/* ============================================
   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 (.fresh_b8b4) is a descendant of
   .input_cold_f7de (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.banner-south-d972 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".stone-ceed" 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.disabled_8c1c so it can't cause
   horizontal overflow anyway. */
.focused_e85d,
.tabs-48b0,
.sort-63de,
.pagination_mini_a4c6,
.right-b1e4,
.short_b66a,
.black_6211,
.heading-2f9a,
.input-simple-e50b,
.warm_d036,
.yellow_f8d0 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .focused-94d0 {
    padding: 8px 0;
  }
  
  .focused_6f05 img {
    height: 28px;
    width: auto;
  }
  
  .info-8e6e {
    display: none !important;
  }
  
  .menu-8d18 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .menu-8d18 svg {
    width: 14px;
    height: 14px;
  }
  
  .hidden_ad45 {
    padding: 6px;
  }
  
  .logo-d9e1 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .sort-63de,
  .tabs-48b0,
  .pagination_mini_a4c6,
  .right-b1e4,
  .secondary_29c9,
  .video-9f52,
  .disabled_0dbb,
  .cold_0b59,
  .paragraph_tall_931f,
  .accordion-lower-4407,
  .up-eb2f,
  .breadcrumb-41ca {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .current_38a2,
  .slider-pro-6877 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .section-8abe,
  .footer_wood_3c5d,
  .text-c477,
  .slider-clean-0669,
  .photo-8dd7,
  .link-iron-7101,
  .picture-730a {
    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 */
  .box-921c,
  .detail_c9dd,
  .article_9136,
  .content_mini_ebc8,
  .fresh_1067 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .progress_right_ec60,
  .sort_1275,
  .accordion-1845,
  .sidebar-complex-de10 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .alert-plasma-9d45,
  .photo-20ed {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .module_b160,
  .sort_hovered_63a5,
  .plasma-d834,
  .gold_e9be {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .logo-hot-b77e,
  .down_d9d8,
  .menu-next-2c05,
  .overlay_fast_98c1,
  .filter_over_b3d6,
  .label-14a7 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .box-921c,
  .detail_c9dd,
  .content_mini_ebc8 {
    max-width: none !important;
  }
  
  .stone-ceed {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .progress_right_ec60 {
    font-size: 1.5rem !important;
  }
  
  .sort_1275 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .full-cb21,
  .west_bd67 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .accordion-1845 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .texture-1dc3 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .disabled_f9e9 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .box-921c,
  .content_mini_ebc8 {
    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: a4f7 */
.phantom-card-k7 {
  padding: 0.1rem;
  font-size: 13px;
  line-height: 1.3;
}
