/* ==========================================================================
   El Banderín — base.css
   Variables de diseño, base tipográfica y utilidades.
   Los colores de marca vienen de theme.json (--wp--preset--color--*);
   aquí se les da un alias corto y se añaden las variantes "vivas" del logo,
   que solo se usan sobre fondo negro o como detalle (nunca para texto sobre claro).
   ========================================================================== */

:root {
	/* Marca (theme.json) */
	--elb-black: var(--wp--preset--color--negro, #0b0b0b);
	--elb-ink: var(--wp--preset--color--tinta, #1a1813);
	--elb-grey: var(--wp--preset--color--gris, #5e5b53);
	--elb-line: var(--wp--preset--color--linea, #e3ded3);
	--elb-paper: var(--wp--preset--color--papel, #f7f5f0);
	--elb-white: var(--wp--preset--color--blanco, #fff);
	--elb-gold: var(--wp--preset--color--oro, #b08d48);
	--elb-gold-ink: var(--wp--preset--color--oro-oscuro, #8a6a2b);
	--elb-sevilla-ink: var(--wp--preset--color--sevilla, #c02600);
	--elb-betis-ink: var(--wp--preset--color--betis, #1e7a1e);

	/* Colores vivos del logo (solo sobre negro o como detalle gráfico) */
	--elb-sevilla-bright: #d42a00;
	--elb-betis-bright: #3bc300;
	--elb-gold-bright: #d8be83;
	--elb-derbi: linear-gradient(90deg, var(--elb-sevilla-bright) 0%, #8c7a00 50%, var(--elb-betis-bright) 100%);

	/* Tipografía */
	--elb-font-head: var(--wp--preset--font-family--titulares, "Barlow Condensed", "Arial Narrow", sans-serif);
	--elb-font-text: var(--wp--preset--font-family--texto, "Source Serif 4", Georgia, serif);
	--elb-font-ui: var(--wp--preset--font-family--interfaz, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);

	/* Espaciado y medidas */
	--elb-gutter: 16px;
	--elb-max: 1240px;
	--elb-read: 720px;
	--elb-radius: 4px;
	--elb-header-h: 104px;
	--elb-space-1: 0.5rem;
	--elb-space-2: 1rem;
	--elb-space-3: 1.5rem;
	--elb-space-4: 2rem;
	--elb-space-5: 3rem;

	/* Acento por defecto (se redefine por sección) */
	--elb-accent: var(--elb-gold);
	--elb-accent-ink: var(--elb-gold-ink);
	--elb-accent-bright: var(--elb-gold-bright);
}

@media (min-width: 600px) {
	:root { --elb-gutter: 24px; }
}

@media (min-width: 960px) {
	:root { --elb-header-h: 72px; }
}

/* Acentos de sección ------------------------------------------------------ */
.elb-accent--betis {
	--elb-accent: var(--elb-betis-ink);
	--elb-accent-ink: var(--elb-betis-ink);
	--elb-accent-bright: var(--elb-betis-bright);
}
.elb-accent--sevilla {
	--elb-accent: var(--elb-sevilla-ink);
	--elb-accent-ink: var(--elb-sevilla-ink);
	--elb-accent-bright: var(--elb-sevilla-bright);
}
.elb-accent--laliga,
.elb-accent--neutral {
	--elb-accent: var(--elb-gold);
	--elb-accent-ink: var(--elb-gold-ink);
	--elb-accent-bright: var(--elb-gold-bright);
}

/* Base ------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--elb-header-h) + 16px);
}

body {
	margin: 0;
	background: var(--elb-paper);
	color: var(--elb-ink);
	font-family: var(--elb-font-text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img,
svg,
video,
iframe { max-width: 100%; }

img { height: auto; display: block; }

a { color: inherit; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--elb-font-head);
	font-weight: 700;
	line-height: 1.1;
	color: var(--elb-black);
	margin: 0;
	text-wrap: balance;
}

p { margin: 0; }

button { font: inherit; }

:focus-visible {
	outline: 3px solid var(--elb-gold);
	outline-offset: 2px;
}

::selection { background: var(--elb-gold-bright); color: var(--elb-black); }

/* Contenedor ------------------------------------------------------------- */
.elb-container {
	width: 100%;
	max-width: var(--elb-max);
	margin-inline: auto;
	padding-inline: var(--elb-gutter);
}

.elb-main {
	display: block;
	min-height: 60vh;
	padding-bottom: var(--elb-space-5);
}

/* Utilidades de accesibilidad (requeridas por WordPress) ----------------- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus,
.elb-skip-link:focus {
	background: var(--elb-white);
	clip: auto !important;
	clip-path: none;
	color: var(--elb-black);
	display: block;
	font-family: var(--elb-font-ui);
	font-size: 0.9375rem;
	font-weight: 700;
	height: auto;
	left: 8px;
	padding: 12px 20px;
	text-decoration: none;
	top: 8px;
	width: auto;
	z-index: 100000;
}

/* Botones ---------------------------------------------------------------- */
.elb-button,
.wp-element-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.5rem 1.25rem;
	border: 2px solid var(--elb-black);
	border-radius: var(--elb-radius);
	background: var(--elb-black);
	color: var(--elb-white);
	font-family: var(--elb-font-head);
	font-size: 1.0625rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.elb-button:hover,
.elb-button:focus-visible {
	background: var(--elb-white);
	color: var(--elb-black);
}

.elb-button--ghost {
	background: transparent;
	color: var(--elb-black);
}

.elb-button--ghost:hover { background: var(--elb-black); color: var(--elb-white); }

.elb-icon { flex: none; vertical-align: middle; }

/* Formularios (búsqueda, comentarios) ------------------------------------ */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
textarea {
	width: 100%;
	min-height: 44px;
	padding: 0.625rem 0.75rem;
	border: 2px solid var(--elb-line);
	border-radius: var(--elb-radius);
	background: var(--elb-white);
	color: var(--elb-ink);
	font-family: var(--elb-font-ui);
	font-size: 1rem;
}

input:focus,
textarea:focus { border-color: var(--elb-black); outline: none; }

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
