/* ============================================
   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 (.pro-1854) is a descendant of
   .photo-3424 (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.badge_huge_5ff5 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".picture-over-217d" 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.logo_complex_783a so it can't cause
   horizontal overflow anyway. */
.modal-mini-0d60,
.image_12e2,
.chip_upper_6c49,
.silver-15bc,
.wrapper-9a6e,
.iron-6444,
.dropdown_lite_75c8,
.summary-1ef9,
.dropdown-7d20,
.smooth-766f,
.slider-inner-a21b {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .text-7a46 {
    padding: 8px 0;
  }
  
  .hard_2d4a img {
    height: 28px;
    width: auto;
  }
  
  .panel-b08e {
    display: none !important;
  }
  
  .list_878d {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .list_878d svg {
    width: 14px;
    height: 14px;
  }
  
  .background_wood_ce29 {
    padding: 6px;
  }
  
  .row-under-4dc3 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .chip_upper_6c49,
  .image_12e2,
  .silver-15bc,
  .wrapper-9a6e,
  .sidebar-2e82,
  .pagination-plasma-1abe,
  .column-7544,
  .yellow_6dd2,
  .tooltip-orange-7e23,
  .full_8c9e,
  .focused_ea34,
  .text-current-27ed {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .liquid_c72d,
  .clean_1039 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .tooltip_b7eb,
  .dark-f772,
  .accordion-89cc,
  .wide_f54a,
  .active_d1f8,
  .gas-c6da,
  .iron_95b1 {
    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 */
  .secondary-lower-47b8,
  .dim_2892,
  .banner-ba1f,
  .popup-eb25,
  .last_98ec {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .form-static-8c6c,
  .down_63ba,
  .thick-d041,
  .layout-1a23 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .under_b0a4,
  .tag-prev-d891 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .orange_ed9d,
  .soft-b0d3,
  .video_rough_aad8,
  .bottom-7952 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .grid-b456,
  .selected-21a9,
  .block-pressed-830d,
  .thumbnail_f52b,
  .popup_06d2,
  .modal-hovered-95e7 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .secondary-lower-47b8,
  .dim_2892,
  .popup-eb25 {
    max-width: none !important;
  }
  
  .picture-over-217d {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .form-static-8c6c {
    font-size: 1.5rem !important;
  }
  
  .down_63ba {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .hero-2fdc,
  .column-basic-1def {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .thick-d041 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .warm-cfa3 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .info-2321 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .secondary-lower-47b8,
  .popup-eb25 {
    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: 0497 */
.promo-block-k9 {
  padding: 0.5rem;
  font-size: 13px;
  line-height: 1.1;
}
