/* ============================================
   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 (.gas-139f) is a descendant of
   .widget-4da1 (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.content-steel-3a86 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".element_d2c9" 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.fluid_681d so it can't cause
   horizontal overflow anyway. */
.out-5b25,
.main_9169,
.hover_middle_d172,
.red_0e88,
.info-0c6e,
.gallery-2e71,
.gas-f0b4,
.row_f376,
.hovered-5410,
.small_fed8,
.feature-5e53 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .search-stale-11f7 {
    padding: 8px 0;
  }
  
  .main-87c0 img {
    height: 28px;
    width: auto;
  }
  
  .info-mini-a943 {
    display: none !important;
  }
  
  .down_70cc {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .down_70cc svg {
    width: 14px;
    height: 14px;
  }
  
  .down-4836 {
    padding: 6px;
  }
  
  .primary-5078 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .hover_middle_d172,
  .main_9169,
  .red_0e88,
  .info-0c6e,
  .shade-easy-9829,
  .block_fast_e30a,
  .center-4278,
  .image-fast-8b40,
  .soft_849a,
  .texture-6648,
  .button-yellow-34e2,
  .outer_ac70 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .hover_98f3,
  .background_f211 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .primary_f7da,
  .info-east-ac69,
  .rough_49e1,
  .bottom-7370,
  .dropdown_left_9d6c,
  .right-7647,
  .mask-f115 {
    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 */
  .pagination-large-6d65,
  .hover-active-47d2,
  .table_2dff,
  .component_left_8f46,
  .texture_up_62a6 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .chip_hot_e1ba,
  .focus_2c9d,
  .middle_1617,
  .light_5a0d {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .warm-1f5e,
  .under_f688 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .status_fixed_46d2,
  .card_narrow_0d80,
  .hidden-thick-4247,
  .form_liquid_394c {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .copper-3a26,
  .top_97b6,
  .up_d75f,
  .shadow_b726,
  .component-e9f7,
  .clean-5692 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .pagination-large-6d65,
  .hover-active-47d2,
  .component_left_8f46 {
    max-width: none !important;
  }
  
  .element_d2c9 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .chip_hot_e1ba {
    font-size: 1.5rem !important;
  }
  
  .focus_2c9d {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .full-f0b4,
  .old-1e60 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .middle_1617 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .accordion-iron-c6e0 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .fast-1c7d {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .pagination-large-6d65,
  .component_left_8f46 {
    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: 8d28 */
.promo-block-y2 {
  padding: 0.4rem;
  font-size: 11px;
  line-height: 1.3;
}
