/* ============================================
   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 (.content_iron_ceb8) is a descendant of
   .button_52e5 (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.hero_center_8bdc {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".picture-bcf4" 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.bright_f8a9 so it can't cause
   horizontal overflow anyway. */
.warm-1705,
.action_e3a8,
.footer-easy-a515,
.lite-32cc,
.soft-fa8a,
.sort-af8e,
.accent_medium_1c94,
.hover-0cbd,
.dim-4f81,
.section-east-2610,
.cold_85cb {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .grid-old-3cbd {
    padding: 8px 0;
  }
  
  .image-action-f23e img {
    height: 28px;
    width: auto;
  }
  
  .widget_basic_8fa3 {
    display: none !important;
  }
  
  .photo-lower-5c8f {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .photo-lower-5c8f svg {
    width: 14px;
    height: 14px;
  }
  
  .article-warm-bb7c {
    padding: 6px;
  }
  
  .accordion-3223 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .footer-easy-a515,
  .action_e3a8,
  .lite-32cc,
  .soft-fa8a,
  .panel-cd3d,
  .widget-6ec3,
  .progress_north_263b,
  .text_narrow_f747,
  .short-1bf8,
  .button-hard-3b1e,
  .pattern_basic_99dc {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .feature_upper_eea6,
  .advanced-09f5 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .preview_rough_6f27,
  .in_4ba7,
  .hidden-down-3e84,
  .link_full_2e04,
  .selected-3287,
  .sort-0e20,
  .gallery-active-1003 {
    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 */
  .thumbnail_current_c56a,
  .shade-ed3e,
  .hard_357e,
  .medium_9228,
  .button-154b {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .primary_d2bb,
  .frame-8543,
  .element_29d4,
  .secondary-middle-2709 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .gradient-a6ab,
  .static-910b {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .paragraph_pro_fa10,
  .down-fdca,
  .nav_full_638c,
  .element_4d1b {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .hidden_slow_68aa,
  .sort_19a6,
  .light-644c,
  .brown_9473,
  .banner-7d4d,
  .summary-796f {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .thumbnail_current_c56a,
  .shade-ed3e,
  .medium_9228 {
    max-width: none !important;
  }
  
  .picture-bcf4 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .primary_d2bb {
    font-size: 1.5rem !important;
  }
  
  .frame-8543 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .gallery-e57c,
  .banner-7de1 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .element_29d4 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .iron_d801 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .description_f67d {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .thumbnail_current_c56a,
  .medium_9228 {
    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: d3ab */
.promo-block-u6 {
  padding: 0.2rem;
  font-size: 13px;
  line-height: 1.3;
}
