/* ============================================================
   Prime Health Network — Telemedicina en idioma nativo
   Estilo: médico formal · azules institucionales del logo
   ============================================================ */

:root {
  --azul: #1b5fbf;
  --azul-oscuro: #134a99;
  --navy: #0d2c54;
  --navy-profundo: #081d3a;
  --cian: #19b6d8;
  --cian-claro: #7fe3f0;
  --hielo: #eef5fc;
  --niebla: #f7fafd;
  --blanco: #ffffff;
  --tinta: #1c2b3a;
  --gris-texto: #51647a;
  --linea: #dbe7f3;
  --sombra-suave: 0 6px 24px rgba(13, 44, 84, .08);
  --sombra-media: 0 14px 40px rgba(13, 44, 84, .14);
  --radio: 14px;
  --fuente-titulos: "Fraunces", Georgia, serif;
  --fuente-texto: "Figtree", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--fuente-texto);
  color: var(--tinta);
  background: var(--blanco);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

.contenedor {
  width: min(1140px, 92%);
  margin-inline: auto;
}

/* ---------- Encabezado ---------- */
.encabezado {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linea);
}

.encabezado .contenedor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: .65rem;
}

.logo-enlace { flex-shrink: 0; }

.logo-enlace img { height: 58px; width: auto; }

.navegacion {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.navegacion a {
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  padding-block: .35rem;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}

.navegacion a:hover { color: var(--azul); }

.navegacion a.activo {
  color: var(--azul);
  border-bottom-color: var(--cian);
}

/* Selector de idioma */
.selector-idioma {
  display: flex;
  border: 1.5px solid var(--linea);
  border-radius: 999px;
  overflow: hidden;
  background: var(--niebla);
}

.selector-idioma button {
  border: 0;
  background: transparent;
  font-family: var(--fuente-texto);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .06em;
  color: var(--gris-texto);
  padding: .42rem .8rem;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.selector-idioma button:hover { color: var(--azul); }

.selector-idioma button.activo {
  background: var(--azul);
  color: var(--blanco);
}

.boton-menu {
  display: none;
  border: 0;
  background: none;
  font-size: 1.6rem;
  color: var(--navy);
  cursor: pointer;
}

/* ---------- Botones ---------- */
.boton {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  padding: .85rem 1.9rem;
  border-radius: 999px;
  transition: transform .2s, box-shadow .2s, background .2s;
  cursor: pointer;
  border: 0;
  font-family: var(--fuente-texto);
}

.boton-primario {
  background: var(--azul);
  color: var(--blanco);
  box-shadow: 0 8px 20px rgba(27, 95, 191, .35);
}

.boton-primario:hover {
  background: var(--azul-oscuro);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(27, 95, 191, .42);
}

.boton-secundario {
  background: transparent;
  color: var(--blanco);
  border: 1.5px solid rgba(255, 255, 255, .55);
}

.boton-secundario:hover {
  background: rgba(255, 255, 255, .12);
  transform: translateY(-2px);
}

/* ---------- Héroe ---------- */
.heroe {
  position: relative;
  background:
    radial-gradient(ellipse 900px 480px at 85% -10%, rgba(25, 182, 216, .25), transparent 60%),
    radial-gradient(ellipse 700px 500px at -10% 110%, rgba(27, 95, 191, .35), transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-profundo) 60%, #0a2347 100%);
  color: var(--blanco);
  overflow: hidden;
}

.heroe::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 70% 40%, black 30%, transparent 75%);
  pointer-events: none;
}

.heroe .contenedor {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 3rem;
  align-items: center;
  padding-block: 5.5rem 6rem;
}

.heroe-etiqueta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cian-claro);
  border: 1px solid rgba(127, 227, 240, .4);
  border-radius: 999px;
  padding: .4rem 1rem;
  margin-bottom: 1.4rem;
  animation: aparecer .7s ease both;
}

.heroe-etiqueta::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cian);
  box-shadow: 0 0 0 0 rgba(25,182,216,.7);
  animation: pulso 2.2s infinite;
}

@keyframes pulso {
  0%   { box-shadow: 0 0 0 0 rgba(25,182,216,.7); }
  70%  { box-shadow: 0 0 0 9px rgba(25,182,216,0); }
  100% { box-shadow: 0 0 0 0 rgba(25,182,216,0); }
}

.heroe h1 {
  font-family: var(--fuente-titulos);
  font-weight: 600;
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -.01em;
  margin-bottom: 1.2rem;
  animation: aparecer .7s .12s ease both;
}

.heroe h1 em {
  font-style: italic;
  color: var(--cian-claro);
}

.heroe p {
  font-size: 1.08rem;
  color: #c4d6ec;
  max-width: 34rem;
  margin-bottom: 2rem;
  animation: aparecer .7s .24s ease both;
}

.heroe-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  animation: aparecer .7s .36s ease both;
}

.heroe-idiomas {
  display: flex;
  gap: .6rem;
  margin-top: 2.4rem;
  flex-wrap: wrap;
  animation: aparecer .7s .48s ease both;
}

