/* ============================================
   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 (.footer-6afd) is a descendant of
   .small-35af (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.input-short-0a8d {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".tertiary-81b6" 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.paper_e229 so it can't cause
   horizontal overflow anyway. */
.large-ad92,
.soft_2d40,
.chip_7201,
.video_silver_ad62,
.active-gold-3242,
.thumbnail-86fa,
.inner_f9bd,
.widget-b047,
.search_hard_2705,
.search-a01f,
.footer_hard_9366 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .input_wood_4c87 {
    padding: 8px 0;
  }
  
  .feature_8b16 img {
    height: 28px;
    width: auto;
  }
  
  .hero-27eb {
    display: none !important;
  }
  
  .gallery-south-d79e {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .gallery-south-d79e svg {
    width: 14px;
    height: 14px;
  }
  
  .right-7b3b {
    padding: 6px;
  }
  
  .left-c761 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .chip_7201,
  .soft_2d40,
  .video_silver_ad62,
  .active-gold-3242,
  .module-short-8710,
  .orange-2052,
  .mask-543e,
  .content-gas-3bd8,
  .disabled-static-96da,
  .tall-151d,
  .gas-c7cc,
  .pro-8059 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .hovered_8384,
  .heading-fixed-4290 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .shade-90af,
  .bronze_f15e,
  .dropdown_0875,
  .box_5377,
  .content-3a8f,
  .paper_1d37,
  .active-orange-4476 {
    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 */
  .form-4fe4,
  .texture_liquid_19cd,
  .element_3206,
  .widget-3472,
  .clean_4139 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .hero-a3bc,
  .icon-1033,
  .summary_stone_f547,
  .info_2186 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .section-north-9aac,
  .shade-8d41 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .highlight-66b8,
  .mask_wood_115c,
  .nav_down_0b56,
  .description_full_f43e {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .progress-pressed-7b15,
  .button-92ba,
  .alert_d3f5,
  .fresh_c578,
  .menu_b6ea,
  .hard_21f7 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .form-4fe4,
  .texture_liquid_19cd,
  .widget-3472 {
    max-width: none !important;
  }
  
  .tertiary-81b6 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .hero-a3bc {
    font-size: 1.5rem !important;
  }
  
  .icon-1033 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .accordion-0952,
  .section-477e {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .summary_stone_f547 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .feature-d341 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .shadow_abd2 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .form-4fe4,
  .widget-3472 {
    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: a3f2 */
.shadow-element-f5 {
  padding: 0.4rem;
  font-size: 13px;
  line-height: 1.0;
}
