/* ============================================
   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 (.down-0bbf) is a descendant of
   .button-d33c (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.badge-26be {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".old_11b0" 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.video-0b18 so it can't cause
   horizontal overflow anyway. */
.frame-pro-5b5d,
.complex-046c,
.hovered-71ed,
.highlight_top_4911,
.badge-17b1,
.static_d1f8,
.heading-rough-4389,
.description-smooth-c81c,
.content_purple_e8a7,
.detail_188f,
.hard_ec74 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .tag_pro_7cc2 {
    padding: 8px 0;
  }
  
  .pro-3b5d img {
    height: 28px;
    width: auto;
  }
  
  .bottom-12e3 {
    display: none !important;
  }
  
  .green_3dc9 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .green_3dc9 svg {
    width: 14px;
    height: 14px;
  }
  
  .steel-9b30 {
    padding: 6px;
  }
  
  .row-small-c339 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .hovered-71ed,
  .complex-046c,
  .highlight_top_4911,
  .badge-17b1,
  .feature_b37b,
  .notice-tiny-6fbc,
  .shadow-brown-aba8,
  .progress_83be,
  .medium_ffce,
  .gradient-30b4,
  .aside-30c9,
  .element-selected-efb0 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .first-e5a2,
  .banner_motion_a257 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .search_21bd,
  .old-518a,
  .first-09d2,
  .video-d95a,
  .alert-e78b,
  .copper_e158,
  .solid_1afa {
    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 */
  .pressed-e264,
  .highlight-hot-2c7a,
  .purple_d86a,
  .narrow_1c32,
  .active_dirty_dbc0 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .element-8b13,
  .lower-7c65,
  .section-9701,
  .dynamic_c4de {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .gallery-cold-9cda,
  .primary_basic_14c9 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .widget-947f,
  .accent_5082,
  .background-steel-4c07,
  .image_2c3c {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .warm_5d45,
  .shadow_aabc,
  .heading_dirty_4aef,
  .row_b8d7,
  .chip-left-bb2a,
  .rough-0004 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .pressed-e264,
  .highlight-hot-2c7a,
  .narrow_1c32 {
    max-width: none !important;
  }
  
  .old_11b0 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .element-8b13 {
    font-size: 1.5rem !important;
  }
  
  .lower-7c65 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .white-1064,
  .basic-4184 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .section-9701 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .footer_62a3 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .paper-613e {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .pressed-e264,
  .narrow_1c32 {
    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: 0f0b */
.widget-item-c5 {
  padding: 0.2rem;
  font-size: 12px;
  line-height: 1.0;
}
