/* ==============================================
   SANARYUM — ESTILOS BASE (v2, mayo 2026)
   Identidad visual unificada + pie azul profundo
   ============================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Montserrat:wght@400;500;600;700&display=swap');

/* Variables globales */
:root {
  --azul-profundo: #1F355A;
  --dorado: #D9B06A;
  --bg: #F9F7F4;
  --blanco: #FFFFFF;
  --texto: #2D3436;
  --muted: #636E72;
  --borde: #E0E0E0;
  --borde-oscuro: rgba(255,255,255,0.08);
  --sombra: 0 8px 30px rgba(0,0,0,0.05);
  --sombra-suave: 0 8px 20px rgba(0,0,0,0.18);
  --radius: 16px;
  --rojo-error: #c0392b;
  --plata: #A0A8B4;
}

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Montserrat', system-ui, sans-serif;
  background: #ffffff;
  color: var(--texto);
  line-height: 1.6;
  min-height: 100vh;
}

/* Tipografía para títulos */
h1, h2, h3, .logo-marca, .plan-nombre, .modal-titulo {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  color: var(--azul-profundo);
}

/* Contenedores */
.contenedor {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.contenedor-estrecho {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.contenedor-form {
  max-width: 580px;
  margin: 0 auto;
  padding: 24px;
  width: 100%;
}

/* ==================== CABECERA ==================== */
.cabecera {
  background: var(--azul-profundo);
  border-bottom: 1px solid var(--borde-oscuro);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  position: sticky;
  top: 0;
  z-index: 20;
}

.cabecera .contenedor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 0;
  min-height: 72px;
}

/* Logo */
.logo-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-marca {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  line-height: 1;
}

.logo-s,
.logo-y {
  color: var(--dorado);
}

.logo-texto {
  color: #F4F1EC;
  font-weight: 400;
}

.logo-lema {
  font-family: 'Montserrat', sans-serif;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--dorado);
  margin-top: 4px;
  text-align: center;
}

/* Navegación */
.nav-principal {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-principal a {
  text-decoration: none;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  font-size: 1.1rem;
  transition: color 0.15s;
  white-space: nowrap;
}

.nav-principal a:hover {
  color: var(--dorado);
}

/* Botones de zona (cuidadores/familias) */
.zonas {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-zona {
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.85rem;
  border: 2px solid var(--dorado);
  transition: all 0.15s;
  white-space: nowrap;
  letter-spacing: 0.5px;
  font-family: 'Montserrat', sans-serif;
}

.btn-zona.cuidadores {
  background: var(--dorado);
  color: var(--azul-profundo);
}

.btn-zona.cuidadores:hover {
  background: #b8963c;
  border-color: #b8963c;
}

.btn-zona.familias {
  background: transparent;
  color: var(--dorado);
}

.btn-zona.familias:hover {
  background: rgba(201,168,76,0.15);
}

.btn-zona.empleo {
  background: #F4F1EC;
  color: var(--azul-profundo);
  font-weight: 600;
}

.btn-zona.empleo:hover {
  background: var(--dorado);
  color: var(--azul-profundo);
}

/* Botón volver */
.volver {
  color: #F4F1EC;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: 'Montserrat', sans-serif;
}

.volver:hover {
  color: var(--dorado);
}

/* Aviso beta */
.aviso-beta {
  background: linear-gradient(135deg, var(--dorado), #b8963c);
  color: var(--azul-profundo);
  text-align: center;
  padding: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  font-family: 'Montserrat', sans-serif;
}

/* ==================== FORMULARIOS GENÉRICOS ==================== */
.campo {
  margin-bottom: 24px;
  text-align: left;
}

.campo label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--texto);
}

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--borde);
  border-radius: 12px;
  font-size: 0.95rem;
  outline: none;
  background: #fff;
  color: var(--texto);
  font-family: 'Montserrat', sans-serif;
  transition: border-color 0.2s;
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  border-color: var(--azul-profundo);
  box-shadow: 0 0 0 3px rgba(31,53,90,0.1);
}

