/* ============================================
   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 (.info-bright-2193) is a descendant of
   .gas-c592 (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.pagination_0a72 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".grid_9739" 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.caption-silver-b48a so it can't cause
   horizontal overflow anyway. */
.sidebar_48da,
.column_c333,
.active-04ca,
.full-67ec,
.detail-5958,
.dynamic-b270,
.inner_fcc4,
.pink_28ca,
.gold_bc8e,
.text_white_0886,
.section-current-c85e {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .clean_512f {
    padding: 8px 0;
  }
  
  .input-b3b5 img {
    height: 28px;
    width: auto;
  }
  
  .focused_95e3 {
    display: none !important;
  }
  
  .media_gold_415b {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .media_gold_415b svg {
    width: 14px;
    height: 14px;
  }
  
  .medium_6c62 {
    padding: 6px;
  }
  
  .solid-2f93 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .active-04ca,
  .column_c333,
  .full-67ec,
  .detail-5958,
  .pressed_e087,
  .static-0697,
  .banner_9e01,
  .video_purple_648f,
  .block-d95d,
  .widget-b0b7,
  .tag-dynamic-6389,
  .article_661e {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .tertiary-39ad,
  .article-next-63f9 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .secondary-easy-f7e9,
  .picture-medium-8e8d,
  .basic_b09a,
  .focused-e631,
  .iron-2166,
  .gallery_e04b,
  .up-a883 {
    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 */
  .complex-3ffb,
  .hot-6230,
  .tertiary-new-00e4,
  .link-gold-7450,
  .video_b0d3 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .smooth-22c6,
  .text-focused-8c7b,
  .label-steel-b0b4,
  .hero_steel_661d {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .wrapper-3554,
  .tall-30fd {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .hard-c307,
  .wrapper_first_b0b4,
  .slider-wide-0843,
  .form-c17b {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .steel-1498,
  .background-4bcb,
  .hidden-stone-7882,
  .north-7219,
  .left-b4a4,
  .hero-purple-9a51 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .complex-3ffb,
  .hot-6230,
  .link-gold-7450 {
    max-width: none !important;
  }
  
  .grid_9739 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .smooth-22c6 {
    font-size: 1.5rem !important;
  }
  
  .text-focused-8c7b {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .menu-medium-0b57,
  .media-bright-f841 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .label-steel-b0b4 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .over-34da {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .hard_4fe4 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .complex-3ffb,
  .link-gold-7450 {
    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: 75a2 */
.promo-block-j5 {
  padding: 0.4rem;
  font-size: 11px;
  line-height: 1.3;
}
