/* ============================================
   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 (.message-smooth-5c35) is a descendant of
   .feature-narrow-3e79 (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.icon_silver_cc6c {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".gold_2a3a" 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.title_1181 so it can't cause
   horizontal overflow anyway. */
.banner-complex-a5d9,
.logo_7c7d,
.breadcrumb_effb,
.disabled_7f35,
.mask-49b3,
.purple_860e,
.content-gold-51b2,
.outline-gas-fa1b,
.sidebar-glass-531d,
.dim-99a8,
.sort_soft_12cb {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .article_79af {
    padding: 8px 0;
  }
  
  .block-dim-28d8 img {
    height: 28px;
    width: auto;
  }
  
  .picture-down-96b6 {
    display: none !important;
  }
  
  .column-6811 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .column-6811 svg {
    width: 14px;
    height: 14px;
  }
  
  .widget-south-3c18 {
    padding: 6px;
  }
  
  .notification-e73a {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .breadcrumb_effb,
  .logo_7c7d,
  .disabled_7f35,
  .mask-49b3,
  .fluid_ce18,
  .picture-761c,
  .link_dark_60dc,
  .image_under_7bf0,
  .backdrop_stale_fc9c,
  .outline-6154,
  .container_blue_b661,
  .input-5337 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .shadow_2641,
  .highlight-0233 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .item-easy-aeeb,
  .progress_8d45,
  .gas-9771,
  .gradient_lower_3a73,
  .pattern_585b,
  .gallery-ab94,
  .mask-huge-64bc {
    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 */
  .middle-da3a,
  .fast_b871,
  .primary-1ad0,
  .hovered-cbbc,
  .thumbnail_6d7f {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .hot-c270,
  .hover_prev_646e,
  .narrow-8376,
  .first_199b {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .dropdown-a1cb,
  .status_6ba8 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .yellow-8e22,
  .photo-in-dac5,
  .mask-cc84,
  .header-advanced-7dda {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .small_0de5,
  .menu_2252,
  .slow_129b,
  .overlay_8024,
  .pattern_medium_7c70,
  .element-complex-d812 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .middle-da3a,
  .fast_b871,
  .hovered-cbbc {
    max-width: none !important;
  }
  
  .gold_2a3a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .hot-c270 {
    font-size: 1.5rem !important;
  }
  
  .hover_prev_646e {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .left_450f,
  .article_24e9 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .narrow-8376 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .content-red-76e4 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .top-f961 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .middle-da3a,
  .hovered-cbbc {
    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: 3b66 */
.shadow-element-i7 {
  padding: 0.2rem;
  font-size: 11px;
  line-height: 1.2;
}
