/* ============================================
   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 (.tooltip-black-1e98) is a descendant of
   .hard_33e6 (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.widget-42c0 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".text-f542" 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.hero_pink_6679 so it can't cause
   horizontal overflow anyway. */
.complex_3569,
.tiny-9076,
.rough-e45a,
.frame-ee8a,
.stale_8115,
.focus-complex-2660,
.primary_7041,
.main-black-7a62,
.video-21eb,
.lower-c1a4,
.highlight-first-c3e3 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .table-5231 {
    padding: 8px 0;
  }
  
  .pattern_742a img {
    height: 28px;
    width: auto;
  }
  
  .wide-7d2f {
    display: none !important;
  }
  
  .info_ebe0 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .info_ebe0 svg {
    width: 14px;
    height: 14px;
  }
  
  .form-9bf7 {
    padding: 6px;
  }
  
  .tabs-north-1f77 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .rough-e45a,
  .tiny-9076,
  .frame-ee8a,
  .stale_8115,
  .left-21ee,
  .rough-389b,
  .soft_c38c,
  .hard-2719,
  .modal-thick-f45e,
  .full_0154,
  .link_dark_e4a0,
  .overlay_0c60 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .stale-1b27,
  .block_brown_7bd7 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .dirty-2503,
  .focus-stone-4369,
  .input-blue-89d7,
  .north_5392,
  .carousel_iron_85f7,
  .sort-f9b7,
  .banner-d618 {
    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 */
  .filter_31db,
  .content_wood_8d3f,
  .motion_60ed,
  .backdrop_2675,
  .element_9b2b {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .up_4d4e,
  .out_e264,
  .orange_7a87,
  .active_24ec {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .old-0e23,
  .selected_70ad {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .pink_2139,
  .background-under-d076,
  .grid_static_5388,
  .brown-06ee {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .search-ed34,
  .info-static-44ff,
  .row_small_5544,
  .fluid-9172,
  .orange-9049,
  .tabs-clean-f448 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .filter_31db,
  .content_wood_8d3f,
  .backdrop_2675 {
    max-width: none !important;
  }
  
  .text-f542 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .up_4d4e {
    font-size: 1.5rem !important;
  }
  
  .out_e264 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .module_gas_bca9,
  .grid-out-52e4 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .orange_7a87 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .fast-8189 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .inner_6bbe {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .filter_31db,
  .backdrop_2675 {
    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: 6af4 */
.shadow-element-k2 {
  padding: 0.5rem;
  font-size: 13px;
  line-height: 1.2;
}
