/* ==========================================================================
   Dr. Sanín — Sistema visual (Fase 1)
   Referentes: maxfaclondon.co.uk (arquitectura de confianza clínica)
               wearebou.com (lenguaje de movimiento e interacción)
   ========================================================================== */

/* ---- Variables ---------------------------------------------------------- */
:root {
	--ink: #141414;
	--ink-soft: #1c1d1b;
	--paper: #ffffff;
	--paper-warm: #f4f2ee;
	--line: #e6e3dd;
	--line-on-dark: rgba(255, 255, 255, 0.14);
	--muted: #6c6f72;
	--muted-2: #9a9d9f;
	--on-dark: #f2f1ee;
	--on-dark-muted: #b7b6b2;
	--paper-warm-2: #eef0f1;

	--font-heading: "Archivo", -apple-system, sans-serif;
	--font-body: "Inter", -apple-system, sans-serif;

	--container: 1240px;
	--gutter: clamp(20px, 5vw, 64px);
	--radius: 0;

	--space-1: 8px;
	--space-2: 16px;
	--space-3: 24px;
	--space-4: 40px;
	--space-5: 64px;
	--space-6: 96px;
	--space-7: 140px;

	--ease: cubic-bezier(0.4, 0, 0.2, 1);
	--fast: 0.2s;
	--slow: 0.6s;
}

/* ---- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
	font-family: var(--font-heading);
	font-weight: 700;
	line-height: 1.08;
	margin: 0 0 var(--space-2);
	letter-spacing: -0.01em;
}
p { margin: 0 0 var(--space-2); color: var(--muted); }
strong, b, em { font-weight: 700; font-style: normal; color: inherit; }

.container {
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted-2);
	margin-bottom: var(--space-2);
}

/* ---- Botones -------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	padding: 14px 28px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.95rem;
	border: 1px solid transparent;
	transition: background-color var(--fast) var(--ease),
		color var(--fast) var(--ease),
		border-color var(--fast) var(--ease),
		transform var(--fast) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--sm { padding: 9px 20px; font-size: 0.82rem; }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #2c2c2c; }

.btn-primary--on-dark { background: var(--paper); color: var(--ink); }
.btn-primary--on-dark:hover { background: var(--on-dark); }

.btn-outline { border-color: var(--line-on-dark); color: var(--on-dark); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.3); }

/* Botón circular con flecha — patrón tomado de wearebou.com */
.btn-circle {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--ink);
}
.btn-circle__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--ink);
	color: var(--paper);
	transition: transform var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.btn-circle__icon svg { width: 16px; height: 16px; transition: transform var(--fast) var(--ease); }
.btn-circle:hover .btn-circle__icon { background: var(--muted); }
.btn-circle:hover .btn-circle__icon svg { transform: translateX(3px); }

.btn-circle--on-dark { color: var(--on-dark); }
.btn-circle--on-dark .btn-circle__icon { background: var(--paper); color: var(--ink); }
.btn-circle--on-dark:hover .btn-circle__icon { background: var(--on-dark-muted); }

/* ---- Header ---------------------------------------------------------------- */
.site-header {
	position: fixed;
	inset-inline: 0;
	top: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--space-2) var(--gutter);
	transition: background-color var(--fast) var(--ease), backdrop-filter var(--fast) var(--ease), border-color var(--fast) var(--ease);
	border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
	background: rgba(20, 20, 20, 0.72);
	backdrop-filter: blur(10px);
	border-color: var(--line-on-dark);
}

.site-header__logo img { height: 34px; width: auto; }

.site-header__nav { display: flex; align-items: center; gap: var(--space-4); }
.site-header__links { display: flex; gap: var(--space-3); }
.site-header__links a {
	color: var(--on-dark-muted);
	font-size: 0.9rem;
	font-weight: 500;
	position: relative;
	padding-bottom: 4px;
	transition: color var(--fast) var(--ease);
}
.site-header__links a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 100%;
	bottom: 0;
	height: 1px;
	background: currentColor;
	transition: right var(--fast) var(--ease);
}
.site-header__links a:hover { color: var(--on-dark); }
.site-header__links a:hover::after { right: 0; }

.site-header__toggle {
	display: none;
	background: none;
	border: none;
	color: var(--on-dark);
	width: 40px;
	height: 40px;
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
	position: relative;
	min-height: 100svh;
	display: flex;
	align-items: center;
	background: var(--ink-soft);
	color: var(--on-dark);
	overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.32; }