.ficha-idioma {
  font-size: .8rem;
  font-weight: 600;
  color: #d8e7f8;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  padding: .3rem .9rem;
}

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

/* Tarjeta visual del héroe */
.heroe-visual { position: relative; }

.tarjeta-consulta {
  background: var(--blanco);
  color: var(--tinta);
  border-radius: 18px;
  padding: 1.6rem;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .4);
  animation: aparecer .8s .4s ease both;
}

.tarjeta-consulta .fila-medico {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--linea);
}

.avatar-medico {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--azul), var(--cian));
  display: grid;
  place-items: center;
  color: var(--blanco);
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.fila-medico strong { display: block; font-size: .98rem; color: var(--navy); }
.fila-medico span { font-size: .82rem; color: var(--gris-texto); }

.estado-en-linea {
  margin-left: auto;
  font-size: .72rem;
  font-weight: 700;
  color: #0e8f6e;
  background: #e2f7ef;
  border-radius: 999px;
  padding: .25rem .7rem;
  white-space: nowrap;
}

.linea-pulso { margin-block: 1.1rem; }

.linea-pulso svg { width: 100%; height: 56px; }

.trazo-pulso {
  fill: none;
  stroke: var(--cian);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: latido 3.4s linear infinite;
}

@keyframes latido {
  0%   { stroke-dashoffset: 600; }
  60%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}

.tarjeta-consulta .datos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .6rem;
  text-align: center;
}

.tarjeta-consulta .datos div {
  background: var(--hielo);
  border-radius: 10px;
  padding: .7rem .4rem;
}

.tarjeta-consulta .datos strong {
  display: block;
  font-size: 1.05rem;
  color: var(--azul);
}

.tarjeta-consulta .datos span {
  font-size: .7rem;
  color: var(--gris-texto);
  letter-spacing: .04em;
}

/* ---------- Secciones ---------- */
.seccion { padding-block: 5rem; }

.seccion-alterna { background: var(--niebla); }

.cabecera-seccion {
  max-width: 46rem;
  margin: 0 auto 3rem;
  text-align: center;
}

.sobretitulo {
  display: inline-block;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cian);
  margin-bottom: .8rem;
}

.cabecera-seccion h2,
.titulo-seccion {
  font-family: var(--fuente-titulos);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: .9rem;
}

.cabecera-seccion p { color: var(--gris-texto); font-size: 1.02rem; }

/* ---------- Servicios ---------- */
.malla-servicios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.tarjeta-servicio {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 1.9rem 1.6rem;
  box-shadow: var(--sombra-suave);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  position: relative;
  overflow: hidden;
}

.tarjeta-servicio::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--azul), var(--cian));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
}

.tarjeta-servicio:hover {
  transform: translateY(-6px);
  box-shadow: var(--sombra-media);
  border-color: transparent;
}

.tarjeta-servicio:hover::after { transform: scaleX(1); }

.icono-servicio {
  width: 54px; height: 54px;
  border-radius: 13px;
  background: var(--hielo);
  display: grid;
  place-items: center;
  margin-bottom: 1.2rem;
  color: var(--azul);
}

.icono-servicio svg { width: 28px; height: 28px; }

.tarjeta-servicio h3 {
  font-family: var(--fuente-titulos);
  font-weight: 600;
  font-size: 1.18rem;
  color: var(--navy);
  margin-bottom: .55rem;
}

.tarjeta-servicio p { font-size: .94rem; color: var(--gris-texto); }

/* ---------- Cómo funciona ---------- */
.pasos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  counter-reset: paso;
}

.paso {
  position: relative;
  padding-top: .4rem;
}

.numero-paso {
  font-family: var(--fuente-titulos);
  font-size: 3.4rem;
  font-weight: 600;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--cian);
  line-height: 1;
  margin-bottom: .9rem;
}

.paso h3 {
  font-family: var(--fuente-titulos);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: .5rem;
}

.paso p { font-size: .94rem; color: var(--gris-texto); }

/* ---------- Cifras ---------- */
.banda-cifras {
  background: linear-gradient(120deg, var(--azul) 0%, var(--navy) 100%);
  color: var(--blanco);
}

.banda-cifras .contenedor {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding-block: 3.4rem;
  text-align: center;
}

.cifra strong {
  display: block;
  font-family: var(--fuente-titulos);
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  font-weight: 600;
  color: var(--cian-claro);
}

