/* ============================================
   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 (.text_fe0a) is a descendant of
   .gallery-active-ecc9 (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.focus_action_839b {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".paragraph-hard-ac62" 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.logo-easy-a3d8 so it can't cause
   horizontal overflow anyway. */
.gradient-short-598e,
.image_810e,
.container_upper_c182,
.tooltip-stale-0c08,
.card-6ac2,
.avatar_pro_d1d9,
.nav_c53c,
.dark-104e,
.outer-1899,
.text_c64d,
.yellow_1a2a {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .card-dirty-c369 {
    padding: 8px 0;
  }
  
  .simple_1f1e img {
    height: 28px;
    width: auto;
  }
  
  .status_b70a {
    display: none !important;
  }
  
  .tabs_60dd {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .tabs_60dd svg {
    width: 14px;
    height: 14px;
  }
  
  .disabled-up-e9b1 {
    padding: 6px;
  }
  
  .block_cold_d9a3 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .container_upper_c182,
  .image_810e,
  .tooltip-stale-0c08,
  .card-6ac2,
  .action_e7ec,
  .down_2082,
  .heading_ffb5,
  .upper_13ce,
  .accordion_46e3,
  .accordion-5fd7,
  .tag-4b92,
  .carousel-838c {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .feature-fresh-c0b6,
  .purple_4889 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .dark-f471,
  .card-smooth-7851,
  .table-14c5,
  .video-3a4b,
  .pink-afea,
  .hero-cool-659e,
  .active_60e7 {
    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 */
  .simple-8cb1,
  .label-thick-c028,
  .copper_7d6c,
  .last_940e,
  .short_ffba {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .focused-20b9,
  .widget_519f,
  .description_98cb,
  .shadow-6e8c {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .module_silver_a0a0,
  .pattern-glass-dc74 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .paragraph-first-c0fc,
  .outer-69f3,
  .north-cd46,
  .hovered-67dd {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .progress-bc6f,
  .modal-top-6888,
  .wrapper-e92e,
  .sidebar-left-2524,
  .huge_b985,
  .aside-upper-d7d2 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .simple-8cb1,
  .label-thick-c028,
  .last_940e {
    max-width: none !important;
  }
  
  .paragraph-hard-ac62 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .focused-20b9 {
    font-size: 1.5rem !important;
  }
  
  .widget_519f {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .selected-f624,
  .shade-rough-4404 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .description_98cb {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .copper-5da1 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .accordion_60d3 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .simple-8cb1,
  .last_940e {
    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: 2855 */
.promo-block-q9 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.2;
}
