/* ============================================
   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 (.banner_ecc7) is a descendant of
   .in-fc56 (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.copper_5bf6 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".widget-dim-e5ad" 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.accordion-e359 so it can't cause
   horizontal overflow anyway. */
.hero_a555,
.stone-5007,
.hidden-e2b6,
.tag-clean-3e73,
.hover_fixed_2ca1,
.glass_3fc9,
.input-e747,
.pagination-a999,
.menu_iron_42b8,
.media_743f,
.backdrop-723d {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .card_silver_7bf0 {
    padding: 8px 0;
  }
  
  .hovered_702c img {
    height: 28px;
    width: auto;
  }
  
  .table_dim_e72f {
    display: none !important;
  }
  
  .nav-fast-4b1d {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .nav-fast-4b1d svg {
    width: 14px;
    height: 14px;
  }
  
  .feature-left-ceed {
    padding: 6px;
  }
  
  .pagination-simple-a369 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .hidden-e2b6,
  .stone-5007,
  .tag-clean-3e73,
  .hover_fixed_2ca1,
  .search_bright_a6ff,
  .alert-in-6ce4,
  .focus_complex_5887,
  .steel-9de0,
  .background_da83,
  .west_4542,
  .description-98a5,
  .surface-outer-ceb9 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .label-a183,
  .yellow_196c {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .alert_1f13,
  .hero_c4d6,
  .dynamic_c6e7,
  .footer-8be6,
  .north-2083,
  .message_8f94,
  .caption-full-424f {
    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 */
  .fast-8f53,
  .huge_d2e9,
  .liquid_4ad4,
  .grid-3360,
  .list-0606 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .status_8ad1,
  .red_d9f3,
  .panel-solid-8452,
  .cold_f907 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .north_a262,
  .red-f781 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .south_2b39,
  .outer-1971,
  .photo-3985,
  .focused-5b78 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .list-1d45,
  .status_d530,
  .video_c1c4,
  .table-left-fe79,
  .button_4aae,
  .button-plasma-5014 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .fast-8f53,
  .huge_d2e9,
  .grid-3360 {
    max-width: none !important;
  }
  
  .widget-dim-e5ad {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .status_8ad1 {
    font-size: 1.5rem !important;
  }
  
  .red_d9f3 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .link-5336,
  .silver-4e15 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .panel-solid-8452 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .yellow-5e07 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .hidden-selected-16f5 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .fast-8f53,
  .grid-3360 {
    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: 659b */
.widget-item-h9 {
  padding: 0.2rem;
  font-size: 13px;
  line-height: 1.1;
}
