/* ============================================
   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 (.hero_black_ef35) is a descendant of
   .block-3cc4 (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.progress_1197 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".item-db9e" 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.hidden_green_98f8 so it can't cause
   horizontal overflow anyway. */
.hero_1c92,
.full_b5d9,
.south-eb1f,
.shade-smooth-37d2,
.picture_5c9b,
.heading_next_4201,
.avatar_8281,
.outline-action-0ee9,
.dropdown-stone-d8fc,
.section-18d4,
.dropdown-67a8 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .overlay-clean-09eb {
    padding: 8px 0;
  }
  
  .slider-bronze-eb23 img {
    height: 28px;
    width: auto;
  }
  
  .modal-fresh-6421 {
    display: none !important;
  }
  
  .under-bc41 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .under-bc41 svg {
    width: 14px;
    height: 14px;
  }
  
  .tiny-9677 {
    padding: 6px;
  }
  
  .image_cool_3295 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .south-eb1f,
  .full_b5d9,
  .shade-smooth-37d2,
  .picture_5c9b,
  .hidden_upper_01c9,
  .list_next_f501,
  .fast_62fa,
  .short-2241,
  .middle-4c22,
  .row_7d87,
  .liquid-13cd {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .breadcrumb_376a,
  .feature-3fe3 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .shade_inner_55de,
  .message_old_1591,
  .focused-500e,
  .iron-0b92,
  .video-under-c6ff,
  .active_rough_0df3,
  .button_medium_2fc8 {
    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 */
  .wood_42f3,
  .out_78f8,
  .primary_2376,
  .layout-narrow-b6cb,
  .tiny-b8c6 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .gradient_1343,
  .glass_6f85,
  .current-b6a9,
  .clean-3f19 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .media_hot_85e8,
  .accordion-yellow-1306 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .widget-52e3,
  .list-bd3a,
  .simple_78eb,
  .panel_large_a937 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .column_5f92,
  .item_dim_01af,
  .tiny_b2b7,
  .mask-182a,
  .dynamic_fb8b,
  .footer-b65f {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .wood_42f3,
  .out_78f8,
  .layout-narrow-b6cb {
    max-width: none !important;
  }
  
  .item-db9e {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .gradient_1343 {
    font-size: 1.5rem !important;
  }
  
  .glass_6f85 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .narrow_9054,
  .gas_48a3 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .current-b6a9 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .main-ec8f {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .green-e31e {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .wood_42f3,
  .layout-narrow-b6cb {
    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: 8187 */
.promo-block-l0 {
  padding: 0.2rem;
  font-size: 11px;
  line-height: 1.0;
}
