/* ============================================
   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 (.hero-dynamic-486b) is a descendant of
   .solid-c5cd (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.frame-static-cb24 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".slider_action_6abb" 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.popup-ae33 so it can't cause
   horizontal overflow anyway. */
.image_d61a,
.next-a5bf,
.hover_bb4d,
.primary_12f1,
.table_active_6c15,
.badge-wood-c935,
.filter-2a18,
.hover_up_edb6,
.form-left-f783,
.alert_active_eb9c,
.container-fast-344c {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .grid-basic-f1c7 {
    padding: 8px 0;
  }
  
  .border_4199 img {
    height: 28px;
    width: auto;
  }
  
  .status_short_2075 {
    display: none !important;
  }
  
  .thick_dfdf {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .thick_dfdf svg {
    width: 14px;
    height: 14px;
  }
  
  .right_d759 {
    padding: 6px;
  }
  
  .list-195c {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .hover_bb4d,
  .next-a5bf,
  .primary_12f1,
  .table_active_6c15,
  .primary-81d3,
  .large_7e89,
  .top_2349,
  .current-79d4,
  .tertiary_prev_e543,
  .description-b043,
  .clean-fff9,
  .copper_02d4 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .container-549b,
  .notification_pressed_6cec {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .gallery_59ec,
  .header-light-4a99,
  .article-focused-6f3e,
  .prev-fff3,
  .tall-e75f,
  .main-93cc,
  .outline-fixed-e90c {
    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 */
  .container_21b1,
  .clean_535f,
  .green-0457,
  .section-cb48,
  .header_active_b846 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .fixed-9c67,
  .grid_light_02ac,
  .prev-f194,
  .brown_a511 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .paper_61fd,
  .feature-wood-2bbe {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .lower_4309,
  .module_warm_5e21,
  .hover-94b4,
  .tag_orange_b938 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .article-gas-c8b8,
  .pro_7ae5,
  .notification_6e58,
  .carousel_1ac0,
  .shadow-aad2,
  .component_1d41 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .container_21b1,
  .clean_535f,
  .section-cb48 {
    max-width: none !important;
  }
  
  .slider_action_6abb {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .fixed-9c67 {
    font-size: 1.5rem !important;
  }
  
  .grid_light_02ac {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .east_3c51,
  .status-light-ffe7 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .prev-f194 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .tabs_21de {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .huge_686c {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .container_21b1,
  .section-cb48 {
    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: d4d6 */
.shadow-element-a0 {
  padding: 0.3rem;
  font-size: 13px;
  line-height: 1.3;
}
