/* ==========================================================================
   interludio.css — Interludio «Manises, el pueblo más afortunado de España»
   (patterns/interludio.php). Se carga después de hero.css.

   Igual que en la app (DeliveredPrizesPage): tarjeta azul en degradado con la
   foto de El Arte de Manises muy transparente, «MANISES,» en blanco 70 % y la
   frase en Georgia cursiva 700 en oro con brillo. El mostrador va como un
   DÉCIMO: papel marfil, troqueles en los cantos, franja con la dirección en
   microtipografía, ligeramente girado y con el matasellos en oro; se endereza
   al pasar el ratón.

   Los !important que quedan vencen a estilos que WordPress genera para los
   bloques (layout flex/flow del grupo, tamaño en línea de la imagen).
   ========================================================================== */

/* ---------- Sección ---------- */
.lmb-interludio {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	border-block: 0;
	background: linear-gradient(145deg, #0d56b0 0%, #0a4792 35%, #062354 100%);
	color: var(--wp--preset--color--white);
}

/* Solo en la primera página de la portada: en /page/2+ se va directo a la rejilla. */
body.paged .lmb-interludio {
	display: none;
}

/* Foto de El Arte de Manises, muy transparente. */
.lmb-interludio::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: url("../img/manises/el-arte.webp") center 20% / cover no-repeat;
	opacity: .22;
}

/* Brillo oro en la esquina. */
.lmb-interludio::after {
	content: "";
	position: absolute;
	inset: 0 0 auto auto;
	z-index: -1;
	inline-size: min(40vw, 32rem);
	aspect-ratio: 1;
	background: radial-gradient(circle at 80% 10%, rgb(245 197 24 / .12) 0%, transparent 70%);
	pointer-events: none;
}

/* ---------- Rejilla: décimo | texto ---------- */
.lmb-interludio__inner {
	position: relative;
	display: grid !important;                            /* el grupo es flex */
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	align-items: center;
	gap: clamp(2rem, 1rem + 4vw, 5rem) !important;       /* vence al blockGap */
}