.campo textarea {
  resize: vertical;
  min-height: 80px;
}

/* Checkbox y consentimiento */
.consentimiento {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  background: #f9f9f9;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--borde);
}

.consentimiento input {
  width: 20px;
  height: 20px;
  accent-color: var(--azul-profundo);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.consentimiento label {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  cursor: pointer;
}

.consentimiento a {
  color: var(--azul-profundo);
  font-weight: 600;
}

/* ==================== BOTONES ==================== */
.btn-primario {
  background: var(--azul-profundo);
  color: #fff;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s;
  font-family: 'Montserrat', sans-serif;
  box-shadow: 0 8px 20px rgba(31,53,90,0.25);
}

.btn-primario:hover {
  background: #1a2e4a;
  transform: translateY(-1px);
}

.btn-dorado {
  background: var(--dorado);
  color: var(--azul-profundo);
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  border: none;
  cursor: pointer;
}

.btn-dorado:hover {
  background: #b8963c;
}

.btn-pagar {
  width: 100%;
  background: var(--azul-profundo);
  color: #fff;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(31,53,90,0.25);
  transition: background 0.15s, transform 0.15s;
  font-family: 'Montserrat', sans-serif;
}

.btn-pagar:hover {
  background: #1a2e4a;
  transform: translateY(-1px);
}

/* ==================== BUSCADOR (index) ==================== */
.buscador {
  display: grid;
  grid-template-columns: 1.1fr 1fr auto;
  gap: 14px;
  align-items: end;
  margin: 32px 0;
  background: var(--blanco);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--sombra);
  border: 1px solid var(--borde);
}

.btn-buscar {
  height: 46px;
  padding: 0 22px;
  background: var(--dorado);
  color: var(--azul-profundo);
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  transition: transform 0.15s, background 0.15s;
  letter-spacing: 0.5px;
  font-family: 'Montserrat', sans-serif;
}

.btn-buscar:hover {
  background: #b8963c;
  transform: translateY(-1px);
}

/* ==================== TARJETAS Y LISTADOS ==================== */
.tarjeta {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radius);
  box-shadow: var(--sombra);
  padding: 32px;
}

.tarjeta-cuidador {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 18px;
  align-items: start;
  padding: 20px;
  border-radius: 12px;
  background: #f9f9f9;
  border: 1px solid var(--borde);
  transition: background 0.2s;
}

.tarjeta-cuidador:hover {
  background: #f0f0f0;
}

.foto-cuidador {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 16px;
  background: #eee;
  border: 2px solid var(--borde);
}

.verificado-badge {
  font-size: 0.7rem;
  color: var(--dorado);
  background: rgba(217,176,106,0.15);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.btn-perfil {
  display: inline-block;
  background: transparent;
  color: var(--azul-profundo);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--azul-profundo);
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  transition: all 0.15s;
  font-family: 'Montserrat', sans-serif;
}

.btn-perfil:hover {
  background: var(--azul-profundo);
  color: #fff;
}

/* ==================== MÉTRICAS Y ESTADOS ==================== */
.metricas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.metrica {
  background: var(--bg);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  border: 1px solid var(--borde);
}

.metrica strong {
  display: block;
  font-size: 1.4rem;
  color: var(--azul-profundo);
}

.metrica span {
  font-size: 0.8rem;
  color: var(--muted);
}

