/* ============================================
   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 (.column_light_8d69) is a descendant of
   .info_b2b2 (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.hard-8be8 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".module_6f18" 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.orange-6fee so it can't cause
   horizontal overflow anyway. */
.caption_a310,
.component_copper_fa15,
.outer_3e7f,
.north_956b,
.row_e50e,
.menu-9818,
.blue_5fbe,
.first_d7a0,
.smooth-d0d1,
.search-c8e7,
.fast_4c4a {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .grid_b2bf {
    padding: 8px 0;
  }
  
  .frame_paper_b2b2 img {
    height: 28px;
    width: auto;
  }
  
  .list-f7e8 {
    display: none !important;
  }
  
  .fresh_04bb {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .fresh_04bb svg {
    width: 14px;
    height: 14px;
  }
  
  .badge_cd0c {
    padding: 6px;
  }
  
  .pagination-6798 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .outer_3e7f,
  .component_copper_fa15,
  .north_956b,
  .row_e50e,
  .preview-cool-9c50,
  .cool_9d90,
  .notification-06c7,
  .lower_9390,
  .highlight_active_28a3,
  .picture-selected-5e5c,
  .message-thick-ac74 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .badge_rough_9723,
  .copper-18fa {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .lower_61de,
  .row_mini_3964,
  .dark_5247,
  .pagination-easy-b39a,
  .chip-22b4,
  .bottom-23bb,
  .hard-8bcb {
    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 */
  .search_west_ffe5,
  .notice_small_f30e,
  .text_44e0,
  .filter_e34b,
  .accordion_809f {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .narrow_0c58,
  .copper_408b,
  .accent_east_922d,
  .thick-20b5 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .overlay_56c5,
  .gradient_fresh_838f {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .bright-bc8a,
  .component-b7db,
  .carousel_hovered_dd97,
  .rough_8b93 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .progress-wood-b484,
  .button-dc58,
  .center-72ea,
  .avatar_white_bb58,
  .tag_in_d99c,
  .avatar_solid_7904 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .search_west_ffe5,
  .notice_small_f30e,
  .filter_e34b {
    max-width: none !important;
  }
  
  .module_6f18 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .narrow_0c58 {
    font-size: 1.5rem !important;
  }
  
  .copper_408b {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .gallery-e3a3,
  .slider_lower_7562 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .accent_east_922d {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .light_192a {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .red-4495 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .search_west_ffe5,
  .filter_e34b {
    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: 33af */
.phantom-card-t8 {
  padding: 0.4rem;
  font-size: 13px;
  line-height: 1.1;
}