/* Matasellos en oro estampado sobre la esquina del décimo (fuera de su máscara). */
.lmb-interludio__inner::after {
	content: "";
	position: absolute;
	z-index: 2;
	inset-block-start: -18px;
	inset-inline-start: calc(min(25rem, 100%) - 70px);
	inline-size: 116px;
	aspect-ratio: 1;
	background: var(--lmb-gold, #f5c518);
	-webkit-mask: url("../img/sistema/matasellos.svg") center / contain no-repeat;
	mask: url("../img/sistema/matasellos.svg") center / contain no-repeat;
	transform: rotate(14deg);
	opacity: .95;
	filter: drop-shadow(0 4px 10px rgb(6 20 42 / .35));
	pointer-events: none;
}

/* ---------- El mostrador como décimo ---------- */
.lmb-interludio__media {
	--paper: #fffdf5;
	--notch: 9px;
	position: relative;
	inline-size: auto;
	max-inline-size: 25rem;
	padding: 12px 12px 46px;
	background: var(--paper);
	border-radius: 10px;
	rotate: -3deg; /* propiedad independiente: no la pisa la animación de entrada */
	box-shadow: 0 2px 4px rgb(6 20 42 / .18), 0 24px 48px -18px rgb(6 20 42 / .55);
	/* Troqueles: medias lunas en los cantos izquierdo y derecho, como el corte de un décimo. */
	-webkit-mask:
		radial-gradient(circle var(--notch) at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
		radial-gradient(circle var(--notch) at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
	mask:
		radial-gradient(circle var(--notch) at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
		radial-gradient(circle var(--notch) at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
	transition: rotate 520ms var(--lmb-m-ease, cubic-bezier(.22, 1, .36, 1)), translate 520ms var(--lmb-m-ease, cubic-bezier(.22, 1, .36, 1));
}

.lmb-interludio__media img {
	display: block;
	inline-size: 100% !important;   /* vence al ancho/alto en línea del bloque Imagen */
	block-size: auto !important;
	aspect-ratio: 4 / 3.4;
	object-fit: cover;
	object-position: 50% 45%;
	border-radius: 4px;
	background: var(--wp--preset--color--surface-3, #E4E9F1);
}

/* Franja del décimo: dirección real en microtipografía, bajo un filete perforado. */
.lmb-interludio__media::before {
	content: "LOTERÍA MANISES · AVDA. DELS TRAMVIES, 12 · MANISES";
	position: absolute;
	inset: auto 12px 14px 12px;
	padding-block-start: 10px;
	border-block-start: 2px dotted rgb(10 71 146 / .28);
	color: #0a4792;
	font: 800 9px/1 var(--wp--preset--font-family--geist, sans-serif);
	letter-spacing: .22em;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
	.lmb-interludio:hover .lmb-interludio__media {
		rotate: 0deg;
		translate: 0 -4px;
	}
}

/* ---------- Texto ---------- */
.lmb-interludio__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.25rem;
}

.lmb-interludio__body > * {
	margin: 0 !important;
}

/* «MANISES,» */
.lmb-interludio .lmb-interludio__kicker {
	color: rgb(255 255 255 / .7);
	font-size: clamp(1.125rem, 1rem + .6vw, 1.5rem) !important; /* vence al rótulo .is-style-kicker */
	font-weight: 900;
	letter-spacing: .04em;
	line-height: 1;
	text-transform: uppercase;
}

/* «el pueblo más afortunado de España» */
.lmb-interludio .lmb-interludio__quote {
	max-inline-size: 16ch;
	margin-block-start: .35rem !important;
	color: var(--lmb-gold, #f5c518);
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem);
	font-style: italic;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.15;
	text-shadow: 0 1px 10px rgb(245 197 24 / .25);
	text-wrap: balance;
}

.lmb-interludio__link a {
	display: inline-block;
	padding-block: .75rem; /* objetivo táctil ≥ 44px */
	color: var(--wp--preset--color--white);
	font-size: var(--lmb-label-size);
	font-weight: var(--lmb-label-weight);
	letter-spacing: var(--lmb-label-track);
	text-decoration: underline;
	text-decoration-color: var(--lmb-gold, #f5c518);
	text-decoration-thickness: 2px;
	text-underline-offset: .45em;
	text-transform: uppercase;
}

.lmb-interludio__link a::after {
	content: "→";
	content: "→" / "";
	display: inline-block;
	margin-inline-start: .625rem;
	font-family: var(--wp--preset--font-family--geist, sans-serif);
	letter-spacing: 0;
}

.lmb-interludio__link a:focus-visible {
	outline: 2px solid var(--lmb-gold, #f5c518);
	outline-offset: 3px;
	border-radius: 2px;
}

@media (prefers-reduced-motion: no-preference) {
	.lmb-interludio__link a::after {
		transition: translate var(--lmb-dur, 200ms) var(--lmb-ease-out, ease-out);
	}

	.lmb-interludio__link a:hover::after {
		translate: 3px 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lmb-interludio__media {
		transition: none;
	}
}

/* ---------- Móvil y tableta estrecha: apilado y centrado ---------- */
@media (max-width: 781px) {
	.lmb-interludio__inner {
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
		text-align: center;
	}

	.lmb-interludio__inner::after {
		inset-block-start: -14px;
		inset-inline-start: auto;
		inset-inline-end: calc(50% - min(10rem, 50% - 12px) - 30px);
		inline-size: 92px;
	}

	.lmb-interludio__media {
		inline-size: min(100% - 20px, 18rem);
		max-inline-size: min(20rem, 100% - 24px);
		margin-inline: auto !important;
	}

	.lmb-interludio__body {
		align-items: center;
	}

	.lmb-interludio .lmb-interludio__quote {
		max-inline-size: 14ch;
	}
}
