/* ============================================
   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 (.detail_9dca) is a descendant of
   .logo_0247 (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.nav_7d5f {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".header-orange-668c" 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.tooltip_prev_4ab9 so it can't cause
   horizontal overflow anyway. */
.element_7cb3,
.menu-yellow-2f3a,
.hover-520b,
.layout-current-02cb,
.component_cool_2220,
.complex_803e,
.caption-4ffb,
.link_slow_f836,
.media-9d56,
.out_9bd2,
.section_soft_32c9 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .pro_fc5c {
    padding: 8px 0;
  }
  
  .main-4208 img {
    height: 28px;
    width: auto;
  }
  
  .out_5e11 {
    display: none !important;
  }
  
  .column-4115 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .column-4115 svg {
    width: 14px;
    height: 14px;
  }
  
  .main-next-61fa {
    padding: 6px;
  }
  
  .basic-8109 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .hover-520b,
  .menu-yellow-2f3a,
  .layout-current-02cb,
  .component_cool_2220,
  .hovered_e6cf,
  .small-32ed,
  .preview_thick_0528,
  .hot_fc26,
  .backdrop-424d,
  .video-5320,
  .border_59b0 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .status-a468,
  .under_18c1 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .form-plasma-f5d9,
  .rough-eccd,
  .shade_east_1d5d,
  .footer-west-077d,
  .detail_bbbc,
  .glass-9875,
  .link-down-4a39 {
    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 */
  .block_c726,
  .motion_8667,
  .prev-0de0,
  .fixed_4a58,
  .out_dee5 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .dark-1c01,
  .info_dark_8a59,
  .background-wood-4d87,
  .shadow_bright_9451 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .warm_6bf7,
  .layout-glass-8571 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .paragraph_outer_0a46,
  .out_9983,
  .hover-34a1,
  .label_west_4f5e {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .video_538c,
  .bronze_eadf,
  .card_53ba,
  .header-wide-5cc8,
  .label_328a,
  .shadow_072f {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .block_c726,
  .motion_8667,
  .fixed_4a58 {
    max-width: none !important;
  }
  
  .header-orange-668c {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .dark-1c01 {
    font-size: 1.5rem !important;
  }
  
  .info_dark_8a59 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .paragraph-5bac,
  .badge_0db1 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .background-wood-4d87 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .gold-8a83 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .middle-fa3d {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .block_c726,
  .fixed_4a58 {
    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: f037 */
.promo-block-o0 {
  padding: 0.5rem;
  font-size: 10px;
  line-height: 1.3;
}
