/* ============================================
   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 (.form_50a3) is a descendant of
   .modal_tall_37aa (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.alert-gold-f984 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".slider_short_342c" 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.narrow_e876 so it can't cause
   horizontal overflow anyway. */
.nav-c6f5,
.element_baae,
.filter_6f54,
.liquid_e687,
.copper_3947,
.accordion-iron-77f0,
.logo-silver-bc02,
.cold-6eeb,
.accent_12db,
.gradient-4252,
.up-ea61 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .in-0b82 {
    padding: 8px 0;
  }
  
  .inner-06e3 img {
    height: 28px;
    width: auto;
  }
  
  .iron-7ac7 {
    display: none !important;
  }
  
  .purple_1231 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .purple_1231 svg {
    width: 14px;
    height: 14px;
  }
  
  .warm_6797 {
    padding: 6px;
  }
  
  .background_short_ebfe {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .filter_6f54,
  .element_baae,
  .liquid_e687,
  .copper_3947,
  .prev-5ee3,
  .stone_fe92,
  .glass_be16,
  .form-hard-6fb6,
  .section_over_68ad,
  .footer_hovered_6711,
  .filter_a599,
  .tooltip-6e7e {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .light-ac47,
  .cool-cc1e {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .thumbnail-black-066e,
  .dynamic-b8ee,
  .video-over-0729,
  .narrow-58a5,
  .preview_complex_149f,
  .advanced_f166,
  .texture-036e {
    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 */
  .outer-5d62,
  .container_hard_d3bc,
  .hot-186c,
  .banner-focused-f8cc,
  .first-dae6 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .focus-3746,
  .under_46e2,
  .yellow_156d,
  .sort_in_1dc1 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .tertiary-dark-700c,
  .chip_cold_aa24 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .cold_e2a7,
  .shadow-0f05,
  .dirty_e492,
  .shade-9e4c {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .panel_83d0,
  .small_af47,
  .media-8d1c,
  .border_81c2,
  .smooth_10ef,
  .dirty-02f0 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .outer-5d62,
  .container_hard_d3bc,
  .banner-focused-f8cc {
    max-width: none !important;
  }
  
  .slider_short_342c {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .focus-3746 {
    font-size: 1.5rem !important;
  }
  
  .under_46e2 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .tabs-bae9,
  .mask-first-5f8b {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .yellow_156d {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .nav-yellow-3f6b {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .gallery_lower_8fbe {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .outer-5d62,
  .banner-focused-f8cc {
    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: b538 */
.phantom-card-a6 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.2;
}
