/* =========================================================================
   Top Dental Care — Home (front-page.php)
   Refresh del home actual: mismo copy y estructura, look navy + foto real,
   más limpio y organizado. Depende de tokens de main.css.
   ========================================================================= */

.hm-main { overflow-x: clip; }
.hm-wrap { max-width: var(--td-maxw); margin-inline: auto; padding-inline: clamp(18px, 5vw, 40px); }
.hm-section { padding-block: clamp(52px, 7vw, 100px); }
.hm-kicker { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; color: var(--td-primary); margin: 0 0 .6rem; }
.hm-h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin: 0 0 .6rem; }
.hm-lead { color: var(--td-ink-soft); font-size: clamp(1.02rem, 1.4vw, 1.15rem); max-width: 64ch; }
.hm-center { text-align: center; }
.hm-center .hm-lead { margin-inline: auto; }

/* ---------- HERO (foto real del home + overlay navy, texto centrado) ---------- */
.hm-hero {
	position: relative; color: #fff; isolation: isolate; overflow: hidden;
	text-align: center;
	padding-block: clamp(96px, 13vw, 170px);
}
.hm-hero__bg {
	position: absolute; inset: 0; z-index: 0;
	background-size: cover; background-position: center 28%;
	transform: scale(1.12);
	animation: hmKenBurns 20s ease-out forwards; /* zoom lento sutil (póster/fallback) */
}
@keyframes hmKenBurns { to { transform: scale(1); } }

