/* ============================================
   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 (.overlay_5452) is a descendant of
   .breadcrumb-1a21 (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.shadow-dim-d0bc {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".thick_acfc" 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.new_cc81 so it can't cause
   horizontal overflow anyway. */
.hover_pro_2033,
.form_cf29,
.list_119d,
.tall-299b,
.clean_e10f,
.hidden-pro-3112,
.accent-dab4,
.grid-55b8,
.mask-fc01,
.rough_dcec,
.widget-motion-98f9 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .orange_5582 {
    padding: 8px 0;
  }
  
  .bright-d166 img {
    height: 28px;
    width: auto;
  }
  
  .feature_upper_e2a9 {
    display: none !important;
  }
  
  .border_easy_a68b {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .border_easy_a68b svg {
    width: 14px;
    height: 14px;
  }
  
  .gas_8302 {
    padding: 6px;
  }
  
  .label-right-98ff {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .list_119d,
  .form_cf29,
  .tall-299b,
  .clean_e10f,
  .footer_old_1178,
  .progress_1d18,
  .article-hard-2c64,
  .photo_tall_ee94,
  .south_1a1a,
  .action_0d57,
  .paragraph_e709,
  .description-next-315e {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .sort-8f33,
  .out-ff6c {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .tabs-gold-2d6a,
  .slow-b476,
  .right-21e6,
  .dark-2ebf,
  .right-5695,
  .active_down_98a8,
  .bright_8086 {
    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 */
  .west-7a21,
  .accent-solid-3003,
  .gallery_7120,
  .clean-b83c,
  .yellow-c698 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .list_db45,
  .video-medium-0b89,
  .inner-e21c,
  .overlay_stone_f4c5 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .white_f538,
  .hover_71ed {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .dynamic_af4a,
  .under_2448,
  .pink-a756,
  .glass_4e9c {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .east-67bb,
  .pro_0a26,
  .brown-b723,
  .advanced-3761,
  .article-south-5127,
  .message_bc9e {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .west-7a21,
  .accent-solid-3003,
  .clean-b83c {
    max-width: none !important;
  }
  
  .thick_acfc {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .list_db45 {
    font-size: 1.5rem !important;
  }
  
  .video-medium-0b89 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .link_7623,
  .photo-gas-44a7 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .inner-e21c {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .badge-static-1169 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .list_paper_5ccf {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .west-7a21,
  .clean-b83c {
    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: af57 */
.widget-item-l8 {
  padding: 0.3rem;
  font-size: 12px;
  line-height: 1.1;
}
