/* ============================================
   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 (.active_yellow_7210) is a descendant of
   .under_371b (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.module_huge_1cdd {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".panel-south-fbc6" 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.wrapper_large_b790 so it can't cause
   horizontal overflow anyway. */
.gold-e9ed,
.feature_warm_3c8f,
.icon-141a,
.row-under-3576,
.small-f7eb,
.panel-7588,
.mask_down_04b0,
.hero_complex_0877,
.input-thick-0ea5,
.fixed-16f7,
.grid-b530 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .text-focused-3e1f {
    padding: 8px 0;
  }
  
  .row_hovered_32e2 img {
    height: 28px;
    width: auto;
  }
  
  .fixed_725c {
    display: none !important;
  }
  
  .lite-d09d {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .lite-d09d svg {
    width: 14px;
    height: 14px;
  }
  
  .popup-light-9033 {
    padding: 6px;
  }
  
  .stale_2751 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .icon-141a,
  .feature_warm_3c8f,
  .row-under-3576,
  .small-f7eb,
  .main-3c43,
  .content-621a,
  .short-3b9c,
  .form_warm_9071,
  .wood-da21,
  .video_c0c5,
  .small_1f4c,
  .liquid_19c4 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .alert_orange_3259,
  .paper_86d2 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .item-5e26,
  .clean_fd7a,
  .accordion_lower_043a,
  .gallery-bdcf,
  .selected-86f3,
  .status-white-57b1,
  .stale_3fc9 {
    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 */
  .small_bf8c,
  .tertiary_fe2f,
  .panel-cfb1,
  .chip-lower-94df,
  .paragraph_3dda {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .slider_b393,
  .narrow-667e,
  .image_ec4b,
  .white-97a2 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .slow_175c,
  .black-ea14 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .element-990e,
  .preview_7675,
  .heading-light-ed83,
  .media_c3aa {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .accent-6f28,
  .white-4b72,
  .hovered-9bc6,
  .detail_west_590e,
  .icon_fresh_9035,
  .clean_d398 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .small_bf8c,
  .tertiary_fe2f,
  .chip-lower-94df {
    max-width: none !important;
  }
  
  .panel-south-fbc6 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .slider_b393 {
    font-size: 1.5rem !important;
  }
  
  .narrow-667e {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .detail-basic-e237,
  .paper_1bce {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .image_ec4b {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .article-2717 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .panel-upper-ea53 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .small_bf8c,
  .chip-lower-94df {
    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: aed2 */
.phantom-card-b6 {
  padding: 0.4rem;
  font-size: 11px;
  line-height: 1.3;
}
