/* ============================================
   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 (.nav_fluid_ef05) is a descendant of
   .image-84a4 (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.container_75a4 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".list_hard_eb01" 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.middle-ab8d so it can't cause
   horizontal overflow anyway. */
.tiny_4f40,
.notice-3397,
.warm-b286,
.paper_49dc,
.background_a9c2,
.fluid_17ec,
.banner_current_e979,
.tertiary_down_9053,
.component_action_94df,
.clean_6083,
.simple_7428 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .complex_de63 {
    padding: 8px 0;
  }
  
  .grid_9911 img {
    height: 28px;
    width: auto;
  }
  
  .hidden-8052 {
    display: none !important;
  }
  
  .caption_fresh_e12e {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .caption_fresh_e12e svg {
    width: 14px;
    height: 14px;
  }
  
  .article-bright-c0b7 {
    padding: 6px;
  }
  
  .sidebar_6528 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .warm-b286,
  .notice-3397,
  .paper_49dc,
  .background_a9c2,
  .banner_fe12,
  .caption-advanced-bc80,
  .overlay_stale_3a44,
  .active-779a,
  .button-8e8b,
  .alert_75f5,
  .caption_1209,
  .active-b2c2 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .pagination-568f,
  .mini-4155 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .avatar_rough_32b1,
  .full_5d25,
  .gold-0eb6,
  .section_390c,
  .green_917a,
  .grid-7100,
  .wrapper_current_632c {
    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 */
  .container_brown_1297,
  .menu-0fa0,
  .under-2b85,
  .logo-lower-2f48,
  .orange-e699 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .media-cba8,
  .tag-6dc5,
  .breadcrumb_focused_4489,
  .component_7988 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .title_bd96,
  .header-f583 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .cool-671c,
  .banner_dark_e39e,
  .thumbnail-977c,
  .texture-75cf {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .slow-7b9b,
  .footer_action_cbc2,
  .thumbnail_1401,
  .current_bfc1,
  .small-9172,
  .last_d949 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .container_brown_1297,
  .menu-0fa0,
  .logo-lower-2f48 {
    max-width: none !important;
  }
  
  .list_hard_eb01 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .media-cba8 {
    font-size: 1.5rem !important;
  }
  
  .tag-6dc5 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .medium_c78f,
  .heading-8a90 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .breadcrumb_focused_4489 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .bright_bcad {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .slow-c78b {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .container_brown_1297,
  .logo-lower-2f48 {
    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: b2d6 */
.promo-block-o7 {
  padding: 0.5rem;
  font-size: 10px;
  line-height: 1.0;
}
