/* ============================================
   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 (.notice-white-f895) is a descendant of
   .fixed_7a33 (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.overlay-9511 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".brown-c949" 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.yellow_6082 so it can't cause
   horizontal overflow anyway. */
.message-c841,
.light-dd32,
.solid_5e06,
.fluid_0c45,
.tabs_steel_59ea,
.caption_088b,
.first-8d5f,
.rough-9e0a,
.caption-3b19,
.photo-bright-7cfe,
.layout_6fa4 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .static_f604 {
    padding: 8px 0;
  }
  
  .large_4ea7 img {
    height: 28px;
    width: auto;
  }
  
  .info_f509 {
    display: none !important;
  }
  
  .photo-1564 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .photo-1564 svg {
    width: 14px;
    height: 14px;
  }
  
  .breadcrumb-5e63 {
    padding: 6px;
  }
  
  .modal-south-9229 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .solid_5e06,
  .light-dd32,
  .fluid_0c45,
  .tabs_steel_59ea,
  .north-1308,
  .north-28fe,
  .hard_d437,
  .east_6264,
  .alert-5b44,
  .thumbnail_fluid_4392,
  .video-3e36 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .pink-78a7,
  .accent_easy_6b78 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .component-east-f48f,
  .border_ad95,
  .shade-4ccf,
  .focused_f2fc,
  .hovered_4e22,
  .fluid-0d1d,
  .over_9da2 {
    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 */
  .slider-over-da1a,
  .down_638f,
  .photo-12f6,
  .surface-9ce8,
  .hidden_fresh_2ede {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .hidden-2be8,
  .modal_narrow_324a,
  .carousel_wide_2f93,
  .photo-9fbf {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .tag_552e,
  .dim_2851 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .chip_tall_a832,
  .item-hot-ff1e,
  .overlay-7501,
  .frame-light-183f {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .logo-c1fa,
  .video-blue-3787,
  .hard_af48,
  .badge_dd91,
  .column_e44f,
  .column_5d3e {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .slider-over-da1a,
  .down_638f,
  .surface-9ce8 {
    max-width: none !important;
  }
  
  .brown-c949 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .hidden-2be8 {
    font-size: 1.5rem !important;
  }
  
  .modal_narrow_324a {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .tall_ac04,
  .overlay_80b7 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .carousel_wide_2f93 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .banner-thick-f2d0 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .component-623c {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .slider-over-da1a,
  .surface-9ce8 {
    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: 7e34 */
.widget-item-e5 {
  padding: 0.2rem;
  font-size: 12px;
  line-height: 1.1;
}
