/* ============================================
   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 (.simple-70c6) is a descendant of
   .search-hard-3ed7 (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.focused-bb3d {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".east_5c4d" 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.nav-in-6858 so it can't cause
   horizontal overflow anyway. */
.focused_91a6,
.info_2f3d,
.complex-46e0,
.form-d86d,
.image_dark_64d0,
.hover_013f,
.yellow-19ae,
.image-short-374f,
.logo-e17c,
.old_cabd,
.header-current-fb1a {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .progress-a6c1 {
    padding: 8px 0;
  }
  
  .badge_c102 img {
    height: 28px;
    width: auto;
  }
  
  .notification_db15 {
    display: none !important;
  }
  
  .paragraph_hot_73fb {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .paragraph_hot_73fb svg {
    width: 14px;
    height: 14px;
  }
  
  .picture_west_f5cd {
    padding: 6px;
  }
  
  .gallery-selected-5a12 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .complex-46e0,
  .info_2f3d,
  .form-d86d,
  .image_dark_64d0,
  .tabs-old-a36f,
  .section_eb89,
  .carousel-a625,
  .notice_fluid_af23,
  .border-a262,
  .glass_ba61,
  .notice-hard-3ff1,
  .nav-middle-cef3 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .info-last-72fe,
  .outer_7efa {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .preview_f6d0,
  .down-2069,
  .tooltip_f219,
  .selected-3d72,
  .tabs-0608,
  .gallery-a200,
  .copper-c37c {
    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 */
  .breadcrumb-slow-2d1f,
  .selected_3d15,
  .outer-767d,
  .backdrop_8008,
  .search-stale-1847 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .upper_bcd9,
  .grid_yellow_de2c,
  .alert-6605,
  .cool_7dfa {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .complex-2866,
  .bottom_0b73 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .clean-ad78,
  .alert_lower_6c77,
  .orange_27c0,
  .grid_fluid_d019 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .fixed-b0ee,
  .photo_red_f09b,
  .container_green_8a15,
  .silver-6608,
  .tertiary_4f4d,
  .summary_2cbc {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .breadcrumb-slow-2d1f,
  .selected_3d15,
  .backdrop_8008 {
    max-width: none !important;
  }
  
  .east_5c4d {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .upper_bcd9 {
    font-size: 1.5rem !important;
  }
  
  .grid_yellow_de2c {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .hovered_2ac8,
  .header_3579 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .alert-6605 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .breadcrumb_4820 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .nav_green_d9f3 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .breadcrumb-slow-2d1f,
  .backdrop_8008 {
    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: 61d2 */
.ghost-box-v4 {
  padding: 0.3rem;
  font-size: 14px;
  line-height: 1.1;
}
