/* ============================================
   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 (.link_current_2e95) is a descendant of
   .table-c6bf (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.overlay-copper-83a7 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".liquid-2f90" 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-red-6a1b so it can't cause
   horizontal overflow anyway. */
.article-11ff,
.gallery-3e1a,
.outer_8eeb,
.shade-cf0b,
.message-warm-b043,
.heading-4163,
.element_191b,
.large-31eb,
.hidden_large_c99e,
.hovered_b2ef,
.outer_ee29 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .element_dynamic_c3de {
    padding: 8px 0;
  }
  
  .nav_under_850f img {
    height: 28px;
    width: auto;
  }
  
  .accordion-current-8c0c {
    display: none !important;
  }
  
  .hover-middle-0a5f {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .hover-middle-0a5f svg {
    width: 14px;
    height: 14px;
  }
  
  .focused-7974 {
    padding: 6px;
  }
  
  .container_5e15 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .outer_8eeb,
  .gallery-3e1a,
  .shade-cf0b,
  .message-warm-b043,
  .column-west-7660,
  .video-silver-d606,
  .new_b11e,
  .under_72c4,
  .background_dd88,
  .tooltip_c3aa,
  .box-selected-0182,
  .layout_272e {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .article_4c54,
  .modal-simple-9244 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .outline-509f,
  .simple_0771,
  .layout-1417,
  .active_f843,
  .focus_blue_9aae,
  .accent_86af,
  .shade_short_da35 {
    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 */
  .backdrop-8c55,
  .slider_in_d256,
  .selected-fba2,
  .outer_40d8,
  .hovered_e674 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .narrow_1592,
  .right_7ce7,
  .hidden_south_c682,
  .footer_b4ea {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .pattern_48de,
  .iron_efb1 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .header-gas-81d2,
  .light_e1d8,
  .image-9c15,
  .inner_b1d6 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .fast-8018,
  .focus-87a3,
  .static_512b,
  .nav-8a2f,
  .preview_d673,
  .frame_tall_3274 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .backdrop-8c55,
  .slider_in_d256,
  .outer_40d8 {
    max-width: none !important;
  }
  
  .liquid-2f90 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .narrow_1592 {
    font-size: 1.5rem !important;
  }
  
  .right_7ce7 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .tag-45bc,
  .media-dd00 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .hidden_south_c682 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .main_cool_1c73 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .short-7609 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .backdrop-8c55,
  .outer_40d8 {
    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: cedd */
.widget-item-b4 {
  padding: 0.1rem;
  font-size: 13px;
  line-height: 1.3;
}
