/* ============================================
   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 (.button-small-8fce) is a descendant of
   .red-7374 (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.column-full-aa70 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".picture_action_114d" 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.label-e124 so it can't cause
   horizontal overflow anyway. */
.hard-44a1,
.description_1a46,
.middle-fc77,
.hot-9db3,
.thick_c38a,
.tiny_ed8c,
.east-f6fe,
.hard-b6b0,
.media_a434,
.aside_inner_1cd9,
.pattern_up_2b06 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .chip_89a6 {
    padding: 8px 0;
  }
  
  .dark-56f3 img {
    height: 28px;
    width: auto;
  }
  
  .media-active-ce26 {
    display: none !important;
  }
  
  .slow-e64c {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .slow-e64c svg {
    width: 14px;
    height: 14px;
  }
  
  .medium-2740 {
    padding: 6px;
  }
  
  .thick_dc87 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .middle-fc77,
  .description_1a46,
  .hot-9db3,
  .thick_c38a,
  .paragraph-f720,
  .logo_fast_38f2,
  .widget_242a,
  .widget-static-da9e,
  .accordion_ec2d,
  .article-cf33,
  .shadow-top-27de,
  .last_5c51 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .border-lite-e448,
  .feature_ac74 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .highlight-dim-6247,
  .link-pink-902e,
  .input-lower-a247,
  .module-new-af0e,
  .wide-8fff,
  .backdrop-54b2,
  .west-7fe1 {
    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 */
  .outline-orange-9118,
  .table-silver-35a0,
  .tag-full-990d,
  .aside_rough_bb25,
  .border-cee7 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .next-d64d,
  .media-current-e1d7,
  .block_e1fa,
  .tag-5f95 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .menu-7d60,
  .avatar_71d4 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .gradient-6e13,
  .mask-400b,
  .cold-daf7,
  .image_purple_c218 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .dynamic-15c5,
  .picture_iron_27be,
  .hero-01d7,
  .layout-short-5187,
  .text_easy_752f,
  .background-narrow-e8fa {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .outline-orange-9118,
  .table-silver-35a0,
  .aside_rough_bb25 {
    max-width: none !important;
  }
  
  .picture_action_114d {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .next-d64d {
    font-size: 1.5rem !important;
  }
  
  .media-current-e1d7 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .breadcrumb-narrow-a815,
  .input_416d {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .block_e1fa {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .video_270a {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .box-up-5ece {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .outline-orange-9118,
  .aside_rough_bb25 {
    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: c0db */
.widget-item-k7 {
  padding: 0.2rem;
  font-size: 12px;
  line-height: 1.0;
}
