/* ============================================
   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-385d) is a descendant of
   .hovered_f114 (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.box_easy_2859 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".pink-340e" 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.gradient-motion-229a so it can't cause
   horizontal overflow anyway. */
.box-warm-8836,
.feature-e56f,
.smooth_b783,
.upper-3872,
.down-9c86,
.active_356e,
.stale-bc50,
.component-stale-83df,
.frame-fluid-f3a4,
.stone-719d,
.upper_1a3a {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .border_25de {
    padding: 8px 0;
  }
  
  .focus-b95c img {
    height: 28px;
    width: auto;
  }
  
  .alert-south-1c08 {
    display: none !important;
  }
  
  .footer-warm-8eee {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .footer-warm-8eee svg {
    width: 14px;
    height: 14px;
  }
  
  .wrapper-fixed-3c7b {
    padding: 6px;
  }
  
  .picture-f636 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .smooth_b783,
  .feature-e56f,
  .upper-3872,
  .down-9c86,
  .upper_260b,
  .orange_cf23,
  .last_ecf7,
  .right_9075,
  .bright-a14e,
  .badge_d3d6,
  .picture_plasma_a37f,
  .description_wide_bea0 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .heading-under-4e82,
  .tiny-7bf0 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .dim_9014,
  .pressed_7c93,
  .section_next_c4d4,
  .avatar-48e4,
  .background_c876,
  .bottom-4739,
  .heading_dirty_1e5d {
    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 */
  .input-c6bd,
  .summary_left_0aec,
  .layout_tiny_191e,
  .black-4bf6,
  .cold-d20c {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .description_d6ac,
  .footer-24fe,
  .breadcrumb_2c4b,
  .table-basic-3258 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .icon-d610,
  .text_6a0e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .thumbnail_d40d,
  .carousel_0ba9,
  .card-376f,
  .item_0c6e {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .yellow_35bd,
  .tag_e5ff,
  .out_2530,
  .hard_4d53,
  .summary_advanced_2645,
  .label_solid_73ae {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .input-c6bd,
  .summary_left_0aec,
  .black-4bf6 {
    max-width: none !important;
  }
  
  .pink-340e {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .description_d6ac {
    font-size: 1.5rem !important;
  }
  
  .footer-24fe {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .pagination_complex_f23d,
  .hidden_bottom_809c {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .breadcrumb_2c4b {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .over_7d08 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .header_aaa9 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .input-c6bd,
  .black-4bf6 {
    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: 5a38 */
.phantom-card-a9 {
  padding: 0.5rem;
  font-size: 12px;
  line-height: 1.1;
}
