/*
Theme Name: UM Child
Theme URI: https://ultimatemadrid.com/
Description: Ultimate Madrid child theme on Twenty Twenty-Five. Brand tokens (Madrid red + navy), Archivo + JetBrains Mono typography, fluid type and spacing scales. Replaces the legacy GeneratePress + um-* CSS stack.
Author: Club Deportivo Elemental Ultimate Madrid
Author URI: https://ultimatemadrid.com/
Template: twentytwentyfive
Version: 0.8.0
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: um-child
Tags: full-site-editing, block-patterns, sports
*/

/* ===============================================================
   UM DESIGN V3 · FOUNDATIONS (2026-05-22, Phase 1 of design handoff)
   Tokens + base atoms ported verbatim from
   docs/design_handoff_ultimate_madrid/styles.css :root + atoms.
   Legacy :root + .um-* rules further down stay intact for backward
   compat; later phases will collapse the legacy tokens into these.
   =============================================================== */

:root {
	/* Palette -- navy + red with warm cream neutral and pitch-green tertiary */
	--navy-900: #0b1730;
	--navy-800: #0f1e3d;
	--navy-700: #18294f;
	--navy-600: #233864;
	--navy-100: #dde3ef;

	--red-600: #d8202a;   /* primary action */
	--red-700: #b91923;
	--red-500: #e63946;   /* red on dark backgrounds */
	--red-50:  #fdecee;   /* tint */

	--cream-50:  #f7f3ec; /* section tint, cards on light */
	--cream-100: #efe9de;
	--cream-200: #e6dfd0;

	--ink-900: #0b1730;   /* body text on light */
	--ink-700: #2b3a5a;
	--ink-500: #5a6781;   /* secondary text */
	--ink-400: #8593ad;
	--ink-300: #b6c0d3;
	--ink-200: #d8dde8;
	--ink-100: #ebeef4;
	--ink-50:  #f4f6fa;

	--field-green: #2e7d4f;

	/* Semantic */
	--bg:            #ffffff;
	--bg-tint:       var(--cream-50);
	--bg-deep:       var(--navy-900);
	--surface:       #ffffff;
	--border:        rgba(11, 23, 48, 0.10);
	--border-strong: rgba(11, 23, 48, 0.18);
	--on-deep:       #ffffff;
	--on-deep-muted: rgba(255, 255, 255, 0.72);
	--on-deep-quiet: rgba(255, 255, 255, 0.55);

	/* Type */
	--font-sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
	--headline-weight: 800;

	/* Spacing scale (linear 4/8/12/16/24/32/48/64/96/128) */
	--sp-1: 4px;
	--sp-2: 8px;
	--sp-3: 12px;
	--sp-4: 16px;
	--sp-5: 24px;
	--sp-6: 32px;
	--sp-7: 48px;
	--sp-8: 64px;
	--sp-9: 96px;
	--sp-10: 128px;

	/* Density */
	--section-y:     96px;
	--container-max: 1200px;
	--container-pad: clamp(20px, 4vw, 40px);

	/* Radii */
	--r-1: 4px;
	--r-2: 8px;
	--r-3: 12px;
	--r-4: 16px;
	--r-5: 24px;

	/* Motion */
	--easing: cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-density="compact"] { --section-y: 72px; }
[data-density="airy"]    { --section-y: 128px; }

/* --- Base type tweaks (scoped to opt-in classes -- body resets stay in
       theme.json so we don't fight the global cascade). Sizing only --
       horizontal alignment is handled by the `__inner` containers that
       wrap v3 pattern content (see `.page-head__inner` / `.um-section-inner`). */
.h-hero    { font-family: var(--font-sans); font-weight: var(--headline-weight); font-size: clamp(44px, 6.4vw, 88px); letter-spacing: -0.028em; line-height: 0.98; color: var(--navy-900); text-wrap: balance; }
.h-page    { font-family: var(--font-sans); font-weight: var(--headline-weight); font-size: clamp(36px, 4.6vw, 60px); letter-spacing: -0.022em; line-height: 1.02; color: var(--navy-900); text-wrap: balance; }
.h-sec     { font-family: var(--font-sans); font-weight: var(--headline-weight); font-size: clamp(28px, 3.2vw, 44px); letter-spacing: -0.018em; line-height: 1.1; color: var(--navy-900); text-wrap: balance; }
.h-card    { font-family: var(--font-sans); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; line-height: 1.2; color: var(--navy-900); }
.h-card-lg { font-family: var(--font-sans); font-weight: 700; font-size: 24px; letter-spacing: -0.012em; line-height: 1.15; color: var(--navy-900); }

.lead {
	font-family: var(--font-sans);
	font-size: clamp(17px, 1.4vw, 19px);
	line-height: 1.5;
	color: var(--ink-700);
	max-width: 62ch;
}
.lead--on-deep { color: var(--on-deep-muted); }

.eyebrow {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--red-600);
	font-weight: 500;
}
.eyebrow--on-deep { color: var(--red-500); }
.eyebrow--muted   { color: var(--ink-500); }

.kicker {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--ink-500);
	letter-spacing: 0.04em;
}

/* --- Container + sections --- */
.container {
	width: 100%;
	max-width: var(--container-max);
	margin: 0 auto;
	padding-left: var(--container-pad);
	padding-right: var(--container-pad);
}
.container-wide { max-width: 1360px; }

.section { padding-block: var(--section-y); }
.section--tint { background: var(--bg-tint); }
.section--deep {
	background: var(--bg-deep);
	color: var(--on-deep);
}
.section--deep h1, .section--deep h2, .section--deep h3, .section--deep h4 { color: var(--on-deep); }
.section--deep p:not(.lead) { color: var(--on-deep-muted); }
.section--deep .lead        { color: var(--on-deep-muted); }

/* --- Button system --- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 20px;
	border-radius: 999px;
	font-family: var(--font-sans);
	font-weight: 600;
	font-size: 15px;
	border: 1px solid transparent;
	transition: transform 0.15s var(--easing), background 0.15s var(--easing),
	            border-color 0.15s var(--easing), color 0.15s var(--easing);
	white-space: nowrap;
	text-decoration: none;
	line-height: 1;
	box-sizing: border-box;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
	background: var(--red-600);
	color: #fff;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 6px 20px -10px rgba(216, 32, 42, 0.6);
}
.btn-primary:hover { background: var(--red-700); color: #fff; }

.btn-outline {
	background: transparent;
	color: var(--navy-900);
	border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--navy-900); background: #fff; }

.btn-outline--on-deep {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.28);
}
.btn-outline--on-deep:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.5);
}

.btn-ghost {
	background: transparent;
	color: var(--navy-900);
	padding: 8px 0;
	border: 0;
}
.btn-ghost .arrow { transition: transform 0.2s var(--easing); display: inline-block; }
.btn-ghost:hover .arrow { transform: translateX(3px); }

.btn-link {
	color: var(--red-600);
	font-weight: 600;
	display: inline;
	border-bottom: 1px solid transparent;
	transition: border-color 0.15s var(--easing);
	text-decoration: none;
}
.btn-link:hover { border-bottom-color: var(--red-600); }
.btn-link .arrow { transition: transform 0.2s var(--easing); display: inline-block; }
.btn-link:hover .arrow { transform: translateX(3px); }
/* Keep CTA arrow glued to its label so the trailing SVG never orphans onto
   its own line. Only links that actually contain a trailing icon flip to
   inline-flex + nowrap; long body-text links (no svg) keep `display: inline`
   so they can still wrap mid-phrase inside paragraph copy. */
a.btn-link:has(> svg:last-child),
a.btn-link:has(> .arrow:last-child) {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	white-space: nowrap;
}
/* Long outbound labels (e.g. "...Federación Española de Disco Volador (FEDV)")
   overflowed at 390px because the inline-flex + nowrap above turned the whole
   link into one unbreakable atom. Under the mobile breakpoint let these links
   wrap mid-label; the trailing icon may drop to the next line but the page no
   longer overflows. */
@media (max-width: 620px) {
	a.btn-link:has(> svg:last-child),
	a.btn-link:has(> .arrow:last-child) {
		display: inline;
		white-space: normal;
		overflow-wrap: anywhere;
		word-break: break-word;
	}
}
/* Any body-copy .btn-link (with or without icon) can break a long unbroken
   URL/label rather than push the viewport. */
.btn-link { overflow-wrap: anywhere; }
/* Generic card-arrow safety net for contexts not covered by .cards-row /
   .activity / .club-pillar specific rules (e.g. /contacto/ pillars). */
.card-arrow {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	white-space: nowrap;
}

.divider {
	height: 1px;
	background: var(--border);
	border: 0;
	margin: 0;
}

/* ---------------------------------------------------------------
   Design picker variants -- applied via `data-neutral` and
   `data-accent` attrs on <html>. Logged-in admins get a picker in
   the admin bar (see um_child_design_picker_* in functions.php);
   ?neutral=warm&accent=orange also works via URL params for share
   links. Default state is no attribute = red accent + light cool
   bg as defined in :root above.
   --------------------------------------------------------------- */

/* Neutral -- shifts page background + tint band warmth */
[data-neutral="warm"] {
	--bg:      var(--cream-50);
	--bg-tint: var(--cream-100);
	--wp--preset--color--paper:     #f7f3ec;
	--wp--preset--color--warm-gray: #efe9de;
}
[data-neutral="cool"] {
	--bg:      #ffffff;
	--bg-tint: #f1f4fa;
	--wp--preset--color--paper:     #ffffff;
	--wp--preset--color--warm-gray: #f1f4fa;
}

/* Accent -- shifts primary action colour (CTAs, links, eyebrows) */
[data-accent="red"] {
	--red-600: #d8202a;
	--red-700: #b91923;
	--red-500: #e63946;
	--red-50:  #fdecee;
	--wp--preset--color--red:          #d8202a;
	--wp--preset--color--red-dark:     #b91923;
	--wp--preset--color--red-light:    #fdecee;
	--wp--preset--color--red-on-navy:  #e63946;
}
[data-accent="orange"] {
	--red-600: #e8590c;
	--red-700: #c1490a;
	--red-500: #fb8500;
	--red-50:  #fdf1e1;
	--wp--preset--color--red:          #e8590c;
	--wp--preset--color--red-dark:     #c1490a;
	--wp--preset--color--red-light:    #fdf1e1;
	--wp--preset--color--red-on-navy:  #fb8500;
}
[data-accent="fuchsia"] {
	--red-600: #c2185b;
	--red-700: #98144a;
	--red-500: #e91e63;
	--red-50:  #fde4eb;
	--wp--preset--color--red:          #c2185b;
	--wp--preset--color--red-dark:     #98144a;
	--wp--preset--color--red-light:    #fde4eb;
	--wp--preset--color--red-on-navy:  #e91e63;
}
[data-accent="amber"] {
	--red-600: #b4651e;
	--red-700: #8a4d16;
	--red-500: #d18837;
	--red-50:  #fbeed8;
	--wp--preset--color--red:          #b4651e;
	--wp--preset--color--red-dark:     #8a4d16;
	--wp--preset--color--red-light:    #fbeed8;
	--wp--preset--color--red-on-navy:  #d18837;
}

/* ---------------------------------------------------------------
   Hero polish -- bring the existing `.um-hero-club` synced pattern
   closer to the prototype hero spec (.h-hero sizing, weight 800,
   pill buttons, mono eyebrow + stat label, larger stat numerals).
   CSS-only override so the synced pattern in wp-admin stays
   editable; Phase 2 will re-author the pattern markup so these
   overrides can drop.
   --------------------------------------------------------------- */
.um-hero-club .wp-block-cover__inner-container > .wp-block-columns {
	gap: var(--sp-7);
}
.um-hero-club h1 {
	font-family: var(--font-sans) !important;
	font-size: clamp(44px, 6.4vw, 88px) !important;
	font-weight: 800 !important;
	letter-spacing: -0.028em !important;
	line-height: 0.98 !important;
}
.um-hero-club > .wp-block-cover__inner-container p.has-red-on-navy-color {
	font-family: var(--font-mono) !important;
	font-size: 11px !important;
	font-weight: 500 !important;
	letter-spacing: 0.16em !important;
	color: var(--red-500) !important;
	text-transform: uppercase;
}
.um-hero-club .um-hero-stats {
	gap: var(--sp-7) !important;
	margin-bottom: var(--sp-7) !important;
}
.um-hero-club .um-hero-stats > .wp-block-group {
	gap: var(--sp-1);
}
.um-hero-club .um-hero-stats > .wp-block-group > p:first-child {
	font-family: var(--font-sans) !important;
	font-size: clamp(36px, 3.4vw, 44px) !important;
	font-weight: 800 !important;
	letter-spacing: -0.018em !important;
	line-height: 1 !important;
}
.um-hero-club .um-hero-stats > .wp-block-group > p:last-child {
	font-family: var(--font-mono) !important;
	font-size: 11px !important;
	letter-spacing: 0.16em !important;
	text-transform: uppercase;
	font-weight: 500 !important;
	color: var(--on-deep-quiet) !important;
}
.um-hero-club .wp-block-button__link {
	border-radius: 999px !important;
	padding: 13px 22px !important;
	font-family: var(--font-sans) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	transition: transform 0.15s var(--easing), background 0.15s var(--easing), border-color 0.15s var(--easing) !important;
}
.um-hero-club .wp-block-button__link:hover { transform: translateY(-1px); }
.um-hero-club .wp-block-button.is-style-outline .wp-block-button__link {
	border-color: rgba(255, 255, 255, 0.28) !important;
	border-width: 1px !important;
}
.um-hero-club .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.08) !important;
	border-color: rgba(255, 255, 255, 0.5) !important;
}

/* ---------------------------------------------------------------
   Phase 2 atoms · PageHeader (.page-head), Statgrid (.statgrid),
   Rules list (.rules). Ported verbatim from
   docs/design_handoff_ultimate_madrid/styles.css. Used by the
   v3 synced patterns `um-page-header-v3`, `um-statgrid-v3`,
   `um-rules-list-v3`.
   --------------------------------------------------------------- */

/* PageHeader -- deep navy hero w/ crumbs + eyebrow + h1 + lead + meta */
.page-head {
	background: var(--navy-900);
	color: var(--on-deep);
	padding-top: 56px;
	padding-bottom: 64px;
	padding-inline: var(--wp--preset--spacing--40);
	position: relative;
	overflow: hidden;
}

/* Inner caps for v3 patterns -- cap content at theme.json wideSize (1200px)
   and center in the viewport. Hero content + body sections now share the
   same horizontal bounds as the nav (which also uses wideSize). The outer
   container (.page-head or `.um-section`) supplies the gutter via
   padding-inline; the inner cap supplies the max-width. Children get
   `margin-left: 0` to defeat WP's `.is-layout-constrained > *` auto-center
   so all elements snap to the inner's left edge regardless of their own
   max-width. */
.page-head__inner,
.um-section-inner {
	width: 100%;
	max-width: var(--wp--style--global--wide-size, 1200px);
	margin-inline: auto;
}
.page-head__inner > *,
.um-section-inner > * {
	margin-left: 0 !important;
	margin-right: 0 !important;
}
.page-head::after {
	content: '';
	position: absolute;
	right: -120px;
	top: -120px;
	width: 360px;
	height: 360px;
	background: radial-gradient(circle at center, rgba(216, 32, 42, 0.18), transparent 65%);
	pointer-events: none;
}
/* Photo hero variant: layers a navy scrim over an action photo so the dark
   hero gains sport/community proof above the fold while the text keeps its
   readable dark treatment. The scrim runs left-heavy (near-opaque behind the
   text column, thinning to the right) so the photo genuinely reads as an
   image instead of a tint. Each page picks its shot via `--ph-img` on a
   `.page-id-N` rule; pages without one get the generic action-shot default. */
.page-head--photo {
	--ph-img: url('/wp-content/uploads/um-photos/accion-de-juego-punta-con-dos-jugadores-saltando.jpg');
	background-image:
		linear-gradient(100deg, rgba(11, 22, 45, 0.95) 0%, rgba(11, 22, 45, 0.86) 45%, rgba(11, 22, 45, 0.45) 100%),
		var(--ph-img);
	background-size: cover;
	background-position: center 32%;
}
.page-id-16 .page-head--photo { --ph-img: url('/wp-content/uploads/um-photos/grupo-escuchando-indicaciones-bajo-focos-en-cocheras-horizontal.jpg'); }
.page-id-13 .page-head--photo { --ph-img: url('/wp-content/uploads/um-photos/clinic-en-patio-de-instituto.jpg'); }
.page-id-11 .page-head--photo { --ph-img: url('/wp-content/uploads/um-photos/plantilla-quijotes-wucc-2026.jpg'); }
.page-id-15 .page-head--photo { --ph-img: url('/wp-content/uploads/um-photos/equipo-en-circulo-manos-al-centro.jpg'); }
.page-id-97 .page-head--photo { --ph-img: url('/wp-content/uploads/um-photos/accion-de-juego-en-estadio.jpg'); }
.page-id-324 .page-head--photo { --ph-img: url('/wp-content/uploads/um-photos/accion-de-juego-bid-de-un-cutter.jpg'); }
.page-id-14 .page-head--photo { --ph-img: url('/wp-content/uploads/um-photos/celebracion-tras-anotar.jpg'); }
.page-id-842 .page-head--photo { --ph-img: url('/wp-content/uploads/um-photos/equipo-femenino-tras-un-punto.jpg'); }
/* Gap pass (2026-07-03): 5 pages were missing the photo hero entirely
   (no page-head--photo class in content). que-hacemos + en get their own
   shot; prensa reuses el-club's WUCC plantilla (on-topic, prensa is
   entirely about the WUCC squad); materiales reuses aprende's hub shot
   since it's a child page of /aprende/ -- sharing across a section's
   subpages is intentional, not a gap. */
.page-id-12 .page-head--photo { --ph-img: url('/wp-content/uploads/um-photos/circulo-de-calentamiento-al-inicio-del-entrenamiento.jpg'); }
.page-id-99 .page-head--photo { --ph-img: url('/wp-content/uploads/um-photos/equipo-en-el-cerro-de-las-cabezas.jpg'); }
.page-id-158 .page-head--photo { --ph-img: url('/wp-content/uploads/um-photos/plantilla-quijotes-wucc-2026.jpg'); }
.page-id-444 .page-head--photo { --ph-img: url('/wp-content/uploads/um-photos/layout-en-partido-final-ceu-2025.jpg'); }
.page-id-790 .page-head--photo { --ph-img: url('/wp-content/uploads/um-photos/accion-de-juego-bid-de-un-cutter.jpg'); }
/* Palmarés + historia (2026-07-14). Keyed to a modifier the generator emits,
   not to .page-id-N like the rules above: these pages are created per
   environment by scripts/phase3-build-*.php, so the DB hands out a different
   post ID on local, beta and prod, and an ID-keyed rule would match in exactly
   one of them. The older pages can use IDs safely because they were migrated
   wholesale and kept theirs.
   Palmarés takes the CEU 2025 final, the championship it is a record of;
   historia reuses el-club's Casa de Campo shot from 2000, the oldest photo we
   have and the one the headline lands on. */
.page-head--palmares { --ph-img: url('/wp-content/uploads/um-photos/layout-en-partido-final-ceu-2025.jpg'); }
.page-head--historia { --ph-img: url('/wp-content/uploads/um-photos/quijotes-casa-de-campo-2000-historia.jpg'); }
.page-head h1, .page-head h2, .page-head h3, .page-head h4 { color: var(--on-deep); }
/* Exclude .eyebrow + .crumbs from the muted-paragraph sweep so their own
   colour rules (red eyebrow, mono-quiet crumbs) survive specificity. */
.page-head p:not(.lead):not(.eyebrow):not(.crumbs):not(.page-meta) { color: var(--on-deep-muted); }

.page-head .eyebrow {
	display: block;
	color: var(--red-500);
	margin-bottom: 12px;
	max-width: 62ch;
}
.page-head h1 { margin-bottom: 16px; }
.page-head .lead { color: var(--on-deep-muted); max-width: 60ch; }
.page-head .crumbs { max-width: 75ch; flex-wrap: nowrap; white-space: nowrap; }
/* No max-width on page-meta -- short items + icons need the full inner
   width so they don't wrap to two rows on desktop. */
/* Long trails (the three /aprende/ entrenamiento guides run 4 levels deep)
   overflow a 390px viewport when forced onto one line; let them wrap on
   small screens instead. */
@media (max-width: 560px) {
	.page-head .crumbs { flex-wrap: wrap; white-space: normal; row-gap: 4px; }
}

.crumbs {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--on-deep-quiet);
	margin-bottom: 12px;
	flex-wrap: wrap;
}
.crumbs a { color: var(--on-deep-muted); transition: color 0.15s var(--easing); text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs em { font-style: normal; color: var(--on-deep-quiet); }
.crumbs__sep { color: var(--on-deep-quiet); opacity: 0.6; }

/* Page-updated -- "Última actualización" line injected under each page H1 by
   um_child_inject_page_updated() in functions.php. Same mono-uppercase voice
   as .crumbs / .eyebrow so it reads as part of the page-head meta cluster. */
/* Hidden visually but left in the DOM so Rank Math can still read the
   dateModified into Article JSON-LD. Most pages change rarely enough that
   a visible "last updated" label reads as churny and over-promises freshness.
   Toggle back on by removing display:none. */
.page-head .page-updated,
.page-updated {
	display: none;
}

.page-meta {
	margin-top: 28px;
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding-top: 24px;
}
.page-meta__item {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 0 28px 0 0;
	margin-right: 28px;
	border-right: 1px solid rgba(255, 255, 255, 0.12);
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--on-deep-muted);
}
.page-meta__item:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.page-meta__item b {
	color: #fff;
	font-family: var(--font-sans);
	font-weight: 700;
	font-size: 15px;
	letter-spacing: -0.01em;
}
/* Inline v3 SVG icons -- `!important` here beats the legacy
   `.entry-content svg[viewbox]:not(.um-icon):not(.um-inline-icon)`
   `width: 100%` rule further down in this file (specificity 0,3,1) that
   stretches "naked" SVGs to container width for AI-generated diagrams. */
.page-meta__item svg {
	width: 16px !important;
	height: 16px !important;
	stroke: var(--on-deep-quiet);
	stroke-width: 1.6;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex-shrink: 0;
	position: relative;
	top: 2px;
}
.btn-link svg,
.btn svg,
.card-arrow svg {
	width: 14px !important;
	height: 14px !important;
	stroke: currentColor;
	stroke-width: 1.6;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex-shrink: 0;
	vertical-align: -2px;
	margin-left: 4px;
}
.btn svg { width: 16px !important; height: 16px !important; }

/* Statgrid -- 4-up stat cluster w/ vertical dividers + big numerals */
.statgrid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
	margin-top: 32px;
}
/* WP's `is-layout-flow > *` adds `margin-block-start: 1.2rem` to all items
   after the first, which in a grid context shifts items 2-4 visually down
   by ~19px. Force margin-top:0 on all grid items so vertical alignment
   matches the prototype. */
.statgrid > .statgrid__item {
	margin-top: 0 !important;
	margin-block-start: 0 !important;
}
.statgrid__item {
	padding: 8px 0;
	border-right: 1px solid var(--border);
	padding-right: 24px;
}
.statgrid__item + .statgrid__item { padding-left: 24px; }
.statgrid__item:last-child { border-right: 0; }
.statgrid__n {
	font-size: clamp(36px, 3.6vw, 52px);
	font-weight: 800;
	letter-spacing: -0.025em;
	color: var(--red-600);
	line-height: 1;
	margin-bottom: 8px;
	font-variant-numeric: tabular-nums;
}
.statgrid__l {
	font-family: var(--font-mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--ink-500);
}

/* Statgrid -- on-deep variant (white numerals, dim dividers, tight) */
.section--deep .statgrid,
.page-head .statgrid { margin-top: 16px; }
.section--deep .statgrid__item,
.page-head .statgrid__item {
	border-right-color: rgba(255, 255, 255, 0.12);
	padding-top: 0;
	padding-bottom: 0;
}
.section--deep .statgrid__n,
.page-head .statgrid__n {
	color: #fff !important;
	font-size: clamp(28px, 2.6vw, 38px) !important;
	margin-bottom: 6px;
}
.section--deep .statgrid__l,
.page-head .statgrid__l { color: var(--on-deep-quiet); }

/* Adjacent v3 page sections flush together -- kill the WP layout-flow
   1.2rem margin between siblings so navy → tint runs edge-to-edge with
   no white sliver between them. */
.um-section + .um-section,
.section + .section,
.section + .um-section,
.um-section + .section { margin-top: 0 !important; }

/* Rules list -- numbered red circle counter (CSS counter, not span) +
   bold "b" + body. Pattern markup stays as a clean core/list so editors
   can add/remove items without touching markup details. */
