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

/* Fix for any potential overflow elements */
/* NOTE: ".wrapper_gold_0aba" 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.active-ef58 so it can't cause
   horizontal overflow anyway. */
.tag_0021,
.basic_1b5c,
.hovered-fb46,
.lite_37c3,
.focus_524f,
.table-2782,
.detail_50e3,
.background_b7ac,
.bronze-d2ac,
.menu-basic-b704,
.bright_28d0 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .short-0749 {
    padding: 8px 0;
  }
  
  .summary-slow-c5e4 img {
    height: 28px;
    width: auto;
  }
  
  .steel-94ec {
    display: none !important;
  }
  
  .fluid_f74c {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .fluid_f74c svg {
    width: 14px;
    height: 14px;
  }
  
  .mask-gold-7864 {
    padding: 6px;
  }
  
  .tiny_c447 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .hovered-fb46,
  .basic_1b5c,
  .lite_37c3,
  .focus_524f,
  .yellow-09ae,
  .left_40de,
  .gas_1215,
  .heading-e37e,
  .action_7b68,
  .hero-selected-a450,
  .section_west_20a6,
  .center_9603 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .pagination_1e3c,
  .picture-red-4bbc {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .bronze_d713,
  .gallery-9159,
  .row_020f,
  .active_3ff8,
  .avatar-2e69,
  .summary-4c5f,
  .shade-dynamic-48be {
    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 */
  .last_9e05,
  .west_71bc,
  .pattern_fresh_353d,
  .fluid_ffdd,
  .stone_86a0 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .hero-45b9,
  .dark_375e,
  .photo-c190,
  .image-first-de61 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .stale-7f2c,
  .dropdown_hard_7a61 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .feature_f822,
  .summary-huge-e313,
  .content_motion_1f25,
  .search-gold-8ab5 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .first_8eb3,
  .steel-d13c,
  .prev_1a3e,
  .light_5bfd,
  .old_0d9d,
  .description_large_2e7d {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .last_9e05,
  .west_71bc,
  .fluid_ffdd {
    max-width: none !important;
  }
  
  .wrapper_gold_0aba {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .hero-45b9 {
    font-size: 1.5rem !important;
  }
  
  .dark_375e {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .accent-be27,
  .hot_9336 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .photo-c190 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .upper_b581 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .element-silver-86c7 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .last_9e05,
  .fluid_ffdd {
    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: 775e */
.promo-block-d6 {
  padding: 0.2rem;
  font-size: 13px;
  line-height: 1.1;
}