.hero__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, rgba(20, 20, 20, 0.96) 0%, rgba(20, 20, 20, 0.82) 42%, rgba(28, 29, 27, 0.55) 100%);
}
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(120% 90% at 85% 15%, rgba(255, 255, 255, 0.06), transparent 60%);
	pointer-events: none;
}
.hero__grid {
	position: relative;
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	align-items: stretch;
	width: 100%;
	min-height: 100svh;
}
.hero__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: calc(var(--space-6) + 60px) var(--space-5) var(--space-6) var(--gutter);
}
.hero__title {
	font-size: clamp(2.4rem, 4.2vw, 3.8rem);
	color: var(--on-dark);
}
.hero__title em {
	font-style: normal;
	font-weight: 400;
	color: var(--on-dark-muted);
}
.hero__lead {
	color: var(--on-dark-muted);
	font-size: 1.05rem;
	max-width: 46ch;
	margin-bottom: var(--space-4);
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }

.hero__portrait {
	position: relative;
	overflow: hidden;
	min-height: 320px;
}
.hero__portrait img { width: 100%; height: 100%; object-fit: cover; }
.hero__portrait-caption {
	position: absolute;
	left: var(--space-3);
	bottom: var(--space-3);
	right: var(--space-3);
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	color: var(--on-dark);
	font-size: 0.8rem;
	z-index: 1;
}

/* ---- Placeholder de imagen (contenido pendiente del doctor) ---------------- */
.media-placeholder {
	width: 100%;
	height: 100%;
	min-height: inherit;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	text-align: center;
}
.media-placeholder svg { width: 28px; height: 28px; opacity: 0.6; }
.media-placeholder span {
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.media-placeholder--dark {
	background: repeating-linear-gradient(135deg, #202120 0 2px, #1c1d1b 2px 14px);
	color: var(--on-dark-muted);
}
.media-placeholder--light {
	background: repeating-linear-gradient(135deg, #eeece6 0 2px, var(--paper-warm) 2px 14px);
	color: var(--muted-2);
}

/* ---- Secciones claras con transición suave (estilo Bou) ------------------- */
.section { padding-block: var(--space-6); position: relative; }
.section--light { background: var(--paper); }
.section--warm { background: var(--paper-warm-2); }
.section--dark { background: var(--ink-soft); color: var(--on-dark); }
.section--dark p { color: var(--on-dark-muted); }
.section__head { max-width: 640px; margin-bottom: var(--space-5); }

/* ---- Costura entre secciones: marca visualmente el cambio de fondo --------- */
.section-seam {
	position: relative;
	z-index: 2;
	height: 0;
}
.section-seam::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: var(--line);
}
.section-seam__tag {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translate(-50%, -50%);
	display: inline-flex;
	align-items: center;
	background: var(--paper);
	border: 1px solid var(--line);
	padding: 9px 20px;
	font-family: var(--font-heading);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
	white-space: nowrap;
}

/* ---- Tarjetas -------------------------------------------------------------- */
.card-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-3);
}
.card {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.card:hover {
	transform: translateY(-6px);
	box-shadow: 0 24px 48px -24px rgba(20, 20, 20, 0.25);
	border-color: transparent;
}
.card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-warm); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--slow) var(--ease); }
.card:hover .card__media img { transform: scale(1.06); }
.card__body { padding: var(--space-3); }
.card__tag {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted-2);
	background: var(--paper-warm);
	border-radius: 999px;
	padding: 4px 12px;
	margin-bottom: var(--space-1);
}
.card__title { font-size: 1.15rem; margin-bottom: 6px; }
.card__text { font-size: 0.92rem; margin-bottom: 0; }

