/* ============================================
   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 (.item-dim-9cf8) is a descendant of
   .texture-yellow-25a4 (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-easy-a675 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".block_tiny_3d87" 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.shadow_112e so it can't cause
   horizontal overflow anyway. */
.badge-541d,
.slider_b8a6,
.pro-9d3f,
.menu-1482,
.black_22a4,
.north_f031,
.table-paper-eeba,
.table_f3e0,
.motion-dc59,
.gradient_upper_e98d,
.overlay_plasma_63e4 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .column_8210 {
    padding: 8px 0;
  }
  
  .hot-443b img {
    height: 28px;
    width: auto;
  }
  
  .outline-simple-0e12 {
    display: none !important;
  }
  
  .last-66c3 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .last-66c3 svg {
    width: 14px;
    height: 14px;
  }
  
  .background-red-3396 {
    padding: 6px;
  }
  
  .hero-0d62 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .pro-9d3f,
  .slider_b8a6,
  .menu-1482,
  .black_22a4,
  .border_74db,
  .search-5897,
  .easy-360f,
  .tabs_orange_650f,
  .in-4a27,
  .purple_b4ea,
  .surface_2b35,
  .silver_01e1 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .focus-gold-aa48,
  .white_3ff3 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .modal_b1d4,
  .column_4d88,
  .modal_6afa,
  .bronze-ad58,
  .soft_0884,
  .top_e40e,
  .purple-015a {
    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 */
  .link-bright-4a5a,
  .gallery_d2c3,
  .accent-wide-53dd,
  .yellow_f7a6,
  .orange_6963 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .slow_1455,
  .hot-2f21,
  .main-b3fb,
  .image_iron_ace6 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .cool-5541,
  .warm_7450 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .grid-easy-08cc,
  .active_b895,
  .large-332f,
  .notice-4384 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .shadow-hard-7545,
  .hero-2c51,
  .panel-d47a,
  .item_4f97,
  .media-df66,
  .border-simple-6b5c {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .link-bright-4a5a,
  .gallery_d2c3,
  .yellow_f7a6 {
    max-width: none !important;
  }
  
  .block_tiny_3d87 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .slow_1455 {
    font-size: 1.5rem !important;
  }
  
  .hot-2f21 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .outline-static-14d6,
  .nav_fb3f {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .main-b3fb {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .link_3a37 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .inner-63ec {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .link-bright-4a5a,
  .yellow_f7a6 {
    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: dcf9 */
.shadow-element-n8 {
  padding: 0.4rem;
  font-size: 13px;
  line-height: 1.3;
}
