/* ============================================
   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 (.short-467d) is a descendant of
   .hero_7053 (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.middle-a279 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".fresh_910c" 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.chip-gas-b26c so it can't cause
   horizontal overflow anyway. */
.caption_liquid_e0cf,
.layout-dark-76d3,
.container-white-0c97,
.hovered-a0ed,
.module_motion_959d,
.gallery_left_f993,
.title-481e,
.chip-e4a4,
.aside_7474,
.content_lower_3321,
.alert_basic_c6fd {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .secondary_5183 {
    padding: 8px 0;
  }
  
  .nav-old-d901 img {
    height: 28px;
    width: auto;
  }
  
  .backdrop-fe70 {
    display: none !important;
  }
  
  .huge-7861 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .huge-7861 svg {
    width: 14px;
    height: 14px;
  }
  
  .out-69a8 {
    padding: 6px;
  }
  
  .hero-7dab {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .container-white-0c97,
  .layout-dark-76d3,
  .hovered-a0ed,
  .module_motion_959d,
  .liquid_1515,
  .active_medium_ef5b,
  .photo_small_7852,
  .container_37a2,
  .feature_3832,
  .in_b6f0,
  .content_82ca,
  .outline-5a86 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .media_active_b7b9,
  .backdrop_ba6b {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .shadow_a5f6,
  .list-prev-0e63,
  .layout-middle-58ba,
  .message-north-f5c2,
  .notice-out-9e59,
  .green_67f7,
  .prev-34eb {
    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 */
  .wrapper-white-70fc,
  .gradient_simple_d8d3,
  .tall-d23d,
  .widget_f87c,
  .message-dirty-6db4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .mask_cd66,
  .photo_west_ab7c,
  .up-46a5,
  .last_7a47 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .primary_south_ec60,
  .selected-b829 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .message_8368,
  .item-ee9e,
  .texture_up_9305,
  .fluid_3735 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .primary_e6f1,
  .article-409f,
  .component_b8a2,
  .form-active-4907,
  .over_aafb,
  .tooltip-soft-43a2 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .wrapper-white-70fc,
  .gradient_simple_d8d3,
  .widget_f87c {
    max-width: none !important;
  }
  
  .fresh_910c {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .mask_cd66 {
    font-size: 1.5rem !important;
  }
  
  .photo_west_ab7c {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .card-e27d,
  .icon-hard-68ac {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .up-46a5 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .frame_283e {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .paragraph_6ac7 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .wrapper-white-70fc,
  .widget_f87c {
    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: 5f55 */
.phantom-card-o5 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.1;
}