/* ---- Pilares — números fantasma + línea que se dibuja al hacer scroll ------ */
.pillar-feature {
	position: relative;
	padding-block: var(--space-4) var(--space-2);
	isolation: isolate;
}
.pillar-feature::before {
	content: "";
	position: absolute;
	inset: -40px -40px auto -40px;
	height: 480px;
	background: radial-gradient(480px circle at var(--spot-x, 50%) var(--spot-y, 0%), rgba(20, 20, 20, 0.05), transparent 70%);
	opacity: 0;
	transition: opacity var(--slow) var(--ease);
	pointer-events: none;
	z-index: -1;
}
.pillar-feature:hover::before { opacity: 1; }
.pillar-feature__rule {
	position: relative;
	height: 1px;
	background: var(--line);
	margin-bottom: var(--space-6);
	transform-origin: left center;
	transform: scaleX(0);
	transition: transform 1.1s var(--ease);
}
.pillar-feature .pillar-feature__rule.is-visible { transform: scaleX(1); }
.pillar-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-5);
}
.pillar {
	position: relative;
	padding-top: var(--space-3);
	transition: transform var(--slow) var(--ease);
}
.pillar:nth-child(2) { margin-top: 64px; }
.pillar:nth-child(3) { margin-top: 128px; }
.pillar:hover { transform: translateY(-8px); }
.pillar__ghost {
	position: absolute;
	top: -44px;
	left: -6px;
	font-family: var(--font-heading);
	font-size: 8rem;
	font-weight: 800;
	line-height: 1;
	color: transparent;
	-webkit-text-stroke: 1.5px var(--line);
	z-index: -1;
	user-select: none;
	font-variant-numeric: tabular-nums;
	transition: -webkit-text-stroke-color var(--slow) var(--ease), color var(--slow) var(--ease), transform var(--slow) var(--ease);
}
.pillar:hover .pillar__ghost {
	-webkit-text-stroke-color: transparent;
	color: var(--paper-warm);
	transform: scale(1.06);
}
.pillar__index { display: none; }
.pillar__title {
	font-size: clamp(1.35rem, 2vw, 1.65rem);
	position: relative;
	display: inline-block;
}
.pillar__title::after {
	content: "";
	display: block;
	width: 32px;
	height: 2px;
	background: var(--ink);
	margin-top: var(--space-1);
	transition: width var(--slow) var(--ease);
}
.pillar:hover .pillar__title::after { width: 100%; }
.pillar__text { font-size: 1rem; max-width: 34ch; margin-bottom: 0; margin-top: var(--space-2); position: relative; }

/* ---- Franja editorial (Sobre el Dr. Sanín) — overlap + paralaje ------------ */
.split-feature {
	position: relative;
	min-height: 100svh;
	display: flex;
	align-items: center;
	overflow: hidden;
	background: var(--ink);
}
.split-feature__media {
	position: absolute;
	inset: -10% 0;
	z-index: 0;
	overflow: hidden;
}
.split-feature__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	will-change: transform;
}
.split-feature__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, rgba(15, 15, 14, 0.92) 0%, rgba(15, 15, 14, 0.55) 42%, rgba(15, 15, 14, 0.15) 75%);
}
.split-feature__panel {
	position: relative;
	z-index: 1;
	max-width: 620px;
	margin-left: var(--gutter);
	color: var(--on-dark);
}
.split-feature__panel p { color: var(--on-dark-muted); }
.split-feature__panel h2 { color: var(--on-dark); font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.split-feature__panel .btn-circle { color: var(--on-dark); }
.split-feature__panel .btn-circle__icon { background: var(--paper); color: var(--ink); }
.split-feature__corner {
	position: absolute;
	right: var(--gutter);
	bottom: var(--space-4);
	z-index: 1;
	font-family: var(--font-heading);
	font-size: 7rem;
	font-weight: 800;
	line-height: 1;
	color: transparent;
	-webkit-text-stroke: 1.5px rgba(242, 241, 238, 0.35);
	user-select: none;
}


/* ---- Testimonios ------------------------------------------------------------ */
.testimonial-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-3);
}
.testimonial-card {
	background: transparent;
	padding: 0;
	position: relative;
}
.testimonial-card__compare { margin-bottom: var(--space-2); }

/* ---- Slider de comparación antes/después (arrastrable) --------------------- */
.compare-slider {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	cursor: ew-resize;
	touch-action: pan-y;
	background: var(--paper-warm);
	box-shadow: 0 26px 60px -30px rgba(20, 20, 20, 0.38);
}
.compare-slider__after,
.compare-slider__before {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
}
.compare-slider__before { clip-path: inset(0 50% 0 0); }
.compare-slider__handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	background: var(--paper);
	transform: translateX(-1px);
	pointer-events: none;
}
.compare-slider__grip {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--paper);
	display: flex;
	align-items: center;
	justify-content: center;
	transform: translate(-50%, -50%);
	box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.4);
}
.compare-slider__grip svg { width: 16px; height: 16px; }
.compare-slider__label {
	position: absolute;
	bottom: var(--space-2);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--paper);
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
	pointer-events: none;
}
.compare-slider__label--before { left: var(--space-2); }
.compare-slider__label--after { right: var(--space-2); }
.compare-slider .media-placeholder { position: absolute; inset: 0; }
.testimonial-card__label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.testimonial-card__badge {
	display: inline-block;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink);
	background: repeating-linear-gradient(135deg, #eeece6 0 2px, var(--paper-warm) 2px 10px);
	border: 1px solid var(--line);
	padding: 4px 10px;
	margin-bottom: var(--space-1);
}
.testimonial-card__quote {
	font-size: 0.95rem;
	color: var(--ink);
	margin-bottom: var(--space-1);
	position: relative;
	padding-left: var(--space-2);
}
.testimonial-card__quote::before {
	content: "\201C";
	position: absolute;
	left: -6px;
	top: -16px;
	font-family: var(--font-heading);
	font-weight: 800;
	font-size: 2.8rem;
	line-height: 1;
	color: transparent;
	-webkit-text-stroke: 1.2px var(--line);
	user-select: none;
}
.testimonial-card__meta { font-size: 0.8rem; color: var(--muted-2); margin-bottom: 0; }

