/* ═══════════════════════════════════════════════
   BÚSQUEDA · Home con formulario país/estado/especialidad
   Cárgalo SOLO en páginas de búsqueda
   ═══════════════════════════════════════════════ */

/* ────── HERO DE BÚSQUEDA ────── */
.search-hero {
  padding: 40px 0 64px;
  background:
    radial-gradient(circle at 50% 0%, rgba(11, 100, 209, 0.06) 0%, transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  min-height: calc(100vh - var(--header-h) - 120px);
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
}

.search-hero .container {
  width: 100%;
}

.search-hero__card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  max-width: 820px;
  margin: 0 auto;
  animation: searchFadeIn .4s ease;
}

@keyframes searchFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 640px) {
  .search-hero { padding: 64px 0 96px; }
  .search-hero__card { padding: 48px 44px; }
}

@media (min-width: 980px) {
  .search-hero__card { padding: 56px 56px; }
}

/* ────── ENCABEZADO ────── */
.search-hero__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 26px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
}

.search-hero__title {
  margin: 0 0 12px;
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--ink);
}

.search-hero__title strong {
  color: var(--brand);
}

.search-hero__desc {
  margin: 0 0 8px;
  font-size: 15px;
  color: #475569;
  line-height: 1.65;
}

@media (min-width: 640px) {
  .search-hero__desc { font-size: 16px; }
}

.search-hero__hint {
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--muted);
  padding-left: 14px;
  border-left: 3px solid var(--brand-soft);
  line-height: 1.5;
}

/* ────── FORMULARIO ────── */
.search-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.search-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-form__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -.005em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-form__hint {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
  min-height: 17px; /* reserva espacio para evitar saltos */
}

.search-form__select {
  width: 100%;
  min-height: 50px;
  padding: 12px 44px 12px 16px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  color: var(--ink);
  background-color: #fff;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%230b64d1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
  text-overflow: ellipsis;
}

.search-form__select:hover:not(:disabled) {
  border-color: #b8d4f5;
}

.search-form__select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.search-form__select:disabled {
  background-color: var(--bg);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.7;
}

/* Estado de carga */
.search-form__select.loading {
  background-image: none;
  background-color: var(--bg);
  color: var(--muted);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}

/* ────── BOTÓN BUSCAR ────── */
.search-form__submit {
  width: 100%;
  min-height: 54px;
  margin-top: 6px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
  box-shadow: var(--shadow-sm);
  letter-spacing: -.005em;
}

.search-form__submit:hover:not(:disabled) {
  background: var(--brand-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.search-form__submit:active:not(:disabled) {
  transform: scale(.99);
}

.search-form__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.search-form__submit svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Spinner cuando está enviando */
.search-form__submit.sending svg {
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ────── RESPONSIVE: 2 columnas en tablet, 3 en desktop ────── */
@media (min-width: 640px) {
  .search-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 18px;
  }

  /* La especialidad ocupa el ancho completo en tablet */
  .search-form__field--full {
    grid-column: 1 / -1;
  }

  .search-form__submit {
    grid-column: 1 / -1;
  }
}

@media (min-width: 820px) {
  /* En desktop vuelven 3 columnas */
  .search-form {
    grid-template-columns: 1fr 1fr 1fr;
  }

  /* El botón sigue full width */
  .search-form__submit {
    grid-column: 1 / -1;
  }
}