/* ============================================
   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 (.detail_491e) is a descendant of
   .gallery-simple-27c8 (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.blue-6a1a {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".accordion_d3bf" 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.label_9f3c so it can't cause
   horizontal overflow anyway. */
.search_brown_2695,
.container-brown-bf08,
.mini_8065,
.tooltip_523c,
.out_a472,
.pagination_d251,
.new-5d57,
.bottom-f8fa,
.layout-bb4b,
.dirty_c688,
.feature-red-2e27 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .dropdown-2945 {
    padding: 8px 0;
  }
  
  .yellow_f812 img {
    height: 28px;
    width: auto;
  }
  
  .brown-8120 {
    display: none !important;
  }
  
  .content_195e {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .content_195e svg {
    width: 14px;
    height: 14px;
  }
  
  .media_last_e719 {
    padding: 6px;
  }
  
  .gradient_8331 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .mini_8065,
  .container-brown-bf08,
  .tooltip_523c,
  .out_a472,
  .tooltip_middle_08fb,
  .message_90b9,
  .liquid_c6c0,
  .photo_west_1341,
  .container_27c3,
  .shade_green_6547,
  .card_47ef,
  .outline_f106 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .heading-medium-b553,
  .shade_4e82 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .next-0e64,
  .silver-fbe2,
  .tertiary-967f,
  .tiny-3b8f,
  .pattern-prev-6574,
  .gradient_b414,
  .overlay_c758 {
    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_f74e,
  .message_clean_db78,
  .in-992d,
  .large-6c89,
  .cool-4bc9 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .text-green-0703,
  .outer_e80e,
  .section_198b,
  .bright_50ca {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .input-302c,
  .media-cold-3354 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .hover-complex-9d33,
  .tertiary-b5cf,
  .top_98c3,
  .paragraph-e5b3 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .black-eb62,
  .up_dfb3,
  .tall_d0ff,
  .warm-8e30,
  .status_152d,
  .modal-out-b045 {
    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_f74e,
  .message_clean_db78,
  .large-6c89 {
    max-width: none !important;
  }
  
  .accordion_d3bf {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .text-green-0703 {
    font-size: 1.5rem !important;
  }
  
  .outer_e80e {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .top_2df8,
  .accordion-basic-9b3b {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .section_198b {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .secondary-glass-3d2f {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .content-d586 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .paragraph_f74e,
  .large-6c89 {
    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: 63e4 */
.shadow-element-w4 {
  padding: 0.3rem;
  font-size: 10px;
  line-height: 1.3;
}
