/* ============================================
   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 (.hard-7098) is a descendant of
   .bottom-8198 (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.clean-7a29 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".gradient-under-f6a1" 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.item_8ef9 so it can't cause
   horizontal overflow anyway. */
.preview_steel_0f9e,
.tabs_c166,
.aside-6615,
.breadcrumb-e87e,
.caption-1526,
.steel-cb63,
.sidebar-solid-1b92,
.layout_6a82,
.element-down-e775,
.title_full_eeb8,
.menu-complex-0745 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .input-easy-7d23 {
    padding: 8px 0;
  }
  
  .accordion-ce0e img {
    height: 28px;
    width: auto;
  }
  
  .outline-east-9f61 {
    display: none !important;
  }
  
  .motion-0c0f {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .motion-0c0f svg {
    width: 14px;
    height: 14px;
  }
  
  .over_0e95 {
    padding: 6px;
  }
  
  .yellow_d89a {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .aside-6615,
  .tabs_c166,
  .breadcrumb-e87e,
  .caption-1526,
  .aside-glass-b6b2,
  .background-f106,
  .old-7c2f,
  .slider_pro_c0df,
  .column_817b,
  .medium_dd06,
  .gradient-black-ebc0,
  .outline_first_a0a4 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .bronze-0fa3,
  .hot-a4d3 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .form-static-37b2,
  .wrapper_fd91,
  .section_green_7539,
  .stale-b2d2,
  .slider_smooth_0af7,
  .complex-adc4,
  .pattern_1c3e {
    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 */
  .shade_74ef,
  .hard-5fb7,
  .short-c7b5,
  .nav_8f17,
  .block_60f4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .media_brown_0fad,
  .element_b013,
  .mini_51ff,
  .thumbnail_black_43fb {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .action-d558,
  .table-a48c {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .dynamic-d971,
  .current_5a63,
  .dirty-7317,
  .bronze_9a86 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .lite-2664,
  .hard_f827,
  .panel-2c4e,
  .slider-up-7231,
  .menu-6f7f,
  .aside-dim-98b7 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .shade_74ef,
  .hard-5fb7,
  .nav_8f17 {
    max-width: none !important;
  }
  
  .gradient-under-f6a1 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .media_brown_0fad {
    font-size: 1.5rem !important;
  }
  
  .element_b013 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .row_36ff,
  .smooth-131e {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .mini_51ff {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .avatar-cool-2ff8 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .module_liquid_abbd {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .shade_74ef,
  .nav_8f17 {
    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: 68a6 */
.widget-item-e6 {
  padding: 0.1rem;
  font-size: 14px;
  line-height: 1.0;
}
