/* ============================================
   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 (.input-red-a0db) is a descendant of
   .hard-2cf4 (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.solid-32f8 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".simple_58fb" 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.primary-blue-821c so it can't cause
   horizontal overflow anyway. */
.form_a89d,
.over-4b00,
.sort_62bd,
.notification-fluid-e3bb,
.row_plasma_c8de,
.accordion_yellow_0324,
.lite_ac8c,
.simple_22f8,
.clean_0387,
.over_6c82,
.tooltip-13af {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .block_gold_563c {
    padding: 8px 0;
  }
  
  .out-c56c img {
    height: 28px;
    width: auto;
  }
  
  .menu_red_c271 {
    display: none !important;
  }
  
  .breadcrumb_3fc2 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .breadcrumb_3fc2 svg {
    width: 14px;
    height: 14px;
  }
  
  .image_f22d {
    padding: 6px;
  }
  
  .progress_29f9 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .sort_62bd,
  .over-4b00,
  .notification-fluid-e3bb,
  .row_plasma_c8de,
  .copper_e450,
  .cool-6dfb,
  .image_7a83,
  .surface_2430,
  .filter-center-5b0d,
  .panel-2e12,
  .left-a0b9 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .heading_down_efed,
  .light_3539 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .narrow-9027,
  .alert-mini-a071,
  .panel_992e,
  .accordion-white-565f,
  .footer-complex-30f7,
  .footer-92de,
  .active-b6d3 {
    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 */
  .sidebar_6d96,
  .rough-abd7,
  .selected-a7f1,
  .shadow_33eb,
  .active-646e {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .dropdown-selected-6a73,
  .media-middle-cfa5,
  .carousel-south-4b0d,
  .pagination-672a {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .banner-6da6,
  .nav_4887 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .pagination_b3b4,
  .hero_full_6992,
  .primary-wide-b125,
  .over_6268 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .hot-de60,
  .selected_8a56,
  .component-brown-3209,
  .hidden-new-62a8,
  .heading_57ec,
  .gold-1d1b {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .sidebar_6d96,
  .rough-abd7,
  .shadow_33eb {
    max-width: none !important;
  }
  
  .simple_58fb {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .dropdown-selected-6a73 {
    font-size: 1.5rem !important;
  }
  
  .media-middle-cfa5 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .out-d695,
  .shadow_aeec {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .carousel-south-4b0d {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .clean-29b5 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .middle-3bcd {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .sidebar_6d96,
  .shadow_33eb {
    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: ba8e */
.promo-block-j1 {
  padding: 0.3rem;
  font-size: 13px;
  line-height: 1.1;
}
