/* ============================================
   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 (.surface_1420) is a descendant of
   .feature_2d0a (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.tiny_d5df {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".mini-b9f2" 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.pink_91fa so it can't cause
   horizontal overflow anyway. */
.hover_basic_1c23,
.west-9e1d,
.badge-697c,
.table-e36e,
.element-2931,
.glass-95b0,
.plasma-d623,
.slider_11ba,
.outer_fc41,
.brown-f146,
.picture_e17b {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .paragraph_green_b851 {
    padding: 8px 0;
  }
  
  .layout-e9e5 img {
    height: 28px;
    width: auto;
  }
  
  .module-light-9d12 {
    display: none !important;
  }
  
  .gradient-bronze-d560 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .gradient-bronze-d560 svg {
    width: 14px;
    height: 14px;
  }
  
  .sidebar-ed59 {
    padding: 6px;
  }
  
  .hover-solid-8be5 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .badge-697c,
  .west-9e1d,
  .table-e36e,
  .element-2931,
  .aside_5300,
  .label-south-5a10,
  .mask-0d5d,
  .box-slow-6aab,
  .thumbnail-active-6552,
  .menu-58b9,
  .paragraph_fixed_b4f0,
  .easy-bae1 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .black-5bc9,
  .down_4d00 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .paragraph_e266,
  .button_d389,
  .upper_2e55,
  .tertiary-194a,
  .banner_wood_a654,
  .plasma-2e4b,
  .gradient-current-0caf {
    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 */
  .row_b3a2,
  .easy_fa6b,
  .hard_cf16,
  .avatar_f785,
  .liquid-2790 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .tooltip-6a84,
  .nav_out_ec01,
  .sidebar_bright_2bb9,
  .card_active_9ee4 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .gradient-cool-1f3a,
  .element_huge_1625 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .heading-6a8e,
  .backdrop-hard-c347,
  .popup_black_d7a7,
  .gradient_bd74 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .widget-a15b,
  .gallery_4fa7,
  .tag_stone_f1f1,
  .wrapper-wide-4a32,
  .status_fbe2,
  .west-c2b3 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .row_b3a2,
  .easy_fa6b,
  .avatar_f785 {
    max-width: none !important;
  }
  
  .mini-b9f2 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .tooltip-6a84 {
    font-size: 1.5rem !important;
  }
  
  .nav_out_ec01 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .pressed_5acc,
  .description-pro-b6ed {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .sidebar_bright_2bb9 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .status_22f3 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .hero-d39b {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .row_b3a2,
  .avatar_f785 {
    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: f412 */
.ghost-box-o9 {
  padding: 0.2rem;
  font-size: 14px;
  line-height: 1.1;
}
