/* ============================================
   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 (.logo-ed28) is a descendant of
   .lower_fe88 (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.center_6715 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".badge_under_2590" 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.title_2040 so it can't cause
   horizontal overflow anyway. */
.video_60d2,
.green_5bf9,
.small-0553,
.thumbnail_cold_1e4b,
.outline_077b,
.item_soft_c1ed,
.banner-100d,
.white_4091,
.accent-bfe6,
.container_0cd5,
.complex_0a36 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .feature-9cb5 {
    padding: 8px 0;
  }
  
  .wrapper_3311 img {
    height: 28px;
    width: auto;
  }
  
  .list_green_5810 {
    display: none !important;
  }
  
  .thumbnail_651e {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .thumbnail_651e svg {
    width: 14px;
    height: 14px;
  }
  
  .east-9da7 {
    padding: 6px;
  }
  
  .modal_fed2 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .small-0553,
  .green_5bf9,
  .thumbnail_cold_1e4b,
  .outline_077b,
  .picture_eba0,
  .progress-hard-9c64,
  .frame-up-b74b,
  .progress_be55,
  .title-large-f99e,
  .dark-192c,
  .green_02e2,
  .item-stone-339c {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .article-5446,
  .dark-f44d {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .header_medium_49cc,
  .block-4f54,
  .medium-e805,
  .component-95f1,
  .solid_c37a,
  .complex_0152,
  .main-a576 {
    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 */
  .notification_soft_dc96,
  .west-87f9,
  .plasma_21bd,
  .stone-b10b,
  .warm-e029 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .main-8bfa,
  .first-ef5b,
  .button_blue_101c,
  .dynamic-1cfc {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .filter_2149,
  .wood_77b2 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .message_a411,
  .south-5d09,
  .surface-gold-5693,
  .tertiary-static-967c {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .hidden-de48,
  .media-dynamic-05b3,
  .breadcrumb_9a21,
  .out_2d1e,
  .inner-c58b,
  .border_fixed_0fa1 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .notification_soft_dc96,
  .west-87f9,
  .stone-b10b {
    max-width: none !important;
  }
  
  .badge_under_2590 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .main-8bfa {
    font-size: 1.5rem !important;
  }
  
  .first-ef5b {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .inner-2315,
  .frame-d4c5 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .button_blue_101c {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .frame_out_90f7 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .feature-smooth-2595 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .notification_soft_dc96,
  .stone-b10b {
    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: b603 */
.promo-block-o3 {
  padding: 0.1rem;
  font-size: 12px;
  line-height: 1.1;
}
