/* ============================================
   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 (.hover_fb55) is a descendant of
   .button-warm-812b (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.large_a11a {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".gallery-9d76" 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.tag_5b80 so it can't cause
   horizontal overflow anyway. */
.breadcrumb-d9e2,
.secondary_02b9,
.pattern_27e1,
.small-6557,
.text_cool_a5df,
.module-e299,
.north-1eb3,
.frame_0d13,
.new-1db4,
.icon-bottom-d6dc,
.image-744b {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .cold-fde5 {
    padding: 8px 0;
  }
  
  .component_02cf img {
    height: 28px;
    width: auto;
  }
  
  .item_a25c {
    display: none !important;
  }
  
  .slider_8bec {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .slider_8bec svg {
    width: 14px;
    height: 14px;
  }
  
  .dirty-7663 {
    padding: 6px;
  }
  
  .input_fluid_ee2f {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .pattern_27e1,
  .secondary_02b9,
  .small-6557,
  .text_cool_a5df,
  .surface-0cc8,
  .alert-21d2,
  .action-84c4,
  .right-dc08,
  .gradient_6900,
  .plasma_3457,
  .chip-d76f,
  .down_2f0a {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .hard-70cd,
  .search_bad8 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .pagination_8faa,
  .active_9d40,
  .search_791e,
  .image-e026,
  .advanced-9d83,
  .filter_fast_b3c6,
  .pagination_6824 {
    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-49bb,
  .popup-lower-a321,
  .icon-f8a7,
  .breadcrumb_2d55,
  .backdrop_f498 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .paragraph_65d3,
  .content_97bf,
  .pressed-b369,
  .progress_north_b5a7 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .label_bronze_1f6f,
  .mask_f948 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .wrapper_d0de,
  .thumbnail-over-d7c2,
  .fluid-ba34,
  .secondary-advanced-353b {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .picture-fb5f,
  .info-cold-b259,
  .pink_0997,
  .title_17c8,
  .static_e440,
  .hero-upper-3c86 {
    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-49bb,
  .popup-lower-a321,
  .breadcrumb_2d55 {
    max-width: none !important;
  }
  
  .gallery-9d76 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .paragraph_65d3 {
    font-size: 1.5rem !important;
  }
  
  .content_97bf {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .frame-up-7c6b,
  .feature-hard-8e32 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .pressed-b369 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .slow-fb3f {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .fixed-f58e {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .fresh-49bb,
  .breadcrumb_2d55 {
    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: aa67 */
.shadow-element-r9 {
  padding: 0.2rem;
  font-size: 14px;
  line-height: 1.2;
}
