/* ==========================================================================
   Estilos de la web. Para cambiar colores, edita solo las variables de :root
   ========================================================================== */

@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --azul-900: #123a63;   /* azul institucional: cabecera, portada, pie */
  --azul-700: #1f5c99;   /* enlaces y acentos */
  --azul-100: #e8f1f9;   /* fondos de sección claros */
  --azul-050: #f4f8fc;
  --texto:    #1c2a39;
  --gris:     #566676;
  --linea:    #cfdbe7;
  --blanco:   #ffffff;
  --wa:       #0e7a5b;   /* verde WhatsApp oscurecido para cumplir contraste AA */
  --wa-hover: #0a5f47;
  --abierto:  #2fbf7d;

  --fuente: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radio: 10px;
  --ancho: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--texto);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--azul-700); text-underline-offset: .18em; }
a:hover { color: var(--azul-900); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid #f2b705; outline-offset: 3px; border-radius: 3px; }

.contenedor { width: min(100% - 2.5rem, var(--ancho)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.saltar {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--blanco); color: var(--azul-900); padding: .6rem 1rem; border-radius: var(--radio);
}
.saltar:focus { top: 1rem; }

/* ---------- Barra superior ---------- */
.barra-sup { background: #0d2c4c; color: #d6e4f2; font-size: .9rem; }
.barra-sup__in { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: .45rem; }
.barra-sup p { margin: 0; }
.barra-sup a { color: var(--blanco); font-weight: 600; text-decoration: none; }
.barra-sup a:hover { text-decoration: underline; }

/* Indicador de abierto / cerrado */
.estado { display: inline-flex; align-items: center; gap: .55em; margin: 0; }
.estado::before {
  content: ""; width: .6em; height: .6em; border-radius: 50%;
  background: #9aa9b8; flex: none;
}
.estado--abierto::before { background: var(--abierto); box-shadow: 0 0 0 .22em rgb(47 191 125 / .25); }

/* ---------- Cabecera ---------- */
.cabecera { background: var(--azul-900); color: var(--blanco); position: sticky; top: 0; z-index: 20; }
.cabecera__in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.5rem; }
.marca { display: inline-flex; align-items: center; gap: .65rem; color: var(--blanco); text-decoration: none; }
.marca:hover { color: var(--blanco); }
.marca__icono { width: 2.2rem; height: 2.2rem; }
.marca__texto { font-size: 1.2rem; font-weight: 400; letter-spacing: .01em; }
.marca__texto strong { font-weight: 800; }

.menu ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.menu a {
  display: block; padding: .55rem .9rem; border-radius: 6px;
  color: var(--blanco); text-decoration: none; font-weight: 500;
}
.menu a:hover { background: rgb(255 255 255 / .12); color: var(--blanco); }

.menu-boton {
  display: none; align-items: center; gap: .6rem;
  background: none; border: 1px solid rgb(255 255 255 / .4); color: var(--blanco);
  font: inherit; font-weight: 600; padding: .45rem .8rem; border-radius: 6px; cursor: pointer;
}
.menu-boton__barras, .menu-boton__barras::before, .menu-boton__barras::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative;
}
.menu-boton__barras::before, .menu-boton__barras::after { content: ""; position: absolute; left: 0; }
.menu-boton__barras::before { top: -6px; }
.menu-boton__barras::after { top: 6px; }

/* ---------- Portada ---------- */
.portada {
  background:
    radial-gradient(1200px 500px at 85% 120%, #1f5c99 0%, transparent 60%),
    var(--azul-900);
  color: var(--blanco);
  padding-block: clamp(3rem, 8vw, 6rem) clamp(3.5rem, 9vw, 7rem);
}
.portada__in { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.portada h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; max-width: 16ch; }
.portada__entrada { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: #d9e6f3; max-width: 34em; margin-bottom: 2rem; }

.hoy-card {
  background: var(--blanco); color: var(--texto);
  border-radius: 14px; padding: 1.75rem;
  border-top: 6px solid var(--azul-700);
}
.hoy-card__titulo { font-size: 1rem; font-weight: 600; color: var(--gris); margin-bottom: .75rem; }
.estado--grande { font-size: 1.3rem; font-weight: 700; color: var(--azul-900); line-height: 1.3; }
.hoy-card__datos { margin: 1.4rem 0; display: grid; gap: 1rem; border-top: 1px solid var(--linea); padding-top: 1.2rem; }
.hoy-card__datos dt { font-size: .85rem; color: var(--gris); }
.hoy-card__datos dd { margin: 0; font-weight: 600; }
.enlace { font-weight: 600; }

/* ---------- Botones ---------- */
.botones { display: flex; flex-wrap: wrap; gap: .8rem; }
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.4rem; border-radius: 999px; border: 2px solid var(--azul-700);
  background: var(--azul-700); color: var(--blanco);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.boton:hover { background: var(--azul-900); border-color: var(--azul-900); color: var(--blanco); }
.boton--wa { background: var(--wa); border-color: var(--wa); }
.boton--wa:hover { background: var(--wa-hover); border-color: var(--wa-hover); }
.boton--sec { background: transparent; color: var(--azul-700); }
.boton--sec:hover { background: var(--azul-700); color: var(--blanco); }
.portada .boton--sec { color: var(--blanco); border-color: rgb(255 255 255 / .7); }
.portada .boton--sec:hover { background: var(--blanco); color: var(--azul-900); border-color: var(--blanco); }
.boton--ancho { width: 100%; }
.icono { width: 1.25em; height: 1.25em; }

/* ---------- Secciones ---------- */
.seccion { padding-block: clamp(3.5rem, 8vw, 6rem); }
.seccion--clara { background: var(--azul-100); }
.seccion__titulo { font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 800; color: var(--azul-900); }
.seccion__entrada { font-size: 1.15rem; color: var(--gris); max-width: 38em; margin-bottom: 2.5rem; }

/* Tratamientos: lista en rejilla con línea superior, sin tarjetas con sombra */
.tratamientos {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem 2.5rem;
}
.tratamientos li { border-top: 2px solid var(--azul-900); padding-top: 1.1rem; }
.tratamientos h3 { font-size: 1.25rem; color: var(--azul-900); margin-bottom: .4em; }
.tratamientos p { color: var(--gris); margin: 0; max-width: 32em; }

/* La clínica */
.clinica { display: grid; grid-template-columns: minmax(200px, 340px) 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.clinica__retrato { aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--azul-050); }
.clinica__retrato img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
.clinica__texto p { max-width: 36em; }
.credenciales { list-style: none; padding: 1rem 0 0; margin: 1.5rem 0 0; border-top: 1px solid var(--linea); color: var(--gris); font-size: .95rem; }

/* Cita */
.cita { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.pasos { padding-left: 1.3rem; margin: 0 0 1.5rem; }
.pasos li { margin-bottom: .7rem; padding-left: .3rem; }
.pasos li::marker { color: var(--azul-700); font-weight: 800; }
.nota { font-size: .95rem; color: var(--gris); border-left: 3px solid var(--azul-700); padding-left: .9rem; }

.formulario {
  background: var(--azul-050); border: 1px solid var(--linea);
  border-radius: 14px; padding: clamp(1.4rem, 3vw, 2.2rem);
}
.campo { margin: 0 0 1.2rem; border: 0; padding: 0; }
.campo-doble { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.campo label, .campo legend { display: block; font-weight: 600; margin-bottom: .35rem; }
.campo input[type="text"], .campo select {
  width: 100%; font: inherit; color: var(--texto);
  padding: .7rem .85rem; border: 1px solid #93a7bb; border-radius: 8px; background: var(--blanco);
}
.campo input[type="text"]:focus, .campo select:focus { border-color: var(--azul-700); }
.opcion { display: flex; align-items: flex-start; gap: .55rem; margin-bottom: .4rem; font-weight: 400 !important; cursor: pointer; }
.opcion input { margin-top: .35em; accent-color: var(--azul-700); width: 1.05rem; height: 1.05rem; flex: none; }
.opcion--legal { font-size: .93rem; color: var(--gris); margin: .4rem 0 1rem; }
.form-aviso { color: #b42318; font-weight: 600; min-height: 1.5em; margin-bottom: .6rem; }
.form-aviso:empty { min-height: 0; margin: 0; }

/* Horario */
.horario { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); }
.horario .estado { font-weight: 600; margin-bottom: 1rem; }
.tabla-horario { width: 100%; max-width: 30rem; border-collapse: collapse; }
.tabla-horario th, .tabla-horario td { text-align: left; padding: .7rem .4rem; border-bottom: 1px solid var(--linea); }
.tabla-horario th { font-weight: 600; width: 40%; }
.tabla-horario .hoy th, .tabla-horario .hoy td { color: var(--azul-900); font-weight: 800; background: rgb(255 255 255 / .6); }
.direccion { font-style: normal; font-size: 1.2rem; font-weight: 600; margin-bottom: 1rem; }

/* ---------- Pie ---------- */
.pie { background: var(--azul-900); color: #c9d8e8; padding-block: 3rem 1.5rem; font-size: .95rem; }
.pie a { color: var(--blanco); }
.pie__in { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.pie__marca { color: var(--blanco); font-weight: 800; font-size: 1.15rem; margin-bottom: .5rem; }
.pie__legal { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.pie__copy { border-top: 1px solid rgb(255 255 255 / .15); margin-top: 2.5rem; padding-top: 1.2rem; font-size: .85rem; }

/* ---------- WhatsApp flotante ---------- */
.wa-flotante {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 30;
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--wa); color: var(--blanco); text-decoration: none; font-weight: 700;
  padding: .8rem 1.1rem .8rem .9rem; border-radius: 999px;
  box-shadow: 0 6px 20px rgb(14 60 45 / .35);
}
.wa-flotante:hover { background: var(--wa-hover); color: var(--blanco); }
.wa-flotante svg { width: 1.6rem; height: 1.6rem; }
.con-whatsapp .pie { padding-bottom: 5.5rem; }

/* ---------- Páginas legales ---------- */
.legal { padding-block: 3rem 5rem; }
.legal article { max-width: 46rem; }
.legal h2 { color: var(--azul-900); margin-top: 2.5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .portada__in, .cita, .horario, .clinica { grid-template-columns: 1fr; }
  .tratamientos { grid-template-columns: 1fr 1fr; }
  .clinica__retrato { max-width: 260px; }
  .pie__in { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .menu-boton { display: inline-flex; }
  .menu { position: absolute; left: 0; right: 0; top: 100%; background: var(--azul-900); display: none; border-top: 1px solid rgb(255 255 255 / .15); }
  .menu.abierto { display: block; }
  .menu ul { flex-direction: column; padding: .5rem 1.25rem 1rem; }
  .menu a { padding: .8rem .4rem; }
  .barra-sup__in { flex-direction: column; align-items: flex-start; gap: .1rem; }
}
@media (max-width: 560px) {
  .tratamientos, .campo-doble { grid-template-columns: 1fr; }
  .wa-flotante__texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .wa-flotante { padding: .9rem; }
  .botones .boton { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.boton--claro { background: transparent; color: var(--blanco); border-color: rgb(255 255 255 / .7); }
.boton--claro:hover { background: var(--blanco); color: var(--azul-900); border-color: var(--blanco); }

.hoy-card__persona { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.2rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--linea); }
.hoy-card__persona img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.hoy-card__persona p { margin: 0; line-height: 1.35; color: var(--gris); }
.hoy-card__persona strong { color: var(--azul-900); }
