/* ============================================
   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 (.search-2157) is a descendant of
   .menu_be24 (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.carousel_20ec {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".prev_a6a0" 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.left-1659 so it can't cause
   horizontal overflow anyway. */
.in-d6f1,
.section-ea4b,
.sidebar-full-586c,
.highlight_0ff6,
.filter-smooth-f7a6,
.status_092d,
.info-new-0827,
.fluid-a92e,
.label-down-7347,
.tooltip-bedb,
.input-old-0360 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .right-831c {
    padding: 8px 0;
  }
  
  .pink-dcc0 img {
    height: 28px;
    width: auto;
  }
  
  .sort-clean-29e1 {
    display: none !important;
  }
  
  .border_b7ec {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .border_b7ec svg {
    width: 14px;
    height: 14px;
  }
  
  .dropdown-3f5a {
    padding: 6px;
  }
  
  .cool_8bd2 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .sidebar-full-586c,
  .section-ea4b,
  .highlight_0ff6,
  .filter-smooth-f7a6,
  .row-0184,
  .fixed_4d01,
  .wrapper_ba65,
  .row-short-8700,
  .photo_e3e0,
  .down-6a03,
  .selected-4fce,
  .outline_easy_e250 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .north-721a,
  .hero-77f8 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .bottom_0c1c,
  .nav-dcd7,
  .row-first-6328,
  .footer-tall-e069,
  .container-huge-6d19,
  .focus-7a2c,
  .hover-pink-0265 {
    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 */
  .dropdown-acc5,
  .list_b0e6,
  .form-hot-d7e3,
  .tabs_74ce,
  .black-4a10 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .active_3425,
  .progress_78f1,
  .main_e9c3,
  .breadcrumb_d363 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .pagination-21da,
  .stale-f1f6 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .lite-e1ca,
  .dropdown-0cd0,
  .frame_cb19,
  .shadow-acd6 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .list-liquid-ac3e,
  .heading-4727,
  .gradient_rough_0840,
  .new_6b66,
  .description-b8f0,
  .background_lite_a5c2 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .dropdown-acc5,
  .list_b0e6,
  .tabs_74ce {
    max-width: none !important;
  }
  
  .prev_a6a0 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .active_3425 {
    font-size: 1.5rem !important;
  }
  
  .progress_78f1 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .white-5102,
  .video_new_4bf6 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .main_e9c3 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .secondary_tall_2bdd {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .wide_55f2 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .dropdown-acc5,
  .tabs_74ce {
    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: 6c86 */
.widget-item-a0 {
  padding: 0.1rem;
  font-size: 13px;
  line-height: 1.1;
}
