/* ============================================
   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 (.current_1546) is a descendant of
   .menu-narrow-3806 (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.easy-56b0 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".slider_east_f9ac" 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.avatar_upper_2756 so it can't cause
   horizontal overflow anyway. */
.right-51b6,
.bright_8b7c,
.carousel_387b,
.basic-dff6,
.green-213b,
.clean-e1fb,
.hard_b1cc,
.bright_31e3,
.alert-silver-34a8,
.media_iron_95c2,
.accordion-wide-77c4 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .wood-2989 {
    padding: 8px 0;
  }
  
  .feature-soft-a857 img {
    height: 28px;
    width: auto;
  }
  
  .bronze_576c {
    display: none !important;
  }
  
  .preview-fluid-4788 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .preview-fluid-4788 svg {
    width: 14px;
    height: 14px;
  }
  
  .gallery-2a1d {
    padding: 6px;
  }
  
  .block_focused_a49f {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .carousel_387b,
  .bright_8b7c,
  .basic-dff6,
  .green-213b,
  .status_first_d5b6,
  .glass_48a4,
  .column-108a,
  .sort_5327,
  .text-outer-5a53,
  .picture_b8ae,
  .disabled-tall-286a {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .highlight_middle_6f8a,
  .dropdown_c902 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .huge_a1f6,
  .image-6484,
  .gallery_3650,
  .cold-f1fe,
  .heading_bf3b,
  .widget_west_538d,
  .preview-tall-3c0e {
    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 */
  .right_dd41,
  .gradient-9e90,
  .center-2f60,
  .status_cf47,
  .thumbnail_a014 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .outer-a289,
  .paragraph-6c9f,
  .row_46cd,
  .texture-bronze-2403 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .current_dc17,
  .widget_4a87 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .fresh_468d,
  .pagination_full_2fbe,
  .east_171e,
  .overlay-1fb0 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .north-3c4b,
  .hard_9b6a,
  .medium-1971,
  .dark_972c,
  .yellow_cf32,
  .outline-2c5c {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .right_dd41,
  .gradient-9e90,
  .status_cf47 {
    max-width: none !important;
  }
  
  .slider_east_f9ac {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .outer-a289 {
    font-size: 1.5rem !important;
  }
  
  .paragraph-6c9f {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .caption-e8a5,
  .tertiary_black_ac76 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .row_46cd {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .thumbnail_purple_5b48 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .container-6282 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .right_dd41,
  .status_cf47 {
    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: 6828 */
.shadow-element-k7 {
  padding: 0.3rem;
  font-size: 10px;
  line-height: 1.0;
}
