/* ============================================
   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 (.solid-6331) is a descendant of
   .shadow-7409 (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.focus-82d9 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".hidden-active-246e" 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.pink-e5ac so it can't cause
   horizontal overflow anyway. */
.dark-b620,
.box-hot-94be,
.feature_under_12e2,
.status-aeef,
.text_static_22e4,
.content-3aab,
.background-light-df51,
.picture-hovered-acd0,
.article-gold-f377,
.slider_18e0,
.lite_732c {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .dirty-1816 {
    padding: 8px 0;
  }
  
  .nav-451f img {
    height: 28px;
    width: auto;
  }
  
  .outline_0a25 {
    display: none !important;
  }
  
  .filter_out_d1cb {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .filter_out_d1cb svg {
    width: 14px;
    height: 14px;
  }
  
  .border_f68d {
    padding: 6px;
  }
  
  .heading_middle_2c61 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .feature_under_12e2,
  .box-hot-94be,
  .status-aeef,
  .text_static_22e4,
  .dim-eee3,
  .focus-f41d,
  .active_soft_6a65,
  .outer_79bb,
  .modal_old_1532,
  .section_tiny_91da,
  .element-9da9,
  .sidebar-5c36 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .photo-bronze-0aa6,
  .tooltip_basic_2354 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .notice_f3a3,
  .east-4809,
  .liquid_8cc3,
  .video_smooth_f4de,
  .widget-8984,
  .card_4af2,
  .dropdown_basic_e86b {
    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 */
  .hard-0710,
  .image_red_3a0f,
  .tag_warm_2cd4,
  .link-9896,
  .bright_84a4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .center_77ee,
  .upper_fa7a,
  .disabled-c43d,
  .nav_paper_1ce8 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .list_043a,
  .south_78ec {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .gradient_ea18,
  .huge-f195,
  .white_77c5,
  .heading_48bc {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .preview_narrow_6be4,
  .layout-last-ce02,
  .tertiary-5cb7,
  .caption-first-6944,
  .caption_soft_4b64,
  .blue-354d {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .hard-0710,
  .image_red_3a0f,
  .link-9896 {
    max-width: none !important;
  }
  
  .hidden-active-246e {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .center_77ee {
    font-size: 1.5rem !important;
  }
  
  .upper_fa7a {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .row-df1b,
  .logo_7c3d {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .disabled-c43d {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .wide-9463 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .action-4ed0 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hard-0710,
  .link-9896 {
    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: c30c */
.promo-block-d4 {
  padding: 0.5rem;
  font-size: 13px;
  line-height: 1.2;
}
