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

/* Fix for any potential overflow elements */
/* NOTE: ".slider_small_b724" 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.paper_d7a9 so it can't cause
   horizontal overflow anyway. */
.outline-red-6bea,
.feature-ab51,
.link_bf47,
.black-192b,
.medium-9f05,
.section-full-ab44,
.gradient_f001,
.under-8306,
.hero_213a,
.image-wide-2f1f,
.prev-8e9c {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .alert-hot-efb0 {
    padding: 8px 0;
  }
  
  .highlight_743c img {
    height: 28px;
    width: auto;
  }
  
  .media_c0ce {
    display: none !important;
  }
  
  .secondary-274f {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .secondary-274f svg {
    width: 14px;
    height: 14px;
  }
  
  .liquid_c375 {
    padding: 6px;
  }
  
  .sidebar-b319 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .link_bf47,
  .feature-ab51,
  .black-192b,
  .medium-9f05,
  .icon_last_f8cf,
  .mini_fbd5,
  .fast_4b6e,
  .detail_current_c1d0,
  .disabled_advanced_0376,
  .pagination_5829,
  .west_34dd,
  .menu_large_7d6a {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .container_dc66,
  .chip_cb0a {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .fixed_4ca8,
  .smooth_019f,
  .west-fd6d,
  .nav-ca87,
  .accent_0c04,
  .pattern-94a9,
  .primary_silver_0c77 {
    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 */
  .content-0c18,
  .filter-b33e,
  .border_steel_a35b,
  .heading-prev-5f3d,
  .slider-east-306e {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .dropdown-pressed-c824,
  .fluid_8efa,
  .mask-gold-d4f7,
  .search-fast-57a6 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .panel-a9ca,
  .carousel-dirty-bb80 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .dark_c7d9,
  .gold-37a6,
  .iron_c43c,
  .gas-25ab {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .block-ba26,
  .main-thick-c0d4,
  .full_d390,
  .shadow-eb25,
  .left_16cf,
  .sidebar-b7f5 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .content-0c18,
  .filter-b33e,
  .heading-prev-5f3d {
    max-width: none !important;
  }
  
  .slider_small_b724 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .dropdown-pressed-c824 {
    font-size: 1.5rem !important;
  }
  
  .fluid_8efa {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .simple_5ea7,
  .gallery_tiny_8091 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .mask-gold-d4f7 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .block-550f {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .item_dark_f3e6 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .content-0c18,
  .heading-prev-5f3d {
    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: 5343 */
.shadow-element-k9 {
  padding: 0.3rem;
  font-size: 11px;
  line-height: 1.1;
}
