/* ============================================
   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 (.iron-506e) is a descendant of
   .fast_3282 (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.preview_dark_ea98 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".nav_tall_d93e" 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.video-glass-4f79 so it can't cause
   horizontal overflow anyway. */
.description-orange-e8ce,
.cool-f527,
.aside-outer-9992,
.modal-short-8714,
.box-f58a,
.popup_29e1,
.in-205d,
.tiny-2ebd,
.left-2755,
.container_e32d,
.breadcrumb_1daf {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .widget-white-2076 {
    padding: 8px 0;
  }
  
  .short-cb5e img {
    height: 28px;
    width: auto;
  }
  
  .stale-3af3 {
    display: none !important;
  }
  
  .east_0aef {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .east_0aef svg {
    width: 14px;
    height: 14px;
  }
  
  .tall_21ed {
    padding: 6px;
  }
  
  .layout_fresh_36a7 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .aside-outer-9992,
  .cool-f527,
  .modal-short-8714,
  .box-f58a,
  .detail_light_977f,
  .accent_orange_f0f9,
  .hard_f028,
  .layout_bottom_289c,
  .pattern-25a0,
  .thick_31e5,
  .heading_east_a219 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .steel-e96b,
  .prev_18f1 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .medium-05d6,
  .module-short-9922,
  .form-outer-cab8,
  .frame-8d6e,
  .inner-5a4b,
  .hidden-9ac2,
  .bronze_8867 {
    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 */
  .component_61d3,
  .gallery-b435,
  .last_78b5,
  .active_6d51,
  .next-2cbf {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .section_4fa2,
  .progress-aca7,
  .soft-1c77,
  .tall_47d0 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .icon_pink_d8b0,
  .thumbnail_db8e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .plasma-8ac1,
  .content-lite-8c15,
  .component_inner_22ec,
  .thumbnail_d6d8 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .list-458d,
  .image-tall-b7ec,
  .short_2e6a,
  .status-last-df68,
  .gallery-5d30,
  .thick-5048 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .component_61d3,
  .gallery-b435,
  .active_6d51 {
    max-width: none !important;
  }
  
  .nav_tall_d93e {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .section_4fa2 {
    font-size: 1.5rem !important;
  }
  
  .progress-aca7 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .huge_cb1d,
  .filter_4fa6 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .soft-1c77 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .hover_6a15 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .warm_1000 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .component_61d3,
  .active_6d51 {
    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: 7fad */
.ghost-box-a0 {
  padding: 0.1rem;
  font-size: 13px;
  line-height: 1.0;
}
