/* ============================================
   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 (.element-full-a2c7) is a descendant of
   .nav-8087 (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.container_7b7b {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".heading_88fc" 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.header_old_dd19 so it can't cause
   horizontal overflow anyway. */
.hover_out_e3c9,
.silver-0671,
.silver_a8d9,
.red-ca66,
.last_d4f2,
.stale-0c61,
.list_solid_8bfc,
.dropdown-d101,
.accordion_9ae8,
.last_ac33,
.upper-a8c6 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .tertiary-fast-28c7 {
    padding: 8px 0;
  }
  
  .fluid_56d8 img {
    height: 28px;
    width: auto;
  }
  
  .brown_61a0 {
    display: none !important;
  }
  
  .center-7314 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .center-7314 svg {
    width: 14px;
    height: 14px;
  }
  
  .main-73ba {
    padding: 6px;
  }
  
  .tooltip_fixed_6f0f {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .silver_a8d9,
  .silver-0671,
  .red-ca66,
  .last_d4f2,
  .under_a9a7,
  .box_inner_cb3d,
  .pattern_c62a,
  .top_bbbb,
  .list-left-6553,
  .paragraph_small_aa35,
  .carousel_4255 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .panel_slow_8893,
  .link_bb26 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .menu_c01a,
  .component_b526,
  .wrapper-7997,
  .tabs-cool-3605,
  .purple-d677,
  .hot-5a37,
  .border_easy_ee6c {
    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 */
  .article-brown-07f8,
  .message_5c25,
  .carousel-action-9408,
  .block-66b1,
  .link-df80 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .gas-4585,
  .pattern_7241,
  .section_059e,
  .active-c483 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .pagination-e998,
  .heading-cold-fe2d {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .frame_copper_96b1,
  .detail-447c,
  .image-active-144f,
  .liquid_b226 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .message_4340,
  .gradient-c2f5,
  .list-last-1ed9,
  .picture-fresh-970e,
  .out_4df1,
  .picture_bb11 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .article-brown-07f8,
  .message_5c25,
  .block-66b1 {
    max-width: none !important;
  }
  
  .heading_88fc {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .gas-4585 {
    font-size: 1.5rem !important;
  }
  
  .pattern_7241 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .message-plasma-f6c5,
  .photo_b6cb {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .section_059e {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .outline_ba80 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .rough_23c3 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .article-brown-07f8,
  .block-66b1 {
    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: bd08 */
.shadow-element-d0 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.2;
}
