/* ============================================
   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 (.accordion_f6ea) is a descendant of
   .clean-cdcf (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.card_2b09 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".shadow_outer_00b1" 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.hover_active_e77d so it can't cause
   horizontal overflow anyway. */
.menu-south-3de3,
.caption_64e7,
.over-fa0a,
.sidebar_smooth_0bd1,
.image-1615,
.badge-cbec,
.black_d7ac,
.logo-65f3,
.tertiary_warm_0fd3,
.border_short_0fc9,
.alert-b6da {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .badge_white_1111 {
    padding: 8px 0;
  }
  
  .disabled_b4b4 img {
    height: 28px;
    width: auto;
  }
  
  .component-4534 {
    display: none !important;
  }
  
  .tiny_5632 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .tiny_5632 svg {
    width: 14px;
    height: 14px;
  }
  
  .main_5075 {
    padding: 6px;
  }
  
  .silver-7878 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .over-fa0a,
  .caption_64e7,
  .sidebar_smooth_0bd1,
  .image-1615,
  .rough-ebf4,
  .out-e0ce,
  .carousel_05af,
  .dirty-6755,
  .list-28dc,
  .panel-5f89,
  .advanced-c2ff,
  .green-1fa2 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .over_fda2,
  .purple_0eb5 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .smooth-ef68,
  .south-3f5b,
  .gallery_5757,
  .footer-out-907e,
  .current_4102,
  .outer_caa6,
  .table-solid-3bf7 {
    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 */
  .search-orange-7a88,
  .accordion_6f52,
  .pink-5e38,
  .breadcrumb_complex_cbff,
  .menu-fa1a {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .highlight_wood_ce3f,
  .green-96ad,
  .message_wood_335d,
  .in_94a6 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .hard-57bc,
  .breadcrumb-81f1 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .advanced_ba93,
  .input-7884,
  .caption-up-6044,
  .label-688a {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .box-under-4067,
  .widget-e76a,
  .cool-9b3a,
  .module-out-337d,
  .description-copper-6b0e,
  .block-old-c550 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .search-orange-7a88,
  .accordion_6f52,
  .breadcrumb_complex_cbff {
    max-width: none !important;
  }
  
  .shadow_outer_00b1 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .highlight_wood_ce3f {
    font-size: 1.5rem !important;
  }
  
  .green-96ad {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .pagination_7043,
  .thick-9dff {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .message_wood_335d {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .sidebar-tiny-db7a {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .cold-00e2 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .search-orange-7a88,
  .breadcrumb_complex_cbff {
    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: e922 */
.shadow-element-a3 {
  padding: 0.1rem;
  font-size: 13px;
  line-height: 1.1;
}
