/* ==========================================================================
   Pie — todo en azul noche (#0a2142 → #06142a), en tres zonas separadas por
   hilos finos rgb(255 255 255 / .08):
     1. Compromisos (franja de 4 rótulos con icono oro).
     2. Columnas: marca (logo, dirección, redes y matasellos) ·
        La administración (enlaces) · Juego responsable (consejos y ayuda, 2 subcolumnas).
     3. Banda legal: sellos oficiales en blanco, aviso, enlaces legales y ©.
   Marco: el de cabecera y cuerpo (1240 px + --lmb-gutter).
   Escala contenida: rótulos 11 px, texto 13 px, banda legal 11 px.
   Oro solo en rótulos y acentos. AA en todo el texto.

   Índice
     0. Base y rótulo único
     1. Compromisos
     2. Columnas (marca · enlaces · juego responsable) y su rejilla
     3. Banda legal
     4. Utilidades
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Base
   ------------------------------------------------------------------------ */
.wp-site-blocks > footer.wp-block-template-part {
	margin-block-start: 0;
}

.lmb-footer {
	--lmb-foot-hair: rgb(255 255 255 / .08);
	--lmb-foot-text: rgb(255 255 255 / .76);   /* ≈ 10:1 sobre el azul noche */
	--lmb-foot-soft: rgb(255 255 255 / .64);   /* ≈ 7:1 */
	--lmb-foot-gap: clamp(2rem, 1rem + 3vw, 4rem);
	background: linear-gradient(180deg, var(--lmb-blue-deep, #0a2142) 0%, var(--lmb-blue-night, #06142a) 100%);
	color: #fff;
}

.lmb-footer :focus-visible {
	outline: 2px solid var(--lmb-gold, #F5C518);
	outline-offset: 3px;
	border-radius: 4px;
}

.lmb-footer :is(p, ul, h2, h3) {
	margin: 0;
}

:where(.lmb-footer p) {
	text-wrap: pretty;
}

.lmb-footer a {
	color: #fff;
	text-decoration: none;
	text-underline-offset: .22em;
	text-decoration-thickness: 1px;
}

.lmb-footer a:hover {
	color: var(--lmb-gold, #F5C518);
	text-decoration-line: underline;
}

@media (prefers-reduced-motion: no-preference) {
	.lmb-footer a {
		transition: color 150ms var(--lmb-ease-out, ease-out), background-color 150ms var(--lmb-ease-out, ease-out);
	}
}

/* Rótulo único del sistema (11 px · 800 · mayúsculas). */
.lmb-footer :is(.lmb-value, .lmb-footer__title, .lmb-legal__claim, .lmb-legal__links a) {
	font-family: inherit;
	font-size: 11px;
	font-weight: var(--lmb-label-weight, 800);
	letter-spacing: var(--lmb-label-track, .14em);
	line-height: 1.35;
	text-transform: uppercase;
}

/* Texto de las columnas: 13 px. */
.lmb-footer :is(.lmb-footer__address, .lmb-footer__address a, .lmb-footer__links a, .lmb-footer__rg li, .lmb-footer__help li, .lmb-footer__help a, .lmb-footer__help-title, .lmb-footer__more) {
	font-size: 13px;
	line-height: 1.55;
}

/* --------------------------------------------------------------------------
   1. Compromisos
   ------------------------------------------------------------------------ */
.lmb-values {
	padding-block: 1.25rem;
	border-block-end: 1px solid var(--lmb-foot-hair);
}

.lmb-values__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, max-content));
	justify-content: space-between;
	gap: 1rem 1.5rem;
	padding: 0;
	list-style: none;
}

.lmb-value {
	display: flex;
	align-items: center;
	gap: .625rem;
	margin: 0;
	color: rgb(255 255 255 / .92);
	white-space: nowrap;
}

.lmb-value::before {
	content: "";
	flex: none;
	inline-size: 18px;
	block-size: 18px;
	background-color: var(--lmb-gold, #F5C518);
	-webkit-mask: var(--lmb-value-icon) center / contain no-repeat;
	mask: var(--lmb-value-icon) center / contain no-repeat;
}

.lmb-value--seguro {
	--lmb-value-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4 6v6c0 4.5 3.4 8.3 8 9 4.6-.7 8-4.5 8-9V6l-8-3Z'/%3E%3Cpath d='m8.5 12 2.5 2.5 4.5-5'/%3E%3C/svg%3E");
}

.lmb-value--garantia {
	--lmb-value-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='9' r='6'/%3E%3Cpath d='M8.5 13.9 7 22l5-3 5 3-1.5-8.1'/%3E%3C/svg%3E");
}

.lmb-value--soporte {
	--lmb-value-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 14v-2a8 8 0 0 1 16 0v2'/%3E%3Crect x='3' y='14' width='4' height='6' rx='1.5'/%3E%3Crect x='17' y='14' width='4' height='6' rx='1.5'/%3E%3Cpath d='M19 20a3 3 0 0 1-3 2h-2'/%3E%3C/svg%3E");
}

.lmb-value--comisiones {
	--lmb-value-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m15 9-6 6'/%3E%3Ccircle cx='9.5' cy='9.5' r='.5' fill='%23000'/%3E%3Ccircle cx='14.5' cy='14.5' r='.5' fill='%23000'/%3E%3C/svg%3E");
}

@media (min-width: 782px) {
	.lmb-values__list {
		grid-template-columns: repeat(4, max-content);
	}
}

/* Escritorio: la misma rejilla de 4 columnas que las columnas de debajo. */
@media (min-width: 1024px) {
	.lmb-values__list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		justify-content: normal;
		column-gap: var(--lmb-foot-gap);
	}
}

/* --------------------------------------------------------------------------
   2. Columnas
   ------------------------------------------------------------------------ */
.lmb-footer__main {
	padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}

.lmb-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2.5rem var(--lmb-foot-gap);
}

