/* ============================================
   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 (.shade-d348) is a descendant of
   .silver_3f1c (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.layout_basic_81b6 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".info_3874" 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.element-soft-9c47 so it can't cause
   horizontal overflow anyway. */
.notification_over_8fb3,
.north_64c4,
.picture_bottom_d843,
.gallery_09cb,
.over-fb67,
.highlight_over_94ca,
.outer-fc51,
.avatar_28ce,
.mini_0828,
.hidden-center-67df,
.focus-c8c5 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .layout-05be {
    padding: 8px 0;
  }
  
  .article-2755 img {
    height: 28px;
    width: auto;
  }
  
  .black-ec39 {
    display: none !important;
  }
  
  .top_ad78 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .top_ad78 svg {
    width: 14px;
    height: 14px;
  }
  
  .block-up-6d04 {
    padding: 6px;
  }
  
  .menu-purple-c980 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .picture_bottom_d843,
  .north_64c4,
  .gallery_09cb,
  .over-fb67,
  .paragraph-e356,
  .module-liquid-9476,
  .pagination_green_9585,
  .surface-fast-035a,
  .item_light_952b,
  .text_bb0f,
  .paragraph_solid_dc8a,
  .last-6dce {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .banner_5035,
  .modal-c0df {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .hard_28f6,
  .status_upper_05f5,
  .hard_ebe8,
  .tag_solid_350e,
  .video_dd7c,
  .silver-0c4d,
  .status_south_b52f {
    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 */
  .overlay-7546,
  .preview-e24a,
  .prev_f699,
  .hidden-9394,
  .component_huge_6006 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .popup_d17b,
  .input-3505,
  .brown-4bdc,
  .yellow-49bd {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .image_stale_37f2,
  .article-first-c0d6 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .preview_7c18,
  .hard-e6c9,
  .pagination-9932,
  .mask-steel-df06 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .cool_94aa,
  .outline-advanced-6027,
  .gallery-2547,
  .copper_29bb,
  .footer_c0c3,
  .badge-3e32 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .overlay-7546,
  .preview-e24a,
  .hidden-9394 {
    max-width: none !important;
  }
  
  .info_3874 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .popup_d17b {
    font-size: 1.5rem !important;
  }
  
  .input-3505 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .preview-904c,
  .medium_8df6 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .brown-4bdc {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .detail_purple_c52d {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .tooltip_02ae {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .overlay-7546,
  .hidden-9394 {
    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: 3cc1 */
.shadow-element-f3 {
  padding: 0.1rem;
  font-size: 14px;
  line-height: 1.1;
}
