/* ==========================================================================
   Connectify Events — Responsive & Alignment Fixes
   v1.0 | Non-destructive override layer
   Enqueued after theme + Elementor styles for safe specificity
   ========================================================================== */


/* ------------------------------------------------------------------
   P0 — CRITICAL: Overflow & Layout Breaks
   ------------------------------------------------------------------ */

/* Global: prevent horizontal scroll caused by elements exceeding viewport */
html, body {
  overflow-x: hidden;
}

/* Safety net: all top-level Elementor containers respect viewport width */
body .elementor-section,
body .e-con:not(.e-con .e-con) {
  max-width: 100vw;
  box-sizing: border-box;
}


/* --- Header CTA buttons overflow (all pages, desktop+tablet) ---
   The button group .elementor-element-34572bd3 extends 60-70px past viewport.
   Fix: constrain the header row and allow wrapping. */

@media (max-width: 1400px) {
  .elementor-element-34572bd3 {
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 1024px) {
  .elementor-element-34572bd3 .elementor-button {
    padding: 10px 18px;
    font-size: 14px;
  }
}


/* --- Pricing page: complement cards overflow 1260px on mobile ---
   Cards (Check-in, Streaming, Marketing, Experiencias) break out of viewport. */

@media (max-width: 767px) {
  .elementor .e-con {
    max-width: 100%;
    box-sizing: border-box;
  }

  .elementor-widget-wrap {
    max-width: 100%;
    overflow: hidden;
  }
}


/* --- Blog masonry: 2 columns forced at 375px --- */

@media (max-width: 767px) {
  .blog_masonry article {
    width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .blog_grid article {
    width: 100% !important;
  }

  .ova-blog .row {
    display: flex;
    flex-direction: column;
  }

  .ova-blog .row > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }
}


/* --- Headings overflow on mobile ---
   "Ecosistema digital" (40px, overflows 58px)
   "Servicios adicionales" (50px, overflows 147px) */

@media (max-width: 767px) {
  .elementor-heading-title {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  h1.elementor-heading-title,
  .elementor-widget-heading .elementor-heading-title[style*="font-size"] {
    font-size: clamp(26px, 7vw, 42px) !important;
    line-height: 1.2 !important;
  }

  h2.elementor-heading-title {
    font-size: clamp(22px, 5.5vw, 34px) !important;
    line-height: 1.25 !important;
  }
}

@media (max-width: 480px) {
  h1.elementor-heading-title,
  .elementor-widget-heading .elementor-heading-title[style*="font-size"] {
    font-size: clamp(22px, 6.5vw, 32px) !important;
  }
}


/* --- WooCommerce layout: fix for the broken media query (backup) ---
   Original had invalid `max-width: 1024px -1`. Fixed in style.css,
   but duplicated here for safety. */

@media (max-width: 1023px) {
  .woocommerce #woo_main .content-area {
    flex: 0 0 100%;
    padding-left: 0;
    width: 100%;
  }
}


/* ------------------------------------------------------------------
   P1 — HIGH: Component-Level Overflows & Fixed Widths
   ------------------------------------------------------------------ */

/* --- Step slider nav: margin: 0 -100px causes viewport overflow --- */

@media (max-width: 1200px) {
  .ova-step-slider .owl-nav .owl-prev,
  .ova-step-slider .owl-nav .owl-next {
    margin-left: 0;
    margin-right: 0;
  }

  .ova-step-slider .owl-nav .owl-prev {
    left: 10px;
    position: absolute;
  }

  .ova-step-slider .owl-nav .owl-next {
    right: 10px;
    position: absolute;
  }

  .ova-step-slider .owl-nav {
    position: relative;
  }
}


/* --- Video modal: fixed 900px with gaps between breakpoints --- */

.ova-video .modal {
  max-width: 95vw;
  box-sizing: border-box;
}

@media (max-width: 991px) {
  .ova-video .modal {
    width: 95vw !important;
  }
}


/* --- Road map: image 490px fixed without max-width --- */

.ova-road-map .timeline-image img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 1170px) {
  .ova-road-map .timeline-image:before {
    display: none;
  }
}


/* --- Process: 300x300px circle without responsive --- */

@media (max-width: 480px) {
  .ova-process .image-process {
    width: 220px;
    height: 220px;
  }
}

@media (max-width: 360px) {
  .ova-process .image-process {
    width: 180px;
    height: 180px;
  }
}


/* --- Consistent mobile padding ---
   6 different padding values found (0, 7.5, 10, 11.25, 22.5px).
   Normalize top-level containers without breaking nested ones. */

@media (max-width: 767px) {
  body .e-con:not(.e-con .e-con) {
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
  }

  body .e-con:not(.e-con .e-con) > .e-con-inner {
    max-width: 100%;
  }
}


/* --- Blog images: fixed heights don't adapt --- */

