/*
 * Formulario de suscripcion: bloque incrustado al final de una entrada,
 * y el mismo formulario dentro del popup. Reusa los tokens y el look de
 * .ay-post-author/.ay-card, sin colores nuevos.
 */

.ay-subscribe { margin: 44px 0; padding: 26px; border-radius: 16px; background: var(--panel); border: 1px solid var(--cream-300); }
.ay-subscribe h3 { font-family: var(--font-display); font-weight: 800; font-size: 20px; margin: 0 0 6px; color: var(--ink); }
.ay-subscribe p { margin: 0 0 16px; color: var(--ink-500); font-size: 14.5px; }
.ay-subscribe-form { display: flex; flex-direction: column; gap: 12px; }
/* Un campo por linea y el boton debajo, de su ancho normal. */
.ay-subscribe-row { display: flex; flex-direction: column; gap: 10px; }
.ay-subscribe-row .ay-btn { align-self: flex-start; margin-top: 4px; }
/* .ay-subscribe delante: Divi tiene input[type="email"] con la misma especificidad y carga despues. */
.ay-subscribe .ay-subscribe-row input { width: 100%; font: inherit; font-size: 15px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--cream-300); background: var(--cream-50); color: var(--ink); }
.ay-subscribe .ay-subscribe-row input:focus-visible { outline: none; border-color: var(--green-200); box-shadow: 0 0 0 3px rgba(41,183,12,.18); }
.ay-subscribe .ay-subscribe-aviso { margin: 0; font-size: 11.5px; line-height: 1.45; color: var(--ink-400); }
.ay-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- popup ---------- */
.ay-popup-overlay { position: fixed; inset: 0; z-index: 1200; background: rgba(29,29,29,.45); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: opacity 200ms ease; }
.ay-popup-overlay.is-open { opacity: 1; visibility: visible; }
.ay-popup-card { position: relative; display: grid; grid-template-columns: 44% 1fr; min-height: 460px; max-width: 840px; width: 100%; max-height: calc(100vh - 40px); overflow: auto; background: var(--panel); border: 1px solid var(--cream-300); border-radius: 22px; box-shadow: 0 24px 60px rgba(29,29,29,.28); transform: translateY(12px) scale(.98); transition: transform 220ms cubic-bezier(.2,.7,.3,1); }
.ay-popup-overlay.is-open .ay-popup-card { transform: translateY(0) scale(1); }
.ay-popup-close { position: absolute; z-index: 2; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--cream-200); color: var(--ink-500); font-size: 18px; cursor: pointer; }
.ay-popup-close:hover { background: var(--cream-300); color: var(--ink); }

/* Mitad de la foto: el recorte sobre el verde plano de la foto de perfil original (#29b70b = --green-bright). */
.ay-popup-foto { position: relative; background: var(--green-bright); overflow: hidden; }
/* Sin recorte arriba ni a los lados de la cabeza: deja ver el verde alrededor. Mas pequena = mas nitida. */
/* Apoyada abajo: el corte del torso queda contra el borde y no se ve "cortado por la mitad". */
.ay-popup-foto img { position: absolute; left: 0; bottom: 0; width: 100%; height: 90%; max-width: none; object-fit: contain; object-position: center bottom; display: block; }

.ay-popup-cuerpo { padding: 44px 40px 36px; align-self: center; }
.ay-popup-card .ay-subscribe { margin: 0; padding: 0; border: none; }
.ay-popup-card .ay-subscribe h3 { font-size: 28px; line-height: 1.1; letter-spacing: -.02em; margin-bottom: 10px; }
.ay-popup-card .ay-subscribe p { font-size: 16px; margin-bottom: 20px; }
.ay-popup-card .ay-subscribe .ay-subscribe-aviso { font-size: 12px; }
.ay-popup-card .ay-subscribe-row input { padding: 14px 16px; font-size: 16px; }
.ay-popup-card .ay-subscribe-row .ay-btn { padding: 14px 28px; font-size: 16px; box-shadow: 0 6px 18px rgba(41,183,12,.32); }

/* Celular: la foto arriba y mas pequena. */
@media (max-width: 640px) {
	.ay-popup-card { grid-template-columns: 1fr; min-height: 0; max-width: 440px; }
	.ay-popup-foto { height: 220px; }
	.ay-popup-cuerpo { padding: 24px 24px 28px; }
	.ay-popup-card .ay-subscribe h3 { font-size: 24px; text-align: center; }
	.ay-popup-card .ay-subscribe p { text-align: center; }
	.ay-popup-card .ay-subscribe-row .ay-btn { align-self: center; }
	.ay-popup-card .ay-subscribe .ay-subscribe-aviso { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	.ay-popup-overlay, .ay-popup-card { transition: none; }
}

/* ---------- pagina "Falta un paso" ---------- */
/* Sin barra fija en esta pagina: no hace falta dejarle espacio arriba. */
.ay-page.ay-gracias-page { padding-top: 0; }

/* Franja verde del titulo; el video se monta encima de su borde inferior. */
.ay-gracias-hero { background: var(--green-deep); color: #fff; text-align: center; padding: 64px 0; }
.ay-gracias-hero.con-video { padding-bottom: 150px; }
.ay-gracias-hero.is-oscuro { background: var(--ink); }
.ay-gracias-hero:not(.con-video) + .ay-gracias { padding-top: 40px; }
.ay-gracias-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 7vw, 64px); line-height: 1.02; letter-spacing: -.03em; margin: 0; color: #fff; text-wrap: balance; }
.ay-gracias { padding-top: 0; }
.ay-gracias-video { max-width: 760px; margin: -120px auto 40px; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; background: var(--green-950); box-shadow: 0 18px 40px rgba(29,29,29,.18); }
.ay-gracias-video iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Botones con el color de cada red. */
/* .ay-btn.x (0,2,0) para ganarle a ".ay-page a" (0,1,1), que pinta los enlaces de verde. */
.ay-btn.ay-btn-youtube { background: #e00000; color: #fff; }
.ay-btn.ay-btn-youtube:hover { background: #b80000; color: #fff; }
.ay-btn.ay-btn-instagram { background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.2); }
.ay-btn.ay-btn-instagram:hover { filter: brightness(.92); color: #fff; }
.ay-btn.ay-btn-whatsapp { background: #075e54; color: #fff; }
.ay-btn.ay-btn-whatsapp:hover { background: #054d44; color: #fff; }
.ay-gracias-pasos { list-style: none; padding: 0; margin: 0; }
.ay-paso-n { font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green-deep); }
.ay-paso h2 { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.25; letter-spacing: -.01em; margin: 0; color: var(--ink); }
.ay-paso .ay-btn { align-self: flex-start; margin-top: auto; padding: 10px 16px; font-size: 14px; }
.ay-paso.is-now { border-color: var(--green-deep); box-shadow: 0 0 0 3px var(--green-50); }