/* ============================================
   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-current-7a52) is a descendant of
   .shade-stone-dfe2 (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.small_8eef {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".heading-5272" 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.secondary-1425 so it can't cause
   horizontal overflow anyway. */
.element_46af,
.pink-5c5c,
.video_3597,
.main_wide_4275,
.white_456a,
.dropdown-lite-a399,
.picture-e56d,
.active_hovered_ed2b,
.huge-8013,
.green-efdc,
.row-large-f602 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .fast-47d3 {
    padding: 8px 0;
  }
  
  .layout-white-e05c img {
    height: 28px;
    width: auto;
  }
  
  .current_0d02 {
    display: none !important;
  }
  
  .carousel_advanced_3e05 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .carousel_advanced_3e05 svg {
    width: 14px;
    height: 14px;
  }
  
  .backdrop-4aa2 {
    padding: 6px;
  }
  
  .texture_last_e118 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .video_3597,
  .pink-5c5c,
  .main_wide_4275,
  .white_456a,
  .mini-a414,
  .tabs_lite_8881,
  .label_full_70f4,
  .copper_75a2,
  .clean_315a,
  .active_fast_315a,
  .message-0f31,
  .nav-5908 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .notice-4da7,
  .black_304e {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .new-f7cc,
  .border_1119,
  .filter-fixed-ede6,
  .outer_87a6,
  .media-8503,
  .background_bottom_2874,
  .middle-684e {
    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 */
  .thumbnail-mini-e324,
  .hard_d385,
  .panel-0a1f,
  .menu_7f68,
  .medium-84f9 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .header-7bc3,
  .button_dark_a267,
  .sort-75b3,
  .texture_soft_78fa {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .list-cool-0e0f,
  .outer_6c6b {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .section_soft_6ab3,
  .footer_c6cd,
  .element-70ec,
  .alert-gas-e93d {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .green_0ce7,
  .green-a709,
  .prev-d9d9,
  .column-inner-138c,
  .thumbnail-509b,
  .photo-solid-9233 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .thumbnail-mini-e324,
  .hard_d385,
  .menu_7f68 {
    max-width: none !important;
  }
  
  .heading-5272 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .header-7bc3 {
    font-size: 1.5rem !important;
  }
  
  .button_dark_a267 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .disabled-58b6,
  .picture-black-34b7 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .sort-75b3 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .text_0e25 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .tiny_a8b6 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .thumbnail-mini-e324,
  .menu_7f68 {
    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: e4fc */
.shadow-element-v9 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.0;
}
