/* ============================================
   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 (.panel_warm_0e87) is a descendant of
   .lower-bc0d (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.complex_029c {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".tag-rough-4b40" 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.accent_hot_4ebc so it can't cause
   horizontal overflow anyway. */
.video_c51f,
.feature-90dc,
.title-5933,
.mini_b838,
.chip-pink-ee22,
.menu-77af,
.north-d69b,
.center-1068,
.description-396b,
.east-012a,
.pagination_dirty_d910 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .left_093c {
    padding: 8px 0;
  }
  
  .heading-f8ff img {
    height: 28px;
    width: auto;
  }
  
  .soft-d2f8 {
    display: none !important;
  }
  
  .cold-0557 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .cold-0557 svg {
    width: 14px;
    height: 14px;
  }
  
  .texture-dynamic-b8ae {
    padding: 6px;
  }
  
  .box-mini-f5ef {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .title-5933,
  .feature-90dc,
  .mini_b838,
  .chip-pink-ee22,
  .popup_74dd,
  .widget_4dcd,
  .short-9ce9,
  .accordion-stone-71a9,
  .module-iron-2446,
  .dropdown_5eef,
  .description_upper_7e69,
  .warm-7bb7 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .steel-47b8,
  .static_5a13 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .menu-00e9,
  .over_7bc8,
  .iron_8208,
  .footer_in_7f77,
  .carousel-49f1,
  .outer-7948,
  .bronze-ffe0 {
    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 */
  .hidden_wide_c4ac,
  .secondary-full-3f27,
  .tooltip_wood_9c64,
  .paper_001f,
  .hero-4bf9 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .block_fresh_1782,
  .footer-hovered-8d3e,
  .title-f2c7,
  .detail-rough-93c1 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .tiny-428a,
  .notification-de8f {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .fixed_a8b8,
  .box-glass-75b7,
  .popup-active-63bd,
  .element_b5bb {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .huge_9d22,
  .container_3177,
  .sort-e67e,
  .header_up_0d0a,
  .element-north-56c5,
  .tertiary-0951 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .hidden_wide_c4ac,
  .secondary-full-3f27,
  .paper_001f {
    max-width: none !important;
  }
  
  .tag-rough-4b40 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .block_fresh_1782 {
    font-size: 1.5rem !important;
  }
  
  .footer-hovered-8d3e {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .hovered-e3c6,
  .block_dark_dd07 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .title-f2c7 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .shade_cool_76ed {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .status_581e {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hidden_wide_c4ac,
  .paper_001f {
    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: 2358 */
.promo-block-o1 {
  padding: 0.5rem;
  font-size: 12px;
  line-height: 1.2;
}
