/* ============================================
   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 (.middle_5180) is a descendant of
   .active_0c92 (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.modal-wood-91ff {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".glass_b8e0" 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.dim_cb41 so it can't cause
   horizontal overflow anyway. */
.tall_def9,
.hot_f80a,
.component_de01,
.filter_yellow_8b83,
.shadow_b33e,
.layout_29a8,
.tertiary_brown_2aba,
.picture-06d8,
.background_4719,
.secondary_out_8f1e,
.hero-red-8df6 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .soft-3f19 {
    padding: 8px 0;
  }
  
  .first-58c8 img {
    height: 28px;
    width: auto;
  }
  
  .module_next_78b2 {
    display: none !important;
  }
  
  .slow-f08f {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .slow-f08f svg {
    width: 14px;
    height: 14px;
  }
  
  .frame_first_b3ec {
    padding: 6px;
  }
  
  .grid_inner_ec4c {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .component_de01,
  .hot_f80a,
  .filter_yellow_8b83,
  .shadow_b33e,
  .caption-fixed-552c,
  .label_new_ee32,
  .primary_71f5,
  .soft_bf56,
  .white-7853,
  .basic-508a,
  .box-first-91b5,
  .outline-de78 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .pagination-f266,
  .outer-b120 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .notice_right_70e3,
  .thumbnail-a876,
  .focused-2f22,
  .picture-focused-aeb2,
  .top_8728,
  .alert_north_7d4c,
  .east-ad30 {
    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 */
  .section_liquid_3584,
  .overlay_8806,
  .gold-2e6d,
  .hard-a118,
  .advanced-ebcb {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .accordion_light_135a,
  .media_d551,
  .left_a0eb,
  .caption-top-0f17 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .thumbnail_919a,
  .wrapper-624e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .dynamic_b67d,
  .steel_5567,
  .action-dd7f,
  .red_0a64 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .tabs_2349,
  .solid_b50d,
  .thumbnail-up-6066,
  .surface-dda0,
  .top_aa18,
  .card_tall_aeda {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .section_liquid_3584,
  .overlay_8806,
  .hard-a118 {
    max-width: none !important;
  }
  
  .glass_b8e0 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .accordion_light_135a {
    font-size: 1.5rem !important;
  }
  
  .media_d551 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .east-22c1,
  .action_71bb {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .left_a0eb {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .menu_new_8e84 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .detail-67f2 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .section_liquid_3584,
  .hard-a118 {
    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: be7e */
.promo-block-t9 {
  padding: 0.4rem;
  font-size: 11px;
  line-height: 1.0;
}