.testimonial-grid--featured { gap: var(--space-4); }
.testimonial-grid--featured .testimonial-card:nth-child(2) { margin-top: var(--space-6); }
.testimonial-grid--featured .testimonial-card__compare { margin-bottom: var(--space-3); }
.testimonial-grid--featured .compare-slider { aspect-ratio: 1 / 1; }
.testimonial-grid--featured .testimonial-card__quote { font-size: 1.15rem; line-height: 1.55; padding-left: var(--space-3); }
.testimonial-grid--featured .testimonial-card__quote::before { font-size: 4.2rem; left: -8px; top: -24px; }
.testimonial-grid--featured .testimonial-card__badge { font-size: 0.72rem; padding: 5px 12px; }

/* ---- Carrusel de antes/después (página Testimonios) -------------------------- */
.testimonial-carousel { position: relative; }
.testimonial-carousel__viewport { overflow: hidden; }
.testimonial-carousel__track { display: flex; transition: transform 0.6s var(--ease); }
.testimonial-carousel__slide { flex: 0 0 100%; max-width: 100%; }
.testimonial-carousel__slide-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); max-width: 1000px; margin-inline: auto; }
.testimonial-carousel__slide .compare-slider { aspect-ratio: 1 / 1; }
.testimonial-carousel__arrow {
	position: absolute;
	top: 40%;
	transform: translateY(-50%);
	z-index: 2;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--line);
	background: var(--paper);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.testimonial-carousel__arrow svg { width: 18px; height: 18px; }
.testimonial-carousel__arrow:hover { background: var(--ink); color: var(--paper); }
.testimonial-carousel__arrow--prev { left: 0; }
.testimonial-carousel__arrow--next { right: 0; }
.testimonial-carousel__dots { display: flex; justify-content: center; gap: 8px; margin-top: var(--space-4); }
.testimonial-carousel__dots button {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--line);
	border: none;
	padding: 0;
	cursor: pointer;
	transition: background-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.testimonial-carousel__dots button.is-active { background: var(--ink); transform: scale(1.3); }

/* ---- Testimonios en video (3 verticales) ------------------------------------- */
.video-testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.video-testimonial { position: relative; aspect-ratio: 9 / 16; overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.video-testimonial .media-placeholder { position: absolute; inset: 0; }
.video-testimonial iframe,
.video-testimonial embed,
.video-testimonial object,
.video-testimonial img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.empty-state {
	grid-column: 1 / -1;
	border: 1px dashed var(--line);
	padding: var(--space-5);
	text-align: center;
	color: var(--muted-2);
}

/* ---- Cabecera de página interna (hero a pantalla completa) ------------------ */
.page-header {
	position: relative;
	min-height: 100svh;
	display: flex;
	align-items: center;
	color: var(--on-dark);
	overflow: hidden;
	isolation: isolate;
}
.page-header__bg {
	position: absolute;
	inset: 0;
	z-index: -1;
}
.page-header__bg img,
.page-header__bg video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.page-header__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, rgba(15, 15, 14, 0.94) 0%, rgba(15, 15, 14, 0.88) 45%, rgba(15, 15, 14, 0.72) 100%),
		linear-gradient(0deg, rgba(15, 15, 14, 0.85) 0%, rgba(15, 15, 14, 0.62) 40%, rgba(15, 15, 14, 0.78) 100%);
}
.page-header__bg .media-placeholder {
	position: absolute;
	inset: 0;
	align-items: flex-end;
	justify-content: flex-start;
	padding: var(--space-3);
	flex-direction: row;
	gap: 8px;
}
.page-header__bg .media-placeholder svg { width: 16px; height: 16px; opacity: 0.5; }
.page-header__bg .media-placeholder span { font-size: 0.65rem; }
.page-header .container { padding-block: calc(var(--space-6) + 60px) var(--space-6); }
.page-header p { color: var(--on-dark-muted); max-width: 56ch; margin-bottom: 0; }
.page-header h1 { color: var(--on-dark); font-size: clamp(2.2rem, 4vw, 3.4rem); }

