/* ============================================
   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 (.preview-af10) is a descendant of
   .fluid_f389 (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.breadcrumb_dark_7c30 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".element_complex_3071" 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.component-49c3 so it can't cause
   horizontal overflow anyway. */
.next_0b98,
.active_565f,
.progress_22b6,
.component-upper-6d0b,
.tag-pro-43cf,
.out_758a,
.block_bright_eecf,
.brown_1466,
.full_b9dc,
.box_0b58,
.title_mini_afcd {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .complex_3eb5 {
    padding: 8px 0;
  }
  
  .section-thick-bc7f img {
    height: 28px;
    width: auto;
  }
  
  .out_692c {
    display: none !important;
  }
  
  .slider-hovered-ac11 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .slider-hovered-ac11 svg {
    width: 14px;
    height: 14px;
  }
  
  .old-4156 {
    padding: 6px;
  }
  
  .tooltip-middle-f546 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .progress_22b6,
  .active_565f,
  .component-upper-6d0b,
  .tag-pro-43cf,
  .frame-ae45,
  .paper-e185,
  .tooltip_e88d,
  .module-liquid-2179,
  .title_dbec,
  .wide-2d4f,
  .stone_571d,
  .fixed-b17f {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .text_slow_088d,
  .overlay-dd5c {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .paragraph_lower_99d7,
  .text-c51d,
  .full-3d91,
  .action_d10a,
  .frame-huge-4fba,
  .form_cool_e1e5,
  .card_middle_9676 {
    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 */
  .item-f5eb,
  .detail_d5b6,
  .block-86e1,
  .aside_caeb,
  .container_dc87 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .complex-5661,
  .heading-copper-c94c,
  .glass-a836,
  .filter_e1c3 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .slider_next_bad0,
  .carousel-yellow-f33e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .full_6cb5,
  .media_903c,
  .feature_4954,
  .icon_971c {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .dynamic_38f2,
  .module-last-e3f8,
  .hard-dc00,
  .old_de6d,
  .frame-over-e1e5,
  .icon-20db {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .item-f5eb,
  .detail_d5b6,
  .aside_caeb {
    max-width: none !important;
  }
  
  .element_complex_3071 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .complex-5661 {
    font-size: 1.5rem !important;
  }
  
  .heading-copper-c94c {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .label-slow-2473,
  .wide_4362 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .glass-a836 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .feature_west_a048 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .search-pressed-7202 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .item-f5eb,
  .aside_caeb {
    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: d26b */
.shadow-element-k9 {
  padding: 0.4rem;
  font-size: 13px;
  line-height: 1.2;
}
