/* ============================================
   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 (.image-5c76) is a descendant of
   .hero-red-5499 (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.feature-brown-8aee {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".button_ac15" 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.feature-6fe9 so it can't cause
   horizontal overflow anyway. */
.tag_bronze_1620,
.text_hard_347f,
.fluid_bc26,
.hot-3c9b,
.hot-16b7,
.layout-center-a7f5,
.hero-672c,
.silver_e96b,
.down-dc01,
.brown_218d,
.lower-f02b {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .list-lite-f92c {
    padding: 8px 0;
  }
  
  .disabled-b231 img {
    height: 28px;
    width: auto;
  }
  
  .row-e8d4 {
    display: none !important;
  }
  
  .hidden-warm-dc83 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .hidden-warm-dc83 svg {
    width: 14px;
    height: 14px;
  }
  
  .nav-ebef {
    padding: 6px;
  }
  
  .accent-86af {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .fluid_bc26,
  .text_hard_347f,
  .hot-3c9b,
  .hot-16b7,
  .avatar_first_78fb,
  .solid_bc2b,
  .grid-a59e,
  .description-hot-1948,
  .paper-b4d9,
  .rough-a929,
  .notification-current-46d4,
  .accordion-1563 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .menu_action_b011,
  .progress-medium-7f1f {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .purple_d748,
  .next_57d2,
  .avatar_outer_1763,
  .status_278b,
  .block-light-f0e7,
  .lower-f5ae,
  .pattern-smooth-f744 {
    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 */
  .carousel-a628,
  .pagination-cc6a,
  .pressed-43f8,
  .hidden_9e7c,
  .huge-124c {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .top-b3f6,
  .first_ab2e,
  .box-action-2cab,
  .hard-841b {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .warm_e3e5,
  .input_150e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .secondary-a021,
  .modal_focused_7182,
  .mask_small_e12c,
  .west_0ddf {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .active_6536,
  .mask-1415,
  .notification_0197,
  .feature_plasma_5416,
  .huge_5300,
  .alert_slow_5828 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .carousel-a628,
  .pagination-cc6a,
  .hidden_9e7c {
    max-width: none !important;
  }
  
  .button_ac15 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .top-b3f6 {
    font-size: 1.5rem !important;
  }
  
  .first_ab2e {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .module_selected_fa0d,
  .preview-53fb {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .box-action-2cab {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .caption_thick_7468 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .label-6bc9 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .carousel-a628,
  .hidden_9e7c {
    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: 688a */
.widget-item-u6 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.1;
}