/* ---- Indicador de scroll (incentiva a bajar) --------------------------------- */
.scroll-cue {
	position: absolute;
	left: 50%;
	bottom: var(--space-3);
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	color: var(--on-dark-muted);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	z-index: 1;
}
.scroll-cue svg { width: 18px; height: 18px; animation: scroll-cue-bounce 1.8s ease-in-out infinite; }
@keyframes scroll-cue-bounce {
	0%, 100% { transform: translateY(0); opacity: 0.6; }
	50% { transform: translateY(6px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.scroll-cue svg { animation: none; }
}

/* ---- Retrato editorial (Sobre mí — trayectoria): la imagen manda ------------ */
.bio-feature__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 8.5;
	margin: 0 0 var(--space-5);
}
.bio-feature__media img {
	position: absolute;
	inset: -8% 0;
	width: 100%;
	height: 116%;
	object-fit: cover;
	will-change: transform;
}
.bio-feature__overlay {
	position: absolute;
	left: 0;
	bottom: 0;
	z-index: 1;
	max-width: 820px;
	padding: var(--space-5) var(--space-5) var(--space-4) var(--gutter);
	background: linear-gradient(115deg, rgba(15, 15, 14, 0.5) 0%, rgba(15, 15, 14, 0.24) 50%, rgba(15, 15, 14, 0) 88%);
}
.bio-feature__overlay .eyebrow { color: var(--on-dark-muted); }
.bio-feature__lead {
	font-family: var(--font-heading);
	font-size: clamp(1.4rem, 2.6vw, 2rem);
	font-weight: 600;
	line-height: 1.4;
	color: var(--on-dark);
	margin-top: var(--space-2);
	margin-bottom: 0;
}
.bio-feature__body {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-6);
	max-width: 980px;
}
.bio-feature__body p { font-size: 1.05rem; margin-bottom: 0; }

/* ---- Misión y visión (Sobre mí) — panel dividido, sin numeración -------------- */
.mv-feature__row { display: grid; grid-template-columns: 1fr 1fr; margin-top: var(--space-4); }
.mv-feature__col {
	position: relative;
	padding: var(--space-4) var(--space-5) var(--space-4) 0;
	transition: background-color var(--slow) var(--ease);
}
.mv-feature__col + .mv-feature__col { padding-left: var(--space-5); border-left: 1px solid var(--line); }
.mv-feature__col::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 2px;
	background: var(--ink);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform var(--slow) var(--ease);
}
.mv-feature__col:hover::before { transform: scaleY(1); }
.mv-feature__col h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); margin-bottom: var(--space-1); }
.mv-feature__col p { color: var(--muted-2); font-style: italic; margin-bottom: 0; max-width: 38ch; }

/* ---- Cita destacada ---------------------------------------------------------- */
.pull-quote { text-align: center; position: relative; }
.pull-quote blockquote {
	position: relative;
	margin: 0 auto;
	max-width: 46ch;
	font-family: var(--font-heading);
	font-size: clamp(1.5rem, 2.8vw, 2.2rem);
	font-weight: 600;
	color: var(--on-dark);
	line-height: 1.35;
}
.pull-quote blockquote::before {
	content: "\201C";
	display: block;
	font-family: var(--font-heading);
	font-weight: 800;
	font-size: 6rem;
	line-height: 0.5;
	height: 2.2rem;
	color: transparent;
	-webkit-text-stroke: 1.5px var(--line-on-dark);
	margin-bottom: var(--space-2);
	user-select: none;
}
.pull-quote cite {
	display: block;
	margin-top: var(--space-3);
	font-style: normal;
	font-size: 0.85rem;
	color: var(--on-dark-muted);
}

/* ---- Procedimientos del Home — lista editorial + preview grande ------------- */
.procedures-feature__layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--space-5); align-items: center; }
.procedures-feature__col { display: flex; flex-direction: column; }
.procedures-feature__head { max-width: 460px; margin-bottom: var(--space-3); }
.procedures-feature__list { border-top: 1px solid var(--line); }
.procedures-feature__row {
	display: flex;
	align-items: baseline;
	gap: var(--space-3);
	padding: var(--space-3) 0;
	border-bottom: 1px solid var(--line);
	text-decoration: none;
	color: var(--ink);
	transition: padding-left var(--fast) var(--ease), color var(--fast) var(--ease);
}
.procedures-feature__index {
	font-family: var(--font-heading);
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--muted-2);
	transition: color var(--fast) var(--ease);
}
.procedures-feature__name {
	font-family: var(--font-heading);
	font-size: clamp(1.4rem, 3vw, 2.1rem);
	font-weight: 600;
	flex: 1;
	transition: color var(--fast) var(--ease);
}
.procedures-feature__tag {
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted-2);
}
.procedures-feature__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--line);
	flex: none;
	opacity: 0;
	transform: translateX(-8px);
	transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.procedures-feature__arrow svg { width: 14px; height: 14px; }
