/* ============================================
   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 (.label_fresh_81cf) is a descendant of
   .background-017a (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.paper-391a {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".short_8684" 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.accordion_f076 so it can't cause
   horizontal overflow anyway. */
.label-hard-803a,
.primary-a34d,
.pressed-fd48,
.slider-upper-2290,
.card_9a16,
.active-cd60,
.wrapper-747a,
.glass_18d1,
.gallery-fast-ef61,
.highlight_outer_dba1,
.pro-af10 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .background_6f3f {
    padding: 8px 0;
  }
  
  .west-d911 img {
    height: 28px;
    width: auto;
  }
  
  .alert_mini_6b3f {
    display: none !important;
  }
  
  .pink-5e99 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .pink-5e99 svg {
    width: 14px;
    height: 14px;
  }
  
  .surface_liquid_5e42 {
    padding: 6px;
  }
  
  .menu-2df3 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .pressed-fd48,
  .primary-a34d,
  .slider-upper-2290,
  .card_9a16,
  .tertiary_silver_94a9,
  .article-0fbe,
  .black_d24b,
  .heading-left-367c,
  .tiny-f3e7,
  .article_c09a,
  .copper-49e0,
  .search_paper_c3b6 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .slow_3752,
  .texture-complex-e9a1 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .primary-5cc5,
  .cool_da16,
  .motion-0cad,
  .right-e7a3,
  .complex-abe7,
  .gradient_bottom_82f8,
  .badge-5194 {
    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 */
  .pressed_63ff,
  .wrapper_small_b574,
  .blue-b1b4,
  .slider-upper-5908,
  .under-bc9e {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .image-east-57c1,
  .badge-95f1,
  .banner-fixed-c0cf,
  .table_bf50 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .brown_f3ba,
  .fixed-aa80 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .media-simple-957b,
  .pagination-2786,
  .list_glass_2089,
  .tertiary-1812 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .wood-b87f,
  .form-4c11,
  .bronze-6c8a,
  .banner_wide_2b18,
  .accent_warm_2504,
  .solid_b596 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .pressed_63ff,
  .wrapper_small_b574,
  .slider-upper-5908 {
    max-width: none !important;
  }
  
  .short_8684 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .image-east-57c1 {
    font-size: 1.5rem !important;
  }
  
  .badge-95f1 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .orange_0bd4,
  .outline_middle_1754 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .banner-fixed-c0cf {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .dropdown_steel_0720 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .aside-a5e7 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .pressed_63ff,
  .slider-upper-5908 {
    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: 29f3 */
.shadow-element-f9 {
  padding: 0.3rem;
  font-size: 14px;
  line-height: 1.2;
}
