/* =========================================================
   SALUYA - Cloudflare Pages
========================================================= */

:root {
  --saluya: #0f766e;
  --saluya-dark: #115e59;
  --saluya-soft: #f0fdfa;
  --text: #172b2a;
  --muted: #64748b;
  --border: #e5e7eb;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
}

button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

#navbar {
  transition:
    box-shadow 200ms ease,
    border-color 200ms ease,
    background 200ms ease;
}

#navbar.navbar-scrolled {
  border-color: rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 6px 30px rgba(15, 23, 42, 0.055);
}

.nav-link {
  position: relative;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  transition: color 180ms ease;
}

.nav-link:hover {
  color: var(--saluya);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 0;
  height: 2px;
  border-radius: 20px;
  background: var(--saluya);
  transform: translateX(-50%);
  transition: width 180ms ease;
}

.nav-link:hover::after {
  width: 18px;
}

.mobile-nav-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #334155;
  font-size: 14px;
  font-weight: 650;
  transition: background 180ms ease, color 180ms ease;
}

.mobile-nav-link:hover {
  color: var(--saluya);
  background: #f0fdfa;
}

.hero {
  background:
    linear-gradient(145deg, #f9fcfb 0%, #ffffff 44%, #f2faf8 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 118, 110, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, transparent, black 25%, transparent 82%);
}

.hero-blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(5px);
  pointer-events: none;
}

.hero-blob--one {
  top: 80px;
  left: -140px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.13), rgba(45, 212, 191, 0));
  animation: blobFloat 10s ease-in-out infinite alternate;
}

.hero-blob--two {
  right: -110px;
  bottom: -60px;
  width: 410px;
  height: 410px;
  background: radial-gradient(circle, rgba(255, 116, 92, 0.10), rgba(255, 116, 92, 0));
  animation: blobFloat 13s ease-in-out infinite alternate-reverse;
}

@keyframes blobFloat {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(25px, -15px, 0) scale(1.08);
  }
}

.search-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 8px 25px rgba(15, 23, 42, 0.05),
    0 30px 70px rgba(15, 118, 110, 0.08);
  backdrop-filter: blur(16px);
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease,
    transform 200ms ease;
}

.search-panel:focus-within {
  border-color: rgba(20, 184, 166, 0.4);
  box-shadow:
    0 8px 25px rgba(15, 23, 42, 0.05),
    0 32px 70px rgba(15, 118, 110, 0.12);
}

.search-field {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
}

.search-icon {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: var(--saluya);
  background: #f0fdfa;
}

.search-label {
  display: block;
  margin-bottom: 2px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 750;
}

.search-input {
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
}

.search-input::placeholder {
  color: #94a3b8;
}

.search-button {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding-inline: 24px;
  border-radius: 18px;
  background: #0f766e;
  color: white;
  font-size: 14px;
  font-weight: 750;
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.20);
  transition:
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.search-button:hover {
  background: #115e59;
  transform: translateY(-1px);
  box-shadow: 0 15px 32px rgba(15, 118, 110, 0.25);
}

.search-button:active {
  transform: scale(0.98);
}

.search-dropdown {
  position: absolute;
  z-index: 40;
  top: calc(100% + 15px);
  left: 0;
  width: min(430px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: white;
  padding: 7px;
  text-align: left;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.13);
  animation: dropdownIn 160ms var(--ease);
}

