/* ============================================
   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 (.over_4bc4) is a descendant of
   .panel_dceb (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.footer-5323 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".summary_0ffd" 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.easy-d7eb so it can't cause
   horizontal overflow anyway. */
.primary_28b1,
.logo-7a06,
.rough_b8b1,
.wood-a3ac,
.filter-red-3563,
.aside-over-36a5,
.stone-89d7,
.inner-f767,
.media_rough_e54b,
.pattern-complex-7d84,
.dark-c548 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .small_d8a5 {
    padding: 8px 0;
  }
  
  .info_static_2895 img {
    height: 28px;
    width: auto;
  }
  
  .basic-660a {
    display: none !important;
  }
  
  .lower_6626 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .lower_6626 svg {
    width: 14px;
    height: 14px;
  }
  
  .stale_ed5a {
    padding: 6px;
  }
  
  .column-fluid-b9db {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .rough_b8b1,
  .logo-7a06,
  .wood-a3ac,
  .filter-red-3563,
  .accent-7b14,
  .highlight_e96b,
  .article_9173,
  .article_wood_811c,
  .accordion-2514,
  .easy-6df4,
  .section-cb82,
  .simple-1aa7 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .disabled_de80,
  .notification_solid_b0e7 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .heading-7a70,
  .slow_4d64,
  .header-8bea,
  .card_top_71f5,
  .notification_ca46,
  .info-wide-29bf,
  .box_b75a {
    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 */
  .paragraph-a50b,
  .filter_9fc3,
  .soft_cd34,
  .current_17eb,
  .silver_1d32 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .box-blue-9d55,
  .first-54e7,
  .soft-4dff,
  .search_1a0b {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .fast_a4e7,
  .footer-fluid-020c {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .element_3449,
  .secondary-new-beb6,
  .large-38c0,
  .background_d847 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .full_978f,
  .feature_78e7,
  .accent_paper_2f57,
  .picture-6b80,
  .banner_872e,
  .slider_wood_2184 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .paragraph-a50b,
  .filter_9fc3,
  .current_17eb {
    max-width: none !important;
  }
  
  .summary_0ffd {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .box-blue-9d55 {
    font-size: 1.5rem !important;
  }
  
  .first-54e7 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .component_0343,
  .dropdown-2774 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .soft-4dff {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .pagination-08e9 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .text-951c {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .paragraph-a50b,
  .current_17eb {
    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: 584f */
.promo-block-r1 {
  padding: 0.1rem;
  font-size: 14px;
  line-height: 1.1;
}
