/* Layout: blanco como base para transmitir calma; el degradado del logo (turquesa, violeta, magenta) solo como acento. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --tint: #f6fafa;
  --ink: #1e2230;
  --ink-soft: #5d6475;
  --line: #e6eaee;
  --primary: #7a4ccf;
  --primary-dark: #6a3dbd;
  --primary-soft: #f3eefc;
  --on-primary: #ffffff;
  --magenta: #b02cc6;
  --magenta-soft: #fcf0fd;
  --teal: #0e917c;
  --teal-soft: #e6f7f3;
  --blue: #3a74ad;
  --blue-soft: #eaf2fa;
  --brand-gradient: linear-gradient(90deg, #e6007e 0%, #7b2fbf 50%, #0a84d6 100%);
  --button-gradient: linear-gradient(90deg, #cf0a70 0%, #6a3dbd 50%, #0a6fc2 100%);
  --header-bg: rgba(255, 255, 255, 0.9);
  --wa: #25d366;
  --shadow: rgba(30, 34, 48, 0.09);
  --radius: 18px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.12; text-wrap: balance; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h1 em, h2 em {
  font-style: italic;
  font-weight: 300;
  color: var(--magenta);
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 0.08em;
}
h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
small { font-size: 0.8em; font-weight: 500; color: var(--ink-soft); }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding-inline: 24px; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}

.icon { width: 18px; height: 18px; flex: none; }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 26px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--button-gradient) border-box;
  color: var(--on-primary);
  font: 600 0.95rem var(--sans);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 20px -10px rgba(127, 79, 209, 0.6);
  transition: filter .2s, box-shadow .2s, border-color .2s, transform .15s;
}
.btn:hover { filter: brightness(1.07); box-shadow: 0 12px 26px -10px rgba(127, 79, 209, 0.7); }
.btn:active { transform: scale(0.98); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn--ghost:hover { border-color: var(--teal); box-shadow: none; filter: none; }
.btn--small { min-height: 40px; padding: 8px 18px; font-size: 0.875rem; }
.btn--full { width: 100%; }
.btn--wa { background: var(--wa); color: #0b2e17; box-shadow: none; }
.btn--wa:hover { filter: brightness(0.96); box-shadow: none; }

:focus-visible { outline: 2.5px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

/* Header */
.header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__logo { display: block; height: 68px; width: auto; }
.brand--small .brand__logo { height: 56px; }
.brand__meta {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--ink-soft);
}

.nav { display: flex; gap: 32px; }
.nav a { text-decoration: none; font-size: 0.9rem; font-weight: 500; color: var(--ink-soft); transition: color .2s; }
.nav a:hover { color: var(--ink); }

