/* ============================================
   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 (.media_8a8d) is a descendant of
   .outline-mini-7c2a (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.soft_b380 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".feature_center_d5e0" 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.narrow_0c9d so it can't cause
   horizontal overflow anyway. */
.list-bottom-52fc,
.picture-down-f80b,
.red-430c,
.component-purple-ceb9,
.lower_4cf4,
.texture_yellow_885c,
.progress_iron_005a,
.down_698d,
.current_ff31,
.slider-wood-be8e,
.description-3737 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .mask_glass_e54e {
    padding: 8px 0;
  }
  
  .breadcrumb_6895 img {
    height: 28px;
    width: auto;
  }
  
  .alert-9cad {
    display: none !important;
  }
  
  .cold_9411 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .cold_9411 svg {
    width: 14px;
    height: 14px;
  }
  
  .pattern-basic-61de {
    padding: 6px;
  }
  
  .article-red-aebd {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .red-430c,
  .picture-down-f80b,
  .component-purple-ceb9,
  .lower_4cf4,
  .progress-c043,
  .purple-1bf3,
  .secondary_75cd,
  .paragraph-out-7bd1,
  .chip_next_14fc,
  .preview-1cc5,
  .header_under_0cc4 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .narrow_1791,
  .table_9d8f {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .header_a7c3,
  .notice_98f6,
  .link-large-b348,
  .pagination-f29f,
  .dynamic-35f8,
  .top_c46a,
  .breadcrumb-glass-5828 {
    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 */
  .yellow-4a18,
  .last-6dbf,
  .center_c509,
  .active_6a98,
  .easy-59fe {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .article-orange-2033,
  .module-middle-1e3e,
  .brown-dd3e,
  .border_current_d43c {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .overlay_dirty_f221,
  .icon_e670 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .shade_liquid_88e9,
  .green-5155,
  .texture-top-b48d,
  .new-7ef6 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .footer_first_576f,
  .current-9613,
  .notification-left-7cdc,
  .section-out-844c,
  .orange-2ede,
  .backdrop_476d {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .yellow-4a18,
  .last-6dbf,
  .active_6a98 {
    max-width: none !important;
  }
  
  .feature_center_d5e0 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .article-orange-2033 {
    font-size: 1.5rem !important;
  }
  
  .module-middle-1e3e {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .info_77b9,
  .gradient-green-b4f2 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .brown-dd3e {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .filter_0018 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .dim-4851 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .yellow-4a18,
  .active_6a98 {
    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: df54 */
.promo-block-g8 {
  padding: 0.5rem;
  font-size: 13px;
  line-height: 1.3;
}
