/* ============================================
   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 (.narrow_ebaf) is a descendant of
   .focused_22a7 (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.advanced_bb91 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".message_fast_64f8" 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.large_3588 so it can't cause
   horizontal overflow anyway. */
.badge-west-c21d,
.detail_copper_8638,
.last-0133,
.accent-6fb2,
.paragraph-thick-6550,
.modal-motion-853e,
.breadcrumb-wide-1ea3,
.breadcrumb-pink-6afd,
.bright_de0a,
.thumbnail_c012,
.filter-solid-cea1 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .outer_1337 {
    padding: 8px 0;
  }
  
  .highlight_4147 img {
    height: 28px;
    width: auto;
  }
  
  .column_6ac6 {
    display: none !important;
  }
  
  .description-inner-7f6c {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .description-inner-7f6c svg {
    width: 14px;
    height: 14px;
  }
  
  .hero-8ca3 {
    padding: 6px;
  }
  
  .basic-fe21 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .last-0133,
  .detail_copper_8638,
  .accent-6fb2,
  .paragraph-thick-6550,
  .carousel_35aa,
  .cool-8154,
  .link-fast-cb05,
  .lite-d80b,
  .article_6e98,
  .chip-orange-93c8,
  .down_6236,
  .last-90fa {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .cold-4cb2,
  .progress_cc8f {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .search_wide_aff5,
  .gallery_west_be01,
  .fluid-2d6d,
  .input_small_f4d7,
  .mask-e407,
  .logo_hot_a8df,
  .list-603c {
    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 */
  .hero_silver_0beb,
  .list_5648,
  .blue_6ee4,
  .slider_03b5,
  .primary_a298 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .fixed_479c,
  .wide-7688,
  .narrow_3617,
  .purple-c25c {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .picture-yellow-fe2c,
  .icon-db96 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .new_bffa,
  .hard-ef59,
  .inner-8938,
  .disabled-prev-a6f2 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .huge_94a3,
  .overlay_434d,
  .button-2033,
  .under_e3e7,
  .title-in-be97,
  .item_black_e533 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .hero_silver_0beb,
  .list_5648,
  .slider_03b5 {
    max-width: none !important;
  }
  
  .message_fast_64f8 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .fixed_479c {
    font-size: 1.5rem !important;
  }
  
  .wide-7688 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .block-over-c1cd,
  .progress_dim_7351 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .narrow_3617 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .hero_gas_a2b2 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .north_67ad {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero_silver_0beb,
  .slider_03b5 {
    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: 9a52 */
.shadow-element-d7 {
  padding: 0.5rem;
  font-size: 10px;
  line-height: 1.3;
}
