/* Alvera demo — responsive extras */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  overscroll-behavior: none;
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  height: auto;
}

::-webkit-scrollbar {
  display: none;
}

.nav-link-active {
  color: #006a64 !important;
  font-weight: 600;
}

.mobile-nav-open {
  overflow: hidden;
}

#mobile-menu:not(.hidden) {
  display: block;
}

@media (min-width: 1280px) {
  #mobile-menu {
    display: none !important;
  }
}

.faq-content.hidden {
  display: none;
}

/* Prevent horizontal overflow from absolute/hero pieces */
main,
section {
  max-width: 100vw;
  overflow-x: clip;
}

/* Sticky aside on hospital pages: stack on mobile */
@media (max-width: 1023px) {
  aside.lg\:sticky {
    position: static !important;
    top: auto !important;
  }
}

/* Tables / wide grids inside content */
@media (max-width: 767px) {
  .grid.md\:grid-cols-12 > div {
    min-width: 0;
  }

  section .overflow-x-auto,
  .marketplace-scroll,
  [class*="overflow-x-auto"] {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  /* Hero platform pill: wrap instead of overflowing */
  section .inline-flex.items-center.rounded-full {
    max-width: 100%;
    white-space: normal;
    text-align: left;
    line-height: 1.35;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  /* Hero CTAs full-width on very small screens */
  section .flex.flex-wrap.items-center.justify-center > a.px-6 {
    width: 100%;
    justify-content: center;
  }

  /* Trust strip: tighter type */
  .grid.grid-cols-2.md\:grid-cols-3.lg\:grid-cols-5 {
    gap: 1rem !important;
  }

  .grid.grid-cols-2.md\:grid-cols-3.lg\:grid-cols-5 .font-label-md {
    font-size: 12px;
    line-height: 1.3;
  }

  /* Search tabs stay scrollable, no wrap squeeze */
  #search-tab-treatments,
  #search-tab-doctors,
  #search-tab-hospitals,
  #search-tab-specialties {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Footer columns breathing room */
  footer .grid {
    gap: 1.5rem;
  }
}

/* Top utility bar + header + CTA crowding */
@media (max-width: 639px) {
  header .bg-inverse-surface .overflow-hidden,
  header .bg-inverse-surface .truncate {
    max-width: 100%;
  }

  header .bg-inverse-surface .flex.items-center.gap-space-xs {
    max-width: 62%;
  }

  header .bg-inverse-surface .flex.items-center.gap-space-xs > span:last-child {
    font-size: 10px;
  }

  header a[data-path="home"] img {
    height: 2.5rem !important;
    max-width: 140px !important;
  }

  header a[data-path="inquiry"] {
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
    font-size: 12px !important;
    gap: 0.25rem !important;
  }

  header a[data-path="inquiry"] .material-symbols-outlined {
    display: none;
  }

  /* Shorter fixed header on phones (h-9 + h-16) */
  main {
    padding-top: 6.5rem !important;
  }

  /* Hero headline / body spacing */
  .font-display-hero {
    font-size: clamp(1.75rem, 8vw, 2.25rem) !important;
    line-height: 1.15 !important;
  }

  .font-body-lg {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
  }
}

@media (max-width: 379px) {
  header a[data-path="inquiry"] {
    font-size: 11px !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  header a[data-path="home"] img {
    max-width: 120px !important;
  }
}

/* Safe area for notched phones (floater) */
@supports (padding: max(0px)) {
  .fixed.bottom-4.right-4,
  .fixed.bottom-4.right-4.sm\:bottom-6 {
    bottom: max(1rem, env(safe-area-inset-bottom));
    right: max(1rem, env(safe-area-inset-right));
  }
}