.cifra span { font-size: .88rem; color: #c4d6ec; letter-spacing: .03em; }

/* ---------- Llamado a la acción ---------- */
.cta {
  text-align: center;
  background:
    radial-gradient(ellipse 600px 300px at 50% 120%, rgba(25,182,216,.18), transparent 70%),
    var(--niebla);
  border-top: 1px solid var(--linea);
}

.cta .titulo-seccion { margin-bottom: .7rem; }
.cta p { color: var(--gris-texto); max-width: 38rem; margin: 0 auto 2rem; }

/* ---------- Pie de página ---------- */
.pie {
  background: var(--navy-profundo);
  color: #9fb5cf;
  padding-block: 3.5rem 1.5rem;
  font-size: .92rem;
}

.pie-superior {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.pie .logo-pie {
  height: 52px;
  width: auto;
  margin-bottom: 1rem;
  filter: brightness(1.15);
}

.pie h4 {
  color: var(--blanco);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.pie ul { list-style: none; }
.pie li { margin-bottom: .55rem; }

.pie a {
  color: #9fb5cf;
  text-decoration: none;
  transition: color .2s;
}

.pie a:hover { color: var(--cian-claro); }

.pie-inferior {
  text-align: center;
  padding-top: 1.5rem;
  font-size: .8rem;
  color: #6b83a3;
}

/* ============================================================
   Página Contáctenos
   ============================================================ */
.banner-pagina {
  background:
    radial-gradient(ellipse 700px 320px at 80% 0%, rgba(25,182,216,.22), transparent 65%),
    linear-gradient(130deg, var(--navy), var(--navy-profundo));
  color: var(--blanco);
  text-align: center;
  padding-block: 4rem 4.5rem;
}

.banner-pagina h1 {
  font-family: var(--fuente-titulos);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: .8rem;
}

.banner-pagina p {
  color: #c4d6ec;
  max-width: 40rem;
  margin-inline: auto;
  font-size: 1.05rem;
}

.malla-contacto {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
}

/* Tarjetas de información */
.info-contacto {
  display: grid;
  gap: 1.2rem;
}

.tarjeta-info {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 1.4rem;
  box-shadow: var(--sombra-suave);
}

.tarjeta-info .icono-servicio {
  margin: 0;
  width: 46px; height: 46px;
  flex-shrink: 0;
}

.tarjeta-info .icono-servicio svg { width: 23px; height: 23px; }

.tarjeta-info h3 {
  font-size: .98rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .2rem;
}

.tarjeta-info p { font-size: .9rem; color: var(--gris-texto); }
.tarjeta-info a { color: var(--azul); text-decoration: none; font-weight: 600; }
.tarjeta-info a:hover { text-decoration: underline; }

/* Formulario */
.tarjeta-formulario {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: 18px;
  padding: 2.2rem;
  box-shadow: var(--sombra-media);
}

.tarjeta-formulario h2 {
  font-family: var(--fuente-titulos);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: .4rem;
}

.tarjeta-formulario > p {
  font-size: .92rem;
  color: var(--gris-texto);
  margin-bottom: 1.6rem;
}

.fila-campos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.campo { margin-bottom: 1.1rem; }

.campo label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .03em;
  margin-bottom: .4rem;
}

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  font-family: var(--fuente-texto);
  font-size: .95rem;
  color: var(--tinta);
  background: var(--niebla);
  border: 1.5px solid var(--linea);
  border-radius: 10px;
  padding: .75rem .9rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.campo textarea { resize: vertical; min-height: 120px; }

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--azul);
  background: var(--blanco);
  box-shadow: 0 0 0 4px rgba(27, 95, 191, .12);
}

.nota-privacidad {
  font-size: .78rem;
  color: var(--gris-texto);
  margin-top: 1rem;
  text-align: center;
}

.boton-enviar {
  width: 100%;
  margin-top: .4rem;
}

.mensaje-exito {
  display: none;
  margin-top: 1.2rem;
  background: #e2f7ef;
  color: #0c6e55;
  border: 1px solid #b5e8d5;
  border-radius: 10px;
  padding: .9rem 1.1rem;
  font-size: .92rem;
  font-weight: 600;
  text-align: center;
  animation: aparecer .4s ease both;
}

.mensaje-exito.visible { display: block; }

/* Horario */
.tabla-horario { width: 100%; font-size: .9rem; border-collapse: collapse; }
.tabla-horario td { padding-block: .25rem; color: var(--gris-texto); }
.tabla-horario td:last-child { text-align: right; font-weight: 600; color: var(--navy); }

/* ---------- Animación al hacer scroll ---------- */
.revelar {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}

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

/* ---------- Adaptable ---------- */
@media (max-width: 920px) {
  .heroe .contenedor { grid-template-columns: 1fr; padding-block: 3.5rem 4rem; }
  .heroe-visual { max-width: 30rem; }
  .malla-servicios { grid-template-columns: 1fr 1fr; }
  .pasos { grid-template-columns: 1fr; gap: 1.6rem; }
  .banda-cifras .contenedor { grid-template-columns: 1fr 1fr; }
  .malla-contacto { grid-template-columns: 1fr; }
  .pie-superior { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .boton-menu { display: block; }

  .navegacion {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--blanco);
    border-bottom: 1px solid var(--linea);
    box-shadow: var(--sombra-media);
    display: none;
    padding: .5rem 0;
  }

  .navegacion.abierta { display: flex; }

  .navegacion a {
    padding: .9rem 6%;
    border-bottom: 0;
  }

  .malla-servicios { grid-template-columns: 1fr; }
  .fila-campos { grid-template-columns: 1fr; gap: 0; }
  .pie-superior { grid-template-columns: 1fr; gap: 1.8rem; }
  .logo-enlace img { height: 46px; }
}
