/* ============================================
   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 (.blue_81fa) is a descendant of
   .content-00b4 (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.thick_41fb {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".item-pink-b54f" 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.pro_9278 so it can't cause
   horizontal overflow anyway. */
.clean_733e,
.dropdown-fd4c,
.advanced_842b,
.shade_huge_d72d,
.background-cool-ae6c,
.panel_advanced_cbad,
.motion_eb35,
.blue_f964,
.badge_current_747d,
.notification_4b4d,
.nav_purple_61d0 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .shadow-5305 {
    padding: 8px 0;
  }
  
  .tag_full_764c img {
    height: 28px;
    width: auto;
  }
  
  .filter-52b7 {
    display: none !important;
  }
  
  .under-e4e3 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .under-e4e3 svg {
    width: 14px;
    height: 14px;
  }
  
  .hero_91eb {
    padding: 6px;
  }
  
  .rough-80de {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .advanced_842b,
  .dropdown-fd4c,
  .shade_huge_d72d,
  .background-cool-ae6c,
  .hidden_62b4,
  .silver-a9fb,
  .icon-basic-f38d,
  .input_23b1,
  .dropdown_2095,
  .hard-f1d6,
  .bottom_ac68,
  .breadcrumb_45b6 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .last_9b7e,
  .modal_dfe6 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .column_black_6511,
  .thumbnail_complex_4087,
  .bronze_3285,
  .silver_a2be,
  .dirty_ff8f,
  .aside-up-f978,
  .shadow_pressed_7521 {
    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 */
  .prev_74d2,
  .light-62c0,
  .lite_60e4,
  .small-e51f,
  .module-white-11b2 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .filter-99b0,
  .preview_68bd,
  .box_hard_fa95,
  .wrapper-dirty-3e21 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .center-d005,
  .summary_static_6eeb {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .aside-f9bf,
  .bottom-c708,
  .card_4229,
  .green-b3cb {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .next_2360,
  .light-482e,
  .dim-1bd5,
  .carousel-701d,
  .liquid-79ae,
  .paper_cd28 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .prev_74d2,
  .light-62c0,
  .small-e51f {
    max-width: none !important;
  }
  
  .item-pink-b54f {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .filter-99b0 {
    font-size: 1.5rem !important;
  }
  
  .preview_68bd {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .hidden_1618,
  .thick_209f {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .box_hard_fa95 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .tabs-72c2 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .slider_35ca {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .prev_74d2,
  .small-e51f {
    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: 7b00 */
.shadow-element-t2 {
  padding: 0.2rem;
  font-size: 11px;
  line-height: 1.3;
}
