/* ============================================
   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 (.mini_627a) is a descendant of
   .card-c569 (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.header_basic_db8e {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".blue_287e" 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.slow-b5e2 so it can't cause
   horizontal overflow anyway. */
.item_warm_07e8,
.popup_new_0678,
.thumbnail-steel-5a28,
.feature-d969,
.disabled_3a59,
.widget-hovered-c454,
.background-638b,
.last_3c25,
.progress_focused_e083,
.video-warm-9e16,
.accordion_0e17 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .widget_light_19a9 {
    padding: 8px 0;
  }
  
  .secondary-basic-0051 img {
    height: 28px;
    width: auto;
  }
  
  .focus_gold_dd1d {
    display: none !important;
  }
  
  .hard-7601 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .hard-7601 svg {
    width: 14px;
    height: 14px;
  }
  
  .center_9832 {
    padding: 6px;
  }
  
  .aside_3bd1 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .thumbnail-steel-5a28,
  .popup_new_0678,
  .feature-d969,
  .disabled_3a59,
  .heading_160d,
  .light-7993,
  .caption-purple-aa50,
  .icon-over-e616,
  .narrow-8ad3,
  .left-b2e8,
  .paragraph_fast_4343 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .list-4e1c,
  .grid_static_1e05 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .orange_f341,
  .pink_a075,
  .full-80e8,
  .yellow_b84f,
  .pattern_red_dbf3,
  .list_lower_73d8,
  .warm_3fce {
    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 */
  .tertiary-e8c2,
  .block-hard-2f12,
  .list-85e0,
  .tooltip_under_8cb0,
  .bottom_edbf {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .header_dark_8018,
  .smooth-729a,
  .status_out_3455,
  .secondary_2974 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .soft-e40c,
  .status_active_6ac5 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .backdrop-old-7baa,
  .small-4823,
  .nav_d08d,
  .accent_77ed {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .item_thick_5e0a,
  .list_43c6,
  .active_6619,
  .content-eaf4,
  .column-plasma-f131,
  .hidden-d07d {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .tertiary-e8c2,
  .block-hard-2f12,
  .tooltip_under_8cb0 {
    max-width: none !important;
  }
  
  .blue_287e {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .header_dark_8018 {
    font-size: 1.5rem !important;
  }
  
  .smooth-729a {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .dynamic-6e2b,
  .thumbnail_bright_abaa {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .status_out_3455 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .tiny_6154 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .lower_30d1 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .tertiary-e8c2,
  .tooltip_under_8cb0 {
    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: a55a */
.phantom-card-n5 {
  padding: 0.5rem;
  font-size: 12px;
  line-height: 1.0;
}
