/* ============================================
   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 (.hidden_9619) is a descendant of
   .lower-d500 (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.header-up-3d66 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".background-ab70" 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.solid_6f57 so it can't cause
   horizontal overflow anyway. */
.fixed_118f,
.link-first-5561,
.popup_65af,
.carousel-rough-ecc3,
.status_fresh_a4f5,
.current-04d2,
.icon-liquid-fa6c,
.card-under-98f3,
.element_left_3f05,
.accordion_action_2cf6,
.disabled-lite-e57e {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .paragraph_medium_ce4f {
    padding: 8px 0;
  }
  
  .easy-ec19 img {
    height: 28px;
    width: auto;
  }
  
  .widget_60be {
    display: none !important;
  }
  
  .south_7688 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .south_7688 svg {
    width: 14px;
    height: 14px;
  }
  
  .border_gas_b0ea {
    padding: 6px;
  }
  
  .advanced-2cdf {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .popup_65af,
  .link-first-5561,
  .carousel-rough-ecc3,
  .status_fresh_a4f5,
  .component-5a2c,
  .shadow-silver-4346,
  .north_39eb,
  .narrow-cc64,
  .center_77fc,
  .picture_tall_da3c,
  .action-deaf,
  .accordion_1fdd {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .primary_27b2,
  .outer-e1f9 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .carousel_d09f,
  .east-860d,
  .old-8630,
  .pink-83b4,
  .gradient-orange-c7f3,
  .logo-e19d,
  .footer-out-1137 {
    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 */
  .current-8817,
  .logo_out_4df0,
  .tiny-5e53,
  .border_385a,
  .table-easy-3b93 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .out-75ed,
  .header_east_eed3,
  .lite-0859,
  .shade-07d2 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .shadow_complex_bb33,
  .black-66d3 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .chip_short_4f45,
  .liquid_6b04,
  .tag_glass_5c5c,
  .card_huge_9a67 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .pattern_c317,
  .down_c1d9,
  .hover_fresh_5856,
  .photo-iron-779f,
  .east-a867,
  .full-3d67 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .current-8817,
  .logo_out_4df0,
  .border_385a {
    max-width: none !important;
  }
  
  .background-ab70 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .out-75ed {
    font-size: 1.5rem !important;
  }
  
  .header_east_eed3 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .form_in_e690,
  .sidebar_2395 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .lite-0859 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .modal-cool-8877 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .hidden-c5de {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .current-8817,
  .border_385a {
    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: 9cf7 */
.ghost-box-s4 {
  padding: 0.4rem;
  font-size: 13px;
  line-height: 1.2;
}
