/* ============================================
   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 (.pagination-basic-d931) is a descendant of
   .lower_11e0 (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.silver-7df9 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".column_huge_4eef" 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.table_386f so it can't cause
   horizontal overflow anyway. */
.paper_2b89,
.hero_a203,
.section-tall-ea5a,
.bright_4e91,
.alert_lower_8857,
.input-top-7430,
.focused_b273,
.active-5bce,
.pro-986b,
.gallery-4086,
.sort_2825 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .plasma-6a1a {
    padding: 8px 0;
  }
  
  .dirty-78b8 img {
    height: 28px;
    width: auto;
  }
  
  .fluid_497c {
    display: none !important;
  }
  
  .steel_2a2d {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .steel_2a2d svg {
    width: 14px;
    height: 14px;
  }
  
  .media-7cda {
    padding: 6px;
  }
  
  .status-606d {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .section-tall-ea5a,
  .hero_a203,
  .bright_4e91,
  .alert_lower_8857,
  .element-active-e221,
  .texture_plasma_f27d,
  .frame-8aca,
  .middle-820f,
  .item-6775,
  .new_6dd0,
  .content-focused-c8b6,
  .motion_5589 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .outline-5521,
  .accent_128b {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .footer_93aa,
  .mini-9b0f,
  .silver-58c1,
  .easy-6252,
  .header_white_d5a3,
  .pro_f47e,
  .silver_8ae6 {
    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 */
  .iron-f4f9,
  .light_6f65,
  .gallery-old-c365,
  .header_b358,
  .item-down-480b {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .heading_first_bd07,
  .hover_thick_d25e,
  .overlay_small_825f,
  .avatar-3c0f {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .popup_1dc5,
  .east_a8e7 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .next-1a16,
  .dark_9d95,
  .accent_current_fb25,
  .filter-4205 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .upper-cde0,
  .shade_gas_e51c,
  .element_6bad,
  .under-0b73,
  .right_7efa,
  .orange-c993 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .iron-f4f9,
  .light_6f65,
  .header_b358 {
    max-width: none !important;
  }
  
  .column_huge_4eef {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .heading_first_bd07 {
    font-size: 1.5rem !important;
  }
  
  .hover_thick_d25e {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .pagination_black_e049,
  .modal-slow-99ee {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .overlay_small_825f {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .active-full-745b {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .accordion-a0f9 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .iron-f4f9,
  .header_b358 {
    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: 882c */
.shadow-element-z8 {
  padding: 0.4rem;
  font-size: 11px;
  line-height: 1.2;
}
