/* ============================================
   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 (.hard-b131) is a descendant of
   .layout_9d42 (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.form-hard-fcbc {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".section_hard_7ae4" 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.backdrop-41c2 so it can't cause
   horizontal overflow anyway. */
.next_8b1a,
.list_e210,
.yellow-dcea,
.sort_35b4,
.active-dafa,
.caption-e477,
.frame-3fbb,
.tiny_354b,
.copper-da2c,
.carousel-2236,
.background-5c37 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .under-d35f {
    padding: 8px 0;
  }
  
  .sidebar_e306 img {
    height: 28px;
    width: auto;
  }
  
  .pattern_silver_4a11 {
    display: none !important;
  }
  
  .frame-2e0a {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .frame-2e0a svg {
    width: 14px;
    height: 14px;
  }
  
  .silver-be9c {
    padding: 6px;
  }
  
  .card_pink_5b63 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .yellow-dcea,
  .list_e210,
  .sort_35b4,
  .active-dafa,
  .media-d63a,
  .label-af3c,
  .component_advanced_8189,
  .row_713d,
  .hard_999b,
  .image-a0c4,
  .notification-fresh-b6a7,
  .column-b113 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .widget-1b1e,
  .middle_42c3 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .focus_deef,
  .modal-wood-97d1,
  .surface_c438,
  .light-dbfb,
  .menu-in-59e6,
  .shadow-3d51,
  .video_6b7f {
    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 */
  .logo-basic-9108,
  .outline_steel_1a55,
  .component_8e8c,
  .row_d401,
  .thumbnail-upper-5612 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .layout-top-eb9a,
  .glass_a505,
  .section-light-61e8,
  .surface-7efe {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .fixed_d476,
  .backdrop_0ff4 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .secondary_out_a47b,
  .banner-440d,
  .glass_4137,
  .notice-8ed0 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .thumbnail-brown-8313,
  .component_stale_d0a6,
  .notification-new-c9a5,
  .gradient-brown-0483,
  .item_large_c339,
  .middle-20c1 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .logo-basic-9108,
  .outline_steel_1a55,
  .row_d401 {
    max-width: none !important;
  }
  
  .section_hard_7ae4 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .layout-top-eb9a {
    font-size: 1.5rem !important;
  }
  
  .glass_a505 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .secondary_static_6411,
  .disabled_dfe6 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .section-light-61e8 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .left-44e3 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .fixed-9a04 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .logo-basic-9108,
  .row_d401 {
    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: cdf8 */
.promo-block-m9 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.2;
}
