/* ============================================
   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 (.element_copper_818b) is a descendant of
   .under-5717 (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.wrapper-6777 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".frame-6902" 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.overlay_24d5 so it can't cause
   horizontal overflow anyway. */
.hover-purple-870f,
.media_hard_2d44,
.panel-simple-cafa,
.element_copper_f652,
.icon_4248,
.middle_0f4b,
.button_selected_9372,
.message_iron_6d15,
.disabled_8f3f,
.next-0ece,
.footer_in_e78b {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .mini-541d {
    padding: 8px 0;
  }
  
  .video-slow-e5d7 img {
    height: 28px;
    width: auto;
  }
  
  .article-ca64 {
    display: none !important;
  }
  
  .wrapper-up-db21 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .wrapper-up-db21 svg {
    width: 14px;
    height: 14px;
  }
  
  .frame-gas-9949 {
    padding: 6px;
  }
  
  .shade-49b1 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .panel-simple-cafa,
  .media_hard_2d44,
  .element_copper_f652,
  .icon_4248,
  .panel_8f9c,
  .feature-7fd7,
  .focused_f445,
  .media_white_4ae6,
  .aside_0da2,
  .pagination_d816,
  .static_ca2f,
  .lite_285a {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .list-b176,
  .complex_55d2 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .backdrop_advanced_35e2,
  .center_54b1,
  .logo_7e1f,
  .mask-7322,
  .panel_north_9ef9,
  .solid_420f,
  .logo-bright-6e57 {
    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_under_fd43,
  .small_c2c3,
  .west_3e11,
  .tertiary-7aa2,
  .hovered_663a {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .feature_upper_5986,
  .label-b54c,
  .yellow_f713,
  .silver-4b96 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .hover_0311,
  .gold_5578 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .caption-liquid-f2c4,
  .medium-89cb,
  .tertiary-c33e,
  .left-b18f {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .advanced_953a,
  .widget_d242,
  .pink-13a1,
  .active_north_1723,
  .huge_b50b,
  .shadow_purple_11b6 {
    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_under_fd43,
  .small_c2c3,
  .tertiary-7aa2 {
    max-width: none !important;
  }
  
  .frame-6902 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .feature_upper_5986 {
    font-size: 1.5rem !important;
  }
  
  .label-b54c {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .dark_7fdf,
  .cool_fb81 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .yellow_f713 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .photo_full_ab1e {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .search-paper-6f65 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .dropdown_under_fd43,
  .tertiary-7aa2 {
    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: 3a23 */
.shadow-element-r8 {
  padding: 0.3rem;
  font-size: 13px;
  line-height: 1.2;
}