.rules {
	padding-left: 0;
	list-style: none;
	border-top: 1px solid var(--border);
	margin: 32px 0;
	counter-reset: um-rules-counter;
}
.rules li {
	list-style: none;
	position: relative;
	padding: 16px 0 16px 44px;
	border-bottom: 1px solid var(--border);
	margin: 0;
	counter-increment: um-rules-counter;
	color: var(--ink-700);
	line-height: 1.55;
}
.rules li::before {
	content: counter(um-rules-counter);
	position: absolute;
	left: 0;
	top: 17px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--red-600);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 600;
}
/* Counter stays IN-FLOW at the parent's content edge -- no negative
   outdent. Body text is offset 44px from the counter (28px circle + 16px
   gap). The body indent reads as a standard numbered-list pattern and
   keeps the red dot inside the content area at all viewports. */
.rules li b { color: var(--navy-900); font-weight: 700; }
.rules--quiet { border-top: 0; }
.rules--quiet li { padding: 10px 0 10px 44px; }
.rules--quiet li:last-child { border-bottom: 0; }

/* Desktop: vertically center the red counter dot with its row content.
   Mobile keeps the original top-aligned 17px offset so multi-line items
   don't pull the dot off the first line at narrow widths. */
@media (min-width: 761px) {
	.rules li::before {
		top: 50%;
		transform: translateY(-50%);
	}
}

/* Responsive collapse -- mirror prototype @ 760px */
@media (max-width: 760px) {
	.statgrid { grid-template-columns: 1fr 1fr; gap: 12px 0; }
	/* In a 2-up grid the first column (items 1 + 3) must drop its
	   padding-left so its content aligns with the parent's left gutter.
	   `+ selector` only inspects DOM order, not grid row breaks, so use
	   nth-child(odd/even) to address the column position explicitly. */
	.statgrid__item { padding: 16px 16px 16px 0; }
	.statgrid__item:nth-child(odd) {
		border-right: 1px solid var(--border);
		padding-left: 0;
	}
	.statgrid__item:nth-child(even) {
		border-right: 0;
		padding-left: 16px;
	}
	.statgrid__item:nth-child(3), .statgrid__item:nth-child(4) {
		border-top: 1px solid var(--border);
		padding-top: 16px;
	}
	.page-meta { gap: 12px 0; }
	.page-meta__item { padding-right: 16px; margin-right: 16px; }
}

/* ---------------------------------------------------------------
   Phase 2 · Slice 2 atoms · Event strip (.event-strip / .event),
   Spirit callout (.spirit), Activity grid (.activity-grid /
   .activity). Used by the v3 synced patterns `um-event-strip-v3`,
   `um-spirit-callout-v3`, `um-activity-grid-v3`.
   --------------------------------------------------------------- */

/* Event strip -- 2-up grid of upcoming session cards */
.event-strip {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-top: 32px;
}
.event {
	display: grid;
	grid-template-columns: 96px 1fr auto;
	align-items: center;
	gap: 24px;
	padding: 22px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-3);
}
.event__date {
	text-align: center;
	border-right: 1px solid var(--border);
	padding-right: 18px;
}
.event__date__day {
	font-family: var(--font-sans);
	font-size: 32px;
	font-weight: 800;
	line-height: 1;
	color: var(--navy-900);
	letter-spacing: -0.02em;
}
.event__date__mo {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-500);
	margin-top: 4px;
}
.event__meta { min-width: 0; }
.event__tag {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--red-600);
	margin-bottom: 6px;
}
.event__title {
	font-family: var(--font-sans);
	font-weight: 700;
	color: var(--navy-900);
	margin-bottom: 4px;
}
.event__where {
	font-size: 13px;
	color: var(--ink-500);
}

/* Spirit callout -- cream-bg call-out with navy icon chip + quote */
.spirit {
	background: var(--cream-50);
	border-radius: var(--r-4);
	padding: 48px;
	border: 1px solid var(--cream-200);
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 36px;
	align-items: center;
}
.spirit__icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--navy-900);
	color: var(--red-500);
	display: grid;
	place-items: center;
	font-size: 28px;
	flex-shrink: 0;
}
.spirit__quote {
	font-family: var(--font-sans);
	font-size: clamp(20px, 1.8vw, 26px);
	font-weight: 600;
	letter-spacing: -0.012em;
	line-height: 1.3;
	color: var(--navy-900);
	margin-bottom: 12px;
}

/* Activity grid -- 3-up card grid w/ image + tag + title + body */
.activity-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}
.activity {
	border: 1px solid var(--border);
	border-radius: var(--r-3);
	overflow: hidden;
	background: var(--surface);
	display: flex;
	flex-direction: column;
	transition: transform 0.2s var(--easing), box-shadow 0.2s var(--easing), border-color 0.15s var(--easing);
	text-decoration: none !important;
	color: var(--ink-700) !important;
}
.activity:hover {
	transform: translateY(-3px);
	box-shadow: 0 18px 50px -24px rgba(11, 23, 48, 0.18);
	border-color: var(--border-strong);
}
.activity__img {
	aspect-ratio: 16 / 10;
	border-radius: 0;
	background-color: var(--ink-50);
	margin: 0;
}
.activity__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.activity__body {
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}
.activity__tag {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--red-600);
}
.activity h3 {
	font-family: var(--font-sans);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.012em;
	line-height: 1.2;
	color: var(--navy-900);
	margin: 0;
}
.activity p {
	font-size: 14px;
	margin: 0;
	color: var(--ink-700);
}
.activity .card-arrow {
	color: var(--red-600) !important;
	font-weight: 700;
	margin-top: auto;
	padding-top: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}
.activity .card-arrow svg {
	width: 14px !important;
	height: 14px !important;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Defeat WP `:root :where(.is-layout-flow) > * { margin-block-start: 1.2rem }`
   inside v3 grid/flex atoms. The atom's own `gap` already controls internal
   rhythm, so the layout-flow margin compounds with it and produces uneven
   first-card heights + tag/title gap drift at different viewport widths. */
.event > *,
.event-strip > *,
.event__meta > *,
.spirit > *,
.spirit > * > *,
.activity > *,
.activity__body > *,
.activity-grid > * {
	margin-top: 0 !important;
	margin-block-start: 0 !important;
}

/* Event button -- WP outputs a wp-block-button OUTER div + a
   wp-block-button__link INNER anchor. The pattern markup only carries a
   className on the outer (no way to put one on the anchor through block
   attrs), so the existing `.btn` / `.btn-outline` rules style the outer
   wrapper while the inner anchor keeps theme.json's default red button.
   That stack reads as a round outline floating outside the button. Scope
   the button look to the inner anchor and neutralise the outer wrapper. */
/* Selector chained through `.entry-content` + `.wp-block-button` so it
   out-specifies the legacy `.entry-content .wp-block-button:not(.is-style-outline)
   > .wp-block-button__link` rule (further down in this file) that pins
   padding + radius. Both rules use `!important`; specificity is the only
   tiebreaker. */
.event .wp-block-button { background: transparent; }
/* `.event.event` doubles the class for +1 specificity over the legacy
   `.entry-content .wp-block-button:not(.is-style-outline) > .wp-block-button__link`
   rule (both rules use `!important`; source order has legacy later in
   this file, so we need higher specificity to win). Apuntarme = red CTA
   pill with a soft red glow shadow. */
.entry-content .event.event .wp-block-button > .wp-block-button__link {
	background: var(--red-600) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 999px !important;
	padding: 9px 18px !important;
	font-family: var(--font-sans) !important;
	font-weight: 600 !important;
	font-size: 13px !important;
	letter-spacing: 0.01em !important;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 6px 20px -10px rgba(216, 32, 42, 0.6) !important;
	transition: background 0.15s var(--easing), transform 0.15s var(--easing), box-shadow 0.15s var(--easing) !important;
}
.entry-content .event.event .wp-block-button > .wp-block-button__link:hover {
	background: var(--red-700) !important;
	transform: translateY(-1px);
	box-shadow: 0 2px 0 rgba(0, 0, 0, 0.04), 0 10px 28px -10px rgba(216, 32, 42, 0.7) !important;
}

/* Event meta -- tighten paragraph rhythm so eyebrow/title/where read as a
   single cluster instead of three separately-spaced lines. */
.event__tag { margin-bottom: 4px; }
.event__title { margin-bottom: 2px; }

/* Activity body layout:
     image → eyebrow → title → body stack at the TOP (fixed positions
     across all cards in the grid row); the red CTA link is pinned to
     the BOTTOM via `margin-top: auto`. Cards equalize via the grid's
     `align-items: stretch`, so any leftover height pools BETWEEN the
     body text and the CTA, never between the title and the body. */
.activity__body { gap: 0; }
.activity__body > .activity__tag { margin: 0 0 6px !important; }
.activity__body > h3 { margin: 0 0 10px !important; }
.activity__body > p { margin: 0 !important; }
.activity__body > .activity__cta { margin: auto 0 0 !important; padding-top: 12px; }
.activity__cta .btn-link { font-size: 14px; }
.activity__cta .btn-link .arrow { margin-left: 4px; }

/* Slice 2 responsive collapses -- mirror prototype @ 1024 and 760 */
@media (max-width: 1024px) {
	.activity-grid { grid-template-columns: 1fr 1fr; }
	.activity-grid > .activity:last-child { grid-column: span 2; }
	.activity-grid > .activity:last-child .activity__img { aspect-ratio: 24 / 9; }
	/* Event-strip 2-up doesn't have room for the 96+content+auto button
	   layout once cards drop below ~600px. Collapse to a single column
	   from 1024 down so each card has full content width. */
	.event-strip { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
	.event-strip { grid-template-columns: 1fr; }
	.event { grid-template-columns: 64px 1fr; gap: 16px; padding: 18px; }
	/* Apuntarme button spans the full card width on mobile so its label
	   doesn't squeeze into a vertical strip in the auto-sized third grid
	   column. Mirror prototype's `.event > .btn { grid-column: span 2 }`. */
	.event > .wp-block-buttons { grid-column: 1 / -1; justify-self: stretch; }
	.event > .wp-block-buttons .wp-block-button,
	.event > .wp-block-buttons .wp-block-button .wp-block-button__link { width: 100%; }
	.entry-content .event.event > .wp-block-buttons .wp-block-button > .wp-block-button__link {
		display: block !important;
		text-align: center !important;
		padding: 12px 18px !important;
	}
	.activity-grid { grid-template-columns: 1fr; }
	.activity-grid > .activity:last-child { grid-column: auto; }
	.activity-grid > .activity:last-child .activity__img { aspect-ratio: 16 / 10; }
	.spirit { grid-template-columns: 1fr; padding: 32px; gap: 20px; text-align: left; }
}
@media (max-width: 480px) {
	.spirit { padding: 24px; }
}

/* ---------------------------------------------------------------
   Phase 2 · Slice 3 atoms · CTA band (.cta-band / .cta-band--deep),
   Sidebar TOC (.toc), Side card (.side-card / .side-card--deep),
   Factbox (.factbox). Used by v3 synced patterns
   `um-cta-band-v3`, `um-side-card-v3`, `um-sidebar-toc-v3`.
   --------------------------------------------------------------- */

/* CTA band -- light tint by default, navy deep variant */
.cta-band {
	background: var(--bg-tint);
	border-radius: var(--r-4);
	padding: 56px;
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 32px;
	border: 1px solid var(--border);
	margin-top: 32px;
}
.cta-band h2 {
	font-family: var(--font-sans);
	font-size: clamp(28px, 3vw, 40px);
	font-weight: 800;
	letter-spacing: -0.018em;
	line-height: 1.1;
	color: var(--navy-900);
	margin: 0 0 8px;
}
.cta-band p {
	color: var(--ink-700);
	margin: 0;
	max-width: 60ch;
}
.cta-band--deep {
	background: var(--navy-900);
	color: #fff;
	border-color: transparent;
	padding: 40px;
}
.cta-band--deep h2,
.cta-band--deep h3 {
	color: #fff;
	margin: 0 0 6px;
}
.cta-band--deep p { color: var(--on-deep-muted); }

/* Defeat WP layout-flow margin compounding inside cta-band cells */
.cta-band > * { margin-top: 0 !important; margin-block-start: 0 !important; }

/* CTA band button -- pill CTA, scoped via `.cta-band.cta-band` specificity
   to beat the legacy `.entry-content .wp-block-button:not(.is-style-outline)`
   !important rule further down in this file. */
.entry-content .cta-band.cta-band .wp-block-button > .wp-block-button__link {
	background: var(--red-600) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 999px !important;
	padding: 12px 24px !important;
	font-family: var(--font-sans) !important;
	font-weight: 600 !important;
	font-size: 15px !important;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 6px 20px -10px rgba(216, 32, 42, 0.6) !important;
	transition: background 0.15s var(--easing), transform 0.15s var(--easing), box-shadow 0.15s var(--easing) !important;
}
.entry-content .cta-band.cta-band .wp-block-button > .wp-block-button__link:hover {
	background: var(--red-700) !important;
	transform: translateY(-1px);
}
.entry-content .cta-band--deep.cta-band--deep .wp-block-button > .wp-block-button__link {
	background: #fff !important;
	color: var(--navy-900) !important;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 6px 20px -10px rgba(0, 0, 0, 0.4) !important;
}
.entry-content .cta-band--deep.cta-band--deep .wp-block-button > .wp-block-button__link:hover {
	background: var(--cream-50) !important;
}

/* Side cards (sidebar tiles) -- light by default, navy deep variant */
.side-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-3);
	padding: 22px;
}
.side-card--deep {
	background: var(--navy-900);
	color: var(--on-deep);
	border-color: transparent;
}
.side-card--deep p { color: var(--on-deep-muted); }
.side-card > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.side-card h4 {
	font-family: var(--font-sans);
	font-size: 16px;
	font-weight: 700;
	margin: 0 0 10px;
	color: var(--navy-900);
}
.side-card--deep h4 { color: #fff; }
.side-card p { font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
.side-card p:last-child { margin-bottom: 0; }
.entry-content .side-card.side-card .wp-block-button { width: 100%; }
.entry-content .side-card.side-card .wp-block-button > .wp-block-button__link {
	background: var(--red-600) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 999px !important;
	padding: 10px 16px !important;
	font-family: var(--font-sans) !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	width: 100% !important;
	text-align: center !important;
	display: block !important;
}
.entry-content .side-card.side-card .wp-block-button > .wp-block-button__link:hover {
	background: var(--red-700) !important;
}
.entry-content .side-card--deep.side-card--deep .wp-block-button > .wp-block-button__link {
	background: #fff !important;
	color: var(--navy-900) !important;
}

/* Sidebar TOC -- mono throughout (eyebrow + link labels + index numbers) */
.toc { font-size: 14px; font-family: var(--font-mono); }
.toc__lbl {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-500);
	margin: 0 0 14px;
	font-weight: 500;
}
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li {
	padding: 7px 0;
	border-bottom: 1px dashed var(--border);
	list-style: none;
	margin: 0;
}
.toc li:last-child { border-bottom: 0; padding-bottom: 0; }
.toc a {
	color: var(--ink-400);
	transition: color 0.15s var(--easing);
	display: flex;
	justify-content: space-between;
	align-items: center;
	text-decoration: none;
}
.toc a:hover { color: var(--navy-900); }
.toc a > span {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--ink-400);
}

/* Factbox -- cream-bg metrics card (sidebar element) */
.factbox {
	background: var(--cream-50);
	border-radius: var(--r-3);
	padding: 22px;
	border: 1px solid var(--cream-200);
}
.factbox > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.factbox h4 {
	font-family: var(--font-sans);
	font-size: 16px;
	font-weight: 700;
	color: var(--navy-900);
	margin: 0;
}
.factbox__rows { display: flex; flex-direction: column; gap: 12px; margin-top: 14px !important; }
.factbox__rows > div {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 14px;
	color: var(--ink-700);
	padding-bottom: 12px;
	border-bottom: 1px solid var(--cream-200);
}
.factbox__rows > div:last-child { border-bottom: 0; padding-bottom: 0; }
.factbox__rows b {
	color: var(--red-600);
	font-size: 18px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

/* Factbox -- navy variant. Pair with .side-card--deep on sidebar tiles. */
.factbox--deep,
.side-card--deep.factbox {
	background: var(--navy-900);
	color: var(--on-deep-muted);
	border-color: transparent;
}
.factbox--deep h4,
.side-card--deep.factbox h4 { color: #fff; }
.factbox--deep .factbox__rows > div,
.side-card--deep.factbox .factbox__rows > div {
	border-bottom-color: rgba(255, 255, 255, 0.12);
	color: var(--on-deep-muted);
}
.factbox--deep .factbox__rows b,
.side-card--deep.factbox .factbox__rows b { color: #fff; }
.side-card--deep.factbox p { color: var(--on-deep-muted); }

/* Single-paragraph factbox -- zero the bottom margin on the lone <p> so
   container padding stays symmetric (default p has margin-bottom: 0.9em
   that shows as visible asymmetry inside a single-child factbox). */
.factbox > p:only-child { margin: 0; }

/* #proximos event row is an inline grid (96px 1fr auto): the fixed date
   column + non-shrinking auto button column overflowed 390px viewports.
   Stack to a single column under 620px so the CTA drops below the copy. */
@media (max-width: 620px) {
	#proximos > div[style*="grid"] {
		grid-template-columns: 1fr !important;
		gap: 14px !important;
	}
	#proximos .event__date { border-right: 0 !important; padding-right: 0 !important; }
}

/* Inline icon span inside .factbox prose. Constrain SVG to a sane size
   so it doesn't pick up the legacy .entry-content svg width: 100% rule. */
.factbox__icon { display: inline-flex; align-items: center; vertical-align: middle; }
.factbox__icon svg {
	width: 16px !important;
	height: 16px !important;
	stroke: var(--red-600);
	stroke-width: 2;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* With-sidebar layout -- main column + 320px sticky right rail */
.with-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 80px;
	align-items: start;
}
.with-sidebar__main { min-width: 0; }
.with-sidebar > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.sidebar {
	position: sticky;
	top: 92px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.sidebar > * { margin-top: 0 !important; margin-block-start: 0 !important; }

/* Slice 3 responsive collapses */
@media (max-width: 960px) {
	.with-sidebar { grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; }
}
/* Collapse the main + sidebar rail to one column earlier (was 760px). At
   768px the 2-col split left the main column ~373px and the rail ~280px,
   both too cramped; single-column at/below 899px keeps tablets readable. */
@media (max-width: 899px) {
	.with-sidebar { grid-template-columns: 1fr; gap: 40px; }
	.sidebar { position: static; }
}
@media (max-width: 760px) {
	.cta-band { grid-template-columns: 1fr; padding: 32px; gap: 20px; }
	.cta-band--deep { padding: 28px; }
}
@media (max-width: 480px) {
	.cta-band { padding: 24px; }
}

/* Cocheras media pair (photo + locator map) on /donde-jugar/. Grid is
   inline-styled (1.4fr 1fr); its children lacked min-width:0, so the fixed
   min-height images kept their intrinsic width and pushed the page past the
   viewport (~602px at 390px). Release the children and stack under 620px. */
.cocheras-media > * { min-width: 0; max-width: 100%; }
@media (max-width: 620px) {
	.cocheras-media { grid-template-columns: 1fr !important; }
	/* inline aspect-ratio + min-height:280px forces an intrinsic width
	   (~448px) wider than the stacked column; drop the min-height so the
	   child sizes from its (now full-width) box instead. */
	.cocheras-media > * { min-height: 0 !important; }
}

/* ---------------------------------------------------------------
   Phase 2 · Slice 4 atoms ·
     Section head (.sec-head / .sec-head--center) utility
     Press-stats (.press-stats) 5-up metrics band
     Team cards (.teams-grid / .team-card) 3-up profile cards
     Club pillars (.club-pillars / .club-pillar) 3-up icon + text
     Footer wordmark (.footer-wordmark) giant signoff
     Factbox (.factbox) sidebar metrics card -- CSS lives in slice 3
   Used by v3 synced patterns
   `um-press-stats-v3`, `um-team-cards-v3`, `um-club-pillars-v3`,
   `um-footer-wordmark-v3`, `um-factbox-v3`.
   --------------------------------------------------------------- */

/* Section head -- wraps the eyebrow / h2 / lead cluster that sits above
   every section. Caps width for readability + adds vertical rhythm. */
.sec-head { margin-bottom: 40px; max-width: 70ch; }
.sec-head--center { margin-left: auto !important; margin-right: auto !important; text-align: center; }
.sec-head > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.sec-head h2 { margin: 10px 0 0; }
.sec-head .lead { margin: 14px 0 0 !important; }
.sec-head--center .lead { margin-left: auto !important; margin-right: auto !important; }

/* Press-stats -- 5-up metrics row w/ vertical dividers, centered numerals */
.press-stats {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 0;
	margin-top: 40px;
	padding: 28px 0;
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}
.press-stats > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.press-stats__item {
	padding: 0 16px;
	text-align: center;
	border-right: 1px solid var(--border);
}
.press-stats__item:last-child { border-right: 0; }
.press-stats__item > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.press-stats__n {
	font-family: var(--font-sans);
	font-size: clamp(32px, 3.4vw, 48px);
	font-weight: 800;
	letter-spacing: -0.025em;
	color: var(--red-600);
	line-height: 1;
	font-variant-numeric: tabular-nums;
}
.press-stats__l {
	margin-top: 8px !important;
	font-family: var(--font-mono);
	font-size: 10.5px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-500);
}

/* Team cards -- 3-up profile cards (Competir) */
.teams-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin-top: 32px;
}
.teams-grid > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.team-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-3);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color 0.15s var(--easing), transform 0.15s var(--easing), box-shadow 0.15s var(--easing);
}
.team-card:hover {
	border-color: var(--border-strong);
	transform: translateY(-3px);
	box-shadow: 0 18px 50px -24px rgba(11, 23, 48, 0.18);
}
.team-card > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.team-card__img {
	aspect-ratio: 4 / 5;
	background-color: var(--ink-50);
	margin: 0;
}
.team-card__body {
	padding: 28px;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0;
}
.team-card__body > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.team-card__tag {
	align-self: flex-start;
	font-family: var(--font-mono) !important;
	font-size: 10px !important;
	letter-spacing: 0.14em !important;
	text-transform: uppercase;
	color: var(--red-600) !important;
	padding: 4px 9px !important;
	background: var(--red-50) !important;
	border-radius: 999px !important;
	font-weight: 500 !important;
	margin: 0 0 12px !important;
	line-height: 1.4 !important;
}
.team-card h3 {
	font-family: var(--font-sans);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.012em;
	color: var(--navy-900);
	margin: 0 0 8px !important;
}
.team-card p { font-size: 14px; color: var(--ink-700); margin: 0; }
.team-card__cta { margin: auto 0 0 !important; padding-top: 12px; }
.team-card__cta .btn-link { font-size: 14px; }
.team-card__cta .btn-link .arrow { margin-left: 4px; }

