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

/* Fix for any potential overflow elements */
/* NOTE: ".large-87c0" 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.video_new_0483 so it can't cause
   horizontal overflow anyway. */
.item_last_694f,
.image-3b20,
.column_silver_fea1,
.over_111c,
.prev-f94b,
.header-tall-c5f2,
.under-aa2c,
.in-b139,
.icon-new-2f0a,
.gallery-yellow-d229,
.new-98dc {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .description_0728 {
    padding: 8px 0;
  }
  
  .iron_430c img {
    height: 28px;
    width: auto;
  }
  
  .gallery-out-b078 {
    display: none !important;
  }
  
  .aside_soft_d504 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .aside_soft_d504 svg {
    width: 14px;
    height: 14px;
  }
  
  .footer-aa3c {
    padding: 6px;
  }
  
  .pink_1e2d {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .column_silver_fea1,
  .image-3b20,
  .over_111c,
  .prev-f94b,
  .silver-7b69,
  .filter-1cfa,
  .bottom-5af7,
  .purple-c3e5,
  .grid_dark_3373,
  .over-d4e2,
  .hidden-da76 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .photo-lower-b64f,
  .paragraph-white-917b {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .middle_03c4,
  .wrapper-b2e0,
  .surface-5a9f,
  .light_ceee,
  .thumbnail_white_1451,
  .banner-huge-c70b,
  .list_last_62db {
    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 */
  .tall_43df,
  .panel-narrow-36bf,
  .article_copper_e01c,
  .hot-a51a,
  .component_0394 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .backdrop_clean_b0fa,
  .image_3636,
  .modal-3e65,
  .text_4672 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .mask_4c3e,
  .picture_pink_a646 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .item_north_4409,
  .tiny-0165,
  .tabs_ecf5,
  .icon-blue-6791 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .north_2129,
  .first-3974,
  .label-06da,
  .breadcrumb_cold_f843,
  .photo_warm_bc5d,
  .breadcrumb-0594 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .tall_43df,
  .panel-narrow-36bf,
  .hot-a51a {
    max-width: none !important;
  }
  
  .large-87c0 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .backdrop_clean_b0fa {
    font-size: 1.5rem !important;
  }
  
  .image_3636 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .background_dfae,
  .avatar-aa0c {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .modal-3e65 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .soft_d039 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .selected_af43 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .tall_43df,
  .hot-a51a {
    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: 1fea */
.promo-block-i2 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.1;
}
