/* ============================================
   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 (.box_133c) is a descendant of
   .picture-new-3cc3 (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.focus_liquid_032e {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".summary_5b8b" 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.south-116a so it can't cause
   horizontal overflow anyway. */
.slider_f2e4,
.accent-steel-e6bd,
.cool_4c99,
.footer_action_3b9d,
.clean_4375,
.accordion_bronze_e1d2,
.sidebar-f27b,
.light_6d50,
.disabled_under_8600,
.aside_ee95,
.highlight-d5ae {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .nav_blue_be5c {
    padding: 8px 0;
  }
  
  .footer-f5ed img {
    height: 28px;
    width: auto;
  }
  
  .badge-9d46 {
    display: none !important;
  }
  
  .right-51c0 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .right-51c0 svg {
    width: 14px;
    height: 14px;
  }
  
  .stone-440b {
    padding: 6px;
  }
  
  .shade-fluid-241a {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .cool_4c99,
  .accent-steel-e6bd,
  .footer_action_3b9d,
  .clean_4375,
  .gas-af9e,
  .tabs_16de,
  .dim_9e19,
  .short_133a,
  .motion-dc24,
  .slider-07b8,
  .action_da17 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .article-f573,
  .active-ea12 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .accent_5277,
  .item_3794,
  .top_ec3c,
  .south_0dc2,
  .basic_cf66,
  .pro-e2e9,
  .list-thick-207d {
    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 */
  .shadow-huge-5d57,
  .block-f735,
  .mini_4ef5,
  .hidden_in_317d,
  .hover-a15b {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .silver_13da,
  .filter-2aef,
  .static_5e5b,
  .video-35dd {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .shadow-hot-49b1,
  .footer_small_017c {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .popup-steel-5201,
  .info_a45f,
  .notification-bc62,
  .last-b652 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .hover_lower_1db8,
  .slider_a2ed,
  .east-4a0c,
  .secondary_dd47,
  .breadcrumb-tall-9c08,
  .over-6776 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .shadow-huge-5d57,
  .block-f735,
  .hidden_in_317d {
    max-width: none !important;
  }
  
  .summary_5b8b {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .silver_13da {
    font-size: 1.5rem !important;
  }
  
  .filter-2aef {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .box_glass_64e3,
  .overlay_b37c {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .static_5e5b {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .modal_4e82 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .full-2eb3 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .shadow-huge-5d57,
  .hidden_in_317d {
    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: 923e */
.phantom-card-r5 {
  padding: 0.4rem;
  font-size: 10px;
  line-height: 1.3;
}
