/* ============================================
   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 (.top_5acb) is a descendant of
   .alert-e3f3 (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.mini-8485 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".sort_last_8b5d" 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.slow_b291 so it can't cause
   horizontal overflow anyway. */
.table-ce93,
.lite_a67d,
.module-east-5abe,
.wrapper-last-f18c,
.carousel-paper-5b75,
.modal_f5f2,
.block-955f,
.hidden-adf9,
.accordion_inner_9871,
.progress_clean_e1e5,
.progress-simple-4daf {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .breadcrumb-7bec {
    padding: 8px 0;
  }
  
  .element_c1a7 img {
    height: 28px;
    width: auto;
  }
  
  .search-f363 {
    display: none !important;
  }
  
  .sidebar-full-bcbe {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .sidebar-full-bcbe svg {
    width: 14px;
    height: 14px;
  }
  
  .icon_short_d5f7 {
    padding: 6px;
  }
  
  .orange-b192 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .module-east-5abe,
  .lite_a67d,
  .wrapper-last-f18c,
  .carousel-paper-5b75,
  .footer_brown_adaa,
  .content_b073,
  .active-last-94ff,
  .chip-iron-c6af,
  .nav-glass-ec94,
  .cold-bfd9,
  .icon-right-3796,
  .tertiary-iron-6530 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .message_center_498f,
  .frame_c4ce {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .disabled_dynamic_dd59,
  .carousel-fe87,
  .steel-1141,
  .heading-smooth-ea0a,
  .icon-gold-8c8f,
  .slider_hovered_54e2,
  .popup-784d {
    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 */
  .out_8317,
  .bronze-8cc5,
  .grid_f5b9,
  .medium_8634,
  .static_d2c3 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .soft-c2ac,
  .slider_94ed,
  .white-b0df,
  .sidebar_a251 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .thumbnail_brown_9809,
  .red-923e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .message_out_1698,
  .paper_c2a4,
  .stale-0490,
  .outline-a729 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .background-dynamic-67fe,
  .carousel-711a,
  .module-wood-58d3,
  .easy_24c2,
  .hero-warm-9145,
  .iron_4c96 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .out_8317,
  .bronze-8cc5,
  .medium_8634 {
    max-width: none !important;
  }
  
  .sort_last_8b5d {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .soft-c2ac {
    font-size: 1.5rem !important;
  }
  
  .slider_94ed {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .purple-e3c4,
  .gallery_rough_600b {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .white-b0df {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .photo_simple_8532 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .sidebar-9368 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .out_8317,
  .medium_8634 {
    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: 98f5 */
.phantom-card-n3 {
  padding: 0.1rem;
  font-size: 13px;
  line-height: 1.0;
}
