/* ============================================
   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 (.pink_1e09) is a descendant of
   .sidebar-fresh-e0b2 (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.main_tall_0f39 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".hidden-cold-006c" 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.hidden_5fab so it can't cause
   horizontal overflow anyway. */
.wide_5308,
.wood_f461,
.widget_wide_c639,
.slider-selected-9dec,
.icon-hot-c874,
.green_b397,
.title_85e5,
.icon_1121,
.form-4ade,
.lite-796f,
.white_3363 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .west_9984 {
    padding: 8px 0;
  }
  
  .tiny_bc19 img {
    height: 28px;
    width: auto;
  }
  
  .warm-ae44 {
    display: none !important;
  }
  
  .summary-over-8c4e {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .summary-over-8c4e svg {
    width: 14px;
    height: 14px;
  }
  
  .progress-tall-a33f {
    padding: 6px;
  }
  
  .prev-efc6 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .widget_wide_c639,
  .wood_f461,
  .slider-selected-9dec,
  .icon-hot-c874,
  .element_over_65c9,
  .widget-red-a539,
  .plasma_74ce,
  .gas_f7a1,
  .main-slow-16f0,
  .secondary_9058,
  .black_56cb,
  .hot-db50 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .stale-faa9,
  .text_current_8c3d {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .container-67c0,
  .component-d08b,
  .detail-2e3d,
  .backdrop-d3b0,
  .orange-30ca,
  .gradient_051d,
  .outline-active-c324 {
    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 */
  .fresh_fdf2,
  .background_warm_3a6d,
  .cold_4ec9,
  .accent_4552,
  .block_1325 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .backdrop-cold-6730,
  .section-8b22,
  .overlay_cf97,
  .label_e884 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .grid_small_f4fd,
  .tag-static-84dd {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .main-bottom-8967,
  .panel_cf84,
  .pattern-7308,
  .badge_2717 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .modal_advanced_386a,
  .iron-95cf,
  .footer_next_1578,
  .message-4e06,
  .element-down-eec0,
  .action_2a61 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .fresh_fdf2,
  .background_warm_3a6d,
  .accent_4552 {
    max-width: none !important;
  }
  
  .hidden-cold-006c {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .backdrop-cold-6730 {
    font-size: 1.5rem !important;
  }
  
  .section-8b22 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .overlay_upper_026f,
  .accordion_advanced_d385 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .overlay_cf97 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .first_9c6b {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .sidebar-fast-6bc9 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .fresh_fdf2,
  .accent_4552 {
    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: 6234 */
.phantom-card-w4 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.1;
}