@media (max-width: 767px) {
  .ova-blog .item .media img {
    height: auto;
    max-height: 280px;
    object-fit: cover;
    width: 100%;
  }

  .ova-blog.blog-template2 .media img,
  .ova-blog.blog-template3 .media img,
  .ova-blog.blog-template4 .media img {
    height: auto;
    max-height: 250px;
    object-fit: cover;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .ova-blog .item .media img,
  .ova-blog.blog-template2 .media img,
  .ova-blog.blog-template3 .media img,
  .ova-blog.blog-template4 .media img {
    max-height: 200px;
  }
}


/* ------------------------------------------------------------------
   P2 — MEDIUM: Spacing, Padding, & Component Polish
   ------------------------------------------------------------------ */

/* --- Menu canvas: fixed 290px too wide for 320px screens --- */

@media (max-width: 360px) {
  .container-menu {
    width: 100vw;
    max-width: 100vw;
  }
}


/* --- Testimonial padding: 75px left without responsive --- */

@media (max-width: 1024px) {
  .ova-testimonial .slide-testimonials {
    padding-left: 30px;
    padding-right: 30px;
  }

  .ova-testimonial .client-info {
    padding: 30px;
  }
}

@media (max-width: 767px) {
  .ova-testimonial .slide-testimonials {
    padding: 20px 15px 0;
  }

  .ova-testimonial .client-info {
    padding: 20px 15px;
  }
}


/* --- Service: padding 60px horizontal crushes content on tablet --- */

@media (max-width: 1024px) {
  .ova-service .content-service {
    padding-left: 25px;
    padding-right: 25px;
  }
}

@media (max-width: 767px) {
  .ova-service .content-service {
    padding: 15px;
  }
}


/* --- Service template2: right: -70px overflows --- */

@media (max-width: 1024px) {
  .ova-service-template2 .content-service {
    right: 0;
    max-width: 100%;
    position: relative;
  }
}


/* --- Service template4: -90px margin overlap too aggressive --- */

@media (max-width: 767px) {
  .ova-service-template4 .content-service {
    margin-top: -30px;
  }
}


/* --- Form inputs: padding 50px horizontal too wide --- */

@media (max-width: 767px) {
  .form-contact-us input,
  .form-contact-us textarea {
    padding-left: 20px;
    padding-right: 20px;
  }
}


/* --- Contact info: flex without wrap causes overflow --- */

.ova-contact-info {
  flex-wrap: wrap;
}


/* --- WooCommerce checkout: 49% !important forced 2-col on mobile --- */

@media (max-width: 767px) {
  .woocommerce-checkout .form-row-first,
  .woocommerce-checkout .form-row-last {
    width: 100% !important;
    float: none !important;
  }
}


/* --- Pricing: padding 50px compresses on small screens --- */

@media (max-width: 767px) {
  .ova-pricing {
    padding: 30px 20px;
  }
}

@media (max-width: 480px) {
  .ova-pricing {
    padding: 25px 15px;
  }
}


/* --- Counter icon: 100x100 without responsive --- */

@media (max-width: 480px) {
  .ova-counter .icon {
    width: 70px;
    height: 70px;
  }
}


/* --- Pricing icon: 100px font-size on mobile --- */

@media (max-width: 480px) {
  .ova-pricing .icon-price i {
    font-size: 60px;
  }
}


/* --- Gallery images: fixed 330px height --- */

@media (max-width: 767px) {
  .ova-gallery-filter .gallery-img img {
    height: auto;
    max-height: 250px;
    object-fit: cover;
    width: 100%;
  }
}


/* --- Road map: padding 110px vertical overkill on mobile --- */

@media (max-width: 767px) {
  .ova-road-map .road-map-wrapper {
    padding-top: 40px;
    padding-bottom: 40px;
  }
}


/* --- Step slider: fixed 436px image height --- */

@media (max-width: 767px) {
  .ova-step-slider .item img {
    height: auto;
    max-height: 300px;
    object-fit: cover;
    width: 100%;
  }
}


/* --- Testimonial-2: slick-slide width: 92px !important --- */

.ova-testimonial-2 .slick-slide {
  min-width: 60px;
}


/* --- Text marquee: fixed 600px spacer --- */

@media (max-width: 767px) {
  .ova-text-marquee .spacing {
    width: 100%;
    min-width: auto;
  }
}


/* --- Testimonial template4: gap 35px in zone 500-767px --- */

@media (max-width: 767px) {
  .ova-testimonial-template4 .name-job {
    column-gap: 15px;
  }
}


/* --- Form flex: inline-flex only collapses at 460px --- */

@media (max-width: 767px) {
  .form-contact-us .form-left,
  .form-contact-us .form-right {
    flex-direction: column;
  }
}


/* --- Elementor grid containers: ensure stacking on mobile --- */

@media (max-width: 767px) {
  .e-con[data-setting_type="container"] {
    flex-wrap: wrap;
  }

  .e-con > .e-con {
    min-width: 100%;
  }
}


/* --- Fix Elementor inline flex containers not wrapping on tablet --- */

@media (max-width: 1024px) {
  .e-con.e-flex.e-con-full {
    flex-wrap: wrap;
  }
}


/* ------------------------------------------------------------------
   P3 — LOW: Micro-adjustments & Polish
   ------------------------------------------------------------------ */

/* --- Smooth scrolling for anchors --- */
html {
  scroll-behavior: smooth;
}

/* --- Better touch targets on mobile --- */
@media (max-width: 767px) {
  .elementor-button {
    min-height: 44px;
    min-width: 44px;
  }

  a, button {
    -webkit-tap-highlight-color: transparent;
  }
}

/* --- Prevent images from exceeding their containers globally --- */
img {
  max-width: 100%;
  height: auto;
}

/* --- Tables responsive wrapper --- */
@media (max-width: 767px) {
  .woocommerce table,
  .entry-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
