/* ============================================
   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_b86e) is a descendant of
   .aside-d381 (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.article-over-fd6a {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".accordion-e2d4" 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.disabled-static-cc39 so it can't cause
   horizontal overflow anyway. */
.input-green-75f9,
.pagination_first_3c91,
.soft-4f91,
.breadcrumb_dim_0f11,
.text-steel-0ef6,
.panel_8f5f,
.south-f73a,
.thick-1c61,
.mask_blue_a914,
.easy_cb81,
.blue-46e4 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .item-ae5f {
    padding: 8px 0;
  }
  
  .wrapper-in-22aa img {
    height: 28px;
    width: auto;
  }
  
  .icon_91d8 {
    display: none !important;
  }
  
  .hover-blue-1fc5 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .hover-blue-1fc5 svg {
    width: 14px;
    height: 14px;
  }
  
  .wrapper_warm_6678 {
    padding: 6px;
  }
  
  .element_7727 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .soft-4f91,
  .pagination_first_3c91,
  .breadcrumb_dim_0f11,
  .text-steel-0ef6,
  .slider_ac22,
  .stale-ee47,
  .search-c42b,
  .chip-pink-7ed9,
  .red-c8de,
  .tall-48e7,
  .gas-f6fe,
  .white-ef1e {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .pro-6fb5,
  .out_430f {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .middle_a510,
  .full_3005,
  .lite-30ab,
  .column_4ca0,
  .overlay_next_15e3,
  .copper_5fa2,
  .hard_5e56 {
    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 */
  .in_efb5,
  .yellow_eaed,
  .dirty-1729,
  .liquid_b526,
  .pattern-ed52 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .image_dark_c869,
  .banner_in_d3dc,
  .thumbnail_wide_565a,
  .rough-b598 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .grid-medium-1b24,
  .center_7e2f {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .column-pro-d94d,
  .mask-d3ad,
  .button-6ae3,
  .row-8a94 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .card-white-3e46,
  .table_rough_68bf,
  .sort_fresh_63b1,
  .filter-1caf,
  .pagination_0f06,
  .card-fbb7 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .in_efb5,
  .yellow_eaed,
  .liquid_b526 {
    max-width: none !important;
  }
  
  .accordion-e2d4 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .image_dark_c869 {
    font-size: 1.5rem !important;
  }
  
  .banner_in_d3dc {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .highlight_narrow_2c91,
  .description-d1da {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .thumbnail_wide_565a {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .media-97f2 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .text-6bfb {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .in_efb5,
  .liquid_b526 {
    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: 4884 */
.shadow-element-y7 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.0;
}
