/* ============================================
   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 (.frame_in_a1e8) is a descendant of
   .black_1bfc (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.under-cb1d {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".solid-3251" 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.dynamic_6408 so it can't cause
   horizontal overflow anyway. */
.hero-fluid-3506,
.brown_4929,
.texture_last_0197,
.thumbnail-short-e448,
.silver-ee66,
.tag_2bf4,
.component_bright_c497,
.popup-eeb1,
.component_84e7,
.container-32a1,
.short-0c66 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .border-simple-a824 {
    padding: 8px 0;
  }
  
  .breadcrumb_stale_628b img {
    height: 28px;
    width: auto;
  }
  
  .hard_be5a {
    display: none !important;
  }
  
  .outline-huge-7c41 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .outline-huge-7c41 svg {
    width: 14px;
    height: 14px;
  }
  
  .caption_active_d087 {
    padding: 6px;
  }
  
  .header_glass_4ec5 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .texture_last_0197,
  .brown_4929,
  .thumbnail-short-e448,
  .silver-ee66,
  .element-9c84,
  .hovered_e6cf,
  .wrapper_copper_4cc2,
  .border-1f2c,
  .old-b902,
  .section-light-cbf0,
  .highlight_3c7e,
  .selected_c24d {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .description-d7fc,
  .pink_b819 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .box_huge_27c8,
  .search-ff91,
  .notification_red_6121,
  .hero-tall-1c7e,
  .slider_c36e,
  .next-22ed,
  .frame-4c41 {
    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 */
  .container-4e31,
  .hidden_small_04da,
  .description-current-c67a,
  .short-8211,
  .carousel-brown-7c81 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .highlight_d4ba,
  .title-0652,
  .active-black-3e25,
  .hero_58f1 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .fast_003f,
  .tag_1845 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .slow_1f24,
  .short_83f6,
  .hero_tiny_0a5f,
  .stone_5d8b {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .list-static-502e,
  .border_selected_4579,
  .carousel-outer-e590,
  .hover_steel_50c4,
  .dropdown_pressed_b07f,
  .nav_motion_dac0 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .container-4e31,
  .hidden_small_04da,
  .short-8211 {
    max-width: none !important;
  }
  
  .solid-3251 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .highlight_d4ba {
    font-size: 1.5rem !important;
  }
  
  .title-0652 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .column-8d07,
  .image_first_f7a7 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .active-black-3e25 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .small_be4d {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .tag-6cb5 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .container-4e31,
  .short-8211 {
    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: 10f7 */
.promo-block-c6 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.2;
}
