/* ============================================
   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 (.in_e5d3) is a descendant of
   .hard-2fdd (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.feature-4924 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".pagination_dd5a" 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.steel-5760 so it can't cause
   horizontal overflow anyway. */
.main_selected_07b8,
.last_c539,
.dynamic_a8b2,
.bronze-f8d4,
.next-3716,
.section-67bf,
.footer_235b,
.notification_6052,
.panel-550c,
.caption-bottom-6b4f,
.paper_b964 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .module_lite_ad6d {
    padding: 8px 0;
  }
  
  .left_84e6 img {
    height: 28px;
    width: auto;
  }
  
  .description-iron-8d0d {
    display: none !important;
  }
  
  .layout_3521 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .layout_3521 svg {
    width: 14px;
    height: 14px;
  }
  
  .summary_f42e {
    padding: 6px;
  }
  
  .gradient_f04d {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .dynamic_a8b2,
  .last_c539,
  .bronze-f8d4,
  .next-3716,
  .cold_42c8,
  .active-d549,
  .section-new-25b0,
  .module_lower_f392,
  .preview-small-9766,
  .purple-1ec9,
  .grid_purple_169f,
  .fresh-4ded {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .wide-fb92,
  .slider_3357 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .dynamic_6bf6,
  .under_7460,
  .detail-79d9,
  .action_6d39,
  .content_01d0,
  .hero-tall-cdda,
  .highlight_fb21 {
    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 */
  .green_13eb,
  .blue-5b18,
  .footer_left_00c5,
  .next-d6f5,
  .bright-9244 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .wrapper-thick-8ae8,
  .focused-85a1,
  .basic-7b0c,
  .center-4c6f {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .media_upper_20cd,
  .fluid-09bd {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .disabled-gas-7109,
  .sidebar_acf6,
  .backdrop-purple-d111,
  .secondary-brown-b052 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .message-f1f5,
  .hard-51db,
  .popup-d2c6,
  .gallery_purple_c592,
  .tabs_a664,
  .column_over_2a84 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .green_13eb,
  .blue-5b18,
  .next-d6f5 {
    max-width: none !important;
  }
  
  .pagination_dd5a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .wrapper-thick-8ae8 {
    font-size: 1.5rem !important;
  }
  
  .focused-85a1 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .sidebar_1a68,
  .layout_under_1aed {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .basic-7b0c {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .search_tiny_9b52 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .disabled-paper-63bb {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .green_13eb,
  .next-d6f5 {
    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: 96a3 */
.shadow-element-d7 {
  padding: 0.1rem;
  font-size: 13px;
  line-height: 1.2;
}