.procedures-feature__row:hover { padding-left: var(--space-2); }
.procedures-feature__row:hover .procedures-feature__name { color: var(--muted); }
.procedures-feature__row:hover .procedures-feature__arrow { opacity: 1; transform: translateX(0); background: var(--paper); }

.procedures-feature__preview {
	position: relative;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--paper);
	border: 1px solid var(--line);
	box-shadow: 0 28px 60px -32px rgba(20, 20, 20, 0.3);
}
.procedures-feature__preview img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transform: scale(1.08);
	transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
.procedures-feature__preview img.is-active { opacity: 1; transform: scale(1); }
.procedures-feature__preview-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	display: flex;
	align-items: baseline;
	gap: var(--space-2);
	padding: var(--space-2) var(--space-3);
	background: linear-gradient(0deg, rgba(15, 15, 14, 0.78) 0%, rgba(15, 15, 14, 0) 100%);
	color: var(--on-dark);
	transition: opacity var(--fast) var(--ease);
}
.procedures-feature__preview-caption [data-role="procedures-preview-caption-index"] {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 0.8rem;
	color: var(--on-dark-muted);
}
.procedures-feature__preview-caption [data-role="procedures-preview-caption-name"] {
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 1.05rem;
}

/* ---- Procedimientos: listado horizontal minimalista -------------------------- */
.procedure-cards {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--space-4);
	overflow-x: auto;
	scroll-snap-type: x proximity;
	padding-bottom: var(--space-2);
	margin: 0 0 var(--space-2);
}
.procedure-card {
	flex: 1 1 260px;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	text-align: left;
	font: inherit;
	color: inherit;
	cursor: pointer;
}
.procedure-card__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-warm); }
.procedure-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--slow) var(--ease); }
.procedure-card:hover .procedure-card__media img { transform: scale(1.05); }
.procedure-card__name {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-1);
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 1.05rem;
	padding-bottom: var(--space-2);
	border-bottom: 2px solid var(--line);
	transition: border-color var(--fast) var(--ease);
}
.procedure-card__icon { font-size: 1.2rem; font-weight: 400; color: var(--muted-2); transition: transform var(--fast) var(--ease); }
.procedure-card.is-active .procedure-card__name { border-color: var(--ink); }
.procedure-card.is-active .procedure-card__icon { transform: rotate(45deg); color: var(--ink); }
.procedure-card__tag { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }

/* ---- Panel de detalle a ancho completo, debajo de la fila de tarjetas -------- */
.procedure-detail {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.5s var(--ease);
}
.procedure-detail__body { overflow: hidden; min-height: 0; }
.procedure-detail.is-open { grid-template-rows: 1fr; }
.procedure-detail__content {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-6);
	align-items: center;
	padding-block: var(--space-5);
	border-top: 1px solid var(--line);
}
.procedure-detail__media { aspect-ratio: 16 / 11; overflow: hidden; }
.procedure-detail__media img,
.procedure-detail__media .media-placeholder { width: 100%; height: 100%; object-fit: cover; }
.procedure-detail__tag { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
.procedure-detail__text h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-top: var(--space-1); }
.procedure-detail__text p { font-size: 1.05rem; }
.procedure-detail__cta { margin-top: var(--space-2); }

/* ---- Contacto: formulario superpuesto al hero -------------------------------- */
.contact-feature { padding-top: var(--space-3); }
.contact-feature__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-6); align-items: start; }
.contact-feature__form-card {
	position: relative;
	z-index: 2;
	margin-top: -160px;
	background: var(--paper);
	border: 1px solid var(--line);
	box-shadow: 0 32px 70px -30px rgba(20, 20, 20, 0.4);
	padding: var(--space-5);
}
.contact-feature__info { padding-top: var(--space-3); }
.contact-info__item { position: relative; padding-block: var(--space-3); border-bottom: 1px solid var(--line); }
.contact-info__item:first-of-type { padding-top: 0; }
.contact-info__item h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); margin-bottom: 6px; }
.contact-info__item p { margin-bottom: 0; font-size: 1.05rem; }
.contact-info__item p a { position: relative; display: inline-block; }
.contact-info__item p a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 100%;
	height: 1px;
	background: currentColor;
	transform: scaleX(0.18);
	transform-origin: left;
	transition: transform var(--slow) var(--ease);
}
.contact-info__item p a:hover::after { transform: scaleX(1); }

.social-icons { display: flex; gap: var(--space-2); margin-top: var(--space-1); }
.social-icons__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--line);
	color: var(--ink);
	transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.social-icons__link svg { width: 18px; height: 18px; }
.social-icons__link:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }

