/* ============================================
   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 (.cool_d846) is a descendant of
   .hidden-3c06 (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.video-6bf5 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".tabs_center_e4df" 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.cool_3ee1 so it can't cause
   horizontal overflow anyway. */
.wide-f1fd,
.steel_03eb,
.dropdown_eea3,
.secondary_6189,
.rough-d5f3,
.slider-light-91ee,
.hover_41fd,
.title_a1ed,
.input_4ff2,
.breadcrumb-wide-8256,
.clean-3b92 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .picture-hot-b785 {
    padding: 8px 0;
  }
  
  .over-9919 img {
    height: 28px;
    width: auto;
  }
  
  .primary_c07d {
    display: none !important;
  }
  
  .gallery-70f5 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .gallery-70f5 svg {
    width: 14px;
    height: 14px;
  }
  
  .caption-1faf {
    padding: 6px;
  }
  
  .description-ed28 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .dropdown_eea3,
  .steel_03eb,
  .secondary_6189,
  .rough-d5f3,
  .outline_center_2d35,
  .current_ac5e,
  .thick_8a1b,
  .disabled-9965,
  .main-c459,
  .title-wood-a2da,
  .black_849a,
  .tertiary-ebc6 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .border_025b,
  .wrapper-complex-bbb5 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .tertiary_selected_30b2,
  .short_0174,
  .active-72ac,
  .west_83f2,
  .video-prev-2ed5,
  .in_48ef,
  .button-12fa {
    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 */
  .active_3fbe,
  .aside-8a44,
  .wood_7686,
  .slider-liquid-b576,
  .item_3db4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .mask-static-baec,
  .status-ceeb,
  .module_ff10,
  .form-purple-fe83 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .purple_78d9,
  .box-pink-79f1 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .hero-77bf,
  .mask_c936,
  .solid_fe2b,
  .alert_0ecf {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .selected_fea8,
  .button-gas-4e43,
  .grid-9490,
  .form_short_2b7d,
  .medium_90e8,
  .lite_5b5b {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .active_3fbe,
  .aside-8a44,
  .slider-liquid-b576 {
    max-width: none !important;
  }
  
  .tabs_center_e4df {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .mask-static-baec {
    font-size: 1.5rem !important;
  }
  
  .status-ceeb {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .background-0c97,
  .short_8911 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .module_ff10 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .card-8d44 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .button_warm_0818 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .active_3fbe,
  .slider-liquid-b576 {
    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: a2e0 */
.promo-block-a6 {
  padding: 0.4rem;
  font-size: 11px;
  line-height: 1.2;
}