.estado {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.estado.pendiente { background: rgba(184,135,61,0.15); color: #B8873D; }
.estado.en-curso { background: rgba(31,53,90,0.1); color: var(--azul-profundo); }
.estado.finalizado { background: rgba(99,110,114,0.1); color: var(--muted); }

/* ==================== MODAL ==================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.modal-overlay.activo { display: flex; }

.modal-contenido {
  background: var(--blanco);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 800px;
  width: 95%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  position: relative;
}

.modal-cerrar {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--azul-profundo);
  color: #fff;
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
}

.modal-cerrar:hover { background: #1a2e4a; }

/* ==================== CHAT FLOTANTE ==================== */
.chat-flotante {
  position: fixed;
  bottom: 32px; right: 32px;
  z-index: 1000;
}

.btn-chat {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--dorado);
  color: var(--azul-profundo);
  border: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  font-size: 2.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
}

.btn-chat:hover {
  background: #b8963c;
  transform: scale(1.08);
}

.ventana-chat {
  position: absolute;
  bottom: 84px; right: 0;
  width: 340px;
  background: var(--azul-profundo);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border: 1px solid var(--borde-oscuro);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.ventana-chat.abierta {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.chat-header {
  background: var(--dorado);
  color: var(--azul-profundo);
  padding: 14px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Montserrat', sans-serif;
}

.chat-header button {
  background: transparent;
  border: none;
  color: var(--azul-profundo);
  font-size: 1.2rem;
  cursor: pointer;
}

.chat-body {
  padding: 14px;
  min-height: 240px;
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(22,40,71,0.5);
}

.mensaje {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  font-family: 'Montserrat', sans-serif;
}

.mensaje.bot {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--borde-oscuro);
  align-self: flex-start;
  color: #F4F1EC;
}

.mensaje.usuario {
  background: var(--dorado);
  color: var(--azul-profundo);
  align-self: flex-end;
}

.chat-input {
  display: flex;
  border-top: 1px solid var(--borde-oscuro);
  padding: 10px; gap: 8px;
  background: rgba(22,40,71,0.8);
}

.chat-input input {
  flex: 1;
  border: 1px solid var(--borde-oscuro);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  outline: none;
  background: rgba(255,255,255,0.04);
  color: #F4F1EC;
}

.chat-input input:focus { border-color: var(--dorado); }

.chat-input button {
  background: var(--dorado);
  color: var(--azul-profundo);
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: 'Montserrat', sans-serif;
}

/* ==================== SERVICIOS, PASOS, RESEÑAS ==================== */
.servicios h2,
.como-funciona h2,
.confianza h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 24px;
}

.grid-servicios,
.pasos,
.reseñas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.servicio-card {
  background: var(--blanco);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--sombra);
  text-align: center;
  border: 1px solid var(--borde);
  transition: transform 0.2s, box-shadow 0.2s;
}

.servicio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

.servicio-icono { font-size: 2.5rem; margin-bottom: 16px; }

.servicio-card h3 { margin-bottom: 8px; }
.servicio-card p { color: var(--muted); font-size: 0.9rem; }

.paso { text-align: center; padding: 24px; }

.paso-numero {
  background: var(--azul-profundo);
  color: #fff;
  width: 50px; height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-weight: 700;
  font-size: 1.3rem;
}

.paso h3 { margin-bottom: 8px; }
.paso p { color: var(--muted); font-size: 0.9rem; }

.reseña {
  background: var(--blanco);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--sombra);
  border: 1px solid var(--borde);
}

.reseña .estrellas { color: var(--dorado); margin-bottom: 8px; font-size: 1.2rem; }
.reseña .texto { color: var(--texto); font-style: italic; margin-bottom: 12px; }
.reseña .autor { color: var(--muted); font-size: 0.85rem; font-weight: 600; }

/* ==================== TITULARES DE SECCIÓN ==================== */
.sello-confianza {
  text-align: center;
  margin: 24px 0 32px;
  color: var(--azul-profundo);
  font-weight: 500;
  font-size: 1.1rem;
}

.sello-confianza strong { color: var(--dorado); font-size: 1.3rem; }

/* ==================== TABLÓN Y MAPA (index) ==================== */
.dos-columnas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 40px;
}

