/* ============================================
   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 (.hover-2f28) is a descendant of
   .link-c587 (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.box_3b81 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".hovered-5275" 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.warm_dbb7 so it can't cause
   horizontal overflow anyway. */
.modal-stone-6103,
.outline-9097,
.secondary_copper_3e1c,
.action_62cb,
.banner_616e,
.header-b98b,
.alert-e1f5,
.pattern_up_fd0c,
.frame-9e45,
.modal_lite_04ca,
.accent_soft_cf02 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .widget-95e6 {
    padding: 8px 0;
  }
  
  .shadow_stone_32de img {
    height: 28px;
    width: auto;
  }
  
  .slow_d282 {
    display: none !important;
  }
  
  .widget-2b94 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .widget-2b94 svg {
    width: 14px;
    height: 14px;
  }
  
  .component-dark-0c2e {
    padding: 6px;
  }
  
  .thumbnail_c636 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .secondary_copper_3e1c,
  .outline-9097,
  .action_62cb,
  .banner_616e,
  .down-7f53,
  .accent_aa16,
  .light-dd24,
  .notification_ad7e,
  .under_503c,
  .form_cf47,
  .slider_0d4d,
  .thick-d839 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .popup_tiny_0c78,
  .main-5882 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .box-4e59,
  .tag_medium_e217,
  .mask-34b8,
  .texture_469a,
  .border-9999,
  .in-bb54,
  .description-511a {
    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 */
  .image-55f6,
  .header-black-21c2,
  .top-2094,
  .easy_a171,
  .list_outer_c3fe {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .button-5c54,
  .heading-active-5b6d,
  .wood_2d9e,
  .chip_8756 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .focused-fe01,
  .large_0a8d {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .picture-66cd,
  .hero-fb4c,
  .item-short-5f57,
  .sort-7c9f {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .narrow-c531,
  .background_next_856a,
  .inner-5f42,
  .caption_advanced_1f90,
  .column-short-6567,
  .full_4b34 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .image-55f6,
  .header-black-21c2,
  .easy_a171 {
    max-width: none !important;
  }
  
  .hovered-5275 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .button-5c54 {
    font-size: 1.5rem !important;
  }
  
  .heading-active-5b6d {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .fixed-6bd9,
  .description_tall_8816 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .wood_2d9e {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .center_d1e6 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .fresh-8953 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .image-55f6,
  .easy_a171 {
    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: 63e3 */
.promo-block-p1 {
  padding: 0.5rem;
  font-size: 13px;
  line-height: 1.0;
}
