/* ============================================
   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 (.pagination-7614) is a descendant of
   .preview-be28 (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.slider-active-7717 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".panel-south-9ee1" 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.popup_glass_e846 so it can't cause
   horizontal overflow anyway. */
.pagination-b769,
.accent_cool_ead4,
.preview_left_3385,
.heading_8cf5,
.new-842b,
.brown-a70e,
.info-new-2a81,
.hover_f7f9,
.gallery-in-604f,
.badge_north_248e,
.title_15b9 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .panel_ddf8 {
    padding: 8px 0;
  }
  
  .description-3641 img {
    height: 28px;
    width: auto;
  }
  
  .iron-6683 {
    display: none !important;
  }
  
  .form-light-13e5 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .form-light-13e5 svg {
    width: 14px;
    height: 14px;
  }
  
  .popup-0ea7 {
    padding: 6px;
  }
  
  .dynamic_0f96 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .preview_left_3385,
  .accent_cool_ead4,
  .heading_8cf5,
  .new-842b,
  .lower_df00,
  .photo-9f35,
  .module-center-8c75,
  .aside_slow_fae9,
  .article-clean-53a5,
  .message-old-aeac,
  .texture_ea2b,
  .text-1be0 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .container-prev-42e9,
  .icon-hot-a2e9 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .title-38b6,
  .stone_1e73,
  .accordion_right_2ec7,
  .sidebar_eff4,
  .row_9fc9,
  .top-e298,
  .old_61a3 {
    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 */
  .slider-7885,
  .grid-wide-5b00,
  .blue-421f,
  .column_black_e789,
  .info-ec5f {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .aside-dynamic-3256,
  .lower-1426,
  .container-basic-f575,
  .list_7aa1 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .notice_bottom_c91a,
  .silver-2de5 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .modal_warm_6a4e,
  .white_a10d,
  .blue-af19,
  .nav-dbac {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .under-32e4,
  .yellow_0caf,
  .fluid_dc94,
  .pagination-105a,
  .icon-7ece,
  .secondary-b342 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .slider-7885,
  .grid-wide-5b00,
  .column_black_e789 {
    max-width: none !important;
  }
  
  .panel-south-9ee1 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .aside-dynamic-3256 {
    font-size: 1.5rem !important;
  }
  
  .lower-1426 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .blue-92c7,
  .banner_prev_2a6b {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .container-basic-f575 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .label-c13e {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .motion_a12b {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .slider-7885,
  .column_black_e789 {
    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: 2648 */
.ghost-box-e9 {
  padding: 0.2rem;
  font-size: 14px;
  line-height: 1.0;
}
