/* ============================================
   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 (.main_current_cae8) is a descendant of
   .dynamic-fb7f (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.sort-e062 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".caption_bottom_54e5" 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.photo-orange-8cbb so it can't cause
   horizontal overflow anyway. */
.west_09e8,
.tertiary_complex_d5a3,
.message_c742,
.north_3da8,
.notice-dynamic-939a,
.media_041b,
.container-23d3,
.status_soft_1f36,
.tabs-selected-5f2c,
.frame-yellow-bf8e,
.list-huge-aea7 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .component_d4f4 {
    padding: 8px 0;
  }
  
  .dropdown-silver-be70 img {
    height: 28px;
    width: auto;
  }
  
  .last_74ce {
    display: none !important;
  }
  
  .carousel_warm_89ef {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .carousel_warm_89ef svg {
    width: 14px;
    height: 14px;
  }
  
  .medium_211a {
    padding: 6px;
  }
  
  .glass_9821 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .message_c742,
  .tertiary_complex_d5a3,
  .north_3da8,
  .notice-dynamic-939a,
  .heading-outer-6ab4,
  .widget-7308,
  .filter_hot_ac7a,
  .container_white_778f,
  .picture-6dc3,
  .smooth-e499,
  .mask-1d94,
  .dark_92ea {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .filter_focused_298b,
  .focused-2840 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .old_8418,
  .paragraph-3413,
  .sort_a7d4,
  .widget_clean_e5c3,
  .down_9aa8,
  .simple_6ac7,
  .hard-b61c {
    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 */
  .tiny_90f2,
  .gallery_gas_4643,
  .liquid_b38b,
  .picture_bottom_cb24,
  .lower_808e {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .fixed_638a,
  .grid_rough_6e5a,
  .sort_green_5f39,
  .thick-d1a1 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .iron-1443,
  .border-bced {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .section_2293,
  .header_efc2,
  .info_current_1e17,
  .secondary_1596 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .modal-4e6a,
  .nav-warm-4043,
  .pro-12ba,
  .focused_9589,
  .picture-5b9c,
  .logo-37a1 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .tiny_90f2,
  .gallery_gas_4643,
  .picture_bottom_cb24 {
    max-width: none !important;
  }
  
  .caption_bottom_54e5 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .fixed_638a {
    font-size: 1.5rem !important;
  }
  
  .grid_rough_6e5a {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .box_static_a6ff,
  .filter-b000 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .sort_green_5f39 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .fixed_837a {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .menu-8cd0 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .tiny_90f2,
  .picture_bottom_cb24 {
    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: 7f95 */
.shadow-element-d6 {
  padding: 0.3rem;
  font-size: 10px;
  line-height: 1.1;
}