/* Club pillars -- 3-up icon + bold + body + arrow link */
.club-pillars {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-top: 32px;
}
.club-pillars > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.club-pillar {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-3);
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	transition: border-color 0.15s var(--easing), transform 0.15s var(--easing), box-shadow 0.15s var(--easing);
}
.club-pillar:hover {
	border-color: var(--border-strong);
	transform: translateY(-2px);
	box-shadow: 0 18px 50px -24px rgba(11, 23, 48, 0.18);
}
.club-pillar > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.club-pillar__icon {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--red-50) !important;
	color: var(--red-600) !important;
	display: grid !important;
	place-items: center;
	margin-bottom: 4px;
	font-size: 18px !important;
	font-weight: 800 !important;
	line-height: 1 !important;
}
.club-pillar__icon svg {
	width: 20px !important;
	height: 20px !important;
	stroke: var(--red-600);
	stroke-width: 2;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.spirit__icon svg {
	width: 32px !important;
	height: 32px !important;
	stroke: var(--red-500);
	stroke-width: 2;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.initi-card__row .initi-card__icon svg {
	width: 14px !important;
	height: 14px !important;
	stroke: var(--red-600);
	stroke-width: 2;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: -2px;
}
.initi-card__row .initi-card__icon { display: inline-flex; align-items: center; justify-content: center; }
.club-pillar b {
	font-family: var(--font-sans);
	font-size: 18px;
	color: var(--navy-900);
	font-weight: 700;
	letter-spacing: -0.01em;
}
.club-pillar p { font-size: 14px; color: var(--ink-700); margin: 0; }
/* CTA paragraph wraps a .card-arrow / .btn-link anchor; the WRAPPER (the
   <p>) must carry `margin-top: auto` because it's the direct child of
   the `.club-pillar` flex column. The anchor's own margin-top: auto
   wouldn't push because the <p> stays in normal flow above it. */
.club-pillar__cta { margin: auto 0 0 !important; padding-top: 4px; }
.club-pillar .card-arrow,
.club-pillar .btn-link {
	color: var(--red-600);
	font-weight: 600;
	font-size: 14px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	white-space: nowrap;
}

/* Footer wordmark -- giant condensed signoff w/ red dot separator */
.footer-wordmark {
	margin-top: 64px;
	display: flex;
	align-items: center;
	gap: clamp(16px, 3vw, 36px);
	width: 100%;
	color: rgba(255, 255, 255, 0.08);
	font-family: var(--font-sans);
	font-weight: 900;
	font-size: clamp(56px, 14vw, 200px);
	line-height: 0.82;
	letter-spacing: -0.04em;
	font-stretch: condensed;
	text-transform: uppercase;
	white-space: nowrap;
	user-select: none;
	pointer-events: none;
	justify-content: space-between;
	overflow: hidden;
}
.footer-wordmark__dot {
	flex: 0 0 auto;
	width: clamp(10px, 1.4vw, 22px);
	height: clamp(10px, 1.4vw, 22px);
	border-radius: 50%;
	background: var(--red-600);
	opacity: 0.55;
}
.footer-wordmark > span:not(.footer-wordmark__dot) { flex: 0 0 auto; }

/* Factbox pattern is styled in slice-3 atoms above. */

/* Slice 4 responsive collapses */
@media (max-width: 1024px) {
	.teams-grid { grid-template-columns: 1fr 1fr; }
	.teams-grid > .team-card:nth-child(3) { grid-column: 1 / -1; }
	.teams-grid > .team-card:nth-child(3) .team-card__img { aspect-ratio: 21/9 !important; }
	.club-pillars { grid-template-columns: 1fr 1fr; }
	.press-stats { grid-template-columns: repeat(5, 1fr); gap: 8px 0; }
	.press-stats__item { padding: 0 8px; }
}
@media (max-width: 760px) {
	.teams-grid { grid-template-columns: 1fr; gap: 16px; }
	.teams-grid > .team-card:nth-child(3) { grid-column: auto; }
	.teams-grid > .team-card:nth-child(3) .team-card__img { aspect-ratio: 16/10 !important; }
	.club-pillars { grid-template-columns: 1fr; }
	/* Tighten the container's vertical padding on mobile -- the 28px top/bottom
	   from the desktop rule plus each item's 16px top padding gives 44px of
	   air above/below the first/last numerals, which read as too generous on
	   a narrow viewport. */
	.press-stats {
		grid-template-columns: 1fr 1fr;
		padding: 8px 0;
	}
	.press-stats__item {
		padding: 12px 8px;
		border-right: 0;
		border-bottom: 1px solid var(--border);
	}
	.press-stats__item:nth-child(odd) { border-right: 1px solid var(--border); }
	.press-stats__item:nth-child(even) { border-right: 0; }
	.press-stats__item:last-child {
		border-bottom: 0;
		grid-column: span 2;
		border-right: 0;
	}
}

/* ---------------------------------------------------------------
   Phase 2 · Slice 5 atoms ·
     Activity stack (.activity-stack / .activity-row) -- stacked
       1-up rows with optional red accent rail
     Initi-card (.initi-grid / .initi-card) -- iniciación
       convocatoria cards w/ red side rail + meta rows
     Timeline (.timeline / .timeline__row / .timeline__dot)
       -- dashed-border year list
     Sponsor tiers (.tiers / .tiers__row + --basic / --escolar /
       --premium variants) -- colaboraciones table
     Glossary entry (.glossary-list / .glossary-entry / .glossary-tag
       + --en / --es variants) -- 2-col definition list
   Used by v3 synced patterns
   `um-activity-stack-v3`, `um-initi-cards-v3`, `um-timeline-v3`,
   `um-sponsor-tiers-v3`, `um-glossary-entries-v3`.
   --------------------------------------------------------------- */

/* Activity stack -- vertical 1-up rows w/ optional left red rail */
.activity-stack {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 24px;
}
.activity-stack > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.activity-row {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-3);
	padding: 24px;
	position: relative;
}
.activity-row > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.activity-row--accent::before {
	content: '';
	position: absolute;
	left: 0;
	top: 24px;
	bottom: 24px;
	width: 3px;
	background: var(--red-600);
	border-radius: 0 3px 3px 0;
}
.activity-row__tag {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--red-600);
	font-weight: 600;
	display: block;
	margin: 0 !important;
}
.activity-row__t {
	font-family: var(--font-sans);
	font-size: 22px;
	font-weight: 700;
	color: var(--navy-900);
	letter-spacing: -0.012em;
	margin: 8px 0 !important;
}
.activity-row p { font-size: 14px; color: var(--ink-700); margin: 0; }

/* Initi-card -- 2-up convocatoria cards with red side rail */
.initi-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-top: 32px;
}
.initi-grid > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.initi-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-3);
	padding: 28px;
	display: flex;
	flex-direction: column;
	position: relative;
}
.initi-card > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.initi-card::before {
	content: '';
	position: absolute;
	left: 0;
	top: 28px;
	bottom: 28px;
	width: 3px;
	background: var(--red-600);
	border-radius: 0 3px 3px 0;
}
.initi-card h3 {
	font-family: var(--font-sans);
	font-size: 20px;
	font-weight: 700;
	color: var(--navy-900);
	margin: 0 0 4px !important;
}
.initi-card p { font-size: 14px; color: var(--ink-700); margin: 0 0 12px; }
.initi-card__row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 10px !important;
	font-size: 14px;
	color: var(--ink-700);
}
.initi-card__row:first-of-type { margin-top: 14px !important; }
.initi-card__cta { margin-top: 28px !important; }
.initi-card__row b {
	color: var(--navy-900);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}
.initi-card__row .initi-card__icon {
	color: var(--red-600);
	flex-shrink: 0;
	font-size: 14px;
	width: 18px;
	text-align: center;
}

/* Timeline -- dashed-border year list */
.timeline {
	margin: 32px 0 0;
	padding-left: 8px;
	border-left: 1px dashed var(--border);
	list-style: none;
}
.timeline > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.timeline__row {
	display: grid;
	grid-template-columns: 64px 18px 1fr;
	gap: 14px;
	align-items: baseline;
	padding: 14px 0;
	border-bottom: 1px dashed var(--border);
}
.timeline__row > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.timeline__row:last-child { border-bottom: 0; }
.timeline__y {
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--red-600);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	margin: 0;
}
.timeline__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--red-600);
	margin-left: -5px;
	transform: translateY(3px);
	box-shadow: 0 0 0 4px var(--bg);
	justify-self: start;
}
.timeline__t {
	color: var(--ink-700);
	font-size: 15px;
	line-height: 1.5;
	margin: 0;
}
.timeline__t b { color: var(--navy-900); font-weight: 700; }