.lmb-footer .lmb-footer__grid > *,
.lmb-footer .lmb-footer__col > * {
	margin-block: 0;
}

.lmb-footer .lmb-footer__title {
	margin-block-end: 1.25rem;
	color: var(--lmb-gold, #F5C518);
}

.lmb-footer__col :is(p, li) {
	color: var(--lmb-foot-text);
	font-size: .9375rem;
	line-height: 1.6;
}

/* Marca: logo, dirección y redes; en móvil el sello a su lado, nunca suelto. */
.lmb-footer__col--brand {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"logo   sello"
		"addr   sello"
		"social sello";
	align-content: start;
	column-gap: 1.5rem;
}

.lmb-footer__brand {
	grid-area: logo;
	justify-self: start;
	display: inline-flex;
	line-height: 0;
}

.lmb-footer__brand img {
	display: block;
	inline-size: auto;
	block-size: 40px;
}

.lmb-footer .lmb-footer__address {
	grid-area: addr;
	margin-block-start: 1.25rem;
}

.lmb-footer__address a {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.lmb-footer .lmb-footer__social {
	grid-area: social;
	gap: .25rem;
	margin-block-start: 1rem;
	margin-inline-start: -.5rem;
	padding: 0;
}

.lmb-footer__social .wp-social-link:hover {
	transform: none;
}

.lmb-footer__social .wp-social-link a {
	padding: .5rem;
	line-height: 0;
	border-radius: var(--lmb-radius-pill, 9999px);
}

.lmb-footer__social .wp-social-link svg {
	inline-size: 22px;
	block-size: 22px;
}

.lmb-footer__social .wp-social-link a:hover {
	background: rgb(255 255 255 / .1);
}

/* Matasellos (firma de marca; patrón matasellos.php). */
.lmb-matasellos {
	display: block;
	inline-size: var(--lmb-matasellos-size, 7rem);
	max-inline-size: 100%;
	aspect-ratio: 1;
	margin: 0;
	pointer-events: none;
	rotate: -12deg;
}

.lmb-matasellos img {
	display: block;
	inline-size: 100% !important;   /* vence al ancho en línea del bloque Imagen */
	block-size: auto !important;
	aspect-ratio: 1;
}

.lmb-footer .lmb-footer__sello.lmb-matasellos {
	--lmb-matasellos-size: 6rem;
	grid-area: sello;
	align-self: center;
	opacity: .5;
	filter: brightness(0) invert(1);
}

/* Enlaces de la administración. */
.lmb-footer__links {
	display: grid;
	gap: .55rem;
	padding: 0;
	list-style: none;
}

.lmb-footer__links a {
	display: inline-block;
	padding-block: .25rem;
	font-weight: 600;
}

/* Juego responsable. */
.lmb-footer__rg,
.lmb-footer__help {
	padding: 0;
	list-style: none;
}

.lmb-footer__rg li {
	position: relative;
	padding-inline-start: 1.125rem;
}

.lmb-footer__rg li + li {
	margin-block-start: .5rem;
}

.lmb-footer__rg li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: .62em;
	inline-size: 6px;
	block-size: 6px;
	border-radius: 50%;
	background: var(--lmb-gold, #F5C518);
}

/* «¿Necesitas ayuda?»: subtítulo discreto, no un tercer estilo de encabezado. */
.lmb-footer .lmb-footer__help-title {
	margin-block: 1.75rem .5rem;
	color: var(--lmb-foot-text);
	font-family: inherit;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
}

.lmb-footer__help li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: .375rem 1rem;
	padding-block: .625rem;
	border-block-start: 1px solid var(--lmb-foot-hair);
}

.lmb-footer__help li:last-child {
	border-block-end: 1px solid var(--lmb-foot-hair);
}

.lmb-footer__help a {
	flex: none;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.lmb-footer .lmb-footer__more {
	margin-block-start: 1.25rem;
}

.lmb-footer__more a {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding-block: .25rem;
	font-weight: 600;
}

.lmb-footer__more a::after {
	content: "→";
	content: "→" / "";
	color: var(--lmb-gold, #F5C518);
}

/* Rejilla:
   - móvil: una columna, con hilos entre bloques;
   - tableta (782–1023): marca | enlaces arriba; juego responsable a lo ancho debajo;
   - escritorio (≥1024): 4 columnas iguales, juego responsable ocupa 2. */
@media (min-width: 782px) {
	.lmb-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.lmb-footer__col--brand {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
	}

	.lmb-footer__col--rg {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-areas:
			"title title"
			"tips  helpt"
			"tips  help"
			"tips  more";
		column-gap: var(--lmb-foot-gap);
	}

	.lmb-footer__col--rg > .lmb-footer__title { grid-area: title; }
	.lmb-footer__col--rg > .lmb-footer__rg { grid-area: tips; }
	.lmb-footer .lmb-footer__col--rg > .lmb-footer__help-title { grid-area: helpt; margin-block-start: 0; }
	.lmb-footer__col--rg > .lmb-footer__help { grid-area: help; }
	.lmb-footer__col--rg > .lmb-footer__more { grid-area: more; }
}

@media (min-width: 782px) and (max-width: 1023.98px) {
	.lmb-footer__col--rg {
		grid-column: 1 / -1;
		grid-template-rows: auto auto auto 1fr;
		padding-block-start: 2.5rem;
		border-block-start: 1px solid var(--lmb-foot-hair);
	}

	.lmb-footer .lmb-footer__sello.lmb-matasellos {
		--lmb-matasellos-size: 5rem;
		margin-block-start: 1.5rem;
		align-self: flex-start;
	}
}

@media (min-width: 1024px) {
	.lmb-footer__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.lmb-footer__col--rg {
		grid-column: span 2;
		align-content: start;
	}

	.lmb-footer .lmb-footer__social {
		align-self: flex-start;
	}

	/* El sello cierra el bloque de marca, justo bajo las redes. */
	.lmb-footer .lmb-footer__sello.lmb-matasellos {
		margin-block-start: 1.75rem;
		align-self: flex-start;
	}

	/* Los rótulos de columna quedan a la altura óptica del logo. */
	.lmb-footer__col:not(.lmb-footer__col--brand) {
		padding-block-start: .75rem;
	}
}

@media (max-width: 781.98px) {
	.lmb-footer__links {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.lmb-footer__links a {
		padding-block: .5rem;
	}

	.lmb-footer__col--brand,
	.lmb-footer__col--links {
		padding-block-end: 2.5rem;
		border-block-end: 1px solid var(--lmb-foot-hair);
	}
}

@media (max-width: 479.98px) {
	.lmb-footer .lmb-footer__sello.lmb-matasellos {
		--lmb-matasellos-size: 7rem; /* sello protagonista en móvil */
	}

	.lmb-footer__help li {
		flex-direction: column;
		align-items: flex-start;
		gap: .125rem;
	}
}

/* --------------------------------------------------------------------------
   3. Banda legal (letra pequeña, alineada a la izquierda)
   ------------------------------------------------------------------------ */
.lmb-footer__legal {
	padding-block: 2rem;
	border-block-start: 1px solid var(--lmb-foot-hair);
	background: var(--lmb-blue-night, #06142a);
	color: var(--lmb-foot-soft);
}

.lmb-legal {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	justify-items: start;
	gap: 1.25rem;
	text-align: start;
}

.lmb-footer .lmb-legal > * {
	margin: 0;
}

/* Sellos oficiales en blanco, sin placa, integrados en el azul. */
.lmb-legal__seals {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	align-items: center;
	gap: 1.25rem 2.25rem;
	padding: 0;
	list-style: none;
}

.lmb-legal__plate {
	display: grid;
	place-items: center;
	line-height: 0;
}

.lmb-legal__plate img {
	display: block;
	inline-size: auto;
	max-inline-size: 100%;
	block-size: 30px;
	object-fit: contain;
	opacity: .95;
	transition: opacity .2s ease;
}

.lmb-legal__plate--combined img {
	block-size: 28px;
}

a.lmb-legal__plate:hover img {
	opacity: 1;
}

.lmb-legal__notice {
	display: grid;
	gap: .375rem;
}

.lmb-footer p.lmb-legal__claim {
	color: rgb(255 255 255 / .72);
	letter-spacing: .12em;
	text-wrap: balance;
}

.lmb-footer .lmb-legal__note {
	text-wrap: balance;
	color: var(--lmb-foot-soft);
	font-size: .8125rem;
	line-height: 1.5;
}

.lmb-legal__links ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	align-items: center;
	gap: 0 .875rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lmb-legal__links li {
	display: inline-flex;
	align-items: center;
	gap: .875rem;
	margin: 0;
}

.lmb-legal__links li + li::before {
	content: "·";
	content: "·" / "";
	color: rgb(255 255 255 / .32);
}

.lmb-footer .lmb-legal__links a {
	display: inline-block;
	padding-block: .5rem;
	color: rgb(255 255 255 / .78);
	letter-spacing: .1em;
}

.lmb-footer .lmb-legal__links a:hover {
	color: var(--wp--preset--color--white);
}

.lmb-footer .lmb-legal__copyright {
	color: rgb(255 255 255 / .6);
	font-size: 11px;
	line-height: 1.5;
	font-variant-numeric: tabular-nums;
	text-wrap: balance;
}

/* Escritorio ancho: sellos | aviso arriba; enlaces | © abajo, bajo un hilo. */
@media (min-width: 1280px) {
	.lmb-legal {
		grid-template-columns: auto minmax(0, 1fr);
		grid-template-areas:
			"seals notice"
			"links copy";
		align-items: center;
		justify-items: stretch;
		gap: 1.5rem var(--lmb-foot-gap);
	}

	.lmb-legal::after {
		content: "";
		grid-row: 2;
		grid-column: 1 / -1;
		align-self: start;
		margin-block-start: -.75rem;
		border-block-start: 1px solid var(--lmb-foot-hair);
	}

	.lmb-legal__seals {
		grid-area: seals;
		justify-content: center;
	}

	.lmb-legal__notice {
		grid-area: notice;
		justify-items: end;
		text-align: end;
	}

	.lmb-legal__links {
		grid-area: links;
		padding-block-start: .75rem;
	}

	.lmb-footer .lmb-legal__copyright {
		grid-area: copy;
		padding-block-start: .75rem;
		text-align: end;
	}
}

/* Móvil: los dos sellos de la DGOJ juntos y el combinado debajo; enlaces en 2 × 2. */
@media (max-width: 599.98px) {
	.lmb-legal__seals {
		gap: 1rem 1.5rem;
	}

	.lmb-legal__seals li:first-child {
		order: 1;
	}

	.lmb-legal__plate img,
	.lmb-legal__plate--combined img {
		block-size: 26px;
	}

	.lmb-footer .lmb-legal__claim > span:not(.lmb-legal__sep) {
		display: block;
	}

	.lmb-legal__sep {
		display: none;
	}

	.lmb-legal__links ul {
		display: grid;
		grid-template-columns: repeat(2, max-content);
		justify-content: start;
		gap: 0 2rem;
	}

	.lmb-legal__links li + li::before {
		content: none;
	}

	.lmb-footer .lmb-legal__links a {
		display: inline-flex;
		align-items: center;
		min-block-size: 44px;
		padding-block: 0;
	}
}

/* La barra inferior de la app (<782 px) se monta sobre el azul, no sobre el blanco:
   la banda legal se alarga por detrás y deja su contenido por encima de la barra. */
@media (max-width: 781.98px) {
	.lmb-footer > .lmb-footer__legal {
		padding-block-end: calc(2rem + var(--lmb-tabbar-h, 62px) + env(safe-area-inset-bottom, 0px));
		margin-block-end: calc(-1 * (var(--lmb-tabbar-h, 62px) + env(safe-area-inset-bottom, 0px)));
	}
}

/* --------------------------------------------------------------------------
   4. Utilidades
   ------------------------------------------------------------------------ */
/* Encabezados solo para lectores de pantalla (patrón estándar, con !important a propósito). */
.lmb-visually-hidden {
	position: absolute !important;
	inline-size: 1px !important;
	block-size: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* App instalada: la barra inferior lleva 18 px más de aire (pwa.css). */
@media (max-width: 781.98px) and (display-mode: standalone) {
	.lmb-footer > .lmb-footer__legal {
		padding-block-end: calc(2rem + var(--lmb-tabbar-h, 68px) + 18px);
		margin-block-end: calc(-1 * (var(--lmb-tabbar-h, 68px) + 18px));
	}
}