/* Video de fondo (YouTube inyectado por JS): cubre el hero sin barras, sin controles. */
.hm-hero__video { position: absolute; inset: 0; z-index: 0; overflow: hidden; opacity: 0; transition: opacity 1.4s ease; pointer-events: none; }
.hm-hero__video.is-ready { opacity: 1; }
.hm-hero__video iframe {
	position: absolute; top: 50%; left: 50%;
	width: 100vw; height: 56.25vw;           /* 16:9 */
	min-height: 100%; min-width: 177.78vh;   /* cover */
	/* zoom extra: empuja el título/branding de YouTube fuera del área visible del hero */
	transform: translate(-50%, -50%) scale(1.45);
	border: 0; pointer-events: none;
}
.hm-hero::before {
	content: ""; position: absolute; inset: 0; z-index: 1;
	background:
		radial-gradient(120% 85% at 50% 35%, rgba(1,45,80,.40) 0%, rgba(1,45,80,.66) 100%),
		linear-gradient(180deg, rgba(1,45,80,.60) 0%, rgba(1,45,80,.56) 45%, rgba(1,79,138,.72) 100%);
}
/* Brillo que recorre el hero UNA vez al cargar (no continuo → WCAG 2.2.2). */
.hm-hero::after {
	content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.07) 50%, transparent 60%);
	background-size: 220% 100%;
	animation: hmSheen 5.5s ease-in-out .3s 1 both;
}
@keyframes hmSheen { from { background-position: 130% 0; } to { background-position: -30% 0; } }
.hm-hero__inner { position: relative; z-index: 2; max-width: 920px; margin-inline: auto; padding-inline: clamp(18px, 5vw, 40px); box-sizing: border-box; text-shadow: 0 2px 18px rgba(1,25,45,.35); }
/* Entrada escalonada de cada línea del hero. */
.hm-hero__inner > * { animation: hmHeroUp .9s cubic-bezier(.22,.61,.36,1) both; }
.hm-hero__inner > *:nth-child(1) { animation-delay: .10s; }
.hm-hero__inner > *:nth-child(2) { animation-delay: .18s; }
.hm-hero__inner > *:nth-child(3) { animation-delay: .26s; }
.hm-hero__inner > *:nth-child(4) { animation-delay: .34s; }
.hm-hero__inner > *:nth-child(5) { animation-delay: .44s; }
.hm-hero__inner > *:nth-child(6) { animation-delay: .54s; }
.hm-hero h1 { overflow-wrap: break-word; }
.hm-hero .hm-btn { text-shadow: none; }
@keyframes hmHeroUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* Scroll cue: invita a seguir bajando (guía el ojo hacia el contenido/CTA). */
.hm-hero__scroll {
	position: absolute; z-index: 2; left: 50%; bottom: clamp(14px, 3vw, 30px); transform: translateX(-50%);
	display: inline-flex; flex-direction: column; align-items: center; gap: .35rem;
	color: rgba(255,255,255,.9); font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
	text-decoration: none; animation: hmHeroUp 1s .7s both;
}
.hm-hero__scroll:hover { color: #fff; text-decoration: none; }
.hm-hero__scroll-arrow { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.5); animation: hmBob 1.8s ease-in-out infinite; }
.hm-hero__scroll-arrow svg { width: 18px; height: 18px; }
@keyframes hmBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* Botón de pausa del video de fondo (accesibilidad WCAG 2.2.2). Lo muestra reveal.js al cargar el video. */
.hm-hero__pause {
	position: absolute; z-index: 2; right: clamp(12px, 3vw, 26px); bottom: clamp(12px, 3vw, 26px);
	width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.5);
	background: rgba(1,25,45,.4); color: #fff; display: none; place-items: center; cursor: pointer;
	-webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
	transition: background .2s ease, transform .2s ease;
}
.hm-hero__pause.is-live { display: grid; }
.hm-hero__pause:hover { background: rgba(1,25,45,.65); transform: scale(1.06); }
.hm-hero__pause svg { width: 18px; height: 18px; }
.hm-hero__pause .ico-play { display: none; }
.hm-hero__pause[aria-pressed="true"] .ico-pause { display: none; }
.hm-hero__pause[aria-pressed="true"] .ico-play { display: block; }
.hm-hero__benefit { font-size: clamp(1rem, 1.6vw, 1.2rem); color: #fff; max-width: 42ch; margin: 0 auto 1.8rem; }
.hm-hero__trust { margin-top: 1.6rem; font-size: .95rem; color: rgba(255,255,255,.97); display: flex; gap: .5rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.hm-stars { color: #ffd15c; letter-spacing: 2px; }
@media (prefers-reduced-motion: reduce) {
	.hm-hero__bg { animation: none; transform: none; }
	.hm-hero__inner, .hm-hero__inner > *, .hm-hero__scroll { animation: none; }
	.hm-hero::after { animation: none; opacity: 0; }
	.hm-hero__scroll-arrow { animation: none; }
	.hm-hero__video { transition: none; }
	.hm-btn--pulse::after { animation: none; }
	.hm-stickybar { transition: none; }
}
.hm-hero h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: .04em; margin: 0 0 .4rem; text-transform: uppercase; }
.hm-hero__sub { font-size: clamp(1.1rem, 2vw, 1.5rem); font-family: var(--td-font-head); font-weight: 500; color: #fff; margin: 0 0 .2rem; }
.hm-hero__loc { font-size: 1rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.92); margin: 0 0 1.8rem; }
.hm-hero__cta { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }
.hm-btn { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; border-radius: 999px; padding: .9rem 1.6rem; transition: transform .25s ease, box-shadow .25s ease, background-color .25s, color .25s; text-decoration: none; }
.hm-btn:hover { transform: translateY(-2px); text-decoration: none; }
.hm-btn--wa { background: #25D366; color: #062b16; }
.hm-btn--wa:hover { background: #1fbb59; color: #062b16; box-shadow: 0 10px 26px rgba(0,0,0,.22); }
.hm-btn--ghost { background: rgba(255,255,255,.10); color: #fff; border: 1.5px solid rgba(255,255,255,.65); }
.hm-btn--ghost:hover { background: #fff; color: var(--td-primary-dark); }
.hm-btn--primary { background: var(--td-primary); color: #fff; }
.hm-btn--primary:hover { background: var(--td-primary-dark); color: #fff; box-shadow: var(--td-shadow); }

/* ---------- WELCOME (texto + imagen) ---------- */
.hm-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hm-split__media img { width: 100%; height: 100%; max-height: 460px; object-fit: cover; border-radius: var(--td-radius-lg); box-shadow: var(--td-shadow); }
.hm-split p { color: var(--td-ink-soft); }

/* ---------- FEATURES (2 tarjetas) ---------- */
.hm-features { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 2.4rem; }
.hm-feature { background: #fff; border: 1px solid var(--td-line); border-radius: var(--td-radius); padding: 1.8rem; box-shadow: var(--td-shadow-sm); transition: transform .3s ease, box-shadow .3s ease; }
.hm-feature:hover { transform: translateY(-4px); box-shadow: var(--td-shadow); }
.hm-feature__ico { width: 54px; height: 54px; border-radius: 14px; background: var(--td-primary-050); color: var(--td-primary); display: grid; place-items: center; margin-bottom: 1rem; }
.hm-feature__ico svg { width: 28px; height: 28px; }
.hm-feature h3 { font-size: 1.25rem; margin: 0 0 .5rem; }
.hm-feature p { margin: 0; color: var(--td-ink-soft); }

/* ---------- QUOTE (Pierre Fauchard) ---------- */
.hm-quote { background: var(--td-bg-tint); }
.hm-quote blockquote { max-width: 900px; margin: 0 auto; text-align: center; }
.hm-quote blockquote p { font-family: var(--td-font-head); font-size: clamp(1.3rem, 2.6vw, 1.9rem); line-height: 1.4; color: var(--td-ink); font-style: italic; margin: 0 0 1.2rem; }
.hm-quote cite { font-style: normal; display: block; }
.hm-quote cite b { display: block; color: var(--td-primary); font-family: var(--td-font-head); font-size: 1.1rem; }
.hm-quote cite span { color: var(--td-ink-soft); font-size: .95rem; }

/* ---------- SERVICES (grid de 8) ---------- */
.hm-services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-top: 2.4rem; }
.hm-service { background: #fff; border: 1px solid var(--td-line); border-radius: var(--td-radius); padding: 1.5rem; box-shadow: var(--td-shadow-sm); transition: transform .3s ease, box-shadow .3s ease, border-color .3s; }
.hm-service:hover { transform: translateY(-5px); box-shadow: var(--td-shadow); border-color: var(--td-primary-100); }
.hm-service.is-featured { border-color: var(--td-primary); }
.hm-service__ico { width: 46px; height: 46px; color: var(--td-primary); margin-bottom: .9rem; }
.hm-service h3 { font-size: 1.1rem; margin: 0 0 .4rem; }
.hm-service p { margin: 0; font-size: .92rem; color: var(--td-ink-soft); }

/* ---------- TESTIMONIAL / CTA ---------- */
.hm-testi { background: linear-gradient(135deg, var(--td-primary), var(--td-primary-dark)); color: #fff; }
.hm-testi__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.hm-testi h2 { color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 0 0 .4rem; }
.hm-testi__eyebrow { color: rgba(255,255,255,.8); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; }
.hm-testi__card { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.2); border-radius: var(--td-radius-lg); padding: 1.8rem; backdrop-filter: blur(4px); }
.hm-testi__card blockquote { margin: 0 0 1rem; font-size: 1.02rem; line-height: 1.65; color: #fff; }
.hm-testi__card cite { font-style: normal; font-weight: 700; color: #fff; }
.hm-testi__stars { color: #ffd15c; letter-spacing: 2px; margin-bottom: .6rem; }

/* ---------- BANDA International Patients (enlace interno) ---------- */
.hm-ipband { background: var(--td-bg-tint); }
.hm-ipband__box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; background: #fff; border: 1px solid var(--td-line); border-left: 5px solid var(--td-primary); border-radius: var(--td-radius); padding: 1.6rem 2rem; box-shadow: var(--td-shadow-sm); }
.hm-ipband__box h3 { margin: 0 0 .2rem; font-size: 1.3rem; }
.hm-ipband__box p { margin: 0; color: var(--td-ink-soft); }
.hm-ipband__cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.hm-testi__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.2rem; }

/* ---------- CONTACT / FIND US ---------- */
.hm-contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); margin-top: 2.2rem; }
.hm-contact__info li { list-style: none; display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1rem; color: var(--td-ink-soft); }
.hm-contact__info { padding: 0; margin: 0 0 1.4rem; }
.hm-contact__info svg { width: 22px; height: 22px; color: var(--td-primary); flex: none; margin-top: 2px; }
.hm-contact__info a { color: var(--td-ink); }
.hm-map iframe, .hm-map img { width: 100%; height: 100%; min-height: 340px; border: 0; border-radius: var(--td-radius); box-shadow: var(--td-shadow-sm); }
.hm-form { margin-top: 1.6rem; }

/* ---------- Brands trust strip (autoridad) ---------- */
.hm-brands { padding-block: clamp(40px, 5vw, 64px); }
.hm-brands__strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(1.4rem, 4vw, 3rem); }
.hm-brands__strip img { height: 40px; width: auto; max-width: 128px; object-fit: contain; filter: grayscale(1); opacity: .6; transition: filter .3s ease, opacity .3s ease, transform .3s ease; }
.hm-brands__strip img:hover { filter: none; opacity: 1; transform: translateY(-2px); }

/* ---------- International Patients / Eugenio (short vertical + copy) ---------- */
.hm-eugenio { position: relative; overflow: hidden; background: linear-gradient(160deg, #012132 0%, #013b63 100%); color: #fff; isolation: isolate; }
.hm-eugenio__glow { position: absolute; z-index: 0; inset: auto auto -20% -10%; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(233,166,60,.28), transparent 62%); filter: blur(10px); pointer-events: none; }
.hm-eugenio__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: clamp(1.6rem, 5vw, 4rem); align-items: center; }
.hm-eugenio__media { justify-self: center; width: 100%; max-width: 300px; }
.hm-eugenio .td-short { max-width: 300px; box-shadow: 0 24px 60px rgba(0,0,0,.42); }
.hm-eugenio__copy .hm-kicker { color: var(--td-accent); }
.hm-eugenio__copy h2 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.hm-eugenio__copy .hm-lead { color: rgba(255,255,255,.9); max-width: 54ch; }
.hm-eugenio__copy .hm-lead strong { color: #fff; }
.hm-eugenio__list { list-style: none; margin: 1.4rem 0 1.8rem; padding: 0; display: grid; gap: .7rem; }
.hm-eugenio__list li { display: flex; align-items: flex-start; gap: .7rem; color: rgba(255,255,255,.94); font-size: 1.02rem; }
.hm-eugenio__list li strong { color: var(--td-accent); font-weight: 700; }
.hm-eugenio__list svg { flex: none; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: rgba(37,211,102,.18); color: #46e07f; margin-top: 1px; }
.hm-eugenio__cta { display: flex; flex-wrap: wrap; gap: .9rem; }

/* ---------- Doctors: tarjetas elevadas con aro de acento (protagonismo) ---------- */
.hm-doctors__strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4rem 1.2rem; margin-top: 2.6rem; }
.hm-doc {
	flex: 1 1 200px; max-width: 228px;
	text-align: center; background: #fff; border: 1px solid var(--td-line);
	border-radius: var(--td-radius); padding: 1.8rem 1rem 1.5rem;
	box-shadow: var(--td-shadow-sm);
	transition: transform .32s ease, box-shadow .32s ease, border-color .32s ease;
}
.hm-doc:hover { transform: translateY(-7px); box-shadow: var(--td-shadow); border-color: var(--td-primary-100); }
.hm-doc__ph {
	width: 168px; height: 168px; margin: 0 auto 1.1rem; border-radius: 50%; padding: 4px;
	background: linear-gradient(140deg, var(--td-primary) 0%, var(--td-accent) 100%);
	box-shadow: 0 10px 24px rgba(1,112,185,.20);
	transition: transform .32s ease;
}
.hm-doc:hover .hm-doc__ph { transform: scale(1.04); }
.hm-doc__ph img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; border: 3px solid #fff; background: #fff; }
.hm-doc h3 { font-size: 1.06rem; margin: 0 0 .25rem; }
.hm-doc span { display: inline-block; color: var(--td-primary); font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

/* ---------- Pulso de atención en el CTA de WhatsApp (honesto, sutil) ---------- */
.hm-btn--pulse { position: relative; }
.hm-btn--pulse::after {
	content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
	box-shadow: 0 0 0 0 rgba(37,211,102,.5);
	animation: hmPulse 2.6s ease-out infinite;
}
@keyframes hmPulse {
	0%   { box-shadow: 0 0 0 0 rgba(37,211,102,.5); }
	70%  { box-shadow: 0 0 0 16px rgba(37,211,102,0); }
	100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* ---------- Barra sticky de conversión (solo móvil/tablet) ---------- */
.hm-stickybar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
	display: none; gap: .6rem;
	padding: .55rem .7rem calc(.55rem + env(safe-area-inset-bottom, 0px));
	background: rgba(255,255,255,.97); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	box-shadow: 0 -6px 24px rgba(20,40,60,.16);
	transform: translateY(120%); visibility: hidden;
	transition: transform .45s cubic-bezier(.22,.61,.36,1), visibility .45s;
}
.hm-stickybar.is-visible { transform: none; visibility: visible; }
.hm-stickybar__btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font-weight: 700; border-radius: 999px; padding: .82rem .5rem; font-size: .98rem; text-decoration: none; transition: transform .2s ease; }
.hm-stickybar__btn:active { transform: scale(.97); }
.hm-stickybar__wa { background: #25D366; color: #062b16; }
.hm-stickybar__book { background: var(--td-accent); color: var(--td-navy); }

/* Foco visible (teclado): anillo blanco + halo azul → visible sobre fondo claro y oscuro. */
.hm-btn:focus-visible,
.hm-stickybar__btn:focus-visible {
	outline: 3px solid #fff; outline-offset: 2px;
	box-shadow: 0 0 0 6px var(--td-primary);
}
.hm-hero__scroll:focus-visible,
.hm-hero__pause:focus-visible {
	outline: 3px solid #fff; outline-offset: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.hm-services-grid { grid-template-columns: repeat(2, 1fr); }
	.hm-split, .hm-testi__grid, .hm-contact__grid { grid-template-columns: 1fr; }
	.hm-split__media { order: -1; }
	.hm-eugenio__grid { grid-template-columns: 1fr; text-align: center; }
	.hm-eugenio__media { order: -1; }
	.hm-eugenio__copy .hm-lead { margin-inline: auto; }
	.hm-eugenio__list { max-width: 30rem; margin-inline: auto; text-align: left; }
	.hm-eugenio__cta { justify-content: center; }
}
@media (max-width: 900px) {
	.hm-stickybar { display: flex; }
	/* Reserva espacio para que la barra no tape el footer. */
	body.hm-hasbar { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
	/* Con la barra activa: oculto la burbuja del plugin (evita 2 WhatsApp verdes)
	   y subo el switcher de idioma + el botón "volver arriba" para que no pisen el CTA. */
	body.hm-hasbar .ht-ctc-chat { display: none !important; }
	body.hm-hasbar .trp-language-switcher,
	body.hm-hasbar #ast-scroll-top { bottom: 84px !important; }
}
@media (max-width: 640px) {
	.hm-features, .hm-services-grid { grid-template-columns: 1fr; }
	.hm-hero { padding-block: clamp(84px, 20vw, 130px); }
	.hm-hero h1 { font-size: clamp(1.9rem, 8.5vw, 3rem); letter-spacing: .015em; overflow-wrap: break-word; }
	.hm-hero__cta { flex-direction: column; align-items: stretch; }
	.hm-hero__cta .hm-btn { justify-content: center; }
	.hm-hero__scroll { display: none; }
	.hm-eugenio__cta { flex-direction: column; align-items: stretch; }
	.hm-eugenio__cta .hm-btn { justify-content: center; }
}
