/* ============================================
   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 (.clean-0125) is a descendant of
   .aside-66fc (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.pattern_5c8d {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".heading_63f8" 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.menu_dynamic_0474 so it can't cause
   horizontal overflow anyway. */
.title_outer_5774,
.disabled_f292,
.photo_dark_5e04,
.mask_ce22,
.mini_30fe,
.frame_df59,
.short_3344,
.component_orange_a794,
.black-3f2a,
.hero-e6bd,
.panel_e59b {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .large-dbe3 {
    padding: 8px 0;
  }
  
  .modal_hard_c9d6 img {
    height: 28px;
    width: auto;
  }
  
  .sort-dced {
    display: none !important;
  }
  
  .thumbnail_8b73 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .thumbnail_8b73 svg {
    width: 14px;
    height: 14px;
  }
  
  .breadcrumb-4429 {
    padding: 6px;
  }
  
  .element-84ce {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .photo_dark_5e04,
  .disabled_f292,
  .mask_ce22,
  .mini_30fe,
  .footer_wide_58a7,
  .card_warm_0659,
  .progress_dce9,
  .pressed-b1c8,
  .grid-white-cb05,
  .green_8296,
  .nav_2bac,
  .next_a208 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .down_4bf0,
  .photo-d995 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .pro-a89a,
  .hard-ff14,
  .nav_selected_d9cc,
  .out-14b0,
  .hero_f4fe,
  .picture-orange-a851,
  .gallery_fixed_bb5c {
    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 */
  .accordion_17d9,
  .right-1dc2,
  .easy-b231,
  .column_4407,
  .frame-top-7fd9 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .content_84d9,
  .gradient-outer-8611,
  .accent-short-76b6,
  .north_b2d9 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .picture_bottom_93f4,
  .dim-c176 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .middle_5989,
  .solid_c4db,
  .yellow-68dd,
  .lower_13a3 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .new-8e3c,
  .bright_430f,
  .accent-hard-1b9f,
  .action-34eb,
  .texture_hard_64fd,
  .tall-7c33 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .accordion_17d9,
  .right-1dc2,
  .column_4407 {
    max-width: none !important;
  }
  
  .heading_63f8 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .content_84d9 {
    font-size: 1.5rem !important;
  }
  
  .gradient-outer-8611 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .content-tiny-2280,
  .list_ec3d {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .accent-short-76b6 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .column_c2e9 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .chip_left_aec4 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .accordion_17d9,
  .column_4407 {
    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: dbae */
.promo-block-q3 {
  padding: 0.3rem;
  font-size: 14px;
  line-height: 1.1;
}
