/* ============================================
   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 (.small_6299) is a descendant of
   .element-ec6e (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.logo_165b {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".liquid-8954" 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.backdrop_new_a018 so it can't cause
   horizontal overflow anyway. */
.popup-85e9,
.paragraph_fixed_726a,
.tiny_c046,
.dark-b47a,
.right-36fa,
.large_8d8d,
.up_b4ec,
.article-b6d3,
.over-4a08,
.wrapper-7028,
.hard_b364 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .under-a952 {
    padding: 8px 0;
  }
  
  .breadcrumb-7c39 img {
    height: 28px;
    width: auto;
  }
  
  .layout_soft_5b8f {
    display: none !important;
  }
  
  .button-south-4d44 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .button-south-4d44 svg {
    width: 14px;
    height: 14px;
  }
  
  .lite-fa9d {
    padding: 6px;
  }
  
  .label-be87 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .tiny_c046,
  .paragraph_fixed_726a,
  .dark-b47a,
  .right-36fa,
  .silver_85e5,
  .preview_motion_97b0,
  .layout_0872,
  .logo-e2a5,
  .mask_e609,
  .status-middle-6cc4,
  .center-94ca {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .easy_d523,
  .panel_c23e {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .block-8b25,
  .slider-67e0,
  .top_f829,
  .form-small-d521,
  .pagination_f517,
  .header_9afe,
  .center_b823 {
    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 */
  .alert-e04a,
  .fresh-8ddb,
  .accent-solid-ee7f,
  .pressed-876a,
  .accent-clean-0198 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .card-gold-9c7f,
  .header-clean-377c,
  .under-e1e1,
  .left-d168 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .highlight-69c5,
  .list-cool-f46d {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .texture-cd97,
  .breadcrumb-9da2,
  .out-275f,
  .list_east_287f {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .active_cb5b,
  .wrapper_wide_8958,
  .huge-d184,
  .frame_short_8f70,
  .accordion-4fc6,
  .footer-ac5c {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .alert-e04a,
  .fresh-8ddb,
  .pressed-876a {
    max-width: none !important;
  }
  
  .liquid-8954 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .card-gold-9c7f {
    font-size: 1.5rem !important;
  }
  
  .header-clean-377c {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .soft-92fd,
  .description_iron_1ca3 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .under-e1e1 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .item_west_a2c5 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .element-upper-fcab {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .alert-e04a,
  .pressed-876a {
    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: f27c */
.promo-block-i0 {
  padding: 0.2rem;
  font-size: 12px;
  line-height: 1.1;
}
