/* Sitio del Dr. Fernando Vallejo. Colores sacados del logo (loto + útero). */
:root {
  --ciruela: #4a1650;        /* titulares y texto fuerte */
  --texto: #3b3040;
  --suave: #6d6272;
  --magenta: #b03a82;        /* acción principal (contraste 5,3:1 sobre blanco) */
  --magenta-hover: #962f6e;
  --rosa: #e786c7;
  --lila: #bc80bc;
  --coral: #ecb3ba;
  --fondo: #ffffff;
  --tinte: #fbf3f8;          /* rosa muy claro para tarjetas */
  --tinte-lila: #f6f0fa;
  --borde: #eadfea;
  --wa: #1fa855;
  --wa-hover: #188a45;
  --radio: 14px;
  --sombra: 0 1px 2px rgba(74, 22, 80, .06), 0 8px 24px rgba(74, 22, 80, .08);
  --titulo: 'Outfit', system-ui, sans-serif;
  --cuerpo: 'Figtree', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
/* Móvil sólido: sin zoom por doble toque (el pellizco sigue, por accesibilidad), sin scroll lateral ni rebote horizontal. */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; overflow-x: clip; overscroll-behavior-x: none; }
body { margin: 0; overflow-x: clip; -webkit-tap-highlight-color: transparent; background: var(--fondo); color: var(--texto); font: 400 17px/1.6 var(--cuerpo); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--magenta); }
h1, h2, h3 { font-family: var(--titulo); color: var(--ciruela); line-height: 1.15; margin: 0 0 .5em; font-weight: 500; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 400; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 400; }
h3 { font-size: 1.2rem; }
h1, h2 { text-wrap: balance; }
p, li, address { overflow-wrap: break-word; }
p { margin: 0 0 1em; }
.contenedor { width: min(1160px, 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.saltar { position: absolute; left: -999px; top: 8px; background: var(--ciruela); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.saltar:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--rosa); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- botones ---------- */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 12px; border: 0; font: 600 1rem/1 var(--cuerpo); text-decoration: none; cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .2s; }
.boton:active { transform: scale(.98); }
.boton-primario { background: var(--magenta); color: #fff; box-shadow: 0 6px 16px rgba(176, 58, 130, .25); }
.boton-primario:hover { background: var(--magenta-hover); }
.boton-primario[disabled] { opacity: .6; cursor: progress; }
.boton-whatsapp { background: var(--wa); color: #fff; }
.boton-whatsapp:hover { background: var(--wa-hover); }
.boton-suave { background: var(--tinte); color: var(--ciruela); box-shadow: inset 0 0 0 1px var(--borde); }
.boton-suave:hover { background: #f6e4ef; }
.boton-texto { background: none; color: var(--suave); padding: 0 6px; min-height: 40px; font-weight: 500; }
.boton-texto:hover { color: var(--ciruela); }
.boton-chico { min-height: 42px; padding: 0 18px; font-size: .95rem; }

/* ---------- cabecera ---------- */
.cabecera { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); transition: box-shadow .25s; }
.cabecera.con-sombra { box-shadow: 0 1px 0 var(--borde); }
.cabecera-fila { display: flex; align-items: center; gap: 24px; height: 72px; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ciruela); margin-right: auto; }
.marca img { width: 44px; height: auto; }
.marca span { display: flex; flex-direction: column; line-height: 1.15; }
.marca strong { font: 500 1.05rem var(--titulo); }
.marca small { color: var(--suave); font-size: .82rem; }
.menu { display: flex; gap: 26px; }
.menu a { color: var(--texto); text-decoration: none; font-weight: 500; font-size: .97rem; }
.menu a:hover { color: var(--magenta); }

/* ---------- hero ---------- */
.hero { padding: 40px 0 72px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.lugar { color: var(--magenta); font-weight: 600; font-size: .95rem; margin-bottom: 14px; }
.hero-acciones { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }

.hero-foto { position: relative; aspect-ratio: 4 / 4.4; border-radius: 28px; background: linear-gradient(180deg, var(--tinte-lila), var(--tinte)); }
.loto { position: absolute; left: 50%; bottom: 22%; width: 118%; transform: translateX(-50%); }
.petalo { mix-blend-mode: multiply; opacity: .55; transform-origin: 300px 400px; transform: scale(.2) rotate(0); animation: abrir 1.4s cubic-bezier(.2, .8, .2, 1) forwards; }
.p1 { animation-delay: .15s; --r: -4deg; } .p2 { animation-delay: .15s; --r: 4deg; }
.p3 { animation-delay: .3s; --r: -2deg; } .p4 { animation-delay: .3s; --r: 2deg; }
.p5 { animation-delay: .45s; --r: 0deg; }
@keyframes abrir { to { transform: scale(1) rotate(var(--r)); } }
.loto.mecer .petalo { animation: mecer 7s ease-in-out infinite alternate; transform: scale(1) rotate(var(--r)); }
@keyframes mecer { from { transform: scale(1) rotate(var(--r)); } to { transform: scale(1.025) rotate(calc(var(--r) * -1)); } }
.doctor { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); height: 100%; width: auto; max-width: none;
  border-radius: 0 0 28px 28px; animation: subir 1s .2s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes subir { from { opacity: 0; transform: translate(-50%, 24px); } }
.tarjeta-flotante { position: absolute; left: -18px; bottom: 40px; display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: #fff; border-radius: 14px; box-shadow: var(--sombra); font-weight: 600; color: var(--ciruela); font-size: .95rem;
  animation: subir2 .8s .9s both; }
@keyframes subir2 { from { opacity: 0; transform: translateY(12px); } }
.punto { width: 10px; height: 10px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 0 rgba(31, 168, 85, .5); animation: latido 2s infinite; }
@keyframes latido { 70% { box-shadow: 0 0 0 10px rgba(31, 168, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 168, 85, 0); } }

/* ---------- secciones ---------- */
.seccion { padding: 88px 0; }
.seccion-suave { background: var(--tinte); }
.intro { font-size: 1.12rem; color: var(--suave); max-width: 40em; margin-bottom: 36px; }

.servicios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.servicio { display: flex; flex-direction: column; padding: 26px; border-radius: var(--radio); background: #fff;
  box-shadow: inset 0 0 0 1px var(--borde); transition: box-shadow .25s, transform .25s; }
.servicio:hover { box-shadow: inset 0 0 0 1px var(--coral), var(--sombra); transform: translateY(-3px); }
.servicio img { width: 56px; height: 56px; margin-bottom: 14px; }
.servicio h3 { margin-bottom: .3em; }
.servicio p { color: var(--suave); flex: 1; }
.servicio-pie { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; }

.despues { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; margin-top: 28px; padding: 32px; border-radius: var(--radio); background: var(--tinte-lila); }
.despues p { color: var(--suave); }
.enlace-wa { font-weight: 600; color: var(--wa-hover); }
.procedimientos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; align-content: center; }
.procedimientos li { position: relative; padding-left: 22px; color: var(--ciruela); font-weight: 500; }
.procedimientos li::before { content: ''; position: absolute; left: 0; top: .55em; width: 9px; height: 9px; border-radius: 50% 0; background: var(--rosa); transform: rotate(45deg); }

/* ---------- reserva ---------- */
.seccion-agenda { background: linear-gradient(180deg, #fff, var(--tinte) 30%); }
.reserva { background: #fff; border-radius: 22px; box-shadow: var(--sombra); padding: 32px; max-width: 860px; }
.pasos { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 28px; counter-reset: p; }
.pasos li { flex: 1; font-size: .88rem; color: var(--suave); padding-top: 10px; border-top: 3px solid var(--borde); transition: border-color .3s, color .3s; }
.reserva[data-paso="1"] .pasos li[data-p="1"], .reserva[data-paso="2"] .pasos li:is([data-p="1"], [data-p="2"]),
.reserva:is([data-paso="3"], [data-paso="4"]) .pasos li { border-color: var(--magenta); color: var(--ciruela); font-weight: 600; }
.paso { animation: entrar .35s ease both; }
@keyframes entrar { from { opacity: 0; transform: translateX(14px); } }
.paso-titulo { font-size: 1.05rem; margin: 6px 0 14px; }
.paso-cabecera { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.mes { color: var(--suave); font-weight: 500; text-transform: capitalize; }
.paso-pie { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

.tipos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tipo { text-align: left; padding: 18px; border-radius: var(--radio); border: 0; background: var(--tinte); cursor: pointer;
  box-shadow: inset 0 0 0 1.5px transparent; font: inherit; color: var(--texto); transition: box-shadow .2s, background .2s, transform .2s; }
.tipo:hover { box-shadow: inset 0 0 0 1.5px var(--coral); transform: translateY(-2px); }
.tipo[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--magenta); background: #fff; }
.tipo strong { display: block; font: 500 1.08rem var(--titulo); color: var(--ciruela); }
.tipo span { display: block; margin-top: 4px; color: var(--suave); font-size: .92rem; }

.dias-marco { display: flex; align-items: center; gap: 6px; margin-bottom: 24px; }
.flecha { flex: none; width: 38px; height: 38px; border-radius: 10px; border: 0; background: var(--tinte); color: var(--ciruela); font-size: 1.4rem; cursor: pointer; }
.flecha:disabled { opacity: .35; cursor: default; }
.dias { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px; flex: 1; }
.dias::-webkit-scrollbar { display: none; }
.dia { flex: 0 0 72px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 0;
  border-radius: 14px; border: 0; background: #fff; box-shadow: inset 0 0 0 1.5px var(--borde); cursor: pointer; font: inherit; color: var(--texto); transition: all .2s; }
.dia small { font-size: .78rem; color: var(--suave); text-transform: capitalize; }
.dia b { font: 500 1.4rem var(--titulo); color: var(--ciruela); font-variant-numeric: tabular-nums; }
.dia:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--coral); }
.dia[aria-checked="true"] { background: var(--magenta); box-shadow: none; }
.dia[aria-checked="true"] :is(small, b) { color: #fff; }
.dia:disabled { opacity: .38; cursor: default; }
.dia .libres { font-size: .7rem; color: var(--wa-hover); font-weight: 600; }
.dia[aria-checked="true"] .libres { color: #fff; }

.horas { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; min-height: 52px; }
.franja { grid-column: 1 / -1; font-size: .85rem; color: var(--suave); font-weight: 600; margin-top: 6px; }
.hora { min-height: 48px; border-radius: 12px; border: 0; background: var(--tinte); color: var(--ciruela); font: 600 1rem var(--cuerpo);
  font-variant-numeric: tabular-nums; cursor: pointer; transition: all .18s; animation: aparecer .3s both; }
@keyframes aparecer { from { opacity: 0; transform: translateY(6px); } }
.hora:hover { box-shadow: inset 0 0 0 1.5px var(--coral); }
.hora[aria-checked="true"] { background: var(--magenta); color: #fff; }
.vacio { grid-column: 1 / -1; color: var(--suave); padding: 12px 0; }

.resumen { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radio); background: var(--tinte); margin-bottom: 22px; color: var(--ciruela); }
.resumen strong { font-family: var(--titulo); font-weight: 500; }
.campos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.campos label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--ciruela); }
.campos .ancho { grid-column: 1 / -1; }
.opcional { font-weight: 400; color: var(--suave); }
input, textarea, select { font: 400 1rem var(--cuerpo); color: var(--texto); padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--borde);
  background: #fff; width: 100%; transition: border-color .2s, box-shadow .2s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--magenta); box-shadow: 0 0 0 4px rgba(176, 58, 130, .12); }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; }
.acepto { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; font-size: .9rem; color: var(--suave); cursor: pointer; }
.acepto input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--magenta); }
.error { color: #b3261e; background: #fdecea; padding: 10px 14px; border-radius: 10px; margin: 16px 0 0; font-weight: 500; }

.listo { text-align: left; }
.listo .nota { color: var(--suave); font-size: .95rem; }
.check { width: 64px; height: 64px; margin-bottom: 14px; }
.check circle { fill: none; stroke: var(--wa); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: trazo .6s forwards; }
.check path { fill: none; stroke: var(--wa); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: trazo .4s .5s forwards; }
@keyframes trazo { to { stroke-dashoffset: 0; } }

/* ---------- doctor ---------- */
.doctor-grid { display: grid; grid-template-columns: minmax(0, 400px) 1fr; gap: 64px; align-items: center; }
.doctor-retrato { height: auto; border-radius: 24px; background: linear-gradient(180deg, var(--tinte-lila), var(--tinte)); aspect-ratio: 4 / 5; object-fit: cover; object-position: top; width: 100%; }

/* ---------- ubicación ---------- */
.ubicacion-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: stretch; }
address { font-style: normal; margin-bottom: 24px; color: var(--texto); }
address strong { color: var(--ciruela); }
.horario { border-collapse: collapse; margin-bottom: 22px; width: 100%; max-width: 380px; }
.horario th, .horario td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--borde); vertical-align: top; font-variant-numeric: tabular-nums; }
.horario th { font-weight: 600; color: var(--ciruela); padding-right: 24px; }
.contacto { display: flex; flex-direction: column; gap: 4px; margin-bottom: 22px; }
.contacto a { color: var(--ciruela); font-weight: 600; text-decoration: none; }
.mapa { position: relative; display: block; border-radius: 22px; overflow: hidden; min-height: 360px; background: var(--tinte-lila); box-shadow: 0 0 0 1px var(--borde); }
.mapa img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.mapa:hover img { transform: scale(1.03); }
.mapa .osm { position: absolute; right: 8px; bottom: 6px; font-size: .68rem; color: var(--suave); background: rgba(255, 255, 255, .8); padding: 1px 6px; border-radius: 6px; }
.mapa .boton { position: absolute; left: 16px; bottom: 16px; background: #fff; box-shadow: var(--sombra); }

/* ---------- pie y flotantes ---------- */
.pie { padding: 36px 0 120px; border-top: 1px solid var(--borde); color: var(--suave); font-size: .92rem; }
.pie-fila { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.pie p { margin: 0; }
.wa-flotante { position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: var(--wa); color: #fff; box-shadow: 0 10px 24px rgba(31, 168, 85, .35); transition: transform .2s; animation: subir2 .6s 1.4s both; }
.wa-flotante:hover { transform: scale(1.07); }
.barra-movil { display: none; }

/* aparición al hacer scroll */
.js .revelar { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .revelar.visto { opacity: 1; transform: none; }

/* ---------- móvil ---------- */
@media (max-width: 900px) {
  .menu { display: none; }
  .hero { padding-top: 16px; }
  .hero-grid, .doctor-grid, .ubicacion-grid, .despues { grid-template-columns: 1fr; gap: 32px; }
  .hero-foto { order: -1; aspect-ratio: 1 / 1; max-height: 440px; width: 100%; }
  .tarjeta-flotante { left: 12px; bottom: 16px; }
  .servicios { grid-template-columns: 1fr; }
  .doctor-retrato { max-width: 360px; }
  .seccion { padding: 64px 0; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .cabecera-fila { height: 62px; }
  .cabecera .boton-chico { display: none; }
  .hero-acciones .boton { flex: 1 1 100%; }
  .reserva { padding: 20px 16px; border-radius: 18px; }
  .campos { grid-template-columns: 1fr; }
  .procedimientos { grid-template-columns: 1fr; }
  .despues { padding: 24px 20px; }
  .flecha { display: none; }
  .paso-pie { flex-direction: column-reverse; align-items: stretch; }
  .paso-pie .boton { width: 100%; }
  .wa-flotante { display: none; }
  .barra-movil { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 -1px 0 var(--borde);
    transform: translateY(110%); transition: transform .3s; }
  .barra-movil.visible { transform: none; }
  .barra-movil .boton-primario { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .revelar { opacity: 1; transform: none; }
}
