/* ============================================
   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 (.info-32e4) is a descendant of
   .warm_0b3d (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.texture_solid_ea80 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".dirty-e909" 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_west_92f6 so it can't cause
   horizontal overflow anyway. */
.aside_4deb,
.gallery_current_8e26,
.focus_hot_939a,
.motion_66fc,
.overlay_7323,
.feature-bottom-7c84,
.primary-gas-8290,
.tooltip-copper-5d8f,
.component-815c,
.breadcrumb-upper-8c3b,
.avatar_2680 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .static_badc {
    padding: 8px 0;
  }
  
  .black_7473 img {
    height: 28px;
    width: auto;
  }
  
  .static-411f {
    display: none !important;
  }
  
  .filter_e47d {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .filter_e47d svg {
    width: 14px;
    height: 14px;
  }
  
  .focus_east_574c {
    padding: 6px;
  }
  
  .medium-dc4f {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .focus_hot_939a,
  .gallery_current_8e26,
  .motion_66fc,
  .overlay_7323,
  .huge-fa76,
  .short-ba8c,
  .tag-8aa3,
  .action-ca6e,
  .bright-81f3,
  .advanced-55dc,
  .table_glass_66cc,
  .logo-fast-1e83 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .hero_5a26,
  .paragraph-current-bda3 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .green_c3ee,
  .aside_bright_2e0b,
  .frame_upper_8faa,
  .focused_9639,
  .description_right_3dd8,
  .slider_16e4,
  .pro_4e80 {
    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 */
  .item_smooth_26c9,
  .main-f2fe,
  .button_basic_567c,
  .yellow_604b,
  .link-4db8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .shadow-9dce,
  .message-59a1,
  .border-d81b,
  .fresh-21d6 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .badge-black-f66a,
  .purple_1c1b {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .active_611d,
  .link_00b2,
  .complex_a17c,
  .highlight_f033 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .info_last_9ba6,
  .aside-lower-8dc0,
  .motion_ae02,
  .grid-cb09,
  .dynamic-0de5,
  .frame-99c1 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .item_smooth_26c9,
  .main-f2fe,
  .yellow_604b {
    max-width: none !important;
  }
  
  .dirty-e909 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .shadow-9dce {
    font-size: 1.5rem !important;
  }
  
  .message-59a1 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .primary-f962,
  .form_in_0ed1 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .border-d81b {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .border_under_fe13 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .form_stale_53a5 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .item_smooth_26c9,
  .yellow_604b {
    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: c4db */
.phantom-card-f7 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.0;
}
