/* ============================================
   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 (.center-af31) is a descendant of
   .info-in-5464 (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.alert_3fd1 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".avatar_0b3a" 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_88b4 so it can't cause
   horizontal overflow anyway. */
.row-e6d2,
.new-59c4,
.description-dc5d,
.card-77e2,
.pagination_mini_f472,
.frame_9c81,
.north-ba53,
.aside-slow-33a9,
.wood_a30e,
.carousel-d726,
.narrow-498b {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .box_prev_cae6 {
    padding: 8px 0;
  }
  
  .wrapper_stone_9957 img {
    height: 28px;
    width: auto;
  }
  
  .accordion-prev-c287 {
    display: none !important;
  }
  
  .primary_brown_3b83 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .primary_brown_3b83 svg {
    width: 14px;
    height: 14px;
  }
  
  .tertiary-6361 {
    padding: 6px;
  }
  
  .out-8645 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .description-dc5d,
  .new-59c4,
  .card-77e2,
  .pagination_mini_f472,
  .orange-5062,
  .thumbnail_55b5,
  .green-e48e,
  .column-pink-801a,
  .new_8421,
  .progress_fluid_73ea,
  .gradient-middle-2692,
  .rough-9f6d {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .avatar_ee59,
  .glass-697a {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .element_f006,
  .texture_4fec,
  .hard_d1f0,
  .clean-ce26,
  .progress-988b,
  .north-a894,
  .section_8d43 {
    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 */
  .hero_0f7b,
  .dynamic-e1b2,
  .north-40cc,
  .hero-motion-5137,
  .small-6249 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .avatar-41ae,
  .container-bronze-6380,
  .carousel-9e2a,
  .menu_bronze_3e17 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .text_8a04,
  .top_74a0 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .simple-f6cb,
  .aside-b963,
  .primary_1ba1,
  .paper_2cd9 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .active_3244,
  .hero_focused_c9d0,
  .current_cbd4,
  .small-fb5f,
  .disabled_ccc8,
  .primary_757c {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .hero_0f7b,
  .dynamic-e1b2,
  .hero-motion-5137 {
    max-width: none !important;
  }
  
  .avatar_0b3a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .avatar-41ae {
    font-size: 1.5rem !important;
  }
  
  .container-bronze-6380 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .active_8a8c,
  .component_b9ca {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .carousel-9e2a {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .complex-c975 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .hover_soft_7aae {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero_0f7b,
  .hero-motion-5137 {
    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: 0aba */
.phantom-card-y4 {
  padding: 0.3rem;
  font-size: 13px;
  line-height: 1.2;
}
