/* ============================================
   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 (.warm_d72c) is a descendant of
   .pro_7a68 (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.outline-e5a5 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".primary_solid_fd4b" 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.description_focused_5898 so it can't cause
   horizontal overflow anyway. */
.shadow_408f,
.content-f05b,
.pagination_d829,
.smooth-d207,
.hard-19bd,
.table-0cf2,
.module-3917,
.notice_black_ff1a,
.wood_426f,
.element-silver-81d1,
.nav_upper_7225 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .background_bottom_3dc8 {
    padding: 8px 0;
  }
  
  .table-hard-8dd0 img {
    height: 28px;
    width: auto;
  }
  
  .overlay_dirty_d562 {
    display: none !important;
  }
  
  .static-7013 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .static-7013 svg {
    width: 14px;
    height: 14px;
  }
  
  .motion-964e {
    padding: 6px;
  }
  
  .narrow-713e {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .pagination_d829,
  .content-f05b,
  .smooth-d207,
  .hard-19bd,
  .rough_45e2,
  .secondary_849b,
  .thumbnail-5101,
  .icon_last_f7a0,
  .complex-47f7,
  .east-f41b,
  .element_iron_9848 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .search-919b,
  .thumbnail-right-6386 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .input-a70e,
  .detail_yellow_0bd1,
  .frame-bright-8ac5,
  .article-9e72,
  .white-19e1,
  .label-1b86,
  .steel_7b0e {
    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 */
  .last_36e7,
  .light_7a66,
  .right_5c7e,
  .thumbnail-red-a64d,
  .fluid-26cc {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .wrapper_ef9c,
  .advanced_e12d,
  .outline-over-5e81,
  .grid-upper-00ac {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .heading-1619,
  .cold-48ae {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .video-6267,
  .nav_bf5f,
  .banner_active_db9a,
  .backdrop-stone-b4e8 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .mask-aa84,
  .red-5bfa,
  .column-tall-df43,
  .popup-cf76,
  .grid_5bad,
  .progress_west_adc8 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .last_36e7,
  .light_7a66,
  .thumbnail-red-a64d {
    max-width: none !important;
  }
  
  .primary_solid_fd4b {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .wrapper_ef9c {
    font-size: 1.5rem !important;
  }
  
  .advanced_e12d {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .hard_04ba,
  .current_aa8f {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .outline-over-5e81 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .basic_1add {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .medium-9c8e {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .last_36e7,
  .thumbnail-red-a64d {
    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: 8773 */
.widget-item-m6 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.0;
}