.tablon,
.mapa-seccion,
.listado {
  background: var(--blanco);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--sombra);
  border: 1px solid var(--borde);
}

.tablon h2,
.mapa-seccion h2,
.listado h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.anuncios { display: grid; gap: 14px; }

.anuncio {
  background: #f9f9f9;
  border: 1px solid var(--borde);
  border-radius: 12px;
  padding: 18px;
}

.anuncio:hover { background: #f0f0f0; }
.anuncio h3 { font-size: 1rem; margin-bottom: 4px; }
.anuncio p { color: var(--muted); font-size: 0.85rem; margin-bottom: 8px; }
.anuncio .meta { font-size: 0.7rem; color: var(--azul-profundo); display: flex; gap: 12px; flex-wrap: wrap; }

.mapa-interactivo {
  width: 100%;
  height: 380px;
  border-radius: 12px;
  border: 1px solid var(--borde);
  overflow: hidden;
  background: #f5f5f5;
}

.mapa-seccion input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--borde);
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 12px;
  outline: none;
  background: #fff;
  color: var(--texto);
  font-family: 'Montserrat', sans-serif;
}

.mapa-seccion input:focus { border-color: var(--dorado); }

/* ==================== PLANES (tablas) ==================== */
.tabla-planes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.plan-card {
  background: var(--blanco);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--sombra);
  text-align: center;
  border: 2px solid var(--borde);
  transition: transform 0.2s;
}

.plan-card:hover { transform: translateY(-4px); }

.plan-card.optimo { border-color: var(--plata); }
.plan-card.premium { border-color: var(--dorado); }
.plan-card.elite { border-color: var(--azul-profundo); }

.plan-nombre {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.plan-precio {
  font-size: 2rem;
  font-weight: 800;
  margin: 12px 0;
  color: var(--texto);
}

.plan-precio small { font-size: 0.9rem; color: var(--muted); }

.plan-features {
  list-style: none;
  text-align: left;
  margin: 20px 0;
}

.plan-features li {
  padding: 8px 0;
  border-bottom: 1px solid var(--borde);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
}

.plan-features li:last-child { border-bottom: none; }
.plan-features .check { color: #1A7F6D; font-weight: 700; }
.plan-features .cross { color: #ccc; font-weight: 700; }

.btn-plan {
  display: inline-block;
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  border: none;
}

.btn-basico { background: var(--borde); color: var(--texto); }
.btn-optimo { background: var(--plata); color: var(--azul-profundo); }
.btn-premium { background: var(--dorado); color: var(--azul-profundo); }
.btn-elite { background: var(--azul-profundo); color: #fff; }

/* ==================== PIE DE PÁGINA (AZUL PROFUNDO) ==================== */
.pie {
  background: var(--azul-profundo);
  color: #F4F1EC;
  text-align: center;
  padding: 24px;
  margin-top: 60px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-family: 'Montserrat', sans-serif;
}

.pie a {
  color: var(--dorado);
  text-decoration: none;
  font-weight: 500;
  margin: 0 12px;
}

.pie a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ==================== UTILIDADES ==================== */
.texto-centrado { text-align: center; }
.texto-muted { color: var(--muted); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
  .cabecera .contenedor {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .nav-principal {
    order: 3;
    flex-wrap: wrap;
    justify-content: center;
  }

  .buscador,
  .grid-servicios,
  .pasos,
  .reseñas,
  .dos-columnas,
  .metricas {
    grid-template-columns: 1fr;
  }

  .tabla-planes {
    grid-template-columns: 1fr 1fr;
  }

  .tarjeta-cuidador {
    grid-template-columns: 1fr;
  }

  .chat-flotante {
    bottom: 16px;
    right: 16px;
  }

  .ventana-chat {
    width: 280px;
  }
}

@media (max-width: 600px) {
  .tabla-planes {
    grid-template-columns: 1fr;
  }

  .logo-marca {
    font-size: 1.5rem;
  }
}