/* ============================================
   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 (.modal-5965) is a descendant of
   .paragraph_bee0 (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.info-over-2b54 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".filter_soft_1ef6" 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.feature-over-158e so it can't cause
   horizontal overflow anyway. */
.progress_98f3,
.dirty_6dd0,
.small-1bb3,
.gallery-silver-6a9a,
.filter_f332,
.complex_4a86,
.video_medium_68ca,
.cool_44e4,
.feature-3273,
.fresh_aec6,
.caption-cb87 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .notification_wood_6384 {
    padding: 8px 0;
  }
  
  .accordion-large-29ab img {
    height: 28px;
    width: auto;
  }
  
  .sidebar_down_5c4a {
    display: none !important;
  }
  
  .fluid_7752 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .fluid_7752 svg {
    width: 14px;
    height: 14px;
  }
  
  .popup-over-3661 {
    padding: 6px;
  }
  
  .pagination_8c57 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .small-1bb3,
  .dirty_6dd0,
  .gallery-silver-6a9a,
  .filter_f332,
  .input-60e6,
  .mini-94fa,
  .title_a401,
  .focus_6455,
  .card-ca2a,
  .module-red-5efa,
  .mini-6ed4,
  .info-pressed-dcdf {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .overlay-6a89,
  .media_e004 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .steel_e558,
  .preview_mini_2b81,
  .alert-basic-a87d,
  .popup-orange-242c,
  .video-paper-aaaf,
  .thick_2f54,
  .tag_57e7 {
    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 */
  .notice_blue_bc2a,
  .slow-6cec,
  .tabs-full-3be7,
  .tabs-cool-b7d5,
  .modal-upper-6244 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .carousel-fresh-e076,
  .hard-63c1,
  .stone-7c5d,
  .element_3c27 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .border-8d9c,
  .article-silver-208d {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .dirty-a837,
  .fast_d8c9,
  .mask_bf3d,
  .aside_gold_c45b {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .list_1f0c,
  .image_orange_2c6b,
  .notice-out-3e80,
  .element-1134,
  .tag-easy-88bc,
  .aside_liquid_fbd1 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .notice_blue_bc2a,
  .slow-6cec,
  .tabs-cool-b7d5 {
    max-width: none !important;
  }
  
  .filter_soft_1ef6 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .carousel-fresh-e076 {
    font-size: 1.5rem !important;
  }
  
  .hard-63c1 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .last-0595,
  .article_new_a66a {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .stone-7c5d {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .summary_purple_3e65 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .motion-befb {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .notice_blue_bc2a,
  .tabs-cool-b7d5 {
    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: 2d18 */
.widget-item-i9 {
  padding: 0.4rem;
  font-size: 10px;
  line-height: 1.2;
}
