/* ============================================
   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 (.layout_c2b1) is a descendant of
   .cold-8a3a (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.accordion_bd37 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".item_9ab8" 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.detail-e984 so it can't cause
   horizontal overflow anyway. */
.panel-soft-3c7d,
.last-82a4,
.notice-6f8c,
.card_hard_af51,
.fluid_9f69,
.column_under_ab54,
.main_47d2,
.section_8649,
.tertiary-cbf6,
.fixed_97f6,
.glass_8654 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .smooth_9121 {
    padding: 8px 0;
  }
  
  .hot_ec78 img {
    height: 28px;
    width: auto;
  }
  
  .hover_d298 {
    display: none !important;
  }
  
  .dropdown-top-3392 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .dropdown-top-3392 svg {
    width: 14px;
    height: 14px;
  }
  
  .section_6efc {
    padding: 6px;
  }
  
  .frame_84d3 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .notice-6f8c,
  .last-82a4,
  .card_hard_af51,
  .fluid_9f69,
  .chip-hard-5bbd,
  .overlay_f89d,
  .menu_center_8e9d,
  .title_d9b5,
  .tooltip_acb9,
  .dropdown_black_ba37,
  .button-tall-7ef1,
  .mini-8533 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .notification-orange-26b0,
  .heading_copper_efd2 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .image-gold-5b1b,
  .progress_028b,
  .popup_in_f0e0,
  .smooth-300b,
  .notification-60e9,
  .white-607b,
  .frame-red-9c61 {
    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 */
  .stone-638b,
  .text_south_4493,
  .sidebar-pink-59ea,
  .active-1f73,
  .badge_608b {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .basic_2e28,
  .container_yellow_206d,
  .caption_lower_fda3,
  .shadow-fc28 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .layout_da4a,
  .tiny_e8a4 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .filter_tiny_cece,
  .chip-5433,
  .media_old_1f06,
  .east_fa04 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .title_c91e,
  .shadow-318c,
  .heading_tiny_1ea3,
  .breadcrumb_ade5,
  .border_ccd8,
  .picture-complex-de95 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .stone-638b,
  .text_south_4493,
  .active-1f73 {
    max-width: none !important;
  }
  
  .item_9ab8 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .basic_2e28 {
    font-size: 1.5rem !important;
  }
  
  .container_yellow_206d {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .brown_e080,
  .column_cf7f {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .caption_lower_fda3 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .down-35d1 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .article_d74a {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .stone-638b,
  .active-1f73 {
    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: ff12 */
.promo-block-l7 {
  padding: 0.4rem;
  font-size: 13px;
  line-height: 1.1;
}
