/* ============================================
   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 (.red-0393) is a descendant of
   .last-4409 (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.item-174e {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".bright_21dc" 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.table_dynamic_c06e so it can't cause
   horizontal overflow anyway. */
.header-f8d6,
.avatar-orange-51da,
.hover-north-68f4,
.mini_946a,
.paper_be06,
.module_silver_9c43,
.media-0dc4,
.bottom_66c7,
.breadcrumb_warm_785f,
.link_1f1b,
.east_511a {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .pink_2f13 {
    padding: 8px 0;
  }
  
  .pressed-4981 img {
    height: 28px;
    width: auto;
  }
  
  .caption_over_2671 {
    display: none !important;
  }
  
  .under-f994 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .under-f994 svg {
    width: 14px;
    height: 14px;
  }
  
  .section-solid-bfd2 {
    padding: 6px;
  }
  
  .hover-left-d1c9 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .hover-north-68f4,
  .avatar-orange-51da,
  .mini_946a,
  .paper_be06,
  .heading_9c1c,
  .active_8771,
  .chip_0149,
  .hidden_3b5e,
  .column_71ea,
  .feature_basic_0564,
  .hover-e84d,
  .photo_f0ef {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .accent-3c58,
  .image-green-9c7b {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .summary-in-2ba4,
  .modal-advanced-6095,
  .avatar_8fb0,
  .down_913a,
  .menu_white_5739,
  .full_08a9,
  .last-0fd9 {
    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 */
  .main_410a,
  .input_7ce7,
  .component_pro_a42f,
  .old_9f74,
  .tiny_b44e {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .bronze_3356,
  .lower-04ce,
  .section_old_4e17,
  .popup-618f {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .notice_cd6b,
  .description_copper_80d1 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .smooth_522f,
  .fresh-94db,
  .icon_4a13,
  .photo_d18c {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .red_f40c,
  .bronze-3bad,
  .active-8d9d,
  .gradient_ab3c,
  .heading_d46a,
  .gradient-small-308d {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .main_410a,
  .input_7ce7,
  .old_9f74 {
    max-width: none !important;
  }
  
  .bright_21dc {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .bronze_3356 {
    font-size: 1.5rem !important;
  }
  
  .lower-04ce {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .hidden-last-9061,
  .primary-gas-e671 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .section_old_4e17 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .form-in-2935 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .pagination-thick-c0ce {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .main_410a,
  .old_9f74 {
    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: 678f */
.promo-block-k0 {
  padding: 0.2rem;
  font-size: 13px;
  line-height: 1.0;
}