/* Sponsor tiers -- 2-col rows (tag column + content column) */
.tiers {
	margin-top: 24px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.tiers > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.tiers__row {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 18px;
	align-items: start;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-3);
	padding: 22px 24px;
}
.tiers__row > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.tiers__tag {
	font-family: var(--font-mono) !important;
	font-size: 10px !important;
	letter-spacing: 0.14em !important;
	text-transform: uppercase !important;
	text-align: center !important;
	padding: 5px 10px !important;
	border-radius: 999px !important;
	font-weight: 600 !important;
	align-self: center !important;
	line-height: 1.4 !important;
	margin: 0 !important;
}
.tiers__row--basic .tiers__tag { background: var(--red-50); color: var(--red-600); }
.tiers__row--escolar .tiers__tag { background: var(--cream-50); color: var(--navy-900); border: 1px solid var(--cream-200); }
.tiers__row--premium .tiers__tag { background: var(--navy-900); color: #fff; }
.tiers__row b {
	display: block;
	color: var(--navy-900);
	font-weight: 700;
	font-size: 17px;
	letter-spacing: -0.01em;
	margin-bottom: 4px;
}
.tiers__row p { font-size: 14.5px; color: var(--ink-700); margin: 4px 0 0; }

/* Glossary entry -- 2-col definition list (term + tag | definition) */
.glossary-list { list-style: none; padding: 0; margin: 32px 0 0; }
.glossary-list > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.glossary-entry {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 24px;
	padding: 18px 0;
	border-bottom: 1px solid var(--border);
	align-items: start;
	list-style: none;
}
.glossary-entry > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.glossary-entry:last-child { border-bottom: 0; }
.glossary-entry__term {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.glossary-entry__term b {
	font-family: var(--font-sans);
	font-size: 17px;
	font-weight: 700;
	color: var(--navy-900);
	letter-spacing: -0.01em;
	line-height: 1.2;
}
.glossary-term__en {
	font-size: 0.85em;
	color: var(--ink-500);
	font-weight: 400;
	margin-left: 0.25em;
}
.glossary-tag {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 999px;
	align-self: flex-start;
	font-weight: 600;
}
.glossary-tag--en { background: var(--navy-900); color: #fff; }
.glossary-tag--es { background: var(--red-50); color: var(--red-600); }
.glossary-entry__def {
	font-size: 14.5px;
	color: var(--ink-700);
	margin: 0;
	line-height: 1.55;
}

/* Slice 5 responsive collapses */
@media (max-width: 760px) {
	.initi-grid { grid-template-columns: 1fr; }
	.tiers__row { grid-template-columns: 100px 1fr; gap: 14px; padding: 18px 20px; }
	.glossary-entry { grid-template-columns: 1fr; gap: 8px; }
	.timeline__row { grid-template-columns: 56px 14px 1fr; gap: 10px; padding: 12px 0; }
}

/* ---------------------------------------------------------------
   Bring-grid (Iniciación · "Qué necesitas traer") -- 2x2 chip grid
   with red-50 icon tile + bold label + secondary text. */
.bring-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 16px;
}
.bring-grid > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.bring-card {
	background: var(--cream-50);
	border: 1px solid var(--cream-200);
	border-radius: var(--r-3);
	padding: 16px 18px;
	display: flex;
	align-items: flex-start;
	gap: 14px;
}
.bring-card__icon {
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	border-radius: 8px;
	background: #fff;
	border: 1px solid var(--border);
	color: var(--red-600);
	/* !important to beat the legacy display:block injected by the
	   .um-section span reset chain. */
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
}
.bring-card__icon > svg { display: block; }
.bring-card__icon svg {
	width: 16px !important;
	height: 16px !important;
	stroke: var(--red-600);
	stroke-width: 2;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.bring-card b {
	display: block;
	color: var(--navy-900);
	font-weight: 700;
	font-size: 14.5px;
}
.bring-card span {
	display: block;
	margin-top: 2px;
	font-size: 13px;
	color: var(--ink-500);
}
@media (max-width: 760px) {
	.bring-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   Image placeholder · diagonal-hatch tile w/ optional caption.
   Used until real photography arrives. Pairs with prototype
   `.img-ph` + `.img-ph__cap`.
   --------------------------------------------------------------- */
.img-ph {
	position: relative;
	overflow: hidden;
	background: var(--ink-50);
	border-radius: var(--r-3);
	display: flex;
	align-items: flex-end;
	background-image: repeating-linear-gradient(135deg, rgba(11, 23, 48, 0.045) 0 2px, transparent 2px 14px);
}
.img-ph::before {
	content: '';
	position: absolute;
	inset: 0;
	border: 1px solid var(--border);
	border-radius: inherit;
	pointer-events: none;
}
.img-ph__cap {
	position: relative;
	margin: 14px;
	padding: 8px 10px;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.02em;
	background: rgba(255, 255, 255, 0.92);
	color: var(--ink-700);
	border-radius: 6px;
	border: 1px solid var(--border);
	max-width: calc(100% - 28px);
}
.img-ph__cap b { color: var(--navy-900); font-weight: 600; }

/* Baked real photo · replaces an .img-ph once a final image is chosen.
   Card wrappers keep their original .img-ph (+ collage) classes for
   placement and inherit the radius/overflow above; standalone wraps
   (hero, split) get them here. Mirrors the staging swap plugin so the
   bake renders identically after that plugin is removed. */
.um-img-wrap {
	position: relative;
	overflow: hidden;
	border-radius: var(--r-3);
	background: var(--ink-50);
}
.um-img-real {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
}
/* Team crest overlaid on a team-card photo (e.g. /competir/), mirroring the
   Q+D card design. Sits top-right; drop shadow keeps it legible on any photo. */
.team-card__crest {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 52px;
	height: auto;
	z-index: 2;
	pointer-events: none;
	filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

/* ---------------------------------------------------------------
   Rules list · `--icons` variant. Replaces the auto-counter with a
   span.n carrying an inline SVG icon. Used on /el-club/ palmarés
   and any other list where each line wants a topical glyph.
   --------------------------------------------------------------- */
.rules--icons li { counter-increment: none; padding-left: 44px; }
.rules--icons li::before { content: none; }
.rules--icons .n {
	position: absolute;
	left: 0;
	top: 14px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--red-600);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.rules--icons .n svg {
	width: 14px !important;
	height: 14px !important;
	stroke: #fff !important;
	stroke-width: 2;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ---------------------------------------------------------------
   With-sidebar layout polish
   --------------------------------------------------------------- */
/* Zero the top margin on main column's first child so its h2 aligns
   with the sidebar's first card (otherwise browser-default h2 margin
   pushes main copy 0.83em below the sidebar). */
.with-sidebar__main > :first-child { margin-top: 0 !important; }

/* Side-card CTA -- when using plain `.btn` instead of wp:button, scale
   down for sidebar context. */
.side-card .btn {
	padding: 15px 16px;
	font-size: 14px;
	width: 100%;
	justify-content: center;
}

/* =============================================================== */
/* END · UM DESIGN V3 FOUNDATIONS                                  */
/* =============================================================== */


/* ========== CDU-96 · FOOTER REDESIGN ==========
   Lives in style.css (not um-custom-v2.css) so it survives the
   final-gate stop-gap-CSS drop. Pairs with patterns/footer-redesign.php
   and parts/footer.html. */

/* UM disc badge -- neutralize WP's image resize class so the SVG
   renders at the design-spec 48px regardless of the figure wrapper */
.um-site-footer .um-footer-disc { margin: 0; line-height: 0; }
.um-site-footer .um-footer-disc img { display: block; width: 48px; height: 48px; border-radius: 10px; }

/* Brand row -- UM disc + Ultimate Madrid wordmark.
   CDU-238: align-items:flex-start so the "Ultimate Madrid" h3 baseline
   sits at the same column-top as the Explorar / Recursos / Conectar h4s
   in the adjacent columns. Centering inside the 48px disc row pushed
   the h3 down ~12px and broke the header line. */
.um-site-footer .um-footer-brand { gap: 14px; align-items: flex-start; }

/* Bottom row -- copyright left, social chips right; wrap on narrow */
.um-site-footer .um-footer-bottom { row-gap: 16px; }

/* Social chips -- 36x36 rounded, navy-soft bg, paper text, red on hover */
.um-site-footer .um-footer-social { gap: 12px; }
.um-site-footer .um-social-chip { display: inline-flex; }
.um-site-footer .um-social-chip a {
	display: inline-flex; align-items: center; justify-content: center;
	width: 36px; height: 36px; border-radius: 8px;
	background: var(--wp--preset--color--navy-soft, #2d3955);
	color: var(--wp--preset--color--paper, #fff);
	font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em;
	text-decoration: none;
	transition: background-color 120ms ease, color 120ms ease;
}
.um-site-footer .um-social-chip a:hover,
.um-site-footer .um-social-chip a:focus { background: var(--wp--preset--color--red, #c4122f); color: #fff; text-decoration: none; }
.um-site-footer .um-social-chip a:focus-visible { outline: 2px solid var(--wp--preset--color--focus, #ffd54a); outline-offset: 3px; }

/* Footer-link list -- kill the bullet, keep tap targets readable */
.um-site-footer .um-footer-links { list-style: none; margin: 0; padding-left: 0; }
.um-site-footer .um-footer-links li { margin-bottom: 4px; }

/* Responsive -- collapse 4-col → 2-col → 1-col, mirror prototype */
@media (max-width: 960px) {
	.um-site-footer .wp-block-columns { flex-wrap: wrap !important; }
	.um-site-footer .wp-block-columns > .wp-block-column { flex-basis: 48% !important; }
}
@media (max-width: 600px) {
	.um-site-footer .wp-block-columns > .wp-block-column { flex-basis: 100% !important; }
	.um-site-footer .um-footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ========== CDU-96 · CARD CTA ALIGNMENT (paths-grid + activities-grid) ==========
   Cards inside .wp-block-columns already stretch to equal heights at desktop
   (flex children inside the columns row). Pin the CTA paragraph to the
   bottom of each card so the "Más información →" / outbound links align
   across cards regardless of body-copy length. Without this, shorter
   descriptions float their CTA up and break the visual rhythm. */
.um-path-card,
.um-activity-card,
.um-activity-card > .wp-block-group {
  display: flex;
  flex-direction: column;
}
.um-activity-card > .wp-block-group {
  /* fill remaining card height so the inner CTA can pin to the bottom */
  flex: 1;
}
.um-path-card > p:last-child,
.um-activity-card > .wp-block-group > p:last-child {
  /* !important needed: the patterns set an inline `margin-top:var(spacing--30)`
     on the CTA paragraph which would otherwise win over the cascade. */
  margin-top: auto !important;
  padding-top: var(--wp--preset--spacing--30);
}

/* CDU-96 Jetpack contact-form overrides removed 2026-05-21 -- site now uses
   Contact Form 7. CF7 inputs/selects/textareas styled inline within
   .um-hablemos-card and .um-schools-form sections. */

/* ===============================================================
 * CDU-96 · MIGRATED FROM um-custom-v2.css + um-tt25-shim.css
 * Stop-gap CSS folded into the child stylesheet so um-custom-v2.css
 * and um-tt25-shim.css can be removed (CDU-96 technical AC). The
 * rules below preserve the legacy class behavior currently used by
 * /iniciacion/ + the inner-page bodies (um-page-body, um-benefits-list,
 * um-program-cards, um-school-list, um-materials-grid, um-sidebar-card,
 * um-toc-list, um-btn-primary, etc.) until the full block-level
 * rewrite lands. Many rules in here are now dead code targeting
 * legacy classes that no longer exist on rendered pages -- slated
 * for cleanup in a follow-up issue.
 * =============================================================== */

/* --- from um-custom-v2.css --- */
/* ==========================================================
   Ultimate Madrid -- Custom CSS v2 for GeneratePress
   ========================================================== */

/* ========== DESIGN TOKENS ========== */
:root {
  --red-madrid: #c4122f;
  --red-dark: #9e0e26;
  --red-light: #fdf2f3;
  /* CDU-227: dropped from #ff8b8b (read as pink in CDU-226 review) to #ff5757 -- saturated red, AA-normal ~4.9:1 vs --navy. Supersedes CDU-36 AAA buffer. */
  --red-on-navy: #ff5757;
  --navy: #1a2744;
  /* Solid chip background for use on --navy surfaces (footer social, etc.). */
  --navy-chip: #2d3955;
  --warm-gray: #f8f6f3;
  --mid-gray: #5b616e; /* CDU-36: was #6b7280 (4.48:1 on cream); now 5.6:1 on warm-gray, 6.6:1 on white. */
  --light-border: #e8e5e0;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  /* CDU-36: solid muted-on-navy ramp. Replaces rgba(255,255,255,X) shortcuts that
     collapse below WCAG AA the moment alpha drops under ~0.5. */
  --um-on-navy-strong: #ffffff;   /* 16.8:1  primary copy, headings */
  --um-on-navy-body:   #c9cfd9;   /* 9.5:1   body copy, links */
  --um-on-navy-muted:  #a4a8b7;   /* 6.4:1   secondary text, copyright, tagline */
  --um-on-navy-subtle: #8c93a1;   /* 4.86:1  borders, faintest legible text */
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --max-width: 1200px;
}

/* ========== GLOBAL ==========
   Body resets handed off to theme.json (font-family, color, line-height,
   size). Only the rendering hints stay here -- they're hard to express in
   theme.json without leaking into the editor canvas.
   h1/h2/h3 sizing is handled by theme.json `styles.elements` plus the new
   `.h-hero` / `.h-page` / `.h-sec` classes in the v3 foundations block. */
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ========== BLOCK-THEME HEADER + NAV (CDU-110) ==========
   um-child is a block theme; the rendered header is built from
   parts/header.html using core/navigation, not GeneratePress classic.
   These rules target the block-nav primitives so top-level items and
   the CTA never wrap mid-phrase, and the header collapses to one row. */
/* CDU-96: bumped from 0.85rem to 1.5rem (24px) per board AC -- prototype uses
   72px nav height; tighter padding made the bar read cramped. */
.um-site-header { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.um-site-header .wp-block-navigation { row-gap: 0; }
.um-site-header .wp-block-navigation .wp-block-navigation-item { white-space: nowrap; }
.um-site-header .wp-block-navigation .wp-block-navigation-item__content,
.um-site-header .wp-block-navigation .wp-block-navigation-item__label {
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.um-site-header .um-nav-cta .wp-block-button__link { white-space: nowrap; }

/* CDU-289: ES/EN language switcher in the header. Sits between the primary nav
   and the Contáctanos CTA on desktop, stays visible (does not collapse into
   the hamburger overlay) on mobile so the English gateway is always one tap
   away regardless of viewport. Uses the navigation typographic scale for
   alignment with the surrounding nav items. */
.um-site-header .um-lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}
.um-site-header .um-lang-switcher a {
  color: var(--wp--preset--color--ink, #1a2744);
  text-decoration: none;
  padding: 0.25rem 0.35rem;
  border-radius: 4px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.um-site-header .um-lang-switcher a:hover,
.um-site-header .um-lang-switcher a:focus-visible {
  color: var(--wp--preset--color--red, #c4122f);
}
.um-site-header .um-lang-switcher .um-lang-sep {
  color: var(--wp--preset--color--border, #d6d8de);
  font-weight: 400;
}
/* Flag + abbreviation treatment for the language link (replaces the spelled-out
   "English" / "Español" text): a small flag icon plus the two-letter code,
   vertically centered. Applies in both the desktop switcher and the mobile
   overlay, overriding their differing base `display` values. */
.lang-flag-link {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
}
.lang-flag-link .flag-icon {
  flex: 0 0 auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.lang-flag-link span { letter-spacing: 0.03em; }

/* Flag+EN is a standing CTA into the English funnel, not a toggle: it shows
   on every page, including /en/ itself (no Español link, no per-page hiding). */
@media (max-width: 480px) {
  .um-site-header .um-lang-switcher { font-size: 0.8rem; gap: 0.25rem; }
  .um-site-header .um-lang-switcher a { padding: 0.2rem 0.25rem; }
}

/* Mobile (≤781px): block-nav collapses to overlay; only logo + CTA share the bar.
   Tighten CTA padding/letter-spacing so the single-word label stays on one line
   at viewports as narrow as 320px. */
@media (max-width: 781px) {
  .um-site-header .um-nav-cta .wp-block-button__link {
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
    letter-spacing: 0.02em !important;
  }
}

/* CDU-229: mobile nav overlay was unusable. Source nav has justifyContent:right,
   which the overlay inherits (align-items: flex-end), pinning items to the right
   edge with no padding and 21px tap targets. Override the open responsive
   container so links stack full-width, get 48px+ tap targets, and read left-aligned.
   Scoped to the open overlay so desktop layout is untouched. */
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
  padding: 4.5rem 1.5rem 2rem !important;
  align-items: stretch !important;
}
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  align-items: stretch !important;
  gap: 0 !important;
  width: 100% !important;
}
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  display: block;
  width: 100%;
  padding: 1rem 0;
  font-size: 1rem !important;
  letter-spacing: 0.06em !important;
  text-align: left;
}
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
  top: 1rem;
  right: 1rem;
}

.page .entry-content > .wp-block-group {
  max-width: none;
}

/* ========== OVERLINE LABEL ========== */
.um-overline {
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: var(--red-madrid) !important;
  margin-bottom: 8px !important;
}

/* ========== SECTION SPACING ========== */
.um-section { padding: 80px 0; }

.um-losquijotes-box {
  margin-top: 32px; padding: 24px;
  background: var(--warm-gray); border-radius: var(--radius);
}
.um-losquijotes-box h3, .um-losquijotes-box h4 {
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.um-losquijotes-box p { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 12px; }

/* Hero stats */
.um-hero-stats,
.um-hero-stats > .wp-block-group__inner-container,
.um-hero-stats.is-layout-flex,
.um-hero-stats .wp-block-group__inner-container.is-layout-flex {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 40px !important;
  margin-bottom: 36px;
}
/* Override WP flex row gap */
.um-hero-stats .wp-block-group {
  margin: 0 !important;
}

/* ========== BUTTONS ========== */
.um-btn-primary {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
}
.um-btn-primary .wp-block-button__link {
  background: var(--red-madrid) !important;
  color: white !important;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s, transform 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: none;
}
.um-btn-primary .wp-block-button__link:hover {
  background: var(--red-dark) !important;
  transform: translateY(-1px);
  color: white !important;
}

.um-path-card {
  background: white;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.um-path-card:hover {
  border-color: var(--red-madrid);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
/* Note: removed the decorative `::after` hover arrow that used to appear
   bottom-right on hover -- every card already has an inline arrow in its
   "Más información →" / "Visitar losquijotes.es ↗" link, so the ::after
   rendered as a duplicate. Hover lift is handled further down in the
   shared `.um-activity-card, .um-path-card, ...` block. */

/* CDU-112: SVG icon system. Replaces emoji used as decorative icons. */
/* Base utility: any inline icon inherits text color and aligns to baseline. */
.um-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
}
/* CDU-212: inline body-copy icons used in place of decorative emoji
   (e.g. /el-club/ palmarés, /que-hacemos/ "Actividades puntuales"). Slightly
   larger than 1em so they read at body-text size, with a small trailing gap
   so they don't kiss the following word, and a brand-red accent. */
.um-inline-icon {
  width: 1.15em;
  height: 1.15em;
  margin-right: 0.4em;
  vertical-align: -0.2em;
  color: var(--red-madrid);
}
/* CDU-231: path-grid icon in a circular red-light chip, matches the school-benefit
   chip pattern on /centros-educativos/. Was a bare 40px outline icon (CDU-226).
   Icon bumped ~1.3x (40 → 52) and seated in an 80px circular chip. */
.um-path-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--red-light);
  margin-bottom: 20px;
  color: var(--red-madrid);
  line-height: 1;
  flex-shrink: 0;
}
.um-path-icon .um-icon { width: 52px; height: 52px; }
.um-path-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.um-path-card p {
  font-size: 0.92rem; color: var(--text-secondary); line-height: 1.6;
  margin-bottom: 0;
}

.um-activity-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  border: 1px solid var(--light-border);
  transition: box-shadow 0.3s, transform 0.3s;
}
.um-activity-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.um-activity-card figure,
.um-activity-card .wp-block-image {
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
  line-height: 0;
}
.um-activity-card img {
  aspect-ratio: 16/10;
  object-fit: cover;
  width: 100% !important;
  max-width: none !important;
  display: block;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

/* ========== CDU-241 · GENERIC CARD PRIMITIVES ==========
   Reusable card variants for ad-hoc inner-page card grids (e.g. /como-se-juega/,
   /donde-jugar-ultimate-madrid/, /centros-educativos/). Specialized cards
   (.um-path-card, .um-activity-card) keep their own rules above; these are
   the editor-reachable primitives for new grids that don't need a bespoke
   class. Sourced from prototype Q+D/ultimatemadrid-prototype.html
   (.path-card / .trust-card outline + .school-content tan band). */
.um-card {
  border-radius: var(--radius);
  padding: 28px 24px;
  box-sizing: border-box;
  /* When dropped on a wp:column, fill the row so sibling cards line up. */
  height: 100%;
}
/* White-bordered hoverable variant: matches prototype .path-card. */
.um-card--outline {
  background: #ffffff;
  border: 1px solid var(--light-border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.um-card--outline:hover {
  border-color: var(--mid-gray);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
/* Tan / warm-gray variant: matches prototype .school-content band. */
.um-card--tan {
  background: var(--warm-gray);
  border: 0;
}
/* When the editor adds both classes (`um-card um-card--outline`) inside a
   wp-block-group/column with its own padding, suppress double padding. */
.wp-block-column > .um-card,
.wp-block-group > .um-card { width: 100%; }

/* ========== FEATURE CHECK LIST ========== */
.um-feature-list { list-style: none; display: grid; gap: 12px; padding: 0; }
.um-feature-list li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 0.95rem; color: var(--text-secondary);
}
/* CDU-125: SVG check bullet (replaces ✓ U+2713). Sits on the typographic
   baseline like the unicode bullet did and inherits brand red. */
.um-feature-list .um-icon {
  color: var(--red-madrid);
  width: 1.1em; height: 1.1em;
  flex: none; margin-top: 0.15em;
}
/* CDU-125: red-on-red-light icon chip used in school-benefits pattern. */
.um-chip-icon {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--red-madrid); line-height: 0;
}
.um-chip-icon .um-icon { width: 1.2rem; height: 1.2rem; }

/* Inner-page navy banner covers should hug their content. WP core sets a default
   `.wp-block-cover { min-height: 430px }` for hero usage; the inner-page-header
   pattern carries `minHeight:0` which omits an inline override, so the 430px
   default leaks through and leaves 100–180px of empty navy on short pages
   (Contacto, Qué Hacemos). The home hero (`.um-hero-club`) sets its own
   `minHeight:560`, which renders an inline style and is exempt from this reset. */
.entry-content > .wp-block-cover.alignfull:not(.um-hero-club) {
  min-height: auto;
  /* Global breathing room between the inner-page hero and the first content
     section. Authors no longer need to add `padding-top:var(--wp--preset--spacing--60)`
     to every page's first `wp:group`; the hero owns this gap. Pages that
     already had that inline padding keep working (the next rule zeroes it). */
  margin-bottom: var(--wp--preset--spacing--60, 3rem);
}
/* Zero the inline padding-top that legacy pages baked into the first
   content section after the hero. Without this, the new hero margin would
   stack on top of the existing 60-spacing padding and double the gap. */
.entry-content > .wp-block-cover.alignfull:not(.um-hero-club) + .wp-block-group,
.entry-content > .wp-block-cover.alignfull:not(.um-hero-club) + .wp-block-columns {
  padding-top: 0 !important;
}

/* Collapse the default block-gap between any full-bleed colored band and the
   block that follows. Without this, the entry-content's paper bg shows through
   as a ~19px white strip -- invisible when both sides are white, but glaring
   when one side has a bg color (Contacto's warm-gray form band, the home's
   navy "Listo para descubrir" CTA → warm-gray Escríbenos band, etc.). */
.entry-content > .wp-block-cover.alignfull:not(.um-hero-club) + *,
.entry-content > .wp-block-group.alignfull[class*="has-"][class*="-background-color"] + .alignfull,
.entry-content > .um-cta-banner + * {
  margin-top: 0;
}

/* When an alignwide editorial image sits between the navy banner and the next
   bg-colored section (e.g. Contacto's jersey shot, Iniciación's hero photo),
   it gets a `spacing-50` margin-top above and a default 19px block-gap below.
   At wide viewports those gaps frame the image nicely; at ≤1200px the image
   already edges out to the viewport so the gaps just leave white strips. Zero
   them at the breakpoint to make the image read as a continuous band. */
@media (max-width: 1200px) {
  .entry-content > .wp-block-cover.alignfull + figure.wp-block-image.alignwide {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  .entry-content > .wp-block-cover.alignfull + figure.wp-block-image.alignwide + * {
    margin-top: 0 !important;
  }
}

/* ===== Mobile gutter for alignwide content =====
   Pages using the new inner-page pattern (Qué Hacemos, Iniciación, Centros,
   El Club, Prensa) have an `alignwide` group as their body wrapper. At wide
   viewports it caps at 1200px with viewport-side margins; at ≤781px it
   stretches to the viewport edge with no padding, so headings and cards
   touch the screen edge. Add a 16px gutter at mobile so text and cards
   breathe. Keep `alignfull` blocks edge-to-edge -- they own their own padding
   for full-bleed backgrounds (cover banner, warm-gray CTA bands, etc.). */
@media (max-width: 781px) {
  body.page .entry-content > .alignwide {
    padding-left: 16px;
    padding-right: 16px;
  }
  /* Counter blocks on /prensa/ are wp:columns directly inside an alignwide
     group; the columns flatten to single-col stacked at mobile and need
     the same gutter. */
  body.page .entry-content > .wp-block-columns.alignwide {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ========== CANONICAL BUTTON SYSTEM ==========

   Patterns, theme.json, and inline editor overrides had drifted to 8 different
   heights (44/50/52/54/58/63/83/89) and 8 different padding combinations across
   the site. This block locks every action button outside the header nav to one
   of two variants: solid (filled red) or outline (transparent + 2px border).

   Heights normalize to ~54px regardless of where the button sits -- banner,
   body, or sidebar -- so a row of CTAs reads as a single design system. Header
   nav button stays smaller (44px) on purpose; it's nav chrome, not page CTA.

   `!important` is required to beat the inline `style="padding:…;border-radius:…"`
   that the core button block emits when authors set custom values in the editor.
   The selectors stay scoped to `.entry-content` and `.wp-block-cover` so we
   don't grab the header CTA. */

/* Solid filled (default state). */
.entry-content .wp-block-button:not(.is-style-outline) > .wp-block-button__link,
.wp-block-cover .wp-block-button:not(.is-style-outline) > .wp-block-button__link {
  padding: 14px 28px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  border: 0 !important;
  border-radius: 8px !important;
}

/* Outline variant -- 2px border, transparent bg. Padding shrunk by 2px each side
   so the outer box matches the solid variant's height. */
.entry-content .wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-cover .wp-block-button.is-style-outline > .wp-block-button__link {
  padding: 12px 26px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  background: transparent !important;
  border: 2px solid currentColor !important;
  border-radius: 8px !important;
}
/* The outer .wp-block-button wrapper sometimes carries inline `border-color`
   + `border-width` attributes baked in by the editor (e.g. `Volver al hub`),
   which then renders a second outline on top of the inner anchor's border.
   Strip the outer border so only the inner anchor draws the outline. */
.entry-content .wp-block-button.is-style-outline,
.wp-block-cover .wp-block-button.is-style-outline {
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
}

/* Header nav CTA: keep smaller, but force radius to match. */
header .wp-block-button__link {
  border-radius: 8px !important;
}

/* Materials grid on /centros-educativos/: 6 small cards in a 3-column grid
   where every cell shares the row height regardless of label length. The
   markup is wp:columns (3) × wp:paragraph (2 each); we flatten the columns
   with `display: contents` so the 6 paragraphs participate directly in the
   parent grid, then `auto-rows: 1fr` syncs row heights. */
.entry-content .wp-block-columns.um-materials-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
}
.entry-content .wp-block-columns.um-materials-grid > .wp-block-column {
  display: contents;
}
.entry-content .wp-block-columns.um-materials-grid > .wp-block-column > p {
  margin: 0 !important;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
}
/* Force the "Próximamente" chip onto its own row above the icon + label,
   so each card reads chip-on-top instead of label-then-trailing-meta. */
.entry-content .wp-block-columns.um-materials-grid > .wp-block-column > p > .um-soon {
  order: -1;
  width: 100%;
  margin-top: 0;
  margin-bottom: 0.25em;
}
.entry-content .wp-block-columns.um-materials-grid > .wp-block-column > p > br {
  display: none;
}
@media (max-width: 600px) {
  .entry-content .wp-block-columns.um-materials-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== INNER PAGE HEADER ========== */
/* CDU-121: pages render the header as `<div class="wp-block-group um-page-header">`
   with layout=default, so no `.wp-block-group__inner-container` is generated and
   the legacy padding/max-width rule (line ~262) never matches. Apply horizontal
   padding directly and constrain children to --max-width so every inner page gets
   the proper hero gutter without per-page block edits.
   Acceptance (CDU-121): h1 left edge >= 32px, hero body type >= 16px. */
.um-page-header {
  background: var(--navy);
  color: white;
  padding: 36px 24px 32px;
}
/* Cap each child to --max-width and center it. Block layout (rather than the
   previous grid trick) lets adjacent vertical margins collapse like normal
   flow -- matching the spacing rhythm of the new inner-page-header pattern.
   With grid, child margins add to row gaps instead of collapsing, which made
   the breadcrumb→overline→h1 stack feel ~2× looser than the new pattern. */
.um-page-header > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}
.um-page-header .um-overline {
  color: var(--red-on-navy) !important;
}
.um-page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700; line-height: 1.2;
  color: white; margin-bottom: 16px;
}
/* CDU-121: bump body copy in the hero to >= 16px so all paragraphs clear WCAG min. */
.um-page-header p {
  font-size: 1rem;
  line-height: 1.6;
}
.um-page-header-desc {
  font-size: 1.1rem; line-height: 1.8;
  color: var(--um-on-navy-body);
}
/* Bring legacy `.um-page-header` chip-row text in line with the new
   inner-page-header pattern. The generic `.um-page-header p` rule above
   forces 1rem on every <p> child, which oversizes the breadcrumb (was
   meant 0.8125rem), the overline, and the meta row. These scoped overrides
   restore the design system's small font preset on those three elements
   without disturbing `.um-page-header-desc`, and align the bottom margins
   to the spacing presets used by the new inner-page-header pattern. */
.um-page-header .um-breadcrumb {
  font-size: 0.8125rem;
  margin-bottom: var(--wp--preset--spacing--30);
}
.um-page-header .um-overline {
  /* `!important` to beat the global `.um-overline` rule, which itself uses
     `!important` to defeat default paragraph styles in other contexts. */
  font-size: var(--wp--preset--font-size--small) !important;
  margin-bottom: var(--wp--preset--spacing--20) !important;
}
.um-page-header .um-page-meta {
  font-size: var(--wp--preset--font-size--small);
}
/* CDU-278: AA contrast on navy hero. Replaces #5b616e (2.38:1) with #aab0ba (~6.79:1). */
.um-breadcrumb,
.um-breadcrumb a {
  color: #aab0ba;
}
.um-breadcrumb {
  font-size: 0.8125rem;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.um-breadcrumb a,
.um-breadcrumb span {
  transition: color 0.2s;
  text-decoration: none;
}
.um-breadcrumb a:hover,
.um-breadcrumb a:focus,
.um-breadcrumb a:focus-visible {
  color: #d4d8df;
}
.um-page-meta {
  display: flex; gap: 18px; margin-top: 28px;
  flex-wrap: wrap; align-items: center;
  font-size: 1rem; color: var(--um-on-navy-muted);
}
.um-page-meta span {
  color: var(--um-on-navy-strong);
  font-weight: 500;
  vertical-align: middle;
}

/* ========== INNER PAGE 2-COL LAYOUT ========== */
.um-page-body {
  padding: 44px 0 60px;
}
.um-page-body > .wp-block-group__inner-container > .wp-block-columns,
.um-page-body .wp-block-columns {
  gap: 56px;
}
/* Sticky sidebar */
.um-page-body .wp-block-column:last-child {
  position: sticky;
  top: 96px;
  align-self: start;
}
/* Content column typography */
.um-page-content h2 {
  font-size: 1.5rem; font-weight: 700;
  color: var(--text-primary);
  margin-top: 48px; margin-bottom: 16px;
  padding-top: 48px;
  border-top: 1px solid var(--light-border);
}
.um-page-content h2:first-child {
  margin-top: 0; padding-top: 0; border-top: none;
}
.um-page-content h3 {
  font-size: 1.1rem; font-weight: 600;
  color: var(--text-primary);
  margin-top: 28px; margin-bottom: 10px;
}
.um-page-content p {
  color: var(--text-secondary);
  font-size: 1rem; line-height: 1.85;
  margin-bottom: 18px;
}
.um-page-content strong { color: var(--text-primary); font-weight: 600; }

/* ========== PROGRAM CARDS (inner pages) ========== */
.um-program-cards { display: grid; gap: 12px; }
.um-program-card {
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex; gap: 16px; align-items: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.um-program-card:hover {
  border-color: var(--red-madrid);
  box-shadow: var(--shadow-md);
}
.um-program-card > div:last-child { align-self: flex-start; }
.um-program-badge {
  background: var(--red-light);
  color: var(--red-madrid);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 6px;
  white-space: nowrap; flex-shrink: 0;
}
.um-program-card h3 { font-size: 0.95rem; margin: 0 0 4px; }
.um-program-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* ========== BENEFITS LIST (inner pages) ========== */
.um-benefits-list { display: grid; gap: 16px; }
.um-benefit-item { display: flex; gap: 14px; align-items: flex-start; }
.um-benefit-check {
  width: 28px; height: 28px;
  background: var(--red-light); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
  color: var(--red-madrid); font-size: 0.8rem; font-weight: 700;
}
/* CDU-112: SVG variant inside the red chip. */
.um-benefit-check .um-icon { width: 16px; height: 16px; }
.um-benefit-item p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; margin: 0; }
.um-benefit-item strong { color: var(--text-primary); }

/* ========== SIDEBAR CARDS ========== */
.um-sidebar-card {
  background: white;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.um-sidebar-contact {
  background: var(--navy); color: white;
}
.um-sidebar-contact h3 { color: white; font-size: 1rem; margin-bottom: 10px; }
.um-sidebar-contact p {
  font-size: 0.88rem; color: rgba(255,255,255,0.7);
  line-height: 1.7; margin-bottom: 20px;
}
.um-sidebar-toc {
  background: var(--warm-gray);
  border: 1px solid var(--light-border);
}
.um-sidebar-toc h3, .um-sidebar-toc h4 {
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--mid-gray); margin-bottom: 14px;
}
.um-sidebar-stats {
  background: white;
  border: 1px solid var(--light-border);
}
.um-sidebar-stats h3, .um-sidebar-stats h4 {
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--mid-gray); margin-bottom: 16px;
}
.um-sidebar-stat {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
}
.um-sidebar-stat-num { font-size: 1.4rem; font-weight: 700; color: var(--red-madrid); }
.um-sidebar-stat-label { font-size: 0.82rem; color: var(--text-secondary); }

/* ========== PAGE CTA (bottom of inner pages) ========== */
/* Pre-footer page CTA. Repainted to warm-gray on 2026-05-21 so the closing
   block reads against the navy footer instead of bleeding into it. */
.um-page-cta {
  background: var(--wp--preset--color--warm-gray, var(--warm-gray));
  color: var(--wp--preset--color--ink, var(--text-primary));
  padding: 64px 0;
  text-align: center;
}
.um-page-cta h2 {
  color: var(--wp--preset--color--ink, var(--text-primary));
  font-size: 1.8rem;
  margin-bottom: 12px;
}
.um-page-cta p {
  color: var(--wp--preset--color--ink-soft, var(--text-secondary));
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

/* ========== INFO BOX ========== */
.um-info-box {
  padding: 20px 24px;
  background: var(--warm-gray);
  border-radius: var(--radius);
  border-left: 3px solid var(--red-madrid);
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 40px 0 12px;
}
.um-info-box p { margin: 0; font-size: 0.88rem; line-height: 1.7; color: var(--text-secondary); }
.um-info-box strong { color: var(--text-primary); }

/* ========== WP BLOCK SPACING FIXES ========== */

/* Fix GP default content width overrides */
.entry-content > .wp-block-group.um-hero,
.entry-content > .wp-block-group.um-section,
.entry-content > .wp-block-group.um-section-alt,
.entry-content > .wp-block-group.um-section-dark,
.entry-content > .wp-block-group.um-cta-banner,
.entry-content > .wp-block-group.um-page-header,
.entry-content > .wp-block-group.um-page-body,
.entry-content > .wp-block-group.um-page-cta {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0;
  padding-right: 0;
}
/* CDU-121: re-apply hero gutter that the full-bleed reset above just stripped.
   Children remain constrained to --max-width via .um-page-header > * (~line 712). */
.entry-content > .wp-block-group.um-page-header {
  padding-left: 24px;
  padding-right: 24px;
}
/* CDU-239: legacy um-page-body / um-page-cta bgs go full-bleed (rule above),
   but with layout:default WP doesn't emit an .__inner-container, so the
   direct children (columns, headings, CTA stack) had no width cap and rendered
   edge-to-edge on wide viewports. Use the same grid trick as .um-page-header
   to keep the bg full-bleed but cap the content column at --max-width (1200px). */
.entry-content > .wp-block-group.um-page-body,
.entry-content > .wp-block-group.um-page-cta,
.entry-content > .wp-block-group.um-section {
  display: grid;
  grid-template-columns: minmax(0, var(--max-width));
  justify-content: center;
  padding-left: 24px;
  padding-right: 24px;
}
.entry-content > .wp-block-group.um-page-body > *,
.entry-content > .wp-block-group.um-page-cta > *,
.entry-content > .wp-block-group.um-section > * {
  min-width: 0;
}

/* GP adds margin between blocks - tighten it */
.um-hero .wp-block-columns,
.um-section .wp-block-columns,
.um-section-alt .wp-block-columns {
  margin-bottom: 0;
}

/* Give the lead hero paragraph (before the stats) more breathing room
   and add space above the CTA buttons */

/* Fix path card icon containers */
.um-path-icon.is-layout-flow { display: flex !important; }

/* Fix button widths in sidebar */
.um-sidebar-card .wp-block-buttons { margin-top: 16px; }
.um-sidebar-card .wp-block-button { width: 100%; }
.um-sidebar-card .wp-block-button__link { width: 100%; text-align: center; }

/* TOC list styling for WP */
.um-toc-list { list-style: none; padding: 0; margin: 0; }
.um-toc-list li { margin-bottom: 8px; }
.um-toc-list a {
  font-size: 0.88rem; color: var(--text-secondary);
  transition: color 0.2s;
}
.um-toc-list a:hover { color: var(--red-madrid); }

/* ========== RESPONSIVE ========== */
@media (max-width: 960px) {
            .um-page-body .wp-block-columns { flex-direction: column; }
}
@media (max-width: 600px) {
        .um-section, .um-section-alt, .um-section-dark { padding: 48px 0; }
  .um-program-card { flex-direction: column; }
}

/* ========== /en/ GATEWAY PAGE ========== */
.um-cta-columns { gap: 24px; align-items: stretch; }

.um-cta-card {
  background: #fff;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}
.um-cta-card h3 { font-size: 1.4rem; margin-bottom: 12px; }
.um-cta-card p { flex-grow: 1; color: var(--text-secondary); }
.um-cta-card .wp-block-buttons { margin-top: 24px; }
.um-cta-card .wp-block-button__link {
  background: var(--red-madrid);
  border-color: var(--red-madrid);
  color: #fff;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
}
.um-cta-card .wp-block-button__link:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}
.um-cta-icon { font-size: 2.4rem; margin-bottom: 16px; line-height: 1; }

@media (max-width: 640px) {
  .um-cta-columns { flex-direction: column !important; }
}

/* ========== CONTENT IMAGE STYLING ========== */
/* Rounded corners on all WordPress block images, matching --radius design token */
.wp-block-image img {
  border-radius: var(--radius);
}
/* Vertical breathing room when images sit inside page-body text columns */
.um-page-content .wp-block-image,
.um-page-body .wp-block-image {
  margin-top: 24px;
  margin-bottom: 24px;
}
/* Images inside section columns get a modest gap from adjacent content */
.um-section .wp-block-image,
.um-section-alt .wp-block-image {
  margin-bottom: 8px;
}

/* CDU-139 -- anchor image inside body columns. Caps render height so a single
   landscape photo grounds the page without becoming an image-dump. */

/* ========== /PRENSA/ -- WUCC PRESS KIT LANDING ========== */

/* ========== CDU-36 ACCESSIBILITY FIXES ========== */
/* Defensive sr-only utility. Keeps "Menú" and similar screen-reader labels off the
   visible canvas even when a parent stacking context tries to lift them. */

/* CDU-36: belt-and-suspenders -- force the dark-surface overline ramp so any
   stale inline color (#FF6B6B) on existing pages still hits the AA-buffered red. */
.um-page-header .um-overline,
.um-section-dark .um-overline,
.um-hero .um-overline {
  color: var(--red-on-navy) !important;
}

/* ========== CDU-39 ACCESSIBILITY FIXES ========== */
/* Footer muted text on navy. Reuses the CDU-36 muted-on-navy token (#a4a8b7,
   6.4:1 vs --navy) instead of introducing the spec'd --text-muted-on-navy
   (#a8b1c2, 5.02:1) -- the existing token gives stronger headroom and avoids
   palette fragmentation. Selectors expanded to cover any block that lands in
   the footer with copyright/SEO copy classes used by the page templates. */

/* Sidebar TOC heading. The CDU-36 --mid-gray lift (#5b616e, 5.6:1 on warm-gray)
   already covers the AA target. UX Designer recommended dropping the muted gray
   in favor of body-navy because the heading is a navigational landmark; we keep
   the muted treatment because uppercase + letter-spaced section labels are a
   conventional sidebar TOC pattern, and the contrast is now AA-compliant. */
.um-sidebar-toc h3,
.um-sidebar-toc h4,
.um-sidebar-toc .wp-block-heading {
  color: var(--mid-gray, #5b616e) !important; /* 5.6:1 on #f8f6f3 */
}

/* ─────────────────────────────────────────────────────────────────
   CDU-43: implementation handoff from CDU-35 (UX)
   ───────────────────────────────────────────────────────────────── */

/* Fix 2 -- Sticky sidebar on long content pages (el-club, centros).
   Main column on these pages runs ~3300–3900 px; the 33% sidebar collapses
   to ~850–1000 px and leaves a 2k–3k px empty strip. Stickying the sidebar
   keeps the TOC + Contactar CTA in view across the full scroll. */
@media (min-width: 769px) {
  .wp-block-columns:has(> .um-page-content) > .wp-block-column:not(.um-page-content) {
    align-self: flex-start;
    position: sticky;
    top: 24px;
  }
}

/* Fix 3 -- Center .um-hero-image so the press-clipping collage on
   /colaboraciones/ doesn't abut the viewport edge. The figure is 1440 px
   wide but the natural <img> is 1024 px and renders left-aligned by default
   block flow; this gives ~208 px breathing room each side at desktop. */
.um-hero-image { text-align: center; }
.um-hero-image > img,
.um-hero-image > a > img { display: block; margin-inline: auto; max-width: 100%; }

/* ========== CDU-80 · TEAM-SEEKER FUNNEL · OUTBOUND AFFORDANCES ========== */
/* External-link affordance: cards/buttons that hand off to losquijotes.es. */

/* CDU-243: outbound CTA card on /contacto/ "¿Buscas el equipo competitivo?"
   column. Per CDU-226 review, recolored from navy to paper bg with red 4px
   left accent border (the navy band read as too heavy / "janky" against the
   warm-gray Hablemos section). A soft border + small shadow keeps the card
   legible against warm-gray without reintroducing a chip color. */
.um-contact-callout.um-contact-callout {
  border-top: 1px solid var(--wp--preset--color--border);
  border-right: 1px solid var(--wp--preset--color--border);
  border-bottom: 1px solid var(--wp--preset--color--border);
  box-shadow: 0 2px 8px rgba(26, 39, 68, 0.04);
}
.um-contact-callout a:hover,
.um-contact-callout a:focus {
  text-decoration: underline;
}

/* Generic external-link affordance for buttons/links: ensure target=_blank
   shows a small visual cue when the ↗ glyph isn't already in the label. */
.um-external .wp-block-button__link[target="_blank"] {
  /* nothing extra needed: the ↗ glyph is in the link copy itself */
}

/* CDU-80: layout fallback for um-* grids when blocks render flat (no
   .wp-block-group__inner-container wrapper). Original rules were authored
   for the classic group markup; modern um-child blocks render flat. */

/* ========== DECISION BAND (CDU-95)
   Two-card team-seeker funnel on /donde-jugar-ultimate-madrid/.
   Cards sit on the body's white bg, so the default white-on-transparent
   .um-btn-outline (wired for dark hero context) becomes invisible.
   Scope a red-on-white outline variant inside the band. */

/* ========== CDU-113 + CDU-238 · FOOTER LINK STYLE ==========
   theme.json sets the global link color to --red (#c4122f). Inside
   the navy footer (#1a2744) that yields ~3.0:1, which fails AA.
   Per CDU-226 prototype review, links sit at on-navy-mute (#a4a8b7,
   ~6.4:1 on navy, AA) -- softer than paper-white so the column h4
   headings carry the visual emphasis and the link list reads as
   secondary. Hover lifts to paper-white + underline so affordance
   stays explicit.
     - default:  #a4a8b7 on-navy-mute (AA 6.4:1)
     - hover:    #f4f4f5 paper-white  + underline
     - focus-visible: explicit ring for keyboard nav */
.um-site-footer a,
.um-site-footer a:visited {
  color: #a4a8b7;
  text-decoration: none;
  transition: color 120ms ease, text-decoration-color 120ms ease;
}
.um-site-footer a:hover,
.um-site-footer a:focus {
  color: #f4f4f5;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.um-site-footer a:focus-visible {
  outline: 2px solid #f4f4f5;
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- from um-tt25-shim.css --- */
/* ============================================================
 * UM TT25 grid shim (CDU-82)
 *
 * Legacy GP/GenerateBlocks markup wrapped grid children in
 * `.wp-block-group__inner-container`. TT25 / core-block markup
 * does not -- children are direct descendants of the grid div,
 * which has `is-layout-flow` and stacks them vertically.
 *
 * This shim retargets the canonical um-* grid containers so the
 * prototype layout renders against modern markup. Removed once
 * homepage + inner pages are reauthored against the CDU-60 pattern
 * set.
 * ============================================================ */

/* Homepage CTA banner: ensure it stretches edge-to-edge and the inner
 * content is constrained back to wide width. */

/* Hero stats row -- 3 inline numbers, not vertical. */
.um-hero-stats.is-layout-flow,
.um-hero-stats {
	display: flex !important;
	flex-wrap: wrap;
	gap: 40px !important;
	margin-bottom: 36px;
}
.um-hero-stats > * {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

@media (max-width: 600px) {
		.um-hero-stats.is-layout-flow,
	.um-hero-stats {
		gap: 24px !important;
	}
}

/* ========================================================================
   CDU-158 · TT25/WP 6.9 layout-flow fallbacks for /prensa/
   In WP 6.9, blocks with `layout: default` no longer render a
   `.wp-block-group__inner-container` wrapper, which broke the legacy
   `.um-* > .wp-block-group__inner-container` grid selectors. Mirror the
   grid declarations onto the block itself (under `is-layout-flow`) so the
   prensa page renders as designed without re-authoring every block.
   Scope is intentionally narrow to selectors used on /prensa/ (page 158).
   Broader regression for other um-* pages tracked separately.
   ======================================================================== */

/* CDU-202: native core/gallery (3-col) -- collapse to single column on narrow
   viewports to avoid the 2-up + orphan layout below ~600px. */
@media (max-width: 600px) {
	.wp-block-gallery.has-nested-images.columns-3 > .wp-block-image {
		flex-basis: 100% !important;
		width: 100% !important;
	}
}

/* ========================================================================
   CDU-237 · Hablemos contact 50/50 (home + /contacto/)
   Pattern um-child/contact-form. Two-column 50/50 at desktop, stacks <960.
   Left column carries overline + Hablemos heading + contact details + navy
   losquijotes.es callout. Right column is a white card wrapping the
   Jetpack contact-form. Form-element styling here so the card matches the
   prototype regardless of which page renders the pattern.
   ======================================================================== */
.um-hablemos { background: var(--wp--preset--color--warm-gray); }

.um-hablemos .um-hablemos-grid {
	max-width: 1200px;
	margin-inline: auto;
}

.um-hablemos-info > * + * {
	margin-top: var(--wp--preset--spacing--20);
}

.um-hablemos-details {
	list-style: none;
	margin: 0 0 var(--wp--preset--spacing--40);
	padding: 0;
}
.um-hablemos-details li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	font-size: 0.95rem;
	color: var(--wp--preset--color--ink-soft);
}
.um-hablemos-details li + li {
	border-top: 1px solid var(--wp--preset--color--divider);
}
.um-hablemos-details a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	font-weight: 500;
}
.um-hablemos-details a:hover,
.um-hablemos-details a:focus { text-decoration: underline; }
.um-hablemos-icon {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	background: var(--wp--preset--color--red-light);
	color: var(--red-madrid);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 1rem;
	line-height: 1;
}
/* CDU-212: SVG icons inside the .um-hablemos-icon chip -- sized to read clearly
   inside the 36px square and inherit the chip's brand-red currentColor. */
.um-hablemos-icon .um-icon { width: 18px; height: 18px; }

.um-hablemos-card {
	box-shadow: 0 8px 24px rgba(26,39,68,0.08);
	border: 1px solid var(--wp--preset--color--border);
}
.um-hablemos-card .wpcf7,
.um-hablemos-card .wpcf7-form { margin: 0; }
.um-hablemos-card .wpcf7-form p { margin: 0 0 var(--wp--preset--spacing--30, 1rem); }
.um-hablemos-card .wpcf7-form label {
	display: block;
	font-size: 0.88rem;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--wp--preset--color--ink);
}
.um-hablemos-card .wpcf7-form-control:not([type="submit"]):not([type="checkbox"]):not([type="radio"]) {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	font-size: 0.95rem;
	font-family: inherit;
	background: #fff;
	transition: border-color 120ms ease, box-shadow 120ms ease;
	box-sizing: border-box;
}
.um-hablemos-card .wpcf7-form-control:not([type="submit"]):focus {
	outline: none;
	border-color: var(--wp--preset--color--red);
	box-shadow: 0 0 0 3px rgba(196,18,47,0.15);
}
.um-hablemos-card textarea.wpcf7-form-control { min-height: 120px; resize: vertical; }
.um-hablemos-card .um-form-submit,
.um-hablemos-card .wpcf7-submit-wrap { margin-top: var(--wp--preset--spacing--40, 1.25rem); }
.um-hablemos-card .wpcf7-submit {
	width: 100%;
	padding: 14px 18px;
	background: var(--wp--preset--color--red);
	color: #fff;
	border: 0;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 120ms ease;
}
.um-hablemos-card .wpcf7-submit:hover {
	background: var(--wp--preset--color--red-dark);
}
.um-hablemos-card .wpcf7-response-output {
	margin: var(--wp--preset--spacing--30, 1rem) 0 0;
	padding: 0.75rem 1rem;
	border-radius: 6px;
	font-size: 0.9rem;
}
.um-hablemos-card .wpcf7-not-valid {
	border-color: var(--wp--preset--color--red, #c4122f) !important;
}
.um-hablemos-card .wpcf7-not-valid-tip {
	display: block;
	margin-top: 0.3rem;
	color: var(--wp--preset--color--red, #c4122f);
	font-size: 0.85rem;
	font-weight: 500;
}

@media (max-width: 960px) {
	.um-hablemos .um-hablemos-grid { gap: var(--wp--preset--spacing--40); }
	.um-hablemos-info,
	.um-hablemos-form { flex-basis: 100% !important; width: 100% !important; }
	.um-hablemos-card { padding: var(--wp--preset--spacing--40) !important; }
}

/* ========================================================================
   CDU-230 · UM home hero -- mobile photo as faded background
   On <=768px, hide the right-hand photo column (it stacked below the text
   on mobile, which read as orphaned per CDU-226 review) and promote the
   same hero photo onto the cover background span with a navy gradient
   overlay strong enough to keep white display text at WCAG AA.
   Desktop layout (two-column with photo on right) is untouched.
   ------------------------------------------------------------------------
   CDU-271 · Swapped from -1229x1536.jpg (~250 KB original-quality JPG) to
   the -w768.webp variant. Mobile viewport is <=768 CSS px and the photo
   sits behind a 0.88-0.94 navy overlay, so 768px webp is visually
   indistinguishable from the larger jpg while shedding ~150 KB. Paired
   with a same-URL preload in mu-plugins/um-perf.php so the browser can
   discover the LCP image from the initial document.
   ======================================================================== */
@media (max-width: 768px) {
	.um-hero-club > .wp-block-cover__background {
		background-color: transparent !important;
		background-image:
			linear-gradient(180deg, rgba(26, 39, 68, 0.88) 0%, rgba(26, 39, 68, 0.94) 100%),
			url('/wp-content/uploads/2026/04/01-hero-airborne-catch_ceu23-w768.webp');
		background-size: cover;
		background-position: center center;
		background-repeat: no-repeat;
		opacity: 1;
	}
	.um-hero-club .wp-block-columns > .wp-block-column:last-child {
		display: none !important;
	}
}

/* ========================================================================
   CDU-242 · CALLOUT BAND FLUSH AGAINST FOOTER
   ------------------------------------------------------------------------
   Closing CTA bands now use warm-gray (different tonal value from navy
   footer). Per CDU-226 review, the band must butt directly against the
   footer with no gap. WP's default block-spacing leaves a margin between
   root-level blocks, so we zero the bottom of the banner AND the top of
   the site footer to cover both pattern-rendered and inline copies.
   ======================================================================== */
.um-cta-banner.alignfull,
.alignfull.um-cta-banner {
	margin-bottom: 0 !important;
}

/* Inner blocks of the banner shouldn't claim a trailing margin either */
.um-cta-banner > *:last-child { margin-bottom: 0 !important; }

/* Kill the gap between the page <main> and the footer template-part.
   WP block-spacing adds blockGap-derived margins between root-level
   blocks (~84px on main's bottom, ~19px on the template-part footer's
   top). When the last section in <main> has its own bg color (e.g.
   Contacto's warm-gray form band), that gap shows as a white strip
   above the footer. Zero both regardless of what's inside <main>. */
body.page main.wp-block-group { margin-bottom: 0 !important; }
body.page .wp-site-blocks > footer.wp-block-template-part { margin-top: 0 !important; }

/* Site footer (inner pattern wrapper) -- zero top margin too */
.um-site-footer { margin-top: 0 !important; }

/* =========================================================================
   POLISH: visual effects
   Restrained micro-interactions to make the site feel alive without
   drifting into kitsch. Every rule below either:
   (a) replaces a browser default that looks crude (the black focus box
       on nav items the user flagged), or
   (b) adds a hover/focus affordance that hints at clickability.
   Effects respect `prefers-reduced-motion: reduce` -- if a visitor opts
   out of motion, transitions collapse to instant.
   ========================================================================= */

/* --- Nav: replace the default focus rectangle with a red bottom-stripe --- */
.um-site-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
  position: relative;
  padding-bottom: 6px;
  background: transparent !important;
  outline: none !important;
  border: 0 !important;
  text-decoration: none !important;
  transition: color 0.18s ease;
}
/* Suppress the user-agent text-decoration on the inner <a>, otherwise hovering
   draws a wobbly underline on top of the animated red stripe. */
.um-site-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:hover,
.um-site-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:focus,
.um-site-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:focus-visible {
  text-decoration: none !important;
}
/* The animated stripe -- drawn left-to-right, sits 2px above the baseline. */
.um-site-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--wp--preset--color--red, #c4122f);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s cubic-bezier(.4, .14, .3, 1);
}
.um-site-header .wp-block-navigation__container > .wp-block-navigation-item:hover > .wp-block-navigation-item__content,
.um-site-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:focus-visible,
.um-site-header .wp-block-navigation__container > .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content,
.um-site-header .wp-block-navigation__container > .wp-block-navigation-item[aria-current] > .wp-block-navigation-item__content {
  color: var(--wp--preset--color--red, #c4122f);
}
.um-site-header .wp-block-navigation__container > .wp-block-navigation-item:hover > .wp-block-navigation-item__content::after,
.um-site-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:focus-visible::after,
.um-site-header .wp-block-navigation__container > .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content::after,
.um-site-header .wp-block-navigation__container > .wp-block-navigation-item[aria-current] > .wp-block-navigation-item__content::after {
  transform: scaleX(1);
}

/* --- Buttons: subtle lift on hover, deeper red on press --- */
.wp-block-button__link {
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  will-change: transform;
}
.wp-block-button__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(196, 18, 47, 0.22);
}
.wp-block-button__link:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(196, 18, 47, 0.18);
}

/* --- Cards: lift on hover for the activity / path / school-program cards --- */
.um-activity-card,
.um-path-card,
.um-program-card,
.um-cta-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.um-activity-card:hover,
.um-path-card:hover,
.um-program-card:hover,
.um-cta-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(26, 39, 68, 0.08);
  border-color: var(--wp--preset--color--red-light, #fdf2f3);
}

/* --- Images inside cards / inline body figures: gentle zoom on hover --- */
.um-activity-card .wp-block-image,
.um-program-card .wp-block-image,
.um-cta-card .wp-block-image,
.um-inline-image,
.um-hero-image {
  overflow: hidden;
}
.um-activity-card .wp-block-image img,
.um-program-card .wp-block-image img,
.um-cta-card .wp-block-image img,
.um-inline-image img,
.um-hero-image img {
  transition: transform 0.45s cubic-bezier(.2, .1, .25, 1);
}
.um-activity-card:hover .wp-block-image img,
.um-program-card:hover .wp-block-image img,
.um-cta-card:hover .wp-block-image img,
.um-inline-image:hover img,
.um-hero-image:hover img {
  transform: scale(1.025);
}

/* --- SVG icons in inline lists / chips: small wiggle on hover --- */
.um-benefit-item:hover .um-benefit-check,
.um-feature-list li:hover .um-icon,
.um-materials-grid > .wp-block-column > p:hover .um-icon {
  transform: scale(1.12) rotate(-4deg);
}
.um-benefit-check,
.um-feature-list li .um-icon,
.um-materials-grid > .wp-block-column > p .um-icon {
  transition: transform 0.2s cubic-bezier(.5, 1.6, .4, 1);
}

/* --- Smooth scroll for in-page anchors (hero CTAs jumping to #paths/#about, TOC links) --- */
html { scroll-behavior: smooth; scroll-padding-top: 96px; }

/* --- Reveal-on-scroll: fade + slide up as a SECTION enters the viewport ---
   Scoped to whole sections / card grids, not individual paragraphs and
   headings. Otherwise long-form pages (Centros, El Club, Cómo se Juega,
   Sobre el Ultimate, etc.) animate every line as you read down the page,
   which is more janky than delightful. The matching IntersectionObserver
   in functions.php walks elements with the .um-reveal class and tags them
   with .is-visible once they cross ~12% into the viewport. */
/* Desktop/tablet only: on phones the initial-hidden state is never applied,
   so sections can't flash blank on first load (slow observers, short
   viewports, and scroll-restoration made the next section appear empty).
   The JS still tags .is-visible everywhere; without these rules that class
   is simply a no-op on mobile. */
@media (min-width: 761px) {
  .entry-content .um-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s cubic-bezier(.22, .61, .36, 1), transform 0.55s cubic-bezier(.22, .61, .36, 1);
  }
  /* Cards within a revealed grid stagger so the row doesn't pop in as a slab.
     Each card animates once its parent grid hits .is-visible. */
  .entry-content .um-reveal-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s cubic-bezier(.22, .61, .36, 1), transform 0.5s cubic-bezier(.22, .61, .36, 1);
  }
}
.entry-content .um-reveal.is-visible,
/* JS-disabled fallback: nothing is hidden. */
html.no-js .entry-content .um-reveal {
  opacity: 1;
  transform: none;
}
.entry-content .um-reveal-stagger.is-visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0s; }
.entry-content .um-reveal-stagger.is-visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.07s; }
.entry-content .um-reveal-stagger.is-visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.14s; }
.entry-content .um-reveal-stagger.is-visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.21s; }
html.no-js .entry-content .um-reveal-stagger > * { opacity: 1; transform: none; }

/* --- Honor user motion preference: collapse all animation when requested --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
}

/* ========== Upcoming Events block (um/upcoming-events) ==========
   Server-rendered via mu-plugins/um-events.php. Cards stack on mobile,
   row-flex on desktop. Inherits Inter via theme.json typography.
   ============================================================ */
.um-upcoming-events {
  margin: var(--wp--preset--spacing--50, 2.5rem) 0;
}
.um-upcoming-events__heading {
  font-size: var(--wp--preset--font-size--x-large);
  font-weight: 700;
  margin: 0 0 var(--wp--preset--spacing--30, 1rem);
  line-height: 1.2;
}
.um-upcoming-events__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--wp--preset--spacing--30, 1rem);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.um-upcoming-event {
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 6px;
  padding: var(--wp--preset--spacing--30, 1rem) var(--wp--preset--spacing--40, 1.25rem);
  background: var(--wp--preset--color--paper, #fff);
}
.um-upcoming-event__type {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--wp--preset--color--red, #d81f3f);
  margin-bottom: 0.4em;
}
.um-upcoming-event__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.3em;
  line-height: 1.3;
}
.um-upcoming-event__title a {
  color: inherit;
  text-decoration: none;
}
.um-upcoming-event__title a:hover { text-decoration: underline; }
.um-upcoming-event__when {
  font-weight: 600;
  margin: 0 0 0.2em;
  font-size: 0.95rem;
}
.um-upcoming-event__where {
  color: var(--wp--preset--color--ink-soft, #4a5570);
  font-size: 0.875rem;
  margin: 0 0 0.6em;
}
.um-upcoming-event__excerpt {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 0.8em;
}
/* Card CTA: rebuilt as a wp:buttons row so it inherits the site's red+round
   button style from the theme stylesheet. Margin-only override here. */
.um-upcoming-event__cta { margin: 0.7em 0 0 !important; }
.um-upcoming-event__cta .wp-block-button__link {
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.um-upcoming-event { position: relative; }
.um-upcoming-event__where a {
  color: var(--wp--preset--color--red, #d81f3f);
  text-decoration: none;
}
.um-upcoming-event__where a:hover { text-decoration: underline; }
.um-upcoming-event__time {
  font-weight: 600;
  color: var(--wp--preset--color--ink, #1a2744);
}
/* Edit pencil for logged-in editors. Top-right corner of each card. */
.um-upcoming-event__edit {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  color: var(--wp--preset--color--ink-soft, #4a5570);
  background: transparent;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.um-upcoming-event__edit:hover,
.um-upcoming-event__edit:focus-visible {
  background: var(--wp--preset--color--warm-gray, #f3ece2);
  color: var(--wp--preset--color--red, #d81f3f);
}
.um-upcoming-event__edit svg {
  width: 16px;
  height: 16px;
}
/* Empty-events panel: split into photo (left) + body (right). Photo collapses
   away on narrow viewports; buttons mirror the site's red CTA + outline pair. */
.um-upcoming-events__empty {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 2fr;
  gap: var(--wp--preset--spacing--40, 1.25rem);
  align-items: stretch;
  border: 1px solid var(--wp--preset--color--border, #e8e5e0);
  border-radius: 10px;
  overflow: hidden;
  background: var(--wp--preset--color--paper, #fff);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.um-upcoming-events__empty-figure {
  margin: 0;
  background: var(--wp--preset--color--warm-gray, #efe6d8);
  min-height: 220px;
}
.um-upcoming-events__empty-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.um-upcoming-events__empty-body {
  padding: var(--wp--preset--spacing--40, 1.25rem) var(--wp--preset--spacing--50, 1.75rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.um-upcoming-events__empty-eyebrow {
  margin: 0 0 0.35em;
  color: var(--wp--preset--color--red, #d81f3f);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.um-upcoming-events__empty-lede {
  margin: 0 0 var(--wp--preset--spacing--30, 1rem);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--wp--preset--color--ink, #1a2744);
}
.um-upcoming-events__empty-ctas {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0;
}
/* Use the site's CTA shape on the empty-state buttons regardless of the
   theme.json default -- borders, padding, radius all match the home + competir
   primary/outline button pair. */
.um-upcoming-events__empty-ctas .wp-block-button__link {
  border-radius: 8px;
  padding: 0.7rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.um-upcoming-events__empty-ctas .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  border: 2px solid var(--wp--preset--color--red, #d81f3f);
  color: var(--wp--preset--color--red, #d81f3f);
  padding: 0.6rem 1.15rem;
}
.um-upcoming-events__empty-ctas .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--wp--preset--color--red, #d81f3f);
  color: var(--wp--preset--color--paper, #fff);
}
/* Collapse to single column on narrow viewports; photo drops to a slim
   header strip so the panel still reads as a card and not a wall of text. */
@media (max-width: 720px) {
  .um-upcoming-events__empty {
    grid-template-columns: 1fr;
  }
  .um-upcoming-events__empty-figure {
    min-height: 140px;
    max-height: 180px;
  }
}

/* Materials grid: "Próximamente" badge for cards on /centros-educativos/ */
.um-materials-grid .um-soon {
  display: inline-block;
  margin-top: 0.5em;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--wp--preset--color--red, #d81f3f);
  text-transform: uppercase;
}
.um-materials-grid .um-soon a {
  color: inherit;
  text-decoration: underline;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  margin-left: 0.4em;
}
.um-materials-grid .um-soon a:hover { text-decoration: none; }

/* ========== Schools CF7 form (.um-schools-form) ==========
   Lives in the navy CTA band at the bottom of /centros-educativos/.
   Migrated from Jetpack to Contact Form 7 on 2026-05-21: selectors now
   target .wpcf7-* markup. Labels light on navy, inputs paper with red
   focus ring, submit button matches the red CTA system.
   ============================================================ */
.um-schools-form {
  max-width: 720px;
  margin-inline: auto;
}
.um-schools-form .wpcf7-form label {
  display: block;
  margin: 0 0 0.4em;
  color: var(--wp--preset--color--paper, #fff);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.um-schools-form .wpcf7-form p {
  margin: 0 0 var(--wp--preset--spacing--30, 1rem);
}
.um-schools-form .wpcf7-form-control:not([type="submit"]):not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--wp--preset--color--paper, #fff);
  color: var(--wp--preset--color--ink, #1a2744);
  font-size: 1rem;
  line-height: 1.4;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}
.um-schools-form textarea.wpcf7-form-control { min-height: 140px; resize: vertical; }
.um-schools-form .wpcf7-form-control:not([type="submit"]):focus {
  outline: none;
  border-color: var(--wp--preset--color--red, #d81f3f);
  box-shadow: 0 0 0 3px rgba(216, 31, 63, 0.28);
}
.um-schools-form ::placeholder {
  color: var(--wp--preset--color--ink-soft, #6c768f);
  opacity: 1;
}
.um-schools-form select.wpcf7-form-control {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--wp--preset--color--ink, #1a2744) 50%),
                    linear-gradient(135deg, var(--wp--preset--color--ink, #1a2744) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) calc(1.05rem),
                       calc(100% - 0.75rem) calc(1.05rem);
  background-size: 0.4rem 0.4rem;
  background-repeat: no-repeat;
}
/* Submit button: match the red CTA system */
.um-schools-form .um-form-submit,
.um-schools-form .wpcf7-submit-wrap {
  margin-top: var(--wp--preset--spacing--40, 1.25rem);
}
.um-schools-form .wpcf7-submit {
  background: var(--wp--preset--color--red, #d81f3f);
  color: var(--wp--preset--color--paper, #fff);
  border: 0;
  border-radius: 8px;
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
}
.um-schools-form .wpcf7-submit:hover {
  background: var(--wp--preset--color--red-2, #b8172f);
}
.um-schools-form .wpcf7-submit:active {
  transform: translateY(1px);
}
/* Response output (success / error) */
.um-schools-form .wpcf7-response-output {
  color: var(--wp--preset--color--paper, #fff);
  padding: var(--wp--preset--spacing--30, 1rem);
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  margin-top: var(--wp--preset--spacing--30, 1rem);
}
/* Validation error state */
.um-schools-form .wpcf7-not-valid {
  border-color: #ffb3c0 !important;
  box-shadow: 0 0 0 3px rgba(255, 179, 192, 0.35) !important;
}
.um-schools-form .wpcf7-not-valid-tip {
  display: block;
  margin-top: 0.3rem;
  color: #ffb3c0;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Warm-gray band variant (2026-05-21 pre-footer repaint).
   The schools form moved from a navy CTA band to a warm-gray one on
   /centros-educativos/. Light-on-dark labels were illegible on the beige
   background; restate them with ink colour and switch the validation chip
   to red while keeping the white inputs + red focus ring intact. */
.has-warm-gray-background-color .um-schools-form .wpcf7-form label {
  color: var(--wp--preset--color--ink, #1a2744);
}
.has-warm-gray-background-color .um-schools-form ::placeholder {
  color: var(--wp--preset--color--ink-soft, #6c768f);
}
.has-warm-gray-background-color .um-schools-form .wpcf7-response-output {
  color: var(--wp--preset--color--ink, #1a2744);
  background: rgba(0, 0, 0, 0.05);
}
.has-warm-gray-background-color .um-schools-form .wpcf7-not-valid {
  border-color: var(--wp--preset--color--red, #d81f3f) !important;
  box-shadow: 0 0 0 3px rgba(216, 31, 63, 0.22) !important;
}
.has-warm-gray-background-color .um-schools-form .wpcf7-not-valid-tip {
  color: var(--wp--preset--color--red, #d81f3f);
}

/* ========== Nav progressive collapse + meta cluster ==========
   Header layout: logo · nav (6 items) · meta-cluster (lang switch + CTA).
   - <1100px: drop the two pri-low items (Dónde Jugar + El Club ▾) so the
     four audience funnels (El Ultimate, Iniciación, Colegios, Competir)
     stay inline. Hidden items remain in the burger overlay when it opens.
   - <860px: force the burger overlay early (core defaults to <600px); the
     full inline nav stops fitting next to logo + CTA below this width.
   - Burger overlay (.is-menu-open) always shows every item regardless of
     the desktop-flow `display:none`, because the rules below scope to
     `:not(.is-menu-open)`.
   ============================================================ */

/* Meta cluster: lang-switcher + Contáctanos button.
   The standalone wp:group keeps the two items tight against each other
   (0.65rem gap) and the whole cluster spaced from the nav by the outer
   header group's default block-gap. */
.um-nav-meta { gap: 0.65rem !important; }
.um-nav-meta .wp-block-buttons { margin: 0; }

/* Progressive collapse. The burger toggle appears the moment any item starts
   hiding, so the full menu is always one tap away. */
@media (max-width: 1099px) {
  .um-site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .um-nav-pri-low {
    display: none;
  }
  /* Surface the burger as soon as anything collapses. */
  .um-site-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: flex !important;
  }
}

/* Force the full burger overlay at <860px: hide the inline ul entirely so
   only the burger remains next to the logo + meta cluster. */
@media (max-width: 860px) {
  .um-site-header .wp-block-navigation__responsive-container:not(.has-modal-open):not(.is-menu-open) {
    display: none !important;
  }
}

/* Burger overlay (any open state): make sure low-priority items are visible. */
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .um-nav-pri-low {
  display: list-item;
}

/* ========== Mobile / burger overlay styling ==========
   Core/navigation renders the overlay with right-aligned submenu items by
   default (inherits the `justifyContent:"right"` from the inline-nav layout).
   These overrides re-anchor everything to the left, give parent items a
   subtle bottom rule, and indent children naturally below their parent.
   Scoped to the open overlay so they only apply when the burger is open. */
.um-site-header .wp-block-navigation__responsive-container.is-menu-open {
  padding: var(--wp--preset--spacing--50, 2.5rem) var(--wp--preset--spacing--40, 1.25rem) var(--wp--preset--spacing--60, 3rem);
}
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
  align-items: stretch;
  justify-content: flex-start;
}
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  flex-direction: column;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
}
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:last-child {
  border-bottom: 0;
}
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  display: block;
  padding: 0.85rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--wp--preset--color--paper, #fff);
  text-align: left;
}
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu .wp-block-navigation-item__content {
  font-weight: 700;
}
/* Submenu containers: stack children flush-left under the parent, no
   right-flyout panel. Drop the inherited absolute-positioned panel styles. */
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
  position: static !important;
  width: 100% !important;
  min-width: 0 !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 0 0.6rem 1rem !important;
  margin: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  box-shadow: none !important;
}
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item {
  border-bottom: 0;
}
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  padding: 0.5rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
}
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
  color: var(--wp--preset--color--paper, #fff);
}
/* Submenu chevron toggle (hidden on mobile overlay since children are
   always expanded inline). */
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-icon {
  display: none;
}
/* Close button alignment + size. */
.um-site-header .wp-block-navigation__responsive-container-close {
  padding: 0.5rem;
  color: var(--wp--preset--color--paper, #fff);
}
.um-site-header .wp-block-navigation__responsive-container-close svg {
  width: 1.5rem;
  height: 1.5rem;
}
/* Burger trigger sizing (closed state). */
.um-site-header .wp-block-navigation__responsive-container-open {
  padding: 0.4rem;
  color: var(--wp--preset--color--ink, #1a2744);
}
.um-site-header .wp-block-navigation__responsive-container-open svg {
  width: 1.6rem;
  height: 1.6rem;
}

/* ========== Glossary live filter ==========
   Input rendered by post 325 at top of /aprende/glosario-ultimate-frisbee/.
   JS lives in functions.php (um_child_inline_glossary_filter).
   ============================================================ */
.um-glos-filter {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0;
  padding: 0 0 var(--wp--preset--spacing--30, 1rem);
  background: var(--wp--preset--color--paper, #fff);
  border-bottom: 1px solid var(--wp--preset--color--border, #e8e5e0);
}
.um-glos-filter input[type="search"] {
  width: 100%;
  padding: 0.7rem 0.95rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--wp--preset--color--ink, #1a2744);
  background: var(--wp--preset--color--paper, #fff);
  border: 1px solid var(--wp--preset--color--border, #e8e5e0);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.um-glos-filter input[type="search"]:focus {
  outline: none;
  border-color: var(--wp--preset--color--red, #d81f3f);
  box-shadow: 0 0 0 3px rgba(216, 31, 63, 0.18);
}
.um-glos-filter input[type="search"]::-webkit-search-cancel-button {
  cursor: pointer;
}
.um-glos-filter-status {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--wp--preset--color--ink-soft, #6c768f);
}
.is-glos-hidden { display: none !important; }
.screen-reader-text {
  clip: rect(1px,1px,1px,1px);
  clip-path: inset(50%);
  height: 1px; width: 1px;
  overflow: hidden;
  position: absolute !important;
  word-wrap: normal !important;
}

/* WUCC section: logo column constrained so the figure doesn't blow up on
   wide viewports. Mobile stacking handled by core columns CSS. */
.um-wucc-section-cols .um-wucc-logo img {
  max-width: 220px;
  width: 100%;
  height: auto;
}
@media (max-width: 781px) {
  .um-wucc-section-cols .um-wucc-logo {
    text-align: center;
  }
  .um-wucc-section-cols .um-wucc-logo img {
    max-width: 160px;
    margin-inline: auto;
  }
}

/* ========== Desktop nav flyout submenu ==========
   Default rendered overlay color is navy (set by the wp:navigation attr
   `overlayBackgroundColor:"navy"`) -- that's correct for the mobile burger
   panel, but on desktop the flyout that opens under "El Ultimate" / "El Club"
   should sit on white with ink-coloured text to match the main header.
   Scope to the closed responsive container so the mobile overlay
   (`.is-menu-open`) keeps its navy treatment.
   ============================================================ */
.um-site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container {
  background: var(--wp--preset--color--paper, #fff) !important;
  color: var(--wp--preset--color--ink, #1a2744) !important;
  border: 1px solid var(--wp--preset--color--border, #e8e5e0);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(10, 15, 34, 0.10);
  padding: 0.4rem 0;
  min-width: 13rem;
}
.um-site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item {
  border-bottom: 0;
}
.um-site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  color: var(--wp--preset--color--ink, #1a2744) !important;
  font-weight: 600;
  padding: 0.5rem 1rem;
  display: block;
}
.um-site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
  background: var(--wp--preset--color--warm-gray, #f3ece2);
  color: var(--wp--preset--color--red, #d81f3f) !important;
}

/* ========== Site logo: kill focus outline + lock size ==========
   The `cropped-header-logo` image gets a red focus ring on click in some
   browsers (link-around-img default `outline: auto -webkit-focus-ring-color`
   plus parent theme rules). Strip it. Lock the rendered width at 160 px
   across breakpoints -- the auto-shrink kicks in below ~700 px otherwise. */
.um-site-header .wp-block-site-logo,
.um-site-header .custom-logo-link,
.um-site-header .custom-logo-link:focus,
.um-site-header .custom-logo-link:focus-visible,
.um-site-header .custom-logo-link:active,
.um-site-header .wp-block-site-logo a:focus,
.um-site-header .wp-block-site-logo a:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
.um-site-header .wp-block-site-logo,
.um-site-header .custom-logo-link {
  display: inline-block;
  flex-shrink: 0;
}
/* Widths here are the source of truth for the `sizes` attribute set by
   um_child_logo_png_attrs() in functions.php. Change both together. */
.um-site-header .wp-block-site-logo img,
.um-site-header .custom-logo {
  width: 160px !important;
  max-width: 160px !important;
  height: auto;
  min-width: 115px;
}

/* Burger toggle ordering. Core/navigation renders the
   `.wp-block-navigation__responsive-container-open` button as the first child
   of the nav block, which leaves it sitting between the logo and the inline
   nav items once it appears at <=1099px. Push it to the right end of the row
   instead so it reads as a continuation of the nav, not a leading control. */
.um-site-header .wp-block-navigation {
  display: flex;
  align-items: center;
}
.um-site-header .wp-block-navigation__responsive-container-open {
  order: 99;
  margin-left: 0.5rem;
}
.um-site-header .wp-block-navigation__responsive-container {
  order: 1;
}

/* ========== Mobile nav refinements ==========
   At narrow viewports the 160 px logo + outer lang switcher + CTA + burger
   crowd each other. Two adjustments:
   1) Shrink the logo so it stops dominating the row.
   2) Hide the outer ES/EN cluster and surface its two links inside the
      burger overlay via the .um-mobile-only nav-link items added in
      parts/header.html.
   ============================================================ */

/* Logo shrinks below the burger-trigger breakpoint, but 115px is the floor:
   below that the disc outline and stars stop resolving. One step only, so the
   `sizes` attribute stays a two-case rule. */
@media (max-width: 860px) {
  .um-site-header .wp-block-site-logo img,
  .um-site-header .custom-logo {
    width: 115px !important;
    max-width: 115px !important;
    min-width: 115px;
  }
}

/* Outer lang switcher hides on mobile; mobile-only nav-link versions show
   inside the burger overlay only. */
.um-mobile-only { display: none !important; }

/* 740px matches the pretty-nav collapse: the flag+EN link stays in the bar
   for as long as the full desktop nav shows, then moves into the overlay. */
@media (max-width: 740px) {
  .um-site-header .um-lang-switcher { display: none; }
  /* Inside the open burger overlay, show the mobile-only lang links. */
  .um-site-header .wp-block-navigation__responsive-container.is-menu-open .um-mobile-only {
    display: list-item !important;
  }
}
/* Style the lang links inside the overlay as a horizontal pair with a divider,
   visually distinct from the regular nav items. */
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .um-lang-link {
  border-bottom: 0 !important;
  display: inline-block !important;
}
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .um-lang-link .wp-block-navigation-item__content {
  display: inline-block;
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  margin-top: 0.6rem;
  margin-right: 0.5rem;
}
.um-site-header .wp-block-navigation__responsive-container.is-menu-open .um-lang-link .wp-block-navigation-item__content:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--wp--preset--color--paper, #fff);
}

/* ========== Aprende inline SVG diagrams ==========
   Pages under /aprende/* embed teaching diagrams as raw inline `<svg>` with
   `width="100%" height="auto"`. The `height="auto"` attribute is invalid for
   SVG (browsers raise a console warning), so they fall back to `display:inline`
   + a default 150px height -- but width:100% combined with that fallback
   produces a 4000+ px tall element on some engines. Override:
   - display:block so the svg sizes intrinsically against the column
   - height:auto in CSS (valid here, unlike the HTML attr)
   - aspect-ratio derived from viewBox
   Scope to entry-content + skip the .um-icon sprite refs so the inline icons
   keep their 1em sizing. */
.entry-content svg[viewBox]:not(.um-icon):not(.um-inline-icon) {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: 600 / 400;
}

/* ============================================================
   Prensa atoms (v3) -- ported from prototype styles.css 2167-2380
   Sala de prensa page (post 158) uses these classes inline.
   ============================================================ */
.press-contact {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-mono);
	font-size: 13px;
	color: var(--ink-700);
	background: var(--cream-50);
	border: 1px solid var(--cream-200);
	padding: 10px 16px;
	border-radius: 999px;
}
.press-contact svg {
	color: var(--red-600);
	width: 16px !important;
	height: 16px !important;
	flex-shrink: 0;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.press-contact b { color: var(--navy-900); font-family: var(--font-sans); font-weight: 700; }

.press-feature {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: 56px;
	align-items: center;
	margin-top: 32px;
}
.wucc-badge {
	aspect-ratio: 1;
	border-radius: 50%;
	background: linear-gradient(135deg, #f4ead2 0%, #e9dca8 100%);
	border: 2px solid #1f3520;
	display: grid;
	grid-template-rows: auto auto auto auto;
	place-items: center;
	gap: 4px;
	padding: 24px;
	color: #1f3520;
	font-family: var(--font-sans);
	text-align: center;
}
.wucc-badge__loc {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.16em;
	font-weight: 700;
}
.wucc-badge__big {
	font-size: clamp(48px, 6vw, 80px);
	font-weight: 900;
	letter-spacing: -0.04em;
	line-height: 0.9;
}
.wucc-badge__year {
	font-size: clamp(28px, 3vw, 40px);
	font-weight: 900;
	letter-spacing: -0.02em;
	line-height: 1;
	color: #b13a2a;
}
.wucc-badge__date {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	font-weight: 600;
}

.press-gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}
.press-gallery > * { margin-top: 0 !important; margin-block-start: 0 !important; }

.press-kits {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-top: 32px;
}
.press-kits > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.press-kit {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-3);
	padding: 24px;
	display: flex;
	flex-direction: column;
}
.press-kit > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.press-kit h3 { color: var(--navy-900); font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.press-kit p { font-size: 14px; margin: 8px 0 0; color: var(--ink-700); }
.press-kit__meta {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--ink-500);
	letter-spacing: 0.04em;
	margin-top: 14px !important;
}

.boilerplate {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}
.boilerplate > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.boilerplate__col {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-3);
	padding: 28px;
}
.boilerplate__col > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.boilerplate__col p { font-size: 14px; line-height: 1.55; margin: 0 0 10px; }
.boilerplate__meta {
	margin-top: 16px !important;
	padding-top: 16px;
	border-top: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	color: var(--ink-700);
}
.boilerplate__meta b { color: var(--navy-900); font-weight: 700; }

.press-contact-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-top: 32px;
}
.press-contact-grid > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.press-contact-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-3);
	padding: 24px;
}
.press-contact-card > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.press-contact-card h4 {
	color: var(--navy-900);
	margin: 0 0 12px;
	font-size: 16px;
	font-weight: 700;
}
.press-contact-card ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.press-contact-card ul li {
	font-size: 14px;
	color: var(--ink-700);
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.press-contact-card ul li svg {
	color: var(--red-600);
	flex-shrink: 0;
	width: 16px !important;
	height: 16px !important;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.press-contact-card ul li b { color: var(--navy-900); }

@media (max-width: 1024px) {
	.press-feature { grid-template-columns: 1fr; gap: 32px; }
	.wucc-badge { max-width: 320px; margin: 0 auto; }
	.press-kits  { grid-template-columns: 1fr; }
	.boilerplate { grid-template-columns: 1fr; }
	.press-contact-grid { grid-template-columns: 1fr; }
	.press-gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
	.press-gallery { grid-template-columns: 1fr; }
}

/* WUCC badge: image variant supersedes drawn circle when an uploaded WUCC
   logo is available. Keeps round aspect + cap so it sits in the same slot. */
.wucc-badge--img {
	display: block;
	width: 100%;
	max-width: 320px;
	height: auto;
	aspect-ratio: 1;
	border-radius: 50%;
	background: transparent;
	border: 0;
	padding: 0;
	object-fit: contain;
}

/* Glossary letter nav + per-letter heading (ported from prototype 2001-2036).
   Single bottom rule (filter input above already supplies the divider). Links
   distribute across the full row width so the alphabet reads as a row. */
.glossary-nav {
	position: sticky;
	top: 72px;
	z-index: 5;
	background: var(--paper, #fff);
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 6px 0;
	margin: 4px 0 8px !important;
	border-top: 0;
	border-bottom: 1px solid var(--border);
	justify-content: space-between;
}
.glossary-nav > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.glossary-nav__l {
	flex: 1 1 32px;
	min-width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 700;
	color: var(--ink-500);
	border-radius: 6px;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
/* Below desktop, lock the alphabet into two equal grid rows so a partial last
   row never leaves an orphan letter sitting alone. Letter count is fixed by
   the data (~20 entries today), so a 10-col grid splits evenly enough; the
   `auto-fit` fallback keeps it sane if the data grows. */
@media (max-width: 1279px) {
	.glossary-nav {
		display: grid;
		grid-template-columns: repeat(10, 1fr);
		justify-content: stretch;
	}
	.glossary-nav__l { width: auto; }
}
@media (max-width: 600px) {
	.glossary-nav { grid-template-columns: repeat(7, 1fr); }
}
.glossary-nav__l:hover,
.glossary-nav__l:focus { background: var(--red-50); color: var(--red-600); }
.glossary-letter {
	margin-top: 28px;
	scroll-margin-top: 140px;
}
.glossary-letter > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.glossary-letter__h {
	font-size: 36px !important;
	font-weight: 800;
	color: var(--red-600);
	letter-spacing: -0.02em;
	line-height: 1;
	border-bottom: 1px solid var(--border);
	padding-bottom: 12px;
	margin: 0 0 8px !important;
}

/* ─── Aprende hub: category grid (ported from prototype 1241-1317) ─── */
.hub-grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 20px;
	margin-top: 32px;
}
.hub-grid > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.hub-cat {
	grid-column: span 6;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-3);
	padding: 32px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.hub-cat > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.hub-cat--wide { grid-column: span 12; }
.hub-cat--deep {
	background: var(--navy-900);
	color: #fff !important;
	border-color: transparent;
}
.hub-cat--deep p { color: rgba(255,255,255,0.78) !important; }
.hub-cat--deep .hub-cat__title { color: #fff !important; }
.hub-cat--deep .hub-cat__list li { border-top-color: rgba(255,255,255,0.12) !important; }
.hub-cat--deep .hub-cat__list a { color: rgba(255,255,255,0.85) !important; }
.hub-cat--deep .hub-cat__list a:hover { color: #fff !important; }
.hub-cat--deep .hub-cat__list a b { color: #fff !important; }
.hub-cat--deep .hub-cat__list a small { color: rgba(255,255,255,0.55) !important; }
.hub-cat--deep .hub-cat__head .kicker { color: rgba(255,255,255,0.5) !important; }
.hub-cat__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
}
.hub-cat__num {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	color: var(--red-600);
}
.hub-cat__title {
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -0.018em;
	color: var(--navy-900);
	margin: 0;
}
.hub-cat__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}
.hub-cat__list li { border-top: 1px solid var(--border); }
.hub-cat__list a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 0;
	gap: 16px;
	color: var(--ink-700);
	text-decoration: none;
	transition: color .15s, padding-left .15s ease;
}
.hub-cat__list a:hover {
	color: var(--navy-900);
	padding-left: 6px;
}
.hub-cat__list a:hover .arrow {
	transform: translateX(3px);
	opacity: 1;
}
.hub-cat__list a .arrow {
	color: var(--red-600);
	opacity: 0.5;
	transition: transform .2s ease, opacity .15s;
	flex-shrink: 0;
}
.hub-cat__list a .arrow svg {
	width: 16px !important;
	height: 16px !important;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.hub-cat__list a b { color: var(--navy-900); font-weight: 600; }
.hub-cat__list a small {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--ink-400);
	letter-spacing: 0.04em;
}
@media (max-width: 760px) {
	.hub-cat { grid-column: span 12; padding: 24px; }
	.hub-cat__title { font-size: 22px; }
}

/* ─── Image collage (mixed photo placeholders, ported from 1484-1496).
   The grid auto-rows control the height; force any inline `aspect-ratio`
   set on .img-ph children to release so the placeholder fills the grid
   cell without overflowing into the next row. Overflow hidden on the cell
   keeps the caption box inside even when the script provides an
   aspect-ratio that would otherwise stretch the box. */
.collage {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	grid-auto-rows: 120px;
	gap: 16px;
	margin-top: 32px;
}
.collage > * {
	margin-top: 0 !important;
	margin-block-start: 0 !important;
	border-radius: var(--r-3);
	overflow: hidden;
}
.collage > .img-ph {
	aspect-ratio: auto;
	height: 100%;
	min-height: 0;
}
.collage .c-a { grid-column: span 4; grid-row: span 2; }
.collage .c-b { grid-column: span 2; grid-row: span 1; }
.collage .c-c { grid-column: span 2; grid-row: span 1; }
.collage .c-d { grid-column: span 3; grid-row: span 2; }
.collage .c-e { grid-column: span 3; grid-row: span 2; }
@media (max-width: 760px) {
	.collage:not(.collage--trio) { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 100px; }
	.collage:not(.collage--trio) > * { grid-column: span 1 !important; grid-row: span 1 !important; }
}
@media (max-width: 540px) {
	.collage { grid-template-columns: 1fr; grid-auto-rows: 160px; }
}

/* 3-image variant used on Centros (Aprende uses the 5-cell layout above).
   Big hero on the left at 2:1 horizontal, two squares stacked on the
   right. Below tablet the hero goes 100% w/ ratio kept, small pair drops
   to 50% width squares side-by-side. */
.collage--trio {
	display: grid;
	grid-template-columns: 2fr 1fr;
	grid-template-rows: auto;
	grid-auto-rows: auto;
	gap: 16px;
	align-items: start;
}
.collage--trio > .img-ph { height: auto; min-height: 0; }
.collage.collage--trio > .img-ph.c-a {
	grid-column: 1;
	grid-row: 1 / span 2;
	aspect-ratio: 2 / 1;
}
.collage.collage--trio > .img-ph.c-b {
	grid-column: 2;
	grid-row: 1;
	aspect-ratio: 1 / 1;
}
.collage.collage--trio > .img-ph.c-c {
	grid-column: 2;
	grid-row: 2;
	aspect-ratio: 1 / 1;
}
@media (max-width: 760px) {
	.collage--trio {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto auto;
		grid-auto-rows: auto;
	}
	.collage.collage--trio > .img-ph.c-a {
		grid-column: 1 / span 2;
		grid-row: 1;
		aspect-ratio: 3 / 2;
	}
	.collage.collage--trio > .img-ph.c-b,
	.collage.collage--trio > .img-ph.c-c {
		grid-column: auto;
		grid-row: 2;
		aspect-ratio: 1 / 1;
	}
}

/* ============================================================
   Home atoms (v3) -- ported from prototype styles.css 863-960,
   plus inline-only classes (.cards-row, .split, .page-head--hero,
   .cta-band--deep) reconstructed from prototype components.jsx.
   ============================================================ */

/* Hero variant of page-head: taller, big condensed headline, no crumbs. */
.page-head--hero {
	padding-top: clamp(56px, 6vw, 96px) !important;
	padding-bottom: clamp(56px, 6vw, 96px) !important;
}
.page-head--hero .h-hero {
	font-size: clamp(44px, 6.4vw, 88px);
	letter-spacing: -0.028em;
	line-height: 0.98;
	color: #fff;
	margin: 0 0 24px;
}
.page-head--hero .h-hero em {
	font-style: normal;
	color: var(--red-500, #e8534b);
}

.hero-grid {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 56px;
	align-items: center;
}
.hero-grid > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.hero-text > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.hero-text > * + * { margin-top: 16px !important; }
.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 32px !important;
}
.hero-stats {
	display: grid;
	grid-template-columns: repeat(3, auto);
	gap: 0;
	margin-top: 40px !important;
	border-top: 1px solid rgba(255,255,255,0.12);
	padding-top: 24px;
}
.hero-stats > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.hero-stats__item { padding-right: 36px; }
.hero-stats__item + .hero-stats__item {
	padding-left: 36px;
	border-left: 1px solid rgba(255,255,255,0.12);
}
.hero-stats__n {
	font-size: clamp(32px, 3.2vw, 44px);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #fff;
	line-height: 1;
	margin-bottom: 6px;
	font-variant-numeric: tabular-nums;
}
.hero-stats__l {
	font-family: var(--font-mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: rgba(255,255,255,0.55);
	margin: 0;
}
.hero-media {
	position: relative;
	aspect-ratio: 4 / 5;
	border-radius: var(--r-4);
	background: var(--ink-50);
	overflow: hidden;
}
.hero-media__chip {
	position: absolute;
	left: -16px;
	top: 24px;
	background: #fff;
	color: var(--navy-900);
	padding: 12px 16px;
	border-radius: 12px;
	box-shadow: 0 18px 50px -20px rgba(0,0,0,0.5);
	font-size: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
	z-index: 2;
}
.hero-media__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--red-600);
	flex-shrink: 0;
}
.hero-media__chip b { display: block; font-weight: 700; }
.hero-media__chip em {
	font-style: normal;
	color: var(--ink-500);
	font-family: var(--font-mono);
	font-size: 11px;
}

/* 4-up card row (paths / next steps) */
.cards-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-top: 32px;
}
.cards-row.cards-row--three { grid-template-columns: repeat(3, 1fr); }
/* Auto-fit variant for card counts that do not divide evenly (e.g. the 5-card
   /que-hacemos/ hub): fills the row on wide screens and reflows down gracefully.
   The base .cards-row media rules below still cap it at 2-up / 1-up on smaller
   viewports. */
.cards-row.cards-row--auto { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.cards-row > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.cards-row .card,
.cards-row .card-link {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-3);
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	text-decoration: none;
	color: var(--ink-700);
	transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.cards-row a.card:hover,
.cards-row .card-link:hover {
	border-color: var(--border-strong);
	transform: translateY(-2px);
	box-shadow: 0 12px 32px -16px rgba(11,23,48,0.18);
}
.cards-row .card h3,
.cards-row .card-link h3 {
	color: var(--navy-900);
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: 0;
}
.cards-row .card-link { color: var(--ink-700); }
.cards-row .card .card-arrow,
.cards-row .card-link .card-arrow {
	color: var(--red-600);
	font-weight: 700;
	margin-top: auto;
	padding-top: 8px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}
.cards-row .card .card-arrow svg,
.cards-row .card-link .card-arrow svg {
	width: 14px !important;
	height: 14px !important;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.cards-row .card p {
	font-size: 14px;
	margin: 0;
	color: var(--ink-700);
}
.card-icon {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--red-50);
	color: var(--red-600);
	display: grid;
	place-items: center;
	margin-bottom: 4px;
}
.card-icon svg {
	width: 20px !important;
	height: 20px !important;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Split layout: image + body 2-col, reverses on .split--reverse */
.split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: center;
	margin-top: 32px;
}
.split > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.split--reverse .split__media { order: 2; }
.split__body > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.split__body > * + * { margin-top: 14px !important; }

/* Split media that fills the content-column height, top-aligned, so the
   subject at the top of the photo (e.g. a disc) stays visible instead of
   being cropped by the centered fixed-ratio default. Restores a ratio
   below the single-column breakpoint so the stacked image keeps height. */
.split__media--fill { align-self: stretch; }
.split__media--fill .um-img-wrap { height: 100%; aspect-ratio: auto; }
.split__media--fill .um-img-real { object-position: 50% 0; }
@media (max-width: 960px) {
	.split__media--fill .um-img-wrap { height: auto; aspect-ratio: 5 / 4; }
}

/* Inline deep CTA band (used at the bottom of pages that want a navy
   panel without a full alignfull tinted section). */
.cta-band--deep {
	background: var(--navy-900);
	color: #fff;
	border: 0;
	border-radius: var(--r-4);
	padding: 40px clamp(24px, 4vw, 56px);
	text-align: center;
	margin-top: 56px;
}
.cta-band--deep > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.cta-band--deep h2,
.cta-band--deep h3 { color: #fff; margin: 0 0 8px; }
.cta-band--deep p {
	color: rgba(255,255,255,0.78);
	margin: 0 auto 20px;
	max-width: 60ch;
}
.cta-band--deep .btn-actions {
	display: inline-flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
}

@media (max-width: 960px) {
	.cards-row { grid-template-columns: 1fr 1fr !important; }
	/* 3-card row reads better as a single column once we drop below desktop
	   (orphan 3rd card otherwise wraps under a 2-col fit). */
	.cards-row.cards-row--three { grid-template-columns: 1fr !important; }
	.split { grid-template-columns: 1fr; gap: 28px; }
	.split--reverse .split__media { order: 0; }
}
/* Tablet/desktop keeps the 2-col hero (image right). Below tablet the hero
   stacks single-col with the photo FIRST (order: -1) so it lands in the
   first fold instead of ~y=838 below it; hero-text keeps its own internal
   flow and spacing. Outer .hero-media and inner .um-img-wrap flatten
   together from the desktop 4:5 portrait to 16:10 (the inner wrap carries
   an inline 4:5, hence the !important overrides) so no empty box shows. */
@media (max-width: 760px) {
	.hero-grid { grid-template-columns: 1fr; gap: 28px; }
	.hero-media {
		order: -1;
		width: 100%;
		max-height: none;
		aspect-ratio: 16 / 10;
	}
	.hero-media .um-img-wrap {
		aspect-ratio: auto !important;
		height: 100%;
	}
	/* The 16:10 crop centers vertically and beheads the action: the flying
	   disc sits in the top fifth of the source photo. Bias the crop upward. */
	.hero-media .um-img-real { object-position: center 12%; }
}

/* Phone vertical rhythm: the fluid spacing presets bottom out too tall on
   small screens (spacing|70 = 64px), leaving oversized white bands between
   the hero and the first content section on el-club, guides, etc. Redefine
   the presets' custom properties at phone width so every section that uses
   them tightens proportionally; sections with bespoke pixel paddings are
   untouched. */
@media (max-width: 560px) {
	:root {
		--wp--preset--spacing--60: 2.25rem;
		--wp--preset--spacing--70: 2.5rem;
		--wp--preset--spacing--80: 3rem;
	}
}
@media (max-width: 540px) {
	.cards-row { grid-template-columns: 1fr !important; }
	.hero-stats { grid-template-columns: 1fr; }
	.hero-stats__item + .hero-stats__item {
		padding-left: 0;
		border-left: 0;
		border-top: 1px solid rgba(255,255,255,0.12);
		padding-top: 16px;
		margin-top: 16px;
	}
	.hero-stats__item { padding-right: 0; }
}

/* ============================================================
   Centros atoms (v3) -- .programs-grid, .program-card,
   .material-grid, .material-card, .kbd-tag. Authored to mirror
   prototype-aligned .hub-cat + .activity-card vibes since the
   prototype JSX doesn't fully define these.
   ============================================================ */
/* auto-fit + a 240px floor keeps cards readable: drops from 2 columns to 1
   whenever the container can't hold two 240px cards, so a narrowed tablet
   main column never squeezes them to unreadable widths. */
.programs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
	margin-top: 24px;
}
.programs-grid > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.program-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-3);
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.program-card > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.program-card__dur {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	color: var(--red-600);
	text-transform: uppercase;
}
.program-card h3 {
	color: var(--navy-900);
	font-size: 18px;
	font-weight: 700;
	margin: 0;
}
.program-card p {
	font-size: 14px;
	color: var(--ink-700);
	margin: 0;
}

.material-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-top: 20px;
}
.material-grid > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.material-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-3);
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	position: relative;
}
.material-card > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.material-card__row {
	display: flex;
	align-items: center;
	gap: 12px;
}
.material-card__icon {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	background: var(--red-50);
	color: var(--red-600);
	display: grid;
	place-items: center;
}
.material-card__icon svg {
	width: 18px !important;
	height: 18px !important;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.material-card h4 {
	color: var(--navy-900);
	font-size: 15px;
	font-weight: 700;
	margin: 0;
}
.material-card p {
	font-size: 13.5px;
	color: var(--ink-700);
	margin: 0;
}
.kbd-tag {
	align-self: flex-start;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	background: var(--ink-50);
	color: var(--ink-500);
	padding: 3px 8px;
	border-radius: 4px;
	font-weight: 600;
}
@media (max-width: 760px) {
	.programs-grid { grid-template-columns: 1fr; }
	.material-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Contacto atoms (v3) -- 2-col form-left / cards-right layout.
   Mirrors Ultimate Madrid.html ContactoPage prototype.
   ============================================================ */
.contact-layout {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 56px;
	align-items: start;
}
.contact-layout > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.contact-form > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.contact-aside {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.contact-aside > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.contact-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-3);
	padding: 24px;
}
.contact-card > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.contact-card .eyebrow { font-size: 11px; }
.contact-card h3 {
	color: var(--navy-900);
	font-size: 20px;
	font-weight: 700;
	margin: 6px 0 0 !important;
	letter-spacing: -0.01em;
}
.contact-card p {
	font-size: 14px;
	color: var(--ink-700);
	margin: 10px 0 12px !important;
	line-height: 1.5;
}
.contact-card .btn-link { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.contact-card--dark {
	background: var(--navy-900);
	border-color: transparent;
}

/* CF7 form skin to match v3 surface */
.contact-form .wpcf7,
.um-section .wpcf7 {
	margin: 0;
}
.contact-form .wpcf7-form,
.um-section .wpcf7-form {
	display: grid;
	gap: 8px;
}
.contact-form .wpcf7-form > p,
.um-section .wpcf7-form > p { margin: 0; }
.contact-form .wpcf7-form label,
.um-section .wpcf7-form label { gap: 4px; margin-bottom: 4px; }
.contact-form .wpcf7-form .wpcf7-not-valid-tip,
.um-section .wpcf7-form .wpcf7-not-valid-tip {
	display: block;
	margin-top: 4px;
	padding: 6px 10px;
	background: rgba(216, 32, 42, 0.08);
	border-left: 3px solid var(--red-600);
	border-radius: 4px;
	color: var(--red-600);
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
/* Overall form response (after submit). Same mono+caps language as the
   per-field tips, but louder: bigger type, heavier weight, thicker left
   bar so it reads as a summary banner rather than another field tip. */
.contact-form .wpcf7-response-output,
.um-section .wpcf7-response-output {
	display: block;
	margin: 20px 0 0 !important;
	padding: 14px 18px !important;
	border: 0 !important;
	border-left: 5px solid var(--red-600) !important;
	border-radius: 6px;
	background: rgba(216, 32, 42, 0.12);
	color: var(--red-600);
	font-family: var(--font-mono);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.45;
}
.contact-form .wpcf7 form.sent .wpcf7-response-output,
.um-section .wpcf7 form.sent .wpcf7-response-output {
	background: rgba(34, 139, 87, 0.08);
	border-left-color: #228b57 !important;
	color: #228b57;
}
.contact-form .wpcf7-form label,
.um-section .wpcf7-form label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-500);
	margin: 0;
}
.contact-form .wpcf7-form input[type="text"],
.contact-form .wpcf7-form input[type="email"],
.contact-form .wpcf7-form select,
.contact-form .wpcf7-form textarea,
.um-section .wpcf7-form input[type="text"],
.um-section .wpcf7-form input[type="email"],
.um-section .wpcf7-form select,
.um-section .wpcf7-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	font-family: var(--font-sans);
	font-size: 15px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--navy-900);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 8px;
	transition: border-color .15s ease, box-shadow .15s ease;
}
/* Select needs explicit appearance reset + custom chevron, otherwise the
   native control reserves extra width for its picker and ends up narrower
   than its sibling text inputs. */
.contact-form .wpcf7-form select,
.um-section .wpcf7-form select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d8202a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 14px;
	padding-right: 38px;
}
.contact-form .wpcf7-form input:focus,
.contact-form .wpcf7-form select:focus,
.contact-form .wpcf7-form textarea:focus {
	outline: none;
	border-color: var(--red-600);
	box-shadow: 0 0 0 3px rgba(216,32,42,0.12);
}
.contact-form .wpcf7-form textarea { min-height: 140px; resize: vertical; }
/* CF7 wraps the submit inside <div class="um-form-submit"> → <p> → input.
   Make every level in that chain a right-justifying flex container so the
   button hugs the right edge regardless of whether CF7 wraps it in <p> or
   not in a future version. */
.contact-form .um-form-submit,
.um-section .um-form-submit {
	display: flex;
	justify-content: flex-end;
	margin-top: 16px;
	width: 100%;
}
.contact-form .um-form-submit p,
.um-section .um-form-submit p {
	margin: 0 !important;
	display: flex;
	justify-content: flex-end;
	flex: 1 1 100%;
	text-align: right;
}
.contact-form .wpcf7-form p:has(.wpcf7-submit),
.um-section .wpcf7-form p:has(.wpcf7-submit) {
	text-align: right;
	margin-top: 16px;
}
/* Cloudflare Turnstile widget moved below the fields, sharing a row with the
   submit button: Turnstile left-aligned (order -1 puts it before the submit
   <p> that comes first in CF7's DOM), submit right-aligned via
   space-between. Narrow screens stack them, checkbox above the button. */
.um-form-submit--with-turnstile,
.contact-form .um-form-submit--with-turnstile,
.um-section .um-form-submit--with-turnstile {
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
}
.um-form-submit--with-turnstile p {
	flex: 0 0 auto !important;
}
.um-form-submit--with-turnstile .wpcf7-turnstile { order: -1; }
@media (max-width: 480px) {
	.um-form-submit--with-turnstile {
		flex-direction: column;
		align-items: stretch;
	}
	.um-form-submit--with-turnstile p { justify-content: center; }
	.um-form-submit--with-turnstile .wpcf7-turnstile { align-self: center; }
}
/* Removed `.wpcf7-submit { margin-left: auto }`: combined with
   `justify-content: flex-end` on the parent it ate all the free space
   between the spinner (order: -1) and submit, leaving the spinner stuck
   at the left edge instead of next to the button. */
/* CF7 spinner sits AFTER submit in the DOM. Inside the flex-end parent
   this leaves it to the right of the button. Flip flex order so the
   spinner sits to the LEFT of the submit button, keeping the button
   flush to the right edge of its container. */
.contact-form .wpcf7-spinner,
.um-section .wpcf7-spinner {
	order: -1;
	margin: 0 12px 0 0;
	align-self: center;
}
.contact-form .wpcf7-submit,
.um-section .wpcf7-submit {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	border: 0;
	border-radius: 999px;
	background: var(--red-600);
	color: #fff;
	font-family: var(--font-sans);
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.01em;
	cursor: pointer;
	transition: background .15s ease, transform .15s ease;
}
.contact-form .wpcf7-submit:hover,
.um-section .wpcf7-submit:hover {
	background: var(--navy-900);
	transform: translateY(-1px);
}

@media (max-width: 960px) {
	.contact-layout { grid-template-columns: 1fr; gap: 32px; }
}
/* Below tablet, force a comfortable horizontal pad on the contact form area
   so fields don't ride up to the viewport edge. Scoped to the contact page
   only: the old unscoped `.um-section-inner { padding-left/right: 20px }`
   stacked on top of `.um-section`'s own inline padding-inline (spacing--40)
   everywhere else on the site, double-padding every mobile section. */
@media (max-width: 600px) {
	.um-section:has(.contact-layout) .um-section-inner {
		padding-left: 20px;
		padding-right: 20px;
	}
	.contact-layout { padding: 0; }
	.contact-form .wpcf7-form { gap: 12px; }
}

/* ============================================================
   Card last-child margin reset
   Bottom margins on the last child inside card-like atoms compounded
   with the card's own padding, producing visibly uneven top/bottom
   spacing. Strip trailing margins from the last child across all card
   containers in one place.
   ============================================================ */
.factbox > :last-child,
.factbox > :last-child p:last-child,
.side-card > :last-child,
.side-card > :last-child p:last-child,
.contact-card > :last-child,
.press-contact-card > :last-child,
.press-kit > :last-child,
.hub-cat > :last-child,
.program-card > :last-child,
.material-card > :last-child,
.activity__body > :last-child,
.boilerplate__col > :last-child,
.spirit > :last-child,
.spirit > :last-child p:last-child,
.spirit__body > :last-child {
	margin-bottom: 0 !important;
}

/* ============================================================
   English landing atoms (v3) -- ported from prototype styles.css
   2333-2370. Two-up choice cards used by /en/.
   ============================================================ */
.en-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-top: 32px;
}
.en-cards > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.en-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-4);
	padding: 36px;
	display: flex;
	flex-direction: column;
	text-decoration: none !important;
	color: inherit;
	transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.en-card > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.en-card > * + * { margin-top: 14px !important; }
/* Push the CTA to the bottom of equal-height cards so extra vertical
   space sits between the description and the button, not below it.
   The preceding paragraph carries a margin-bottom because `margin-top:
   auto` on the button collapses to 0 when the paragraph fills the card,
   leaving no breathing room. */
.en-card > .btn { margin-top: auto !important; padding-top: 12px; }
.en-card > p:has(+ .btn) { margin-bottom: 20px; }
.en-card:hover {
	border-color: var(--border-strong);
	transform: translateY(-3px);
	box-shadow: 0 24px 60px -28px rgba(11,23,48,0.2);
}
.en-card__icon {
	width: 56px;
	height: 56px;
	border-radius: 14px;
	background: var(--red-50);
	color: var(--red-600);
	display: grid;
	place-items: center;
}
.en-card__icon svg {
	width: 28px !important;
	height: 28px !important;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.en-card h2,
.en-card h3 {
	font-size: clamp(24px, 2.4vw, 32px);
	color: var(--navy-900);
	margin: 0;
}
.en-card p {
	font-size: 16px;
	line-height: 1.5;
	color: var(--ink-700);
	margin: 0;
}
.en-card__hint {
	margin-top: 16px !important;
	padding-top: 16px;
	border-top: 1px dashed var(--border);
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.06em;
	color: var(--ink-500);
}
@media (max-width: 1024px) {
	.en-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   Pretty nav (Phase 4): ported from prototype components.jsx
   .nav-item / .dropdown system. Replaces the wp:navigation core
   block on desktop with custom HTML in parts/header.html.

   Desktop: inline horizontal row, items w/ has-menu open a
   dropdown panel on hover/focus showing tag + label + desc.
   Mobile: hidden + burger toggles a sliding accordion overlay.
   ============================================================ */
.um-pretty-nav {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: clamp(8px, 1.4vw, 24px);
}
.um-pn__item {
	position: relative;
}
.um-pn__link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 8px 0;
	color: var(--navy-900);
	font-family: var(--font-sans);
	font-weight: 600;
	font-size: 0.95rem;
	letter-spacing: 0.005em;
	text-decoration: none;
	white-space: nowrap;
	transition: color .15s ease;
}
.um-pn__link:hover,
.um-pn__link:focus { color: var(--red-600); }
.um-pn__chev {
	width: 12px;
	height: 12px;
	opacity: 0.6;
	transition: transform .15s ease;
}
.um-pn__item.is-open .um-pn__chev { transform: rotate(180deg); opacity: 1; }

/* Dropdown panel */
.um-pn__dropdown {
	position: absolute;
	top: calc(100% + 12px);
	left: 50%;
	transform: translate(-50%, -6px);
	width: 380px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--r-3);
	box-shadow: 0 24px 60px -20px rgba(11,23,48,0.25),
				0 4px 12px -4px rgba(11,23,48,0.08);
	padding: 8px;
	opacity: 0;
	pointer-events: none;
	transition: opacity .14s ease, transform .18s ease;
	z-index: 60;
}
.um-pn__dropdown::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: -12px;
	height: 12px;
}
.um-pn__dropdown::after {
	content: '';
	position: absolute;
	top: -6px;
	left: 50%;
	width: 12px;
	height: 12px;
	background: #fff;
	border-top: 1px solid var(--border);
	border-left: 1px solid var(--border);
	transform: translateX(-50%) rotate(45deg);
}
.um-pn__item.is-open .um-pn__dropdown {
	opacity: 1;
	transform: translate(-50%, 0);
	pointer-events: auto;
}
.um-pn__dropdown--right {
	left: auto;
	right: 0;
	transform: translate(0, -6px);
}
.um-pn__dropdown--right::after {
	left: auto;
	right: 28px;
	transform: rotate(45deg);
}
.um-pn__item.is-open .um-pn__dropdown--right {
	transform: translate(0, 0);
}
/* Solo variant: narrower single-card hover for non-submenu top-level
   items (Dónde Jugar / Iniciación / Colegios / Competir). */
.um-pn__dropdown--solo { width: 320px; }
.um-pn__dd-inner {
	display: flex;
	flex-direction: column;
	position: relative;
	z-index: 1;
}
.um-pn__dd-item {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-rows: auto auto auto;
	grid-template-areas: 'tag arrow' 'title arrow' 'desc desc';
	align-items: center;
	column-gap: 12px;
	padding: 12px 14px;
	border-radius: 8px;
	transition: background .12s ease;
	text-decoration: none;
}
.um-pn__dd-item:hover { background: var(--ink-50); }
.um-pn__dd-item:hover .um-pn__dd-arrow { transform: translateX(3px); opacity: 1; }
.um-pn__dd-tag {
	grid-area: tag;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--red-600);
	font-weight: 600;
}
.um-pn__dd-item b {
	grid-area: title;
	font-size: 15px;
	color: var(--navy-900);
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.2;
	margin-top: 2px;
}
.um-pn__dd-desc {
	grid-area: desc;
	font-size: 13px;
	color: var(--ink-500);
	line-height: 1.4;
	margin-top: 6px;
}
.um-pn__dd-arrow {
	grid-area: arrow;
	width: 14px;
	height: 14px;
	color: var(--red-600);
	opacity: 0.4;
	transition: transform .2s ease, opacity .15s ease;
	align-self: center;
}

/* Burger button + mobile overlay */
.um-pn__burger {
	display: none;
	width: 44px;
	height: 44px;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 0;
}
.um-pn__burger span {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--navy-900);
	transition: transform .2s ease, opacity .2s ease;
}
.um-pn__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.um-pn__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.um-pn__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.um-pn__mobile {
	position: fixed;
	inset: 96px 0 0;
	background: var(--navy-900);
	color: #fff;
	z-index: 70;
	overflow-y: auto;
	padding: 24px clamp(20px, 4vw, 32px);
}
.um-pn__mobile[hidden] { display: none; }
.um-pn__m-list { list-style: none; padding: 0; margin: 0; }
.um-pn__m-item { border-bottom: 1px solid rgba(255,255,255,0.1); }
.um-pn__m-row { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.um-pn__m-item:not(.has-menu) .um-pn__m-row { cursor: default; }
.um-pn__m-link {
	display: block;
	padding: 16px 0;
	color: #fff;
	text-decoration: none;
	font-size: 1.1rem;
	font-weight: 600;
}
.um-pn__m-toggle {
	background: transparent;
	border: 0;
	color: #fff;
	padding: 8px;
	cursor: pointer;
}
.um-pn__m-toggle svg { width: 18px; height: 18px; transition: transform .2s ease; }
.um-pn__m-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.um-pn__m-sub {
	list-style: none;
	padding: 0 0 12px 16px;
	margin: 0;
	display: none;
}
.um-pn__m-item.is-open .um-pn__m-sub { display: block; }
.um-pn__m-sub a {
	display: block;
	padding: 8px 0;
	color: rgba(255,255,255,0.78);
	text-decoration: none;
	font-size: 0.95rem;
}
.um-pn__m-sub a:hover { color: #fff; }
.um-pn__m-divider {
	height: 0;
	background: transparent;
	margin: 12px 0;
	border: 0 !important;
}

/* Responsive: hide pretty desktop nav at narrow widths, show burger.
   Collapse dropped from 960px to 740px so tablets (768px) keep the full
   discovery nav instead of logo + burger + CTA only; the 741-1024 band
   compresses type and gaps so all six items + EN + CTA fit. */
@media (max-width: 1024px) and (min-width: 741px) {
	.um-pretty-nav { gap: clamp(5px, 0.9vw, 12px); }
	.um-pn__link { font-size: 0.78rem; letter-spacing: 0; }
	.um-site-header .custom-logo,
	.um-site-header .wp-block-site-logo img { max-width: 104px; height: auto; }
	.um-site-header .um-lang-switcher { font-size: 0.75rem; }
	.um-site-header .um-lang-switcher a { padding: 0.2rem 0.2rem; }
	.um-site-header .um-nav-cta .wp-block-button__link {
		font-size: 0.78rem;
		padding-inline: 0.6rem !important;
	}
	.um-site-header { padding-inline: 12px; }
}
@media (max-width: 740px) {
	.um-pretty-nav { display: none; }
	.um-pn__burger { display: flex; }
}

/* On the desktop pretty nav, hide the wp:html block's burger so it
   doesn't show alongside. (Burger already hidden at >960 by default.) */

/* =============================================================
   Search results template — wp:search hero input + result list +
   no-results state. Lives on /?s=, rendered from templates/search.html.
   ============================================================= */
.page-head .um-search-form--hero {
	max-width: 56ch;
	margin-top: 18px;
}
.page-head .wp-block-search__inside-wrapper {
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.22);
	border-radius: 999px;
	padding: 4px 4px 4px 18px;
	display: flex;
	align-items: stretch;
}
.page-head .wp-block-search__input {
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 16px;
	font-family: var(--font-sans, system-ui), sans-serif;
	outline: none;
	flex: 1;
	min-width: 0;
}
.page-head .wp-block-search__input::placeholder { color: rgba(255,255,255,0.55); }
.page-head .wp-block-search__button {
	background: var(--red-600, #d8202a);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 10px 18px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	font-family: inherit;
}
.page-head .wp-block-search__button:hover { background: var(--red-700, #b51820); }

.um-search-results { display: flex; flex-direction: column; gap: 32px; }
.um-search-result {
	padding-bottom: 28px;
	border-bottom: 1px solid var(--border, rgba(11,23,48,0.1));
}
.um-search-result:last-child { border-bottom: 0; }
.um-search-result .h-card-lg a {
	color: var(--navy-900);
	text-decoration: none;
}
.um-search-result .h-card-lg a:hover { color: var(--red-600); text-decoration: underline; text-underline-offset: 3px; }
.um-search-result .wp-block-post-excerpt p {
	margin-top: 8px;
	color: var(--ink-700);
	line-height: 1.55;
	max-width: 70ch;
}
.um-search-empty { max-width: 60ch; text-align: left; }

/* =============================================================
   .disc-show — two-up photo showcase used on /aprende/materiales/
   to feature competition + own-brand disc visuals. Each cell is a
   tinted .img-ph (placeholder hatch + caption) followed by a small
   title + meta line below.
   ============================================================= */
.disc-show {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-top: 24px;
}
.disc-show--three { grid-template-columns: repeat(3, 1fr); gap: 18px; }
.disc-show__item { display: flex; flex-direction: column; gap: 12px; }
.disc-show__item .img-ph {
	aspect-ratio: 1 / 1;
	width: 100%;
}
.disc-show__item .img-ph.tint-warm  { background-color: #b08653; background-image: linear-gradient(135deg, #c79461 0%, #8a6c4c 100%); }
.disc-show__item .img-ph.tint-grass { background-color: #4d6e4d; background-image: linear-gradient(135deg, #6c8b6e 0%, #3b5d3f 100%); }
.disc-show__item .img-ph.tint-cream { background-color: #d8ccb4; background-image: linear-gradient(135deg, #e6dcc4 0%, #b7a98a 100%); }
.disc-show__item .img-ph__cap .tint-tag {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 6px;
	background: var(--red-600);
	color: #fff;
	border-radius: 3px;
	font-size: 9.5px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	vertical-align: 1px;
}
.disc-show__item h4 {
	margin: 0;
	font-family: var(--font-mono);
	font-weight: 500;
	font-size: 13px;
	letter-spacing: 0.03em;
	color: var(--ink-500);
}
.disc-show__item .meta {
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.03em;
	color: var(--ink-500);
	margin: 0;
}
/* Tight gap between item title and meta line (design spec 2px); keep
   bigger gap above the img-ph via the parent grid gap. */
.disc-show__item h4 + .meta { margin-top: -10px; }
@media (max-width: 720px) {
	.disc-show { grid-template-columns: 1fr; }
}

/* Sidebar boxes (.side-card.toc, .side-card.factbox) inherit symmetric
   padding from .side-card but their inner ul/dl carry their own bottom
   margin, which compounds with the box padding and makes the bottom
   feel heavier than the top. Zero out the last child's margin so the
   spacing reads even. */
.side-card > *:last-child { margin-bottom: 0; }
.side-card .toc__lbl + ul,
.side-card .mat-spec { margin-bottom: 0; }

/* Compact variant of .cards-row used as bottom-of-page pagination
   (Volver al hub / Siguiente paso / etc). Tighter padding + smaller
   heading so the row reads as navigation, not feature cards. Arrow is
   absolute-positioned in the top-right so it can't orphan onto its
   own line when the heading wraps. */
.cards-row--nav .card {
	padding: 18px 44px 18px 20px !important;
	gap: 6px !important;
	position: relative;
}
.cards-row--nav .card h3 {
	font-size: 16px !important;
	font-weight: 700 !important;
}
.cards-row--nav .card .eyebrow { margin-bottom: 0; }
.cards-row--nav .card .card-arrow {
	position: absolute;
	top: 18px;
	right: 18px;
	margin: 0 !important;
	padding: 0 !important;
	color: var(--red-600);
	opacity: 0.6;
	transition: transform .2s var(--easing), opacity .15s ease;
}
.cards-row--nav .card .card-arrow svg {
	width: 16px;
	height: 16px;
}
.cards-row--nav .card:hover .card-arrow {
	opacity: 1;
	transform: translateX(2px);
}

/* Replace the browser default focus outline (heavy dark square) with a
   subtle red ring. Only applies to keyboard focus via :focus-visible so
   pointer clicks don't get an outline. */
*:focus { outline: none; }
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--red-500, #e8534b);
	outline-offset: 3px;
	border-radius: 3px;
}

/* Sub-heading inside a mat-card (e.g. "Dónde conseguir uno"). Bold
   navy, small, sits above a list. */
.mat-card__sub,
.hub-cat--wide .mat-card__sub {
	font-family: var(--font-sans);
	font-size: 16px;
	font-weight: 700;
	color: var(--navy-900);
	letter-spacing: -0.005em;
	margin: 16px 0 4px;
}

/* Materiales hero card uses .hub-cat--wide but with the design's
   mat-card__head separator look (border-bottom + breathing room).
   Scope so other hub-cats are unaffected. */
.hub-cat--wide.hub-cat--mat .hub-cat__head {
	padding: 0 0 22px;
	margin-bottom: 18px;
	border-bottom: 1px solid var(--border);
}

/* Disc-show captions follow the design spec: 11px mono on white card,
   shot title bolded as semi-bold navy. */
.disc-show .img-ph__cap { line-height: 1.45; }
.disc-show .img-ph__cap b { font-weight: 600; color: var(--navy-900); }

/* Default .sec-head reserves 40px below itself for a lead paragraph.
   Sec-heads that ship only eyebrow + h2 (no .lead) collapse to a
   tighter spacing so the next block doesn't float in dead air. */
.sec-head:not(:has(> .lead)) { margin-bottom: 18px; }

/* =============================================================
   .mat-spec — compact key/value list used inside the Materiales
   sidebar factbox ("Ficha técnica del disco"). Two-column rows,
   muted dt + emphasized dd.
   ============================================================= */
.mat-spec { margin: 10px 0 0; padding: 0; }
.mat-spec > div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
	border-top: 1px solid var(--cream-200, rgba(11,23,48,0.08));
	font-size: 13px;
	line-height: 1.45;
}
.mat-spec > div:first-child { border-top: 0; padding-top: 0; }
.mat-spec > div:last-child { padding-bottom: 0; }
.mat-spec dt {
	margin: 0;
	color: var(--ink-500);
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.mat-spec dd {
	margin: 0;
	color: var(--navy-900);
	font-weight: 600;
	text-align: right;
}

/* =============================================================
   .faq-accordion — native <details>/<summary> with chevron toggle.
   Used on FAQ blocks (Materiales, future schema-ready FAQPages).
   ============================================================= */
.faq-accordion { border-top: 1px solid var(--border); }
.faq-accordion details {
	border-bottom: 1px solid var(--border);
	padding: 0;
}
.faq-accordion summary {
	list-style: none;
	cursor: pointer;
	padding: 20px 56px 20px 4px;
	position: relative;
	font-family: var(--font-sans);
	font-weight: 600;
	color: var(--navy-900);
	font-size: 16px;
	line-height: 1.45;
	letter-spacing: -0.005em;
}
.faq-accordion summary::-webkit-details-marker { display: none; }
/* Chevron toggle: gray (ink-50 bg + ink-700 chev) by default, red bg +
   white chev when the disclosure is open, matching the design spec. */
.faq-accordion summary::after {
	content: '';
	position: absolute;
	right: 12px;
	top: 50%;
	width: 30px;
	height: 30px;
	margin-top: -15px;
	border-radius: 50%;
	background-color: var(--ink-50, #eef0f4);
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23394050' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 60%;
	transition: transform .25s var(--easing), background-color .15s ease;
}
.faq-accordion details[open] summary::after {
	transform: rotate(180deg);
	background-color: var(--red-600);
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
}
.faq-accordion details p,
.faq-accordion details ul {
	padding: 0 16px 22px 4px;
	margin: 0;
	color: var(--ink-700);
	line-height: 1.65;
	max-width: 70ch;
}
.faq-accordion details p + p { padding-top: 12px; }
.faq-accordion details ul { padding-left: 24px; }

/* =============================================================
   Mobile responsive fixes (Phase 1.3 sweep, 2026-05-27).
   Narrow viewports (<600px / <480px) need overrides for layouts
   that ship inline grid styles from the phase3 rebuild scripts.
   ============================================================= */

/* Hero + page heading: clamp lower bound drops below 44/36px on
   small screens so long single words ("Quijotes+Dulcineas",
   "Frisbee") stop clipping the right edge. */
@media (max-width: 480px) {
	.h-hero,
	.page-head--hero .h-hero { font-size: clamp(34px, 9vw, 44px); letter-spacing: -0.02em; }
	.h-page,
	.page-head .h-page { font-size: clamp(30px, 8vw, 40px); letter-spacing: -0.018em; }
}

/* /aprende/ intro-row ships an inline `grid-template-columns:
   1.4fr 1fr` for desktop. Force single column under 720px so the
   "Próximo lunes abierto" side card stops squeezing the body
   paragraph below readable width. !important needed because the
   inline style wins specificity without it. */
@media (max-width: 720px) {
	.intro-row {
		grid-template-columns: 1fr !important;
		gap: 32px !important;
	}
}


/* ---------------------------------------------------------------
   Learn panel (Aprende articles) : unified "Que aprenderas" preview
   whose outcome rows are the section jump-links, plus the slim
   sticky index rail (.rail) that replaces the old .toc side card.
   Design handoff: aprende preview panel, Option B (2026-07-03).
   --------------------------------------------------------------- */
.panel {
	border: 1px solid var(--border);
	border-radius: var(--r-4);
	overflow: hidden;
	background: var(--surface);
	box-shadow: 0 18px 40px -28px rgba(11, 23, 48, 0.4);
}
.panel__grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.panel__main { padding: 26px 30px 10px; }
.panel__head .eyebrow { display: block; }
.panel__head h3 {
	margin: 8px 0 0;
	font-size: 23px;
	font-weight: 800;
	letter-spacing: -0.015em;
	line-height: 1.15;
	color: var(--navy-900);
	max-width: 30ch;
}
.panel__side {
	background: var(--cream-50);
	border-left: 1px solid var(--border);
	padding: 26px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.panel__side > * { margin-top: 0 !important; margin-block-start: 0 !important; }
.panel__side h4 { font-size: 16px; font-weight: 700; color: var(--navy-900); margin: 8px 0 0; }
.panel__side p { font-size: 13px; line-height: 1.5; color: var(--ink-700); margin: 8px 0 0; }
/* Specificity 0,3,0 to beat the responsive `a.btn-link:has(> svg)` rule
   (0,2,2) that flips these links to display:inline on mobile and drops the
   arrow to its own line. nowrap keeps label + arrow together. */
.panel .panel__side .btn-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; margin-top: 10px; white-space: nowrap; }
.panel__side .btn-link svg {
	width: 14px; height: 14px; flex: none;
	fill: none; stroke: currentColor; stroke-width: 2;
	stroke-linecap: round; stroke-linejoin: round;
}
.panel__rule { height: 1px; background: var(--border); flex: none; }
.panel__cta {
	margin-top: auto !important;
	display: inline-flex;
	width: 100%;
	justify-content: center;
	white-space: normal; /* long CTA labels wrap inside the 300px side column */
	text-align: center;
}
.panel__cta svg { flex: none; }
.panel__foot { display: none; }
.panel__foot .btn-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.panel__foot .btn-link svg {
	width: 13px; height: 13px; flex: none;
	fill: none; stroke: currentColor; stroke-width: 2;
	stroke-linecap: round; stroke-linejoin: round;
}
.panel__foot-cta {
	display: inline-flex; align-items: center; gap: 5px;
	color: var(--ink-500); font-weight: 700; font-size: 13px;
	text-decoration: none; /* TT25 underlines a:where(...) globally */
	transition: color 0.15s var(--easing);
}
.panel__foot-cta:hover { color: var(--navy-900); }
.panel__foot-cta svg {
	width: 13px; height: 13px; flex: none;
	fill: none; stroke: currentColor; stroke-width: 2;
	stroke-linecap: round; stroke-linejoin: round;
}

/* Outcome rows: each row is the anchor that jumps to its section. */
.ogrid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin-top: 18px;
	border-top: 1px solid var(--border);
}
.orow {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 28px;
	border-bottom: 1px solid var(--border);
	text-decoration: none; /* TT25 underlines a:where(...) globally */
	transition: background 0.15s var(--easing);
}
.ogrid .orow:nth-child(odd) { border-right: 1px solid var(--border); }
.ogrid .orow:last-child,
.ogrid .orow:nth-child(odd):nth-last-child(2) { border-bottom: 0; }
.orow:hover { background: var(--cream-50); }
.orow:hover .orow__n { color: var(--red-600); }
.orow__tx {
	flex: 1;
	min-width: 0;
	font-size: 14.5px;
	color: var(--navy-900);
	font-weight: 700;
	line-height: 1.3;
}
.orow__n {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--ink-400);
	flex: none;
	transition: color 0.15s var(--easing);
}
.chk {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--red-600);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
}
.chk svg {
	width: 15px; height: 15px;
	fill: none; stroke: #fff; stroke-width: 2.2;
	stroke-linecap: round; stroke-linejoin: round;
}

/* Scroll-spy active state on the standard sidebar TOC. The rail was
   retired: the "En esta página" index is now the full-width .side-card.toc
   (original width/font/colors, no shadow) that additionally highlights the
   section you are reading. assets/js/um-learn-rail.js toggles li.on on any
   [data-spy] container. */
.toc[data-spy] li { position: relative; }
.toc[data-spy] li.on > a { color: var(--navy-900); font-weight: 700; }
.toc[data-spy] li.on > a > span { color: var(--red-600); }
.toc[data-spy] li.on::before {
	content: "";
	position: absolute;
	left: -14px; /* into the .side-card padding gutter, so text does not shift */
	top: 7px;
	bottom: 7px;
	width: 2px;
	border-radius: 2px;
	background: var(--red-600);
}

/* Anchor jumps from panel rows / TOC land below the sticky header. */
.with-sidebar__main h2[id],
.with-sidebar__main [id] { scroll-margin-top: 120px; }

@media (max-width: 1024px) {
	.panel__grid { grid-template-columns: minmax(0, 1fr) 260px; }
	.orow { padding: 14px 20px; }
}

/* Match the 899px .with-sidebar collapse: single column. The side column
   flows below the rows as a full-width footer region (keeps the styled CTA
   button + official link, which the old collapsed strip had dropped). */
@media (max-width: 899px) {
	.panel__grid { grid-template-columns: 1fr; }
	.panel__main { padding: 18px 18px 0; }
	.panel__head h3 { font-size: 18px; }
	.ogrid { grid-template-columns: 1fr; margin-top: 14px; }
	.ogrid .orow { border-right: 0; padding: 13px 18px; }
	.ogrid .orow:nth-child(odd):nth-last-child(2) { border-bottom: 1px solid var(--border); }
	.ogrid .orow:last-child { border-bottom: 0; }
	.panel__side {
		border-left: 0;
		border-top: 1px solid var(--border);
		padding: 18px;
	}
	.panel__side .panel__meta { display: none; } /* dup of the inline meta--m */
	.panel__foot { display: none; } /* superseded by the full side column above */

	/* The top panel already lists every section, so drop the duplicate
	   sidebar TOC on phones. Non-panel pages keep their sidebar TOC. */
	body:has(.panel) .sidebar .toc { display: none; }
}

/* Reduce the body gutter on phones: the section already insets the content,
   and cards add their own padding, so a smaller outer gutter reads better.
   !important needed: the patterns set inline padding-left/right (spacing--40)
   directly on the element, which a stylesheet rule cannot outrank otherwise. */
@media (max-width: 600px) {
	.um-section:has(.with-sidebar),
	.um-section:has(.panel) {
		padding-left: var(--wp--preset--spacing--30) !important;
		padding-right: var(--wp--preset--spacing--30) !important;
	}
}

/* Diagram bake variant: SVG diagrams (assets/diagrams/*.svg) are labeled
   technical illustrations, not photos -- cropping with object-fit:cover
   (the .um-img-real default) would cut off dimension labels at the edges.
   Use contain instead; the SVG paints its own white background so there's
   no letterbox gap to hide. */
.um-img-wrap.um-diagram .um-img-real { object-fit: contain; }

/* ===========================================================================
   Palmarés (/palmares/) -- CEU + CEBU tables and rankings.
   Built by scripts/phase3-build-palmares.php from fedv-palmares/palmares.json.
   The same markup sits on white (.um-section) and on navy (.section--deep),
   so every colour goes through a local prop that .section--deep re-points.
   =========================================================================== */
.pal-eras,
.pal-ranks {
	display: grid;
	gap: var(--sp-5);
	margin-top: var(--sp-6);
}
.pal-eras  { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.pal-ranks { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.pal-era {
	border-top: 2px solid var(--red-600);
	padding-top: var(--sp-4);
}
.pal-era__k {
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.12em;
	color: var(--ink-500);
	margin: 0 0 var(--sp-2);
}
.pal-era h3 { margin: 0 0 var(--sp-3); }
.pal-era p  { margin: 0; color: var(--ink-700); }

/* --- Shared surface tokens: light by default, re-pointed on navy --- */
.pal-t,
.pal-rank,
.pal-stats {
	--pal-line: var(--border);
	--pal-dim:  var(--ink-500);
	--pal-text: var(--ink-900);
}
.section--deep .pal-t,
.section--deep .pal-rank,
.section--deep .pal-stats {
	--pal-line: rgba(255, 255, 255, 0.14);
	--pal-dim:  var(--on-deep-muted);
	--pal-text: #ffffff;
}

.pal-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: var(--sp-4);
	margin-top: var(--sp-6);
	padding-top: var(--sp-5);
	border-top: 1px solid var(--pal-line);
}
/* min-width:0 because a grid item defaults to min-width:auto, and the longer
   labels ("ediciones disputadas") then push the track past its share and give
   the whole page a few pixels of horizontal scroll on a phone. */
.pal-stats .statgrid__item {
	border: 0;
	padding: 0;
	min-width: 0;
	overflow-wrap: anywhere;
}

/* --- Ranking bars --- */
.pal-rank__h {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--pal-dim);
	margin: 0 0 var(--sp-2);
}
.pal-rank__note { font-size: 13px; color: var(--pal-dim); margin: 0 0 var(--sp-3); }
.pal-rank__list { list-style: none; margin: 0; padding: 0; }
.pal-rank__row {
	display: grid;
	grid-template-columns: 2ch minmax(0, 1fr) 64px 3ch;
	align-items: center;
	gap: var(--sp-3);
	padding: 7px 0;
	border-bottom: 1px solid var(--pal-line);
}
.pal-rank__pos {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--pal-dim);
}
/* "Quijotes+Dulcineas (Q+D)" is too long to fit a ranking column on one line,
   and truncating it hides which club it is. Wrap instead. */
.pal-rank__club {
	font-weight: 600;
	color: var(--pal-text);
	line-height: 1.25;
	overflow-wrap: anywhere;
}
.pal-rank__bar {
	height: 6px;
	border-radius: 999px;
	background: var(--pal-line);
	overflow: hidden;
}
.pal-rank__bar i { display: block; height: 100%; border-radius: 999px; }
.pal-rank__n {
	font-family: var(--font-mono);
	font-weight: 600;
	text-align: right;
	color: var(--pal-text);
	font-variant-numeric: tabular-nums;
}

/* --- Year-by-year table --- */
.pal-wrap {
	margin-top: var(--sp-7);
	overflow-x: auto;          /* six columns will not fit a phone */
	-webkit-overflow-scrolling: touch;
}
.pal-t {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	min-width: 720px;
}
.pal-t__cap {
	caption-side: top;
	text-align: left;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--pal-dim);
	padding-bottom: var(--sp-3);
}
.pal-t th,
.pal-t td {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 1px solid var(--pal-line);
	vertical-align: middle;
}
.pal-t thead th {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--pal-dim);
	font-weight: 500;
	white-space: nowrap;
}
.pal-t tbody th {
	font-family: var(--font-mono);
	font-weight: 600;
	color: var(--pal-text);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}
.pal-club { display: inline-flex; align-items: center; gap: var(--sp-2); }
.pal-club b { font-weight: 600; color: var(--pal-text); }
.pal-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex: 0 0 auto;
}
.pal-eq {
	font-family: var(--font-mono);
	font-size: 10px;
	color: var(--pal-dim);
	margin-left: var(--sp-2);
	white-space: nowrap;
}
.pal-t__place { color: var(--pal-dim); }
.pal-t__empty { color: var(--pal-dim); opacity: 0.45; }
.pal-t__none {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--red-500);
}
.pal-src {
	font-size: 13px;
	color: var(--ink-500);
	margin-top: var(--sp-5);
}

@media (max-width: 640px) {
	.pal-rank__row { grid-template-columns: 2ch minmax(0, 1fr) 40px 3ch; }
}

/* Callout for a boxed aside inside a section (used on /historia-del-ultimate/
   for the 2001 championship result). Inherits the palmarés surface tokens. */
.pal-callout {
	margin-top: var(--sp-6);
	padding: var(--sp-5);
	border-left: 3px solid var(--red-500);
	background: rgba(255, 255, 255, 0.04);
}
.pal-callout p:last-child { margin-bottom: 0; }

/* The .section--deep text rules target p, but .timeline__t is a div, so
   timeline copy kept --ink-700 on navy (about 1.3:1). Used by
   /historia-del-ultimate/, which puts a timeline on the deep section. */
.section--deep .timeline__t { color: var(--on-deep-muted); }
.section--deep .timeline__t b { color: var(--on-deep); }

/* Body prose under a .sec-head. The .sec-head cluster is eyebrow + h2 + lead
   only (it force-zeroes child margins), so longer copy lives out here. */
.pal-prose { max-width: 70ch; margin-top: -24px; }  /* .sec-head owns 40px below */
.pal-prose p { margin: 0 0 var(--sp-4); }
.pal-prose p:last-child { margin-bottom: 0; }

/* Federations grid on /historia-del-ultimate/. Sits on .section--deep, so it
   borrows the palmarés surface tokens. */
.pal-orgs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: var(--sp-5);
	margin-top: var(--sp-6);
}
.pal-org {
	--pal-line: rgba(255, 255, 255, 0.14);
	--pal-dim: var(--on-deep-muted);
	min-width: 0;
	padding-top: var(--sp-4);
	border-top: 2px solid var(--red-500);
}
.pal-org__tag {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--pal-dim);
	margin: 0 0 var(--sp-2);
}
.pal-org__n {
	font-size: 28px;
	line-height: 1;
	margin: 0 0 var(--sp-1);
	color: var(--on-deep);
}
.pal-org__n a {
	display: inline-flex;
	align-items: center;
	gap: var(--sp-2);
	color: inherit;
	text-decoration: none;
}
.pal-org__n a:hover { color: var(--red-500); }
/* Same treatment every other icon on the site gets: without fill:none and an
   explicit size the arrow paints as a full-size black triangle. */
.pal-org__n svg {
	width: 14px !important;
	height: 14px !important;
	stroke: var(--red-500);
	stroke-width: 1.8;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex: 0 0 auto;
}
.pal-org__full {
	font-size: 13px;
	color: var(--pal-dim);
	margin: 0 0 var(--sp-3);
}
.pal-org__d { margin: 0 0 var(--sp-4); }
.pal-org__events { margin: 0; }
.pal-org__events dt {
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	color: var(--red-500);
	margin-top: var(--sp-3);
	padding-top: var(--sp-3);
	border-top: 1px solid var(--pal-line);
}
.pal-org__events dt:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.pal-org__events dd {
	margin: var(--sp-1) 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--pal-dim);
}
.pal-org__events dd b { color: var(--on-deep); font-weight: 600; }
