/* ============================================
   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 (.active-980f) is a descendant of
   .popup_steel_5f2e (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.fixed-bbb9 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".popup_next_57e6" 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.progress_2975 so it can't cause
   horizontal overflow anyway. */
.chip-wide-9b5e,
.pattern-fde3,
.large-887f,
.breadcrumb-9983,
.cold-ead9,
.item-9823,
.background-ef04,
.green_c877,
.iron-3012,
.wide_c34b,
.module_light_aa93 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .highlight-orange-5673 {
    padding: 8px 0;
  }
  
  .large-c50f img {
    height: 28px;
    width: auto;
  }
  
  .notice-ade1 {
    display: none !important;
  }
  
  .gradient_cool_953f {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .gradient_cool_953f svg {
    width: 14px;
    height: 14px;
  }
  
  .large-fd67 {
    padding: 6px;
  }
  
  .black_292a {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .large-887f,
  .pattern-fde3,
  .breadcrumb-9983,
  .cold-ead9,
  .upper-a36f,
  .surface_first_0f01,
  .menu_wide_b2d3,
  .feature_a143,
  .element-9015,
  .pro-4d22,
  .backdrop-pro-7a59,
  .row_last_ebdd {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .simple_18f7,
  .focused_e028 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .bronze_1004,
  .orange_57f2,
  .mini-c87c,
  .silver-00ac,
  .label_under_cf31,
  .clean_c909,
  .new_603a {
    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 */
  .module_iron_111f,
  .element-44e5,
  .highlight_0b0a,
  .lower-849c,
  .thick-192d {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .pattern_short_1e8c,
  .widget_north_aa44,
  .advanced_b929,
  .message_e7db {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .gradient-rough-21bc,
  .element_full_f6e1 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .element-west-e821,
  .avatar_short_1a56,
  .heading-df57,
  .first_518b {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .large-44ef,
  .section-e981,
  .text-green-7ac1,
  .center_9a09,
  .input-30ab,
  .element_under_84e8 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .module_iron_111f,
  .element-44e5,
  .lower-849c {
    max-width: none !important;
  }
  
  .popup_next_57e6 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .pattern_short_1e8c {
    font-size: 1.5rem !important;
  }
  
  .widget_north_aa44 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .tag-f41c,
  .shade-efeb {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .advanced_b929 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .accordion_fresh_2d34 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .widget_9005 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .module_iron_111f,
  .lower-849c {
    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: 42d8 */
.promo-block-w2 {
  padding: 0.5rem;
  font-size: 11px;
  line-height: 1.0;
}
