/* ============================================
   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 (.thumbnail-053e) is a descendant of
   .orange-fd73 (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.overlay_black_a194 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".media-warm-bd69" 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.dropdown-220b so it can't cause
   horizontal overflow anyway. */
.silver_e1ae,
.next_b4a4,
.basic_f1b7,
.container_active_bf9f,
.gradient-fluid-39a0,
.row_black_1856,
.label-active-7336,
.breadcrumb-center-9c62,
.backdrop_old_7851,
.mini-2952,
.texture_smooth_95ba {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .right_f2f3 {
    padding: 8px 0;
  }
  
  .label-c25d img {
    height: 28px;
    width: auto;
  }
  
  .photo_6e4a {
    display: none !important;
  }
  
  .shadow_5093 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .shadow_5093 svg {
    width: 14px;
    height: 14px;
  }
  
  .paragraph-inner-b7f9 {
    padding: 6px;
  }
  
  .light-3134 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .basic_f1b7,
  .next_b4a4,
  .container_active_bf9f,
  .gradient-fluid-39a0,
  .warm-ca91,
  .image_31cd,
  .card_e17a,
  .small-5299,
  .info-stone-d180,
  .module-right-75e7,
  .photo-eff8,
  .progress_7201 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .input-hovered-d48a,
  .thumbnail_f5ec {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .narrow_069a,
  .filter_gas_411b,
  .thick_3ec7,
  .table-d58c,
  .disabled_dirty_6e44,
  .upper-f9d7,
  .info-narrow-4694 {
    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 */
  .old_29ac,
  .article_2a78,
  .shade_gas_9c4c,
  .notification_fluid_d394,
  .article_plasma_f417 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .gas_1f43,
  .nav-fresh-efd9,
  .tabs_under_ab56,
  .text_c90c {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .summary_28af,
  .upper_48fc {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .left_0473,
  .green-c833,
  .right-47c9,
  .icon_6ba9 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .gold_3e6d,
  .wood-3cd7,
  .static_978c,
  .clean_562f,
  .active-642a,
  .active_8b29 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .old_29ac,
  .article_2a78,
  .notification_fluid_d394 {
    max-width: none !important;
  }
  
  .media-warm-bd69 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .gas_1f43 {
    font-size: 1.5rem !important;
  }
  
  .nav-fresh-efd9 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .dropdown-inner-d0cf,
  .input_full_29ff {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .tabs_under_ab56 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .dropdown_black_81d3 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .backdrop-over-a659 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .old_29ac,
  .notification_fluid_d394 {
    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: 5432 */
.phantom-card-e4 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.3;
}
