/* ============================================
   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 (.label-7105) is a descendant of
   .tag-pressed-5d95 (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.carousel-middle-e116 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".gas-2583" 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.grid-8ca0 so it can't cause
   horizontal overflow anyway. */
.shade_10cb,
.row-d004,
.cold_1cb3,
.green-1fee,
.footer-west-fada,
.button_focused_9cd8,
.frame_iron_e0b6,
.link-cbae,
.search-narrow-84a9,
.alert_lower_d419,
.notification-2a7d {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .white-16c2 {
    padding: 8px 0;
  }
  
  .status-e1e4 img {
    height: 28px;
    width: auto;
  }
  
  .slow_3244 {
    display: none !important;
  }
  
  .black_c010 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .black_c010 svg {
    width: 14px;
    height: 14px;
  }
  
  .frame-paper-23c5 {
    padding: 6px;
  }
  
  .hover_red_7ced {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .cold_1cb3,
  .row-d004,
  .green-1fee,
  .footer-west-fada,
  .secondary-2478,
  .thumbnail-b09b,
  .title-8629,
  .label_tiny_077d,
  .header_liquid_6a46,
  .paragraph-soft-eb5e,
  .description_2f8a,
  .avatar-599d {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .outer_3244,
  .modal-f111 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .row-f176,
  .card-5cef,
  .gallery-03dc,
  .info_7ab6,
  .texture_0699,
  .light-4cb1,
  .prev-9001 {
    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 */
  .outline-d656,
  .box-b06e,
  .tabs-top-0352,
  .notification-green-f936,
  .mini-be4a {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .component_a950,
  .caption-781e,
  .north-3551,
  .stale-1731 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .media-93c3,
  .shade_f00e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .current_8235,
  .input-a7b1,
  .popup-3787,
  .breadcrumb-950c {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .texture-right-6820,
  .description-7177,
  .easy-ea78,
  .tiny_f226,
  .heading_bronze_ec02,
  .header_small_7233 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .outline-d656,
  .box-b06e,
  .notification-green-f936 {
    max-width: none !important;
  }
  
  .gas-2583 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .component_a950 {
    font-size: 1.5rem !important;
  }
  
  .caption-781e {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .video_east_7da6,
  .summary_fluid_7c52 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .north-3551 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .wood_ea6b {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .banner_74f9 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .outline-d656,
  .notification-green-f936 {
    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: 4e5b */
.ghost-box-u1 {
  padding: 0.4rem;
  font-size: 13px;
  line-height: 1.2;
}