@keyframes dropdownIn {
  from {
    opacity: 0;
    transform: translateY(-7px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-heading {
  padding: 9px 11px 7px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dropdown-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  border-radius: 12px;
  padding: 10px;
  color: #475569;
  font-size: 13px;
  transition: background 150ms ease, color 150ms ease;
}

.dropdown-option:hover {
  color: #0f766e;
  background: #f0fdfa;
}

.dropdown-option-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 10px;
  color: #0f766e;
  background: #f0fdfa;
}

.country-menu {
  animation: dropdownIn 160ms var(--ease);
}

.country-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 10px 11px;
  color: #475569;
  font-size: 13px;
  font-weight: 650;
  transition: color 150ms ease, background 150ms ease;
}

.country-option:hover {
  color: #0f766e;
  background: #f0fdfa;
}

.specialty-chip {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  padding: 8px 13px;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
  backdrop-filter: blur(8px);
  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.specialty-chip:hover {
  color: #0f766e;
  border-color: #99f6e4;
  background: #f0fdfa;
  transform: translateY(-1px);
}

.trust-check {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
}

.section-kicker {
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.filter-chip {
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: white;
  padding: 9px 14px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  transition: all 160ms ease;
}

.filter-chip:hover {
  color: #0f766e;
  border-color: #99f6e4;
  background: #f0fdfa;
}

.filter-chip--active {
  color: white;
  border-color: #0f766e;
  background: #0f766e;
}

.doctor-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #e6ecea;
  border-radius: 24px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.02);
  transition:
    transform 240ms var(--ease),
    border-color 240ms ease,
    box-shadow 240ms ease;
}

.doctor-card:hover {
  transform: translateY(-4px);
  border-color: #d4e6e2;
  box-shadow: 0 22px 50px rgba(15, 51, 47, 0.09);
}

.doctor-card--premium::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  opacity: 0;
  background: linear-gradient(90deg, #14b8a6, #5eead4, #ff8a72);
  transition: opacity 200ms ease;
}

.doctor-card--premium:hover::before {
  opacity: 1;
}

.doctor-avatar {
  display: grid;
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  place-items: center;
  border: 1px solid #d7ede9;
  border-radius: 20px;
  background: linear-gradient(135deg, #e8f8f5, #f7fcfb);
  color: #0f766e;
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.doctor-avatar--premium {
  background: linear-gradient(135deg, #dff8f3, #effaf8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.doctor-name {
  color: #172b2a;
  font-family: "Manrope", sans-serif;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.doctor-specialty {
  margin-top: 4px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 700;
}

.verified-badge {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: #0f766e;
}

.public-registry-badge {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: #f0fdfa;
  padding: 6px 9px;
  color: #0f766e;
  font-size: 10px;
  font-weight: 750;
}

.favorite-button {
  display: grid;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #64748b;
  background: #ffffff;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.favorite-button:hover {
  color: #f43f5e;
  border-color: #fecdd3;
  background: #fff1f2;
  transform: scale(1.04);
}

.time-chip {
  flex-shrink: 0;
  border: 1px solid #ccfbf1;
  border-radius: 10px;
  background: #f0fdfa;
  padding: 7px 10px;
  color: #0f766e;
  font-size: 11px;
  font-weight: 750;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.time-chip:hover {
  color: white;
  border-color: #0f766e;
  background: #0f766e;
}

.profile-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid #dbe4e2;
  border-radius: 13px;
  background: #ffffff;
  padding-inline: 16px;
  color: #475569;
  font-size: 12px;
  font-weight: 750;
  transition: all 160ms ease;
}

.profile-button:hover {
  color: #0f766e;
  border-color: #99f6e4;
  background: #f0fdfa;
}

.book-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 13px;
  background: #0f766e;
  padding-inline: 17px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.16);
  transition:
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.book-button:hover {
  background: #115e59;
  transform: translateY(-1px);
  box-shadow: 0 11px 24px rgba(15, 118, 110, 0.21);
}

.claim-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 18px;
  border: 1px solid #d8eee9;
  border-radius: 17px;
  background: linear-gradient(135deg, #f0fdfa, #ffffff);
  padding: 14px;
}

.claim-button {
  display: inline-flex;
  min-height: 42px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 12px;
  background: #0f766e;
  padding-inline: 14px;
  color: white;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  transition: background 160ms ease, transform 160ms ease;
}

.claim-button:hover {
  background: #115e59;
  transform: translateY(-1px);
}

.question-card {
  border: 1px solid #e2ebe9;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  padding: 22px;
  box-shadow: 0 10px 30px rgba(15, 51, 47, 0.04);
  backdrop-filter: blur(8px);
  transition: transform 220ms var(--ease), box-shadow 220ms ease;
}

.question-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 45px rgba(15, 51, 47, 0.075);
}

.question-action {
  display: grid;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #64748b;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.question-action:hover {
  color: #0f766e;
  border-color: #99f6e4;
  background: #f0fdfa;
}

.answer-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid white;
  border-radius: 999px;
  background: #ccfbf1;
  color: #0f766e;
  font-size: 9px;
  font-weight: 800;
}

.claim-professional {
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.16);
}

.footer-title {
  color: #0f172a;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.footer-links a {
  width: fit-content;
  color: #64748b;
  font-size: 13px;
  transition: color 160ms ease;
}

.footer-links a:hover {
  color: #0f766e;
}

.reveal-ready {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 650ms var(--ease), transform 650ms var(--ease);
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up {
  opacity: 0;
  transform: translateY(12px);
  animation: heroFadeUp 700ms var(--ease) forwards;
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#toast {
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

#toast.toast-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

::-webkit-scrollbar {
  width: 10px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f8fafc;
}

::-webkit-scrollbar-thumb {
  border: 2px solid #f8fafc;
  border-radius: 999px;
  background: #cbd5e1;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(20, 184, 166, 0.20);
  outline-offset: 3px;
}

@media (max-width: 767px) {
  .search-panel {
    grid-template-columns: 1fr;
    gap: 0;
    border-radius: 22px;
    padding: 7px;
  }

  .search-field {
    min-height: 67px;
    padding: 8px 10px;
  }

  .search-field:first-child {
    border-bottom: 1px solid #edf2f1;
  }

  .search-button {
    width: 100%;
    min-height: 52px;
    margin-top: 5px;
    border-radius: 16px;
  }

  .search-dropdown {
    top: calc(100% + 5px);
    width: calc(100vw - 46px);
  }

  .doctor-card {
    border-radius: 20px;
    padding: 17px;
  }

  .doctor-avatar {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    border-radius: 17px;
    font-size: 15px;
  }

  .doctor-name {
    font-size: 15.5px;
  }

  .claim-mini {
    display: block;
  }

  .claim-button {
    width: 100%;
    margin-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* =========================================================
   MOBILE SEARCH DROPDOWN FIX
   Evita que chips/textos del hero se pinten encima del menú.
========================================================= */

.search-wrapper {
  position: relative;
  z-index: 80;
}

.search-panel {
  z-index: 81;
  overflow: visible;
}

.search-field {
  z-index: auto;
}

.search-dropdown {
  z-index: 200;
  max-height: min(420px, 48dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #ffffff;
}

.hero .specialty-chip,
.hero .trust-check {
  position: relative;
  z-index: 1;
}

/* Los bloques posteriores del hero quedan por debajo del buscador abierto */
.hero .fade-up:not(.search-wrapper) {
  z-index: 1;
}

/* Mejor experiencia en celular con teclado abierto */
@media (max-width: 767px) {
  .search-wrapper {
    z-index: 200;
  }

  .search-panel {
    z-index: 201;
  }

  .search-dropdown {
    z-index: 999;
    top: calc(100% + 8px);
    max-height: 38dvh;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  }

  .dropdown-option {
    min-height: 48px;
    font-size: 15px;
  }

  .dropdown-heading {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #ffffff;
  }
}