/* Portada */
.hero { padding-block: 88px 104px; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero__text { min-width: 0; }
.lead { margin-top: 24px; font-size: 1.125rem; color: var(--ink-soft); max-width: 33rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.hero__note strong { color: var(--ink); white-space: nowrap; }
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 var(--teal);
  animation: pulse 2.4s infinite;
  flex: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--teal-soft); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Agenda semanal (portada) */
.agenda { position: relative; padding-top: 120px; min-width: 0; }
.agenda__fan { position: absolute; top: 0; left: 50%; width: 150%; max-width: 720px; transform: translateX(-50%); }
.fan__sector { fill: url(#fan-gradient); opacity: 0.1; }
.fan__arc { fill: none; stroke: url(#fan-gradient); stroke-width: 1.2; opacity: 0.4; }
.agenda__card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 24px 60px -20px var(--shadow);
}
.agenda__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
}
.agenda__status.is-open { background: var(--teal-soft); color: var(--teal); }
.agenda__status.is-open::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.agenda__title { font-size: 1.5rem; margin: 16px 0 12px; }
.agenda__list { list-style: none; margin: 0; padding: 0; }
.agenda__list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: baseline;
  gap: 12px;
  padding: 12px 10px;
  margin-inline: -10px;
  border-radius: 10px;
  border-bottom: 1px solid var(--line);
}
.agenda__list li:last-child { border-bottom: 0; }
.agenda__list li.is-today { background: var(--magenta-soft); border-bottom-color: transparent; }
.agenda__list li.is-today .agenda__day { color: var(--magenta); }
.agenda__day { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.agenda__slots { display: grid; gap: 6px; min-width: 0; }
.agenda__slot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.agenda__what { font-weight: 600; }
.agenda__time { font-size: 0.9rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.agenda__link { display: inline-block; margin-top: 16px; font-size: 0.9rem; font-weight: 600; color: var(--primary); text-decoration: none; }
.agenda__link:hover { text-decoration: underline; }

/* Secciones */
.section { padding-block: 104px; }
.section--tint { background: linear-gradient(180deg, var(--bg), var(--tint) 30%, var(--tint) 70%, var(--bg)); }
.section__head { margin-bottom: 48px; }

/* Consultorios */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.service {
  --tone: var(--primary);
  --tone-soft: var(--primary-soft);
  --tone-bar: var(--tone);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 34px 28px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .2s, box-shadow .2s;
}
.service::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--tone-bar); }
.service:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px var(--shadow); }
.service--ecografias { --tone-bar: var(--brand-gradient); grid-column: 1 / -1; }
.service--clinica { --tone: var(--primary); --tone-soft: var(--primary-soft); }
.service__when span.is-new { background: var(--magenta-soft); color: var(--magenta); }
.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--magenta-soft);
  color: var(--magenta);
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: middle;
  white-space: nowrap;
}
.service--obstetricia { --tone: var(--magenta); --tone-soft: var(--magenta-soft); }
.service--ginecologia { --tone: var(--teal); --tone-soft: var(--teal-soft); }
.service--psicologia { --tone: var(--blue); --tone-soft: var(--blue-soft); }
.service__when { display: flex; flex-wrap: wrap; gap: 6px; }
.service__when span {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--tone-soft);
  color: var(--tone);
  font-size: 0.78rem;
  font-weight: 700;
}
.service h3 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; margin-top: 6px; }
.service p:not(.service__when) { color: var(--ink-soft); }
.service__cta {
  margin-top: auto;
  padding: 14px 0 0;
  border: 0;
  background: none;
  color: var(--tone);
  font: 700 0.95rem var(--sans);
  text-align: left;
  cursor: pointer;
}
.service__cta span { display: inline-block; transition: transform .2s; }
.service__cta:hover span { transform: translateX(4px); }

/* Turnos */
.booking { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; }
.booking__intro > p:not(.eyebrow) { margin-top: 20px; color: var(--ink-soft); max-width: 26rem; }
.booking__perks { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 12px; }
.booking__perks li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.booking__perks li::before {
  content: "";
  width: 20px; height: 20px;
  flex: none;
  border-radius: 50%;
  background: var(--teal-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m6 10.5 2.5 2.5L14 7.5' fill='none' stroke='%232fb5ae' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

.wizard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 30px 70px -30px var(--shadow);
  min-width: 0;
}
.wizard__progress { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wizard__progress li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 3px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: border-color .3s, color .3s;
}
.wizard__progress span {
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--tint);
  font-size: 0.72rem;
}
.wizard__progress li.is-active, .wizard__progress li.is-done { border-image: var(--brand-gradient) 1; color: var(--ink); }
.wizard__progress li.is-active span, .wizard__progress li.is-done span { background: var(--button-gradient); color: var(--on-primary); }

.wizard__step { animation: stepIn .35s ease; }
.wizard__step h3 { font-size: 1.3rem; margin-bottom: 18px; outline: none; }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.choices { display: grid; gap: 12px; }
.choice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  width: 100%;
  padding: 20px 22px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
}
.choice:hover { border-color: var(--primary); background: var(--surface); }
.choice:active { transform: scale(0.99); }
.choice__name { font-size: 1.05rem; font-weight: 700; }
.choice__meta { font-size: 0.88rem; color: var(--ink-soft); }

