/* ============================================
   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 (.top-ec0e) is a descendant of
   .modal_green_92ea (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.basic_28f3 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".message-8cac" 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.brown_35dd so it can't cause
   horizontal overflow anyway. */
.video_complex_cf8b,
.label-soft-f90b,
.pro-d480,
.banner_dynamic_0058,
.purple_2d73,
.current_28ef,
.tag-wide-f81e,
.glass-5c28,
.out-0078,
.video_165e,
.tooltip_narrow_9d7f {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .smooth-c8dd {
    padding: 8px 0;
  }
  
  .center-5d3a img {
    height: 28px;
    width: auto;
  }
  
  .list_02e2 {
    display: none !important;
  }
  
  .layout_silver_9cbd {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .layout_silver_9cbd svg {
    width: 14px;
    height: 14px;
  }
  
  .form-next-064f {
    padding: 6px;
  }
  
  .heading_next_0259 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .pro-d480,
  .label-soft-f90b,
  .banner_dynamic_0058,
  .purple_2d73,
  .banner_ef21,
  .pink_788e,
  .image_b4db,
  .smooth-e6c4,
  .footer_cool_d5c8,
  .orange_665c,
  .article-93bb,
  .motion_3678 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .bright-def0,
  .white_a402 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .element-over-b5cc,
  .fast-6c41,
  .list-silver-f7dd,
  .thumbnail_fluid_8cb7,
  .lite_4035,
  .main-7d9f,
  .avatar_wood_0f01 {
    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 */
  .iron-8573,
  .breadcrumb_3714,
  .box-8fb5,
  .header_rough_bb89,
  .backdrop_dynamic_bd42 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .orange_2e08,
  .description_206b,
  .background_mini_d9e5,
  .backdrop-a5a9 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .cold-bc0a,
  .gold_bb31 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .fluid_9744,
  .solid-0fb1,
  .backdrop_7534,
  .carousel_bd89 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .feature-473c,
  .block-gas-be36,
  .clean_89cc,
  .container-pro-4eee,
  .chip-6217,
  .backdrop-under-42b2 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .iron-8573,
  .breadcrumb_3714,
  .header_rough_bb89 {
    max-width: none !important;
  }
  
  .message-8cac {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .orange_2e08 {
    font-size: 1.5rem !important;
  }
  
  .description_206b {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .center-d78b,
  .popup-red-9873 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .background_mini_d9e5 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .first-5445 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .pink-65db {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .iron-8573,
  .header_rough_bb89 {
    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: a3fe */
.phantom-card-o8 {
  padding: 0.5rem;
  font-size: 13px;
  line-height: 1.3;
}
