/* ============================================
   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 (.aside-complex-e09d) is a descendant of
   .list-right-8e25 (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.gallery_83dc {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".content_75e8" 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.item_2171 so it can't cause
   horizontal overflow anyway. */
.warm-7ce1,
.disabled-liquid-f6d7,
.upper_f173,
.button-upper-10b9,
.caption-64ce,
.paragraph-out-e690,
.outer_8da9,
.carousel_stale_9615,
.alert-7166,
.wide_a697,
.alert_09a2 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .in_d3a3 {
    padding: 8px 0;
  }
  
  .preview_pink_3ee4 img {
    height: 28px;
    width: auto;
  }
  
  .liquid_4085 {
    display: none !important;
  }
  
  .overlay_pink_549a {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .overlay_pink_549a svg {
    width: 14px;
    height: 14px;
  }
  
  .main_gold_5f80 {
    padding: 6px;
  }
  
  .column-wood-0de3 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .upper_f173,
  .disabled-liquid-f6d7,
  .button-upper-10b9,
  .caption-64ce,
  .large_46dc,
  .disabled-large-07ee,
  .top-b455,
  .green_99d1,
  .huge_8da9,
  .accordion-9662,
  .modal_d79e,
  .frame-white-78e2 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .primary-3572,
  .focus_hard_5bcd {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .row_9b63,
  .last-e36e,
  .new_872d,
  .gallery-liquid-12b8,
  .label-pink-3b77,
  .bronze-fa4c,
  .out-0c1d {
    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 */
  .block_5e2d,
  .grid-white-03d8,
  .silver-725d,
  .notice-c061,
  .old_a006 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .wide-5e29,
  .box_1058,
  .text_cc20,
  .element-e04e {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .popup-3954,
  .aside_b518 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .column-down-1c4d,
  .notification-003b,
  .box-orange-881a,
  .copper_0df8 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .caption-top-b1b5,
  .gold_37ea,
  .component-out-e0a7,
  .fluid-c514,
  .tertiary-hard-cf44,
  .header_8009 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .block_5e2d,
  .grid-white-03d8,
  .notice-c061 {
    max-width: none !important;
  }
  
  .content_75e8 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .wide-5e29 {
    font-size: 1.5rem !important;
  }
  
  .box_1058 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .frame-slow-4da7,
  .simple-fa32 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .text_cc20 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .pagination_99e3 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .content_top_5ebb {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .block_5e2d,
  .notice-c061 {
    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: 2136 */
.shadow-element-g9 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.2;
}