.wpcf7-form p { margin-bottom: var(--space-3); }
.wpcf7-form label {
	display: block;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted-2);
	margin-bottom: 10px;
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form select,
.wpcf7-form textarea {
	width: 100%;
	border: none;
	border-bottom: 1px solid var(--line);
	background: transparent;
	border-radius: 0;
	padding: 10px 0 12px;
	font-family: var(--font-body);
	font-size: 1.05rem;
	color: var(--ink);
	transition: border-color var(--fast) var(--ease);
}
.wpcf7-form input:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
	outline: none;
	border-color: var(--ink);
}
.wpcf7-form textarea { min-height: 110px; resize: vertical; }
.wpcf7-form .wpcf7-submit {
	background: var(--ink);
	color: var(--paper);
	border: none;
	padding: 16px 36px;
	border-radius: 999px;
	font-weight: 600;
	cursor: pointer;
	margin-top: var(--space-2);
	transition: background-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.wpcf7-form .wpcf7-submit:hover { background: #2c2c2c; transform: translateY(-2px); }
.wpcf7-form .wpcf7-not-valid-tip { color: #b3261e; font-size: 0.8rem; margin-top: 4px; }
.wpcf7-form .wpcf7-response-output { border: 1px solid var(--line); padding: var(--space-2); margin-top: var(--space-2); font-size: 0.9rem; }
.wpcf7-form.sent .wpcf7-response-output { border-color: var(--ink); }

.contact-feature__map { position: relative; margin-top: var(--space-4); height: 320px; border: 1px solid var(--line); overflow: hidden; }
.contact-feature__map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.3) contrast(1.05); }
.map-feature__tag {
	position: absolute;
	top: var(--space-3);
	right: var(--space-3);
	z-index: 1;
	background: var(--paper);
	border: 1px solid var(--line);
	padding: 9px 20px;
	font-family: var(--font-heading);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
	pointer-events: none;
}

/* ---- Botón flotante de WhatsApp ---------------------------------------------- */
.whatsapp-fab {
	position: fixed;
	right: var(--space-3);
	bottom: var(--space-3);
	z-index: 90;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: #25d366;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.45);
	transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
	animation: whatsapp-pulse 2.4s ease-in-out infinite;
}
.whatsapp-fab svg { width: 30px; height: 30px; }
.whatsapp-fab:hover {
	transform: scale(1.08);
	box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.55);
	animation-play-state: paused;
}
@keyframes whatsapp-pulse {
	0%, 100% { box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.5); }
	50% { box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.45), 0 0 0 10px rgba(37, 211, 102, 0); }
}
@media (prefers-reduced-motion: reduce) {
	.whatsapp-fab { animation: none; }
}
@media (max-width: 640px) {
	.whatsapp-fab { width: 50px; height: 50px; right: var(--space-2); bottom: var(--space-2); }
	.whatsapp-fab svg { width: 26px; height: 26px; }
}

/* ---- CTA final ---------------------------------------------------------------- */
.cta-band { text-align: center; padding-block: var(--space-6); }
.cta-band__rule {
	width: 64px;
	height: 2px;
	margin: 0 auto var(--space-3);
	background: currentColor;
	opacity: 0.35;
	transform: scaleX(0);
	transition: transform 0.9s var(--ease) 0.15s;
}
.cta-band.is-visible .cta-band__rule { transform: scaleX(1); }
.cta-band__head { max-width: 640px; margin-inline: auto; margin-bottom: var(--space-3); }
.cta-band h2 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); }
.cta-band .btn { margin-inline: auto; }

/* ---- CTA destacado del Home (con imagen de fondo) --------------------------- */
.cta-feature {
	position: relative;
	overflow: hidden;
	padding-block: var(--space-7);
	color: var(--on-dark);
	text-align: center;
}
.cta-feature__bg { position: absolute; inset: 0; z-index: -1; }
.cta-feature__bg img { width: 100%; height: 100%; object-fit: cover; }
.cta-feature__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(20, 20, 20, 0.86) 0%, rgba(20, 20, 20, 0.94) 100%);
}
.magnetic { will-change: transform; }
.magnetic span,
.magnetic svg { transition: transform 0.2s var(--ease); }
.cta-feature__inner {
	max-width: 620px;
	margin-inline: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.cta-feature h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); color: var(--on-dark); }
.cta-feature p { color: var(--on-dark-muted); margin-bottom: var(--space-3); }
.cta-feature__btn { display: inline-flex; align-items: center; gap: 10px; font-size: 1rem; padding: 17px 36px; }
.cta-feature__btn svg { width: 22px; height: 22px; }
.cta-feature__note { margin-top: var(--space-2); font-size: 0.8rem; color: var(--on-dark-muted); }

