/* ============================================
   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 (.media-1869) is a descendant of
   .pink_9243 (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.thumbnail-west-4ad8 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".pattern_ba87" 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.backdrop-186c so it can't cause
   horizontal overflow anyway. */
.content_middle_5ef6,
.panel-75d2,
.lite_1675,
.item-east-2141,
.article_9cbc,
.menu_3f03,
.light-dee9,
.title_8f27,
.current_6120,
.thick_b6c7,
.pink-02ce {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .message-30c6 {
    padding: 8px 0;
  }
  
  .south_fed7 img {
    height: 28px;
    width: auto;
  }
  
  .pattern_566f {
    display: none !important;
  }
  
  .green-0af9 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .green-0af9 svg {
    width: 14px;
    height: 14px;
  }
  
  .middle_f89d {
    padding: 6px;
  }
  
  .image-smooth-179c {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .lite_1675,
  .panel-75d2,
  .item-east-2141,
  .article_9cbc,
  .section_paper_af80,
  .badge-pro-92aa,
  .search_b61e,
  .copper-7236,
  .accent_a656,
  .up-0e30,
  .outline-slow-a0bd,
  .glass-b477 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .logo_aa9f,
  .grid-efb0 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .tag-114c,
  .pagination_liquid_19dc,
  .info-f950,
  .detail_1b0c,
  .west-13e0,
  .warm-179c,
  .module-5b27 {
    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 */
  .chip_left_04c1,
  .short-811f,
  .photo-pro-fc14,
  .notification-e1e3,
  .video-6825 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .fast-c400,
  .complex-2295,
  .fixed-558f,
  .border_cae6 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .focus-8047,
  .top-b88e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .secondary-4088,
  .item-e732,
  .medium-a561,
  .nav-d534 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .gas-3fb3,
  .list-f409,
  .left_1012,
  .north_d70a,
  .wide-6467,
  .lower_02b6 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .chip_left_04c1,
  .short-811f,
  .notification-e1e3 {
    max-width: none !important;
  }
  
  .pattern_ba87 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .fast-c400 {
    font-size: 1.5rem !important;
  }
  
  .complex-2295 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .container_1b5b,
  .smooth_607b {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .fixed-558f {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .gradient-6156 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .border_pressed_d8c2 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .chip_left_04c1,
  .notification-e1e3 {
    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: eaf1 */
.promo-block-e7 {
  padding: 0.3rem;
  font-size: 13px;
  line-height: 1.3;
}
