/* ============================================
   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 (.filter-old-521a) is a descendant of
   .panel_iron_b226 (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.backdrop_gold_2de5 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".card_f8ed" 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.pink-7e55 so it can't cause
   horizontal overflow anyway. */
.backdrop_pro_4b98,
.static-7a3a,
.center_7fe8,
.container-b86a,
.breadcrumb-0873,
.bronze-de4d,
.pattern_b3ab,
.logo_fd24,
.column_f275,
.center-2119,
.feature-out-d32d {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .picture-tall-eae5 {
    padding: 8px 0;
  }
  
  .texture-e566 img {
    height: 28px;
    width: auto;
  }
  
  .simple-b0be {
    display: none !important;
  }
  
  .nav-af43 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .nav-af43 svg {
    width: 14px;
    height: 14px;
  }
  
  .next_9e06 {
    padding: 6px;
  }
  
  .focused_45f1 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .center_7fe8,
  .static-7a3a,
  .container-b86a,
  .breadcrumb-0873,
  .current-aea9,
  .module_slow_26fc,
  .border_small_e585,
  .active_17d0,
  .fresh_7cec,
  .tooltip_slow_9890,
  .grid_selected_611d {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .icon_1431,
  .grid-middle-b2db {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .content_4d91,
  .detail-north-c6ce,
  .primary_fluid_04d0,
  .backdrop-72b1,
  .menu_small_e426,
  .focus-top-a0f1,
  .shade-a36b {
    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 */
  .bottom-830d,
  .panel_cold_eca2,
  .info_prev_4209,
  .advanced-1bb1,
  .footer-new-73b0 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .message_purple_31bd,
  .media-559f,
  .row-34d6,
  .pressed_6f6b {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .shade-iron-3645,
  .soft_348a {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .row_d968,
  .label-outer-a149,
  .solid_b854,
  .basic-8063 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .label-5000,
  .silver-8632,
  .new_964e,
  .medium-0a6f,
  .wrapper-da69,
  .card_8e92 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .bottom-830d,
  .panel_cold_eca2,
  .advanced-1bb1 {
    max-width: none !important;
  }
  
  .card_f8ed {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .message_purple_31bd {
    font-size: 1.5rem !important;
  }
  
  .media-559f {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .element_next_55e8,
  .item_2217 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .row-34d6 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .prev-6724 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .current_e9a8 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .bottom-830d,
  .advanced-1bb1 {
    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: 7ba2 */
.promo-block-f9 {
  padding: 0.1rem;
  font-size: 12px;
  line-height: 1.3;
}
