/* ============================================
   CRITICAL MOBILE FIXES
   Additional layer to ensure perfect mobile display
   ============================================ */

/* Prevent horizontal scroll at all costs */
html {
  width: 100%;
  scroll-behavior: smooth;
  /* NO position:relative - it breaks sticky! */
  /* NO overflow-x here either - mixed with body's overflow-x: hidden
     it makes <html> its own scroll container and breaks sticky too! */
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  /* NO position:relative - it breaks sticky! */
}

/* Ensure all major containers respect viewport */
/* NOTE: "nav" is intentionally excluded here. Giving a <nav> element
   overflow-x: hidden makes its overflow-y auto-compute to "auto" (per the
   CSS overflow spec), turning it into a clipping/scroll container. Since
   the header's dropdown submenu (.tertiary-active-38a5) is a descendant of
   .black_8419 (a <nav>), it was getting clipped and forced into a tiny
   internal scrollbar instead of opening naturally below the nav link. */
main,
section,
article,
footer {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header must NOT have max-width restriction for sticky to work */
header.right_f730 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".dropdown-253b" is intentionally excluded here for the same reason as
   "nav" above — the header's <div class="container"> wraps the nav and
   must not clip the dropdown submenu with an auto-computed overflow-y.
   It's already width-capped via max-width in style.logo-complex-a630 so it can't cause
   horizontal overflow anyway. */
.fixed-9d72,
.wood-3ae3,
.pattern-soft-bb82,
.complex_2a52,
.filter-bdbc,
.gallery_5afb,
.hot_d52c,
.shadow_fluid_ce44,
.accordion-old-b7bc,
.breadcrumb-action-94b9,
.image_eab4 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .element_c151 {
    padding: 8px 0;
  }
  
  .nav-glass-5d24 img {
    height: 28px;
    width: auto;
  }
  
  .focus_gas_0c11 {
    display: none !important;
  }
  
  .hover_out_8619 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .hover_out_8619 svg {
    width: 14px;
    height: 14px;
  }
  
  .feature_bottom_20e6 {
    padding: 6px;
  }
  
  .main-ce78 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .pattern-soft-bb82,
  .wood-3ae3,
  .complex_2a52,
  .filter-bdbc,
  .fresh-ee5b,
  .soft_463a,
  .gallery-b7ba,
  .slider-bright-c953,
  .overlay_gold_2ca2,
  .under_285c,
  .table_bottom_ad8e,
  .panel-81d3 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .list-f22f,
  .next-f57f {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .disabled-huge-2cf5,
  .mask_6960,
  .basic-66e5,
  .mini_a26f,
  .next_fcc3,
  .dim_b28f,
  .shade_green_6eea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  /* Ensure images are responsive */
  img,
  svg,
  picture {
    max-width: 100% !important;
    height: auto !important;
  }
  
  /* Better padding for mobile */
  .full-87d7,
  .hard_a18b,
  .element-227a,
  .form_aeca,
  .fast-c4df {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .hard_61b7,
  .badge_next_8ce8,
  .detail_stale_0b14,
  .north_f005 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .footer_50fc,
  .dark_f6e6 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .column_7514,
  .nav-inner-9ee1,
  .video-474d,
  .highlight_0d4c {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .rough_7861,
  .tiny-dee4,
  .text_d467,
  .aside_8971,
  .carousel-f4b6,
  .banner_9eae {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .full-87d7,
  .hard_a18b,
  .form_aeca {
    max-width: none !important;
  }
  
  .dropdown-253b {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .hard_61b7 {
    font-size: 1.5rem !important;
  }
  
  .badge_next_8ce8 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .hero-9cd4,
  .badge_c461 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .detail_stale_0b14 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .outline-paper-2dce {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .secondary-f499 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .full-87d7,
  .form_aeca {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
}

/* iPhone X and notch devices */
@supports (padding: max(0px)) {
  body {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
}

/* css-noise: 1407 */
.phantom-card-h8 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.0;
}
