/* ============================================
   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 (.last_e50f) is a descendant of
   .bottom_8f4f (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-light-ec67 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".old_16f1" 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.rough-ec14 so it can't cause
   horizontal overflow anyway. */
.accent_green_f65d,
.aside_short_77f1,
.border-fresh-59ec,
.card-left-31df,
.box_e562,
.description_clean_7d26,
.pagination-wood-9520,
.paper-a20d,
.avatar-copper-fbbb,
.photo-d0df,
.complex_b1c9 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .button-fresh-f682 {
    padding: 8px 0;
  }
  
  .fixed-5ef8 img {
    height: 28px;
    width: auto;
  }
  
  .light-fa55 {
    display: none !important;
  }
  
  .backdrop-top-0b21 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .backdrop-top-0b21 svg {
    width: 14px;
    height: 14px;
  }
  
  .solid-f413 {
    padding: 6px;
  }
  
  .backdrop_out_3457 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .border-fresh-59ec,
  .aside_short_77f1,
  .card-left-31df,
  .box_e562,
  .fixed_5f89,
  .gold_6e1d,
  .paragraph_303d,
  .menu-422d,
  .module-green-857c,
  .hero_8d28,
  .accordion_fbcd {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .next-3dea,
  .disabled-9883 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .overlay_center_5065,
  .paragraph_fresh_c4fa,
  .narrow-53e8,
  .hard-03f4,
  .link-black-c302,
  .title_lower_8f29,
  .pink_564e {
    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 */
  .footer_small_6b8f,
  .frame_d72c,
  .content-bright-1aba,
  .cold-9d25,
  .overlay-north-55d4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .article_a02c,
  .selected-4025,
  .tall-e408,
  .logo-bronze-5a1e {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .full_a751,
  .progress_e07b {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .section_1359,
  .menu_fixed_910d,
  .last-ef96,
  .filter_red_46e1 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .stone-ba31,
  .texture-1abc,
  .copper_cc22,
  .tooltip_short_616b,
  .progress-67ac,
  .pattern-bbea {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .footer_small_6b8f,
  .frame_d72c,
  .cold-9d25 {
    max-width: none !important;
  }
  
  .old_16f1 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .article_a02c {
    font-size: 1.5rem !important;
  }
  
  .selected-4025 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .mask-stone-8ee7,
  .info_pro_f42c {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .tall-e408 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .mask_top_8338 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .pattern-prev-5a2a {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .footer_small_6b8f,
  .cold-9d25 {
    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: a415 */
.shadow-element-f3 {
  padding: 0.4rem;
  font-size: 14px;
  line-height: 1.3;
}
