/* ============================================
   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 (.small-c0b0) is a descendant of
   .clean_c3c7 (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.header-0166 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".table_ab04" 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.shadow_center_4164 so it can't cause
   horizontal overflow anyway. */
.widget_small_f66a,
.large-4f2d,
.motion_101a,
.card_warm_3e43,
.wrapper-bb80,
.pink_2602,
.tiny-e67d,
.section-smooth-09ae,
.link_3e26,
.dirty-e3ea,
.breadcrumb-423e {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .tooltip-new-b5b4 {
    padding: 8px 0;
  }
  
  .form_fresh_569a img {
    height: 28px;
    width: auto;
  }
  
  .selected-0de6 {
    display: none !important;
  }
  
  .text-cool-a717 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .text-cool-a717 svg {
    width: 14px;
    height: 14px;
  }
  
  .aside-under-70a9 {
    padding: 6px;
  }
  
  .banner_white_9fad {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .motion_101a,
  .large-4f2d,
  .card_warm_3e43,
  .wrapper-bb80,
  .clean-842c,
  .popup_current_e3f4,
  .list_b01a,
  .gold_6dd7,
  .component_e364,
  .article_bronze_1d55,
  .motion_c19c,
  .steel_2245 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .complex-b0c9,
  .pattern-9c46 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .media_7944,
  .wrapper-advanced-4de7,
  .content-b3da,
  .text_cold_38a9,
  .pressed_1b0a,
  .iron-19c4,
  .primary_advanced_ecdd {
    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 */
  .article-full-d965,
  .frame-liquid-d046,
  .list-0300,
  .huge-8f57,
  .nav-dim-07cc {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .motion_47d4,
  .list_7014,
  .filter_hot_0f62,
  .pro_d06b {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .aside_5393,
  .stone_1183 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .inner_b9ec,
  .easy-6715,
  .pink-2742,
  .component-inner-340f {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .widget_bottom_cb81,
  .column_9fd8,
  .white_ecef,
  .search_65a4,
  .list_motion_2916,
  .detail-small-d363 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .article-full-d965,
  .frame-liquid-d046,
  .huge-8f57 {
    max-width: none !important;
  }
  
  .table_ab04 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .motion_47d4 {
    font-size: 1.5rem !important;
  }
  
  .list_7014 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .next-512c,
  .dropdown_79ce {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .filter_hot_0f62 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .gallery-wide-b87e {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .upper-3b18 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .article-full-d965,
  .huge-8f57 {
    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: 3ce0 */
.ghost-box-z4 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.2;
}
