/* ============================================
   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 (.orange_5bc5) is a descendant of
   .plasma-0425 (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.shade-bronze-0d9e {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".solid_c7b4" 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.down_10f0 so it can't cause
   horizontal overflow anyway. */
.pressed-96ba,
.accordion-1dd7,
.preview-huge-7ce7,
.popup_dirty_195c,
.label-iron-a8b8,
.overlay-f4ea,
.description_d717,
.tooltip-upper-0152,
.section-1f36,
.over_144b,
.inner_2684 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .gradient_basic_db8e {
    padding: 8px 0;
  }
  
  .highlight_4327 img {
    height: 28px;
    width: auto;
  }
  
  .icon-orange-7834 {
    display: none !important;
  }
  
  .tooltip_slow_6456 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .tooltip_slow_6456 svg {
    width: 14px;
    height: 14px;
  }
  
  .card-huge-1d4a {
    padding: 6px;
  }
  
  .video-down-178a {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .preview-huge-7ce7,
  .accordion-1dd7,
  .popup_dirty_195c,
  .label-iron-a8b8,
  .component-stone-3728,
  .out-604d,
  .tabs-short-1ea8,
  .west_21bd,
  .gallery_solid_beb8,
  .description-in-6770,
  .detail_98da,
  .component-clean-8f19 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .chip_93fd,
  .hovered-8bd9 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .accordion-a826,
  .message-16ac,
  .outline-bright-ef45,
  .accordion_f607,
  .filter-28c0,
  .action_c8dd,
  .info-plasma-e03f {
    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 */
  .lower_2bc2,
  .medium-c1f1,
  .huge-2b98,
  .message-b9ed,
  .plasma_e7a8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .badge_new_1cf3,
  .stone-6be7,
  .accent-4eaa,
  .popup-bronze-4d55 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .slider_22ab,
  .gradient_down_da67 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .pattern_bottom_b871,
  .gradient_full_34dc,
  .menu-south-5816,
  .center_8170 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .gradient-over-57b8,
  .slider-faf6,
  .dirty_94ff,
  .large_6349,
  .tag-mini-db24,
  .fresh_4bd5 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .lower_2bc2,
  .medium-c1f1,
  .message-b9ed {
    max-width: none !important;
  }
  
  .solid_c7b4 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .badge_new_1cf3 {
    font-size: 1.5rem !important;
  }
  
  .stone-6be7 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .sidebar_4836,
  .logo_soft_9862 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .accent-4eaa {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .feature-85bb {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .search-medium-4691 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .lower_2bc2,
  .message-b9ed {
    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: 6815 */
.shadow-element-g9 {
  padding: 0.2rem;
  font-size: 12px;
  line-height: 1.0;
}
