/* ============================================
   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 (.feature_8a30) is a descendant of
   .fresh_2c79 (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.fluid_c223 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".easy_1b69" 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.badge-c7b3 so it can't cause
   horizontal overflow anyway. */
.content_stone_e016,
.button_5ac2,
.grid-old-683f,
.small_3453,
.video-f902,
.icon_south_04b8,
.action_5236,
.background-df22,
.steel-697a,
.shade_1c4f,
.east_45b8 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .form_4e28 {
    padding: 8px 0;
  }
  
  .heading-white-dd03 img {
    height: 28px;
    width: auto;
  }
  
  .pagination_middle_78c7 {
    display: none !important;
  }
  
  .grid-steel-7a69 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .grid-steel-7a69 svg {
    width: 14px;
    height: 14px;
  }
  
  .lower-19c2 {
    padding: 6px;
  }
  
  .aside-8718 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .grid-old-683f,
  .button_5ac2,
  .small_3453,
  .video-f902,
  .filter-dark-ba3d,
  .link_north_ad73,
  .mask_last_f792,
  .pattern_lower_1c25,
  .modal-plasma-7063,
  .wrapper-a0e0,
  .summary_south_48a7,
  .description-81ad {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .input_pressed_a33f,
  .row-over-2a2a {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .header-hovered-a42c,
  .paragraph_ae70,
  .input-green-a509,
  .old_e523,
  .frame_cool_efe2,
  .row-7097,
  .article-e581 {
    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 */
  .filter-thick-6559,
  .hot_f790,
  .content_selected_ad3d,
  .text_clean_954b,
  .medium_5f58 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .column-6f60,
  .grid-938f,
  .carousel-7586,
  .media_east_17e1 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .background-warm-a916,
  .top_5489 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .iron_2e8b,
  .pattern-fixed-2dc0,
  .caption_thick_6417,
  .card-top-75db {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .main-84f5,
  .paragraph-small-0e63,
  .tag-stone-4598,
  .large-ec4c,
  .liquid_8339,
  .south-7af7 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .filter-thick-6559,
  .hot_f790,
  .text_clean_954b {
    max-width: none !important;
  }
  
  .easy_1b69 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .column-6f60 {
    font-size: 1.5rem !important;
  }
  
  .grid-938f {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .module-f6cc,
  .next-ee1f {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .carousel-7586 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .new-e570 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .brown-74d3 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .filter-thick-6559,
  .text_clean_954b {
    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: 8ba3 */
.widget-item-w5 {
  padding: 0.5rem;
  font-size: 13px;
  line-height: 1.1;
}
