/* ============================================
   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 (.pattern-82e3) is a descendant of
   .backdrop-stale-7038 (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.logo_hard_b5e6 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".cold_35eb" 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.logo_basic_79d9 so it can't cause
   horizontal overflow anyway. */
.summary-8e50,
.tall_86c0,
.input_615a,
.content-ebd5,
.red-f23a,
.pressed-80c7,
.section-up-b5bd,
.brown-a760,
.tertiary-ac29,
.bronze-6bb0,
.paragraph_981f {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .module-8468 {
    padding: 8px 0;
  }
  
  .panel_975b img {
    height: 28px;
    width: auto;
  }
  
  .silver-101e {
    display: none !important;
  }
  
  .logo_soft_89a1 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .logo_soft_89a1 svg {
    width: 14px;
    height: 14px;
  }
  
  .dim_8a73 {
    padding: 6px;
  }
  
  .hero_e10d {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .input_615a,
  .tall_86c0,
  .content-ebd5,
  .red-f23a,
  .input-lite-4af2,
  .breadcrumb-active-77e2,
  .input-black-9ed4,
  .summary_0123,
  .summary_easy_e44d,
  .middle-4090,
  .component_stone_f4da,
  .box-basic-e610 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .stone-03b8,
  .list-afb9 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .active-d7f9,
  .badge_copper_8fdc,
  .footer-basic-3641,
  .image_pink_1a45,
  .gallery-ca42,
  .dark_1585,
  .grid-wide-cdf9 {
    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 */
  .basic_2341,
  .progress_f80b,
  .thick_db3d,
  .form_d130,
  .background-next-a0eb {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .hero_prev_d508,
  .blue-25cd,
  .focus_pink_bf40,
  .simple-1061 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .pro-234c,
  .top_3d59 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .pink_bbeb,
  .message_e841,
  .hidden_7593,
  .dropdown_7294 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .search-1b14,
  .cool-ebd1,
  .brown_72b3,
  .border-0f86,
  .next-b820,
  .static_74cb {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .basic_2341,
  .progress_f80b,
  .form_d130 {
    max-width: none !important;
  }
  
  .cold_35eb {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .hero_prev_d508 {
    font-size: 1.5rem !important;
  }
  
  .blue-25cd {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .accent_d21c,
  .link_white_3346 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .focus_pink_bf40 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .fluid_d91d {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .west_7143 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .basic_2341,
  .form_d130 {
    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: 511f */
.promo-block-e4 {
  padding: 0.1rem;
  font-size: 10px;
  line-height: 1.1;
}
