/* ============================================
   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 (.chip-stale-34a9) is a descendant of
   .nav-ab81 (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.hard_7266 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".paragraph_516a" 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.east-4a9b so it can't cause
   horizontal overflow anyway. */
.modal_over_a570,
.out-e025,
.description_mini_17c5,
.heading_hot_bb26,
.table-4a12,
.smooth-4728,
.tag-5072,
.message_cool_56c6,
.wrapper-left-8681,
.fluid-48e3,
.container-focused-5458 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .south-eeca {
    padding: 8px 0;
  }
  
  .pro_97aa img {
    height: 28px;
    width: auto;
  }
  
  .dirty_3105 {
    display: none !important;
  }
  
  .nav-12c6 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .nav-12c6 svg {
    width: 14px;
    height: 14px;
  }
  
  .container_yellow_e40f {
    padding: 6px;
  }
  
  .header_light_9a28 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .description_mini_17c5,
  .out-e025,
  .heading_hot_bb26,
  .table-4a12,
  .glass-d985,
  .red_2b7b,
  .top_d23c,
  .heading_hot_8d90,
  .thumbnail-de55,
  .media_under_6185,
  .clean_f5f6 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .hovered_0284,
  .paragraph_dd16 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .input-rough-a36c,
  .slider-black-d46a,
  .motion_01f3,
  .glass_dd19,
  .tabs_narrow_30d6,
  .hover_5f8b,
  .container_fast_fd7c {
    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 */
  .right-96f4,
  .button_small_6fe1,
  .card_hard_eb70,
  .article_a09b,
  .card_808d {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .dark_d8fb,
  .gold_5724,
  .backdrop_current_e926,
  .paper_2677 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .soft-401d,
  .heading-ad68 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .yellow-5770,
  .detail_95ee,
  .menu_right_9a30,
  .dropdown-yellow-c6a3 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .element_iron_63aa,
  .mask_e468,
  .banner_8783,
  .gradient-hard-23d9,
  .large_a90d,
  .mask_c1a0 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .right-96f4,
  .button_small_6fe1,
  .article_a09b {
    max-width: none !important;
  }
  
  .paragraph_516a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .dark_d8fb {
    font-size: 1.5rem !important;
  }
  
  .gold_5724 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .message-bbfc,
  .primary-thick-8923 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .backdrop_current_e926 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .feature_7b72 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .gallery-aa78 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .right-96f4,
  .article_a09b {
    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: b04e */
.phantom-card-g4 {
  padding: 0.1rem;
  font-size: 10px;
  line-height: 1.2;
}
