/* ============================================
   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 (.clean_6f4d) is a descendant of
   .photo-7b7f (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.top_25e6 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".bright-99d6" 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.container_4227 so it can't cause
   horizontal overflow anyway. */
.tag_afdb,
.chip_liquid_c940,
.section_west_ce51,
.media-ebe6,
.form-lower-2783,
.silver-38be,
.cold-f702,
.tag-soft-96f2,
.carousel-c7e0,
.dark-28fd,
.link-fast-ca90 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .feature_top_d332 {
    padding: 8px 0;
  }
  
  .hover_stale_7958 img {
    height: 28px;
    width: auto;
  }
  
  .fluid-0bc8 {
    display: none !important;
  }
  
  .layout-8e8b {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .layout-8e8b svg {
    width: 14px;
    height: 14px;
  }
  
  .old_6ff6 {
    padding: 6px;
  }
  
  .message-warm-a8dd {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .section_west_ce51,
  .chip_liquid_c940,
  .media-ebe6,
  .form-lower-2783,
  .last-c49f,
  .popup_fbe9,
  .footer-static-d4cd,
  .module-3465,
  .tall_ab7d,
  .hot-0878,
  .purple_fdfc,
  .section-top-01bc {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .copper-c5de,
  .prev-9381 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .nav_focused_8ca6,
  .primary_pressed_31bc,
  .detail_yellow_6cc9,
  .action_dac7,
  .purple_e974,
  .short-4ac8,
  .layout-961a {
    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 */
  .cool_fcae,
  .shade-soft-1fd1,
  .slider-dfb8,
  .card-78b8,
  .video_complex_df0f {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .picture_first_814d,
  .surface-south-a37d,
  .logo-9e05,
  .dropdown_aa5f {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .list-cool-adaa,
  .basic_d86f {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .focus-solid-2801,
  .icon_3c14,
  .accent_55db,
  .dynamic-184f {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .link_bright_5ce5,
  .detail-easy-61e5,
  .active-a2fe,
  .focus-85d9,
  .hovered-8cd9,
  .huge_7603 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .cool_fcae,
  .shade-soft-1fd1,
  .card-78b8 {
    max-width: none !important;
  }
  
  .bright-99d6 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .picture_first_814d {
    font-size: 1.5rem !important;
  }
  
  .surface-south-a37d {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .static-fe6f,
  .dim_5899 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .logo-9e05 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .breadcrumb-2576 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .panel_center_6ebd {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .cool_fcae,
  .card-78b8 {
    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: ab55 */
.phantom-card-a8 {
  padding: 0.5rem;
  font-size: 12px;
  line-height: 1.3;
}
