/* Golda Lab — la web que vive el calendario judío (goldalab-tiempo.php, tiempo.js).
 * La janukiá es la de la trama de la caja de Shabat Talks (arcos) con las llamas en el oro de la GOLDa Box. La franja va
 * en ciruela con dos velitas que titilan y el saludo en ámbar (portada v4); en Iom Kipur e Iom Hashoá, sin adornos ni
 * movimiento. */

/* El fuego de las velas (antes --gl-oro: ese nombre ahora es el dorado de la portada v4, en estilos.css). */
:root {
	--gl-fuego: #f5b82e;
	--gl-fuego-claro: #fff1b0;
}

/* ─── Dibujos ─────────────────────────────────────────────────────────── */
.gl-icono {
	flex: none;
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.gl-velas-dibujo {
	flex: none;
	overflow: visible;
}
.gl-velas-cuerpo {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linejoin: round;
	stroke-linecap: round;
}
.gl-velas-dibujo .gl-llama-fuego {
	fill: var(--gl-fuego);
}
.gl-janukia-dibujo {
	display: block;
	overflow: visible;
}
.gl-janukia-brazos {
	fill: none;
	stroke: currentColor;
	stroke-width: 4;
	stroke-linecap: round;
}
.gl-llama-fuego {
	fill: var(--gl-fuego);
}
.gl-llama-corazon {
	fill: var(--gl-fuego-claro);
}

/* Las llamas: apagadas hasta que tiempo.js las enciende; cada una titila a su ritmo. */
.gl-janukia-dibujo .gl-llama {
	opacity: 0;
	transform-box: fill-box;
	transform-origin: 50% 100%;
}
.gl-janukia-dibujo .gl-llama.gl-encendida {
	opacity: 1;
	filter: drop-shadow(0 -1px 3px rgba(245, 184, 46, 0.55));
	animation: gl-titilar 2.4s ease-in-out infinite alternate;
	animation-delay: calc(var(--gl-i, 0) * -0.37s);
}
.gl-llama[data-vela="1"] { --gl-i: 1; }
.gl-llama[data-vela="2"] { --gl-i: 2; }
.gl-llama[data-vela="3"] { --gl-i: 3; }
.gl-llama[data-vela="4"] { --gl-i: 4; }
.gl-llama[data-vela="5"] { --gl-i: 5; }
.gl-llama[data-vela="6"] { --gl-i: 6; }
.gl-llama[data-vela="7"] { --gl-i: 7; }
.gl-llama[data-vela="8"] { --gl-i: 8; }
@keyframes gl-titilar {
	0% {
		transform: scale(1, 1) rotate(-2deg);
	}
	45% {
		transform: scale(0.93, 1.07) rotate(1.5deg);
	}
	100% {
		transform: scale(1.04, 0.95) rotate(-0.5deg);
	}
}

/* ─── La franja de arriba (portada v4): ciruela, 40 px, dos velitas que titilan, el saludo en ámbar ─── */
.gl-tiempo-franja {
	position: relative;
	z-index: 30;
	background: var(--gl-ciruela);
	color: rgba(255, 255, 255, 0.82);
}
.gl-tiempo-franja[hidden] {
	display: none;
}
.gl-tiempo-franja-adentro {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px 12px;
	max-width: var(--gl-ancho);
	min-height: 40px;
	margin: 0 auto;
	padding: 8px var(--gl-margen-v4, var(--gl-margen));
	font-size: 13px;
	font-weight: 500;
	line-height: 1.35;
}
.gl-tiempo-franja-icono {
	display: inline-flex;
	color: #fff;
}
.gl-tiempo-franja-janukia .gl-janukia-dibujo {
	width: 42px;
	height: 28px;
}
/* Las velas de Shabat: cuerpos blancos y la llama ámbar que titila con su brillo. */
.gl-tiempo-franja-velas .gl-velas-dibujo {
	width: 22px;
	height: 22px;
}
.gl-tiempo-franja-velas .gl-velas-cuerpo {
	fill: #fff;
	stroke: none;
}
.gl-tiempo-franja-velas .gl-llama-fuego {
	fill: var(--gl-ambar, #ffcf6b);
	filter: drop-shadow(0 0 4px rgba(255, 207, 107, 0.9));
	transform-box: fill-box;
	transform-origin: 50% 100%;
	animation: gl-franja-llama 2.2s ease-in-out infinite;
}
@keyframes gl-franja-llama {
	50% {
		transform: scale(0.85, 1.12) translateY(-0.5px);
	}
}
/* El punto que late (cuenta regresiva): una brasa ámbar. */
.gl-tiempo-franja-punto {
	flex: none;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--gl-ambar, #ffcf6b);
	box-shadow: 0 0 10px 1px rgba(255, 207, 107, 0.7);
	animation: gl-late 1.8s ease-in-out infinite;
}
@keyframes gl-late {
	50% {
		opacity: 0.35;
	}
}
.gl-tiempo-franja-texto {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 0 8px;
	margin: 0;
	text-align: center;
}
.gl-tiempo-franja-saludo {
	font-weight: 600;
	color: var(--gl-ambar, #ffcf6b);
}
.gl-tiempo-franja-saludo::after {
	content: "·";
	margin-left: 8px;
	color: rgba(255, 255, 255, 0.4);
	font-weight: 400;
}
.gl-tiempo-franja-saludo:last-child::after {
	content: none;
}
.gl-tiempo-franja-detalle {
	color: rgba(255, 255, 255, 0.82);
}
/* Los enlaces de la franja (en Janucá, «Qué regalar» y «Pinta tu Janucá»): en fila con el resto; en el celular, apilados. */
.gl-tiempo-franja-enlaces {
	display: contents;
}
.gl-tiempo-franja-enlace {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 32px;
	padding: 0 2px;
	color: #fff;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgba(255, 207, 107, 0.6);
	text-underline-offset: 4px;
	transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.gl-tiempo-franja-enlace .gl-flecha {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 0.25s var(--gl-ease-out);
}
.gl-tiempo-franja-enlace:hover {
	color: var(--gl-ambar, #ffcf6b);
	text-decoration-color: currentColor;
}
.gl-tiempo-franja-enlace:hover .gl-flecha {
	transform: translateX(3px);
}
.gl-tiempo-franja-enlace:focus-visible {
	outline: 2px solid var(--gl-ambar, #ffcf6b);
	outline-offset: 3px;
	border-radius: 4px;
}
/* Iom Kipur e Iom Hashoá: sin adornos ni brillo. */
.gl-tiempo-franja-solemne {
	border-bottom: 1px solid var(--gl-linea-oscura);
}
.gl-tiempo-franja-solemne .gl-tiempo-franja-saludo,
.gl-tiempo-franja-solemne .gl-tiempo-franja-enlace {
	color: #fff;
}
@media (prefers-reduced-motion: reduce) {
	.gl-tiempo-franja-punto,
	.gl-tiempo-franja-velas .gl-llama-fuego {
		animation: none;
	}
}
.gl-pausa .gl-tiempo-franja-punto,
.gl-pausa .gl-tiempo-franja-velas .gl-llama-fuego {
	animation-play-state: paused;
}
/* En el celular, una sola fila: el dibujo, el saludo con el detalle debajo y el enlace al lado. */
@media (max-width: 599px) {
	.gl-tiempo-franja-adentro {
		flex-wrap: nowrap;
		justify-content: flex-start;
		gap: 10px;
		padding: 6px 16px;
		font-size: 12px;
	}
	.gl-tiempo-franja-texto {
		flex: 1 1 auto;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		text-align: left;
	}
	.gl-tiempo-franja-saludo::after {
		content: none;
	}
	.gl-tiempo-franja-enlaces {
		display: flex;
		flex: none;
		flex-direction: column;
		align-items: flex-end;
	}
	.gl-tiempo-franja-enlace {
		min-height: 44px;
		white-space: nowrap;
	}
	.gl-tiempo-franja-enlace:not(:only-child) {
		min-height: 28px;
	}
}

/* ─── El horario de Shabat (sobre noche: apertura de la portada y página de Shabat) ── */
.gl-shabat-horario {
	display: grid;
	gap: 6px;
	justify-items: start;
	margin-top: 22px;
	color: #fff;
	font-size: 15px;
}
.gl-shabat-horario-titulo {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin: 0;
	font-weight: 600;
}
.gl-shabat-horario-titulo .gl-velas-dibujo {
	width: 22px;
	height: 22px;
}
.gl-shabat-ciudad {
	position: relative;
	display: inline-flex;
	align-items: center;
}
.gl-shabat-ciudad select {
	appearance: none;
	min-height: 36px;
	margin: 0;
	padding: 2px 24px 2px 0;
	border: 0;
	border-bottom: 2px dashed rgba(201, 227, 90, 0.75);
	border-radius: 0;
	background: transparent;
	color: var(--gl-lima);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	field-sizing: content; /* mide lo que dice la ciudad elegida, no la más larga */
}
.gl-shabat-ciudad::after {
	content: "";
	position: absolute;
	right: 4px;
	top: 50%;
	width: 8px;
	height: 8px;
	margin-top: -6px;
	border-right: 2px solid var(--gl-lima);
	border-bottom: 2px solid var(--gl-lima);
	transform: rotate(45deg);
	pointer-events: none;
}
.gl-shabat-ciudad select:hover {
	border-bottom-style: solid;
}
.gl-shabat-ciudad select:focus-visible {
	outline: 2px solid var(--gl-lima);
	outline-offset: 3px;
	border-radius: 4px;
}
.gl-shabat-ciudad option {
	background: #fff;
	color: var(--gl-tinta);
}
.gl-shabat-horario-horas {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 28px;
	margin: 0;
}
.gl-shabat-horario-horas > div {
	display: flex;
	align-items: baseline;
	gap: 8px;
}
.gl-shabat-horario-horas dt {
	color: rgba(255, 255, 255, 0.78);
	font-size: 14px;
	font-weight: 500;
}
.gl-shabat-horario-horas dd {
	margin: 0;
	color: rgba(255, 255, 255, 0.78);
	font-size: 14px;
}
.gl-shabat-horario-horas strong {
	margin-left: 2px;
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
}
.gl-shabat-ubicacion {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: rgba(255, 255, 255, 0.85);
	font: 500 14px "Montserrat", sans-serif;
	text-decoration: underline;
	text-decoration-color: rgba(255, 255, 255, 0.4);
	text-underline-offset: 4px;
	cursor: pointer;
}
.gl-shabat-ubicacion[hidden] {
	display: none;
}
.gl-shabat-ubicacion:hover {
	color: #fff;
	text-decoration-color: var(--gl-lima);
}
.gl-shabat-ubicacion:disabled {
	opacity: 0.6;
	cursor: progress;
}
.gl-shabat-ubicacion:focus-visible {
	outline: 2px solid var(--gl-lima);
	outline-offset: 3px;
	border-radius: 4px;
}
.gl-shabat-nota {
	margin: 0;
	color: rgba(255, 255, 255, 0.82);
	font-size: 14px;
}
.gl-shabat-nota:empty {
	display: none;
}
/* En la apertura de la portada, separado de los botones. */
.gl-portada .gl-shabat-horario {
	max-width: 480px;
	margin-top: 28px;
	padding-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, 0.16);
}
/* Entra después de los botones, con la misma subida (gl-subir, paginas.css). */
.gl-js .gl-portada .gl-shabat-horario {
	opacity: 0;
	transform: translateY(14px);
	animation: gl-subir 520ms var(--gl-ease-out) forwards;
	animation-delay: 540ms;
}

/* ─── La janukiá de la página de Janucá ───────────────────────────────── */
.gl-janukia {
	display: grid;
	gap: 12px;
	justify-items: start;
	margin: 18px 0 4px;
	color: rgba(255, 255, 255, 0.94);
}
.gl-janukia-grande {
	width: min(100%, 280px);
	height: auto;
}
.gl-janukia figcaption {
	font-family: var(--gl-titulos);
	font-size: 24px;
	line-height: 1.2;
	color: var(--gl-lima);
}
/* Al abrir la página, las velas se encienden una tras otra: el shamash y después de derecha a izquierda. */
.gl-janukia .gl-llama.gl-encendida {
	animation: gl-encender 0.7s cubic-bezier(0.16, 1, 0.3, 1) both, gl-titilar 2.4s ease-in-out infinite alternate;
	animation-delay: calc(var(--gl-i, 0) * 0.16s), calc(var(--gl-i, 0) * -0.37s);
}
@keyframes gl-encender {
	from {
		opacity: 0;
		filter: blur(3px);
	}
}

/* ─── Agregar a mi calendario (página de cada fecha) y suscribirse (portada del blog) ── */
.gl-fecha-agendar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 8px;
	margin: 12px 0 0;
	color: rgba(255, 255, 255, 0.82);
	font-size: 14px;
}
.gl-fecha-agendar a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	color: #fff;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgba(255, 255, 255, 0.45);
	text-underline-offset: 4px;
}
.gl-fecha-agendar a:hover {
	color: #fff;
	text-decoration-color: var(--gl-lima);
}
.gl-fechas-suscribir {
	display: grid;
	gap: 10px;
	justify-items: start;
	max-width: 480px;
	margin-top: 28px;
}
.gl-fechas-suscribir-boton {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 50px;
	padding: 0 24px;
	border-radius: 999px;
	background: var(--gl-lima);
	color: var(--gl-noche);
	font-weight: 700;
	font-size: 16px;
	text-decoration: none;
	transition: transform 0.16s ease-out, background-color 0.2s ease;
}
.gl-fechas-suscribir-boton:hover {
	background: #b2ff3a;
	color: var(--gl-noche);
}
.gl-fechas-suscribir-botones {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.gl-fechas-suscribir-boton-borde {
	border: 1px solid rgba(255, 255, 255, 0.6);
	background: transparent;
	color: #fff;
}
.gl-fechas-suscribir-boton-borde:hover {
	border-color: var(--gl-lima);
	background: var(--gl-lima);
}
.gl-fechas-suscribir-boton:active {
	transform: scale(0.97);
}
.gl-fechas-suscribir-boton:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}
.gl-fechas-suscribir-boton .gl-icono {
	width: 20px;
	height: 20px;
	stroke-width: 2;
}
.gl-fechas-suscribir p {
	margin: 0;
	color: rgba(255, 255, 255, 0.82);
	font-size: 14px;
	line-height: 1.5;
}
.gl-fechas-suscribir p a {
	color: #fff;
	font-weight: 600;
	text-underline-offset: 3px;
}

/* ─── En el pago, durante Shabat ──────────────────────────────────────── */
.gl-aviso-shabat {
	display: none;
}
.gl-shabat .gl-aviso-shabat {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0 0 18px;
	padding: 14px 16px;
	border-radius: 12px;
	background: var(--gl-lavanda);
	color: var(--gl-tinta);
	font-size: 15px;
	line-height: 1.45;
}
.gl-aviso-shabat .gl-velas-dibujo {
	width: 24px;
	height: 24px;
	color: var(--gl-golda);
}

/* ─── Modo Shabat: luces cálidas, como de vela, y todo más lento ─────────── */
/* El resto de la semana el papel tiene luces lila y morado (estilos.css); en Shabat se encienden estas, cálidas. */
body.gl-shabat::before {
	content: "";
	position: fixed;
	inset: -20%;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(34% 30% at 18% 22%, rgba(245, 184, 46, 0.17), transparent 70%),
		radial-gradient(30% 28% at 82% 28%, rgba(168, 60, 252, 0.13), transparent 70%),
		radial-gradient(42% 36% at 60% 86%, rgba(255, 196, 110, 0.15), transparent 70%);
	animation: gl-cielo 64s ease-in-out infinite alternate;
	will-change: transform;
}
@keyframes gl-cielo {
	from {
		transform: translate3d(-5%, -4%, 0) rotate(-3deg);
	}
	to {
		transform: translate3d(5%, 4%, 0) rotate(4deg);
	}
}
.gl-pausa body.gl-shabat::before {
	animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
	body.gl-shabat::before {
		animation: none;
	}
}
body.gl-shabat .hero-section[data-type="type-2"]::after,
body.gl-shabat .gl-fecha-portada::after,
body.gl-shabat .gl-trama {
	animation-duration: 18s;
}

/* ─── Iom Kipur e Iom Hashoá: quieto ───────────────────────────────────── */
body.gl-dia-solemne .hero-section[data-type="type-2"]::after,
body.gl-dia-solemne .gl-fecha-portada::after,
body.gl-dia-solemne .gl-trama {
	animation-play-state: paused;
}

/* Sin movimiento si se pide (sistema o «Pausar movimiento»): las llamas quedan quietas, encendidas. */
.gl-pausa .gl-janukia-dibujo .gl-llama.gl-encendida {
	animation: none;
}
@media (prefers-reduced-motion: reduce) {
	.gl-janukia-dibujo .gl-llama.gl-encendida {
		animation: none;
	}
	.gl-fechas-suscribir-boton {
		transition: none;
	}
	.gl-js .gl-portada .gl-shabat-horario {
		animation: none;
		opacity: 1;
		transform: none;
	}
}
