/* ============================================
   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 (.modal-dynamic-c278) is a descendant of
   .thumbnail_7807 (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.message-103a {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".gradient-7d05" 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.pagination-in-5955 so it can't cause
   horizontal overflow anyway. */
.up_270b,
.widget-smooth-df53,
.solid-cb61,
.active-2566,
.static_99b5,
.progress-cf86,
.dropdown_53a8,
.photo-hard-321a,
.shadow-tiny-bda8,
.orange-e4b4,
.element_top_9f15 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .cool-efcf {
    padding: 8px 0;
  }
  
  .input-short-b8a9 img {
    height: 28px;
    width: auto;
  }
  
  .simple-865b {
    display: none !important;
  }
  
  .silver-05c5 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .silver-05c5 svg {
    width: 14px;
    height: 14px;
  }
  
  .label-selected-713b {
    padding: 6px;
  }
  
  .mask_old_ed58 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .solid-cb61,
  .widget-smooth-df53,
  .active-2566,
  .static_99b5,
  .frame_full_742c,
  .shadow-d596,
  .column_71dc,
  .static-3611,
  .preview_09e8,
  .outline-2e61,
  .focus_new_7588,
  .active_d621 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .pink-90e7,
  .wide-ceea {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .plasma-228e,
  .north-c132,
  .menu-iron-875b,
  .text_bottom_3bf9,
  .small-d702,
  .accordion_plasma_25ec,
  .box_f3fc {
    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 */
  .input_c570,
  .nav-stone-1b3c,
  .article_lite_61c5,
  .hard-146f,
  .black-2209 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .wide-dacc,
  .solid-1d08,
  .surface_c35a,
  .breadcrumb_plasma_663b {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .element-50f5,
  .card-warm-98de {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .soft-1ce9,
  .status_8986,
  .solid-43bd,
  .info_4044 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .main-faee,
  .summary_30c4,
  .secondary-ea80,
  .slider-wide-a971,
  .feature_wood_29d9,
  .layout_c86f {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .input_c570,
  .nav-stone-1b3c,
  .hard-146f {
    max-width: none !important;
  }
  
  .gradient-7d05 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .wide-dacc {
    font-size: 1.5rem !important;
  }
  
  .solid-1d08 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .footer-new-ef25,
  .accordion_d660 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .surface_c35a {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .badge_431b {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .pink-303b {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .input_c570,
  .hard-146f {
    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: 67a9 */
.promo-block-b0 {
  padding: 0.2rem;
  font-size: 14px;
  line-height: 1.1;
}