.wizard__hint { margin: -8px 0 18px; color: var(--ink-soft); font-size: 0.95rem; }
.dates { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.date {
  display: grid;
  gap: 2px;
  padding: 16px 18px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
}
.date:hover { border-color: var(--primary); background: var(--surface); }
.date:active { transform: scale(0.98); }
.date__tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--magenta); }
.date__day { font-size: 1.05rem; font-weight: 700; }
.date__day::first-letter { text-transform: uppercase; }
.date__time { font-size: 0.85rem; color: var(--ink-soft); }

.wizard__back {
  margin-top: 22px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font: 600 0.9rem var(--sans);
  cursor: pointer;
}
.wizard__back:hover { color: var(--ink); }

.summary { margin: 0 0 24px; padding: 6px 20px; background: var(--tint); border-radius: 14px; }
.summary div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.summary div:last-child { border-bottom: 0; }
.summary dt { color: var(--ink-soft); font-size: 0.9rem; }
.summary dd { margin: 0; font-weight: 600; text-align: right; }
#sum-date::first-letter { text-transform: uppercase; }
.finish { display: grid; gap: 12px; }
.finish__note { margin-top: 14px; font-size: 0.88rem; color: var(--ink-soft); text-align: center; }
.finish__note a { color: var(--primary); font-weight: 600; }

/* Ubicación */
.location { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.location__info { min-width: 0; }
.location address { margin-top: 24px; font-style: normal; color: var(--ink-soft); font-size: 1.05rem; }
.location address strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 1.2rem; }
.location__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.location__map {
  aspect-ratio: 4 / 3;
  max-width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--tint);
}
.location__map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Footer */
.footer { padding-block: 36px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--ink-soft); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.footer a:not(.brand) { color: var(--primary); font-weight: 600; text-decoration: none; }

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: 58px; height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--wa);
  color: #fff;
  box-shadow: 0 10px 28px var(--shadow);
  transition: transform .2s;
  z-index: 20;
}
.wa-float:hover { transform: scale(1.06); }

/* Responsive */
@media (max-width: 960px) {
  .hero { padding-block: 56px 72px; }
  .hero__inner, .booking, .location { grid-template-columns: 1fr; gap: 48px; }
  .agenda { max-width: 520px; }
  .services { grid-template-columns: 1fr; }
  .section { padding-block: 72px; }
  .section__head { margin-bottom: 36px; }
  .nav { display: none; }
}

@media (max-width: 560px) {
  .container { padding-inline: 16px; }
  .brand__meta { display: none; }
  .hero__actions .btn { flex: 1 1 auto; }
  .agenda { padding-top: 80px; }
  .agenda__card { padding: 22px; }
  .agenda__list li { grid-template-columns: 40px 1fr; gap: 8px; }
  .wizard { padding: 22px 18px; border-radius: 20px; }
  .wizard__progress li { font-size: 0.75rem; }
  .dates { grid-template-columns: 1fr; }
  .location__actions .btn { flex: 1 1 auto; }
  .wa-float { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* Canales de contacto flotantes (asistente 24 h, Telegram, llamada) */
.channels { position: fixed; left: 16px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; z-index: 20; }
.channel {
  position: relative; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-soft, #5d6475);
  background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line, #e6eaee); box-shadow: 0 8px 22px var(--shadow, rgba(30,34,48,.09));
  transition: transform .2s, color .2s, border-color .2s;
}
.channel:hover, .channel:focus-visible { transform: scale(1.1); }
.channel--wa:hover { color: #1fa855; border-color: #25d366; }
.channel--tg:hover { color: #229ed9; border-color: #229ed9; }
.channel--tel:hover { color: var(--primary); border-color: var(--primary); }
.channel__tip {
  position: absolute; left: 56px; top: 50%; transform: translateY(-50%); white-space: nowrap;
  background: var(--ink, #1e2230); color: #fff; font-size: .75rem; font-weight: 600; padding: 5px 10px; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.channel:hover .channel__tip, .channel:focus-visible .channel__tip { opacity: 1; }
@media (max-width: 560px) {
  .channels { top: auto; transform: none; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: 16px; flex-direction: row; }
  .channel__tip { display: none; }
}

.service__pro { margin: 2px 0 6px; font-size: .85rem; opacity: .75; }