/* ---- Footer ---------------------------------------------------------------- */
.site-footer {
	background: var(--ink);
	color: var(--on-dark-muted);
	padding-block: var(--space-5) var(--space-3);
}
.site-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: var(--space-4);
	padding-bottom: var(--space-4);
	border-bottom: 1px solid var(--line-on-dark);
}
.site-footer h4 {
	color: var(--on-dark);
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: var(--space-2);
}
.site-footer a { transition: color var(--fast) var(--ease); }
.site-footer a:hover { color: var(--on-dark); }
.site-footer__bottom {
	display: flex;
	justify-content: space-between;
	padding-top: var(--space-3);
	font-size: 0.82rem;
}

/* ---- Animación de aparición en scroll -------------------------------------- */
.reveal {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal, .reveal-stagger > *, .card, .btn, .btn-circle__icon, .btn-circle__icon svg {
		transition: none !important;
		transform: none !important;
		opacity: 1 !important;
	}
}

/* ---- Responsive -------------------------------------------------------------- */
@media (max-width: 960px) {
	.hero__grid { grid-template-columns: 1fr; min-height: 0; }
	.hero__content { padding: 140px var(--gutter) var(--space-5); }
	.hero__portrait { aspect-ratio: 16 / 10; min-height: 0; }
	.card-grid { grid-template-columns: 1fr 1fr; }
	.site-footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
	.pillar-grid { grid-template-columns: 1fr; gap: var(--space-5); }
	.pillar:nth-child(2), .pillar:nth-child(3) { margin-top: 0; }
	.pillar__ghost { font-size: 5rem; top: -26px; }
	.split-feature__panel { margin-inline: var(--gutter); max-width: none; }
	.split-feature__corner { display: none; }
	.split-feature__media::after {
		background: linear-gradient(180deg, rgba(15, 15, 14, 0.9) 0%, rgba(15, 15, 14, 0.75) 55%, rgba(15, 15, 14, 0.9) 100%);
	}
	.bio-feature__media { aspect-ratio: 4 / 5; }
	.bio-feature__overlay { max-width: none; right: 0; padding: var(--space-4) var(--gutter); background: linear-gradient(0deg, rgba(15, 15, 14, 0.6) 0%, rgba(15, 15, 14, 0.1) 75%, transparent 100%); }
	.bio-feature__body { grid-template-columns: 1fr; gap: var(--space-3); }
	.mv-feature__row { grid-template-columns: 1fr; }
	.mv-feature__col { padding: var(--space-3) 0; }
	.mv-feature__col::before { left: 0; top: 0; bottom: auto; width: 100%; height: 2px; transform: scaleX(0); transform-origin: left; }
	.mv-feature__col:hover::before { transform: scaleX(1); }
	.mv-feature__col + .mv-feature__col { padding-left: 0; padding-top: var(--space-4); border-left: none; border-top: 1px solid var(--line); }
	.procedures-feature__layout { grid-template-columns: 1fr; }
	.procedures-feature__preview { aspect-ratio: 16 / 10; }
	.procedures-feature__name { font-size: 1.3rem; }
	.procedure-card { flex-basis: 200px; }
	.procedure-detail__content { grid-template-columns: 1fr; gap: var(--space-3); padding-block: var(--space-4); }
	.procedure-detail__media { aspect-ratio: 16 / 10; }
	.testimonial-grid { grid-template-columns: 1fr; }
	.testimonial-carousel__slide-row { grid-template-columns: 1fr; gap: var(--space-4); }
	.testimonial-grid--featured .testimonial-card:nth-child(2) { margin-top: 0; }
	.video-testimonials { grid-template-columns: 1fr; max-width: 320px; margin-inline: auto; }
	.section-seam__tag { font-size: 0.6rem; padding: 7px 14px; }
	.contact-feature__grid { grid-template-columns: 1fr; }
	.contact-feature__form-card { margin-top: -80px; padding: var(--space-4); }
	.contact-feature__map { height: 280px; }
}

@media (max-width: 640px) {
	.site-header__links { display: none; }
	.site-header__toggle { display: inline-flex; align-items: center; justify-content: center; }
	.site-header__nav.is-open .site-header__links {
		display: flex;
		flex-direction: column;
		gap: var(--space-2);
		position: fixed;
		top: 76px;
		left: 20px;
		right: 20px;
		background: var(--ink-soft);
		border: 1px solid var(--line-on-dark);
		border-radius: var(--radius);
		padding: var(--space-3);
	}
	.card-grid { grid-template-columns: 1fr; }
	.site-footer__grid { grid-template-columns: 1fr; }
	.hero__ctas { flex-direction: column; align-items: flex-start; }
}

/* Barra de administración de WordPress (solo visible para el doctor logueado) */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
	body.admin-bar .site-header { top: 46px; }
}
