/* Casa del Estudiante theme — front-end styles (mobile first, no build step). */

/* ---------- Fonts (self-hosted, variable Inter + Poppins 700) ---------- */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/poppins-700-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/poppins-700-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens (mirror theme.json) ---------- */
:root {
	--ce-red: #d73333;
	--ce-red-dark: #bf2d2d;
	--ce-red-darkest: #a40e0e;
	--ce-grey: #424a50;
	--ce-grey-light: #5b6770;
	--ce-text: #363636;
	--ce-black: #111111;
	--ce-bg-light: #f1f1f1;
	--ce-border: #cfcfcf;
	--ce-white: #ffffff;
	--ce-blue: #338fc2;
	--ce-yellow: #ffd100;
	--ce-font: Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--ce-font-heading: Poppins, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--ce-s1: 4px;
	--ce-s2: 8px;
	--ce-s3: 12px;
	--ce-s4: 16px;
	--ce-s5: 24px;
	--ce-s6: 32px;
	--ce-s7: 48px;
	--ce-s8: 64px;
	--ce-container: 1200px;
	--ce-content: 720px;
	--ce-radius-card: 16px;
	--ce-radius-btn: 8px;
	--ce-shadow: 0 1px 2px rgba(17, 17, 17, 0.08), 0 4px 16px rgba(17, 17, 17, 0.06);
	--ce-focus: 0 0 0 3px var(--ce-white), 0 0 0 6px var(--ce-blue);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
	margin: 0;
	font-family: var(--ce-font);
	font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.125rem);
	line-height: 1.5;
	color: var(--ce-text);
	background: var(--ce-white);
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
	font-family: var(--ce-font-heading);
	font-weight: 700;
	line-height: 1.2;
	color: var(--ce-black);
	margin: 0 0 0.5em;
	overflow-wrap: anywhere;
}
h1 { font-size: clamp(1.75rem, 1.4rem + 1.8vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 1.25rem + 1.2vw, 2rem); }
h3 { font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p, ul, ol, dl, figure, table, blockquote { margin-top: 0; margin-bottom: var(--ce-s4); }
a { color: var(--ce-black); text-decoration: underline; text-underline-offset: 0.15em; }
a:hover, a:focus { color: var(--ce-red-dark); }
img, svg, video { max-width: 100%; height: auto; }
iframe, embed, object, video { max-width: 100%; }
figure img { display: block; }
figcaption { font-size: 0.875rem; color: var(--ce-grey-light); margin-top: var(--ce-s2); }
hr { border: 0; border-top: 1px solid var(--ce-border); margin: var(--ce-s6) 0; }
blockquote { border-left: 4px solid var(--ce-red); padding-left: var(--ce-s4); margin-left: 0; color: var(--ce-grey); }
code, pre { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.9375em; }
pre { overflow-x: auto; background: var(--ce-bg-light); padding: var(--ce-s4); border-radius: var(--ce-radius-btn); }
small { font-size: 0.875rem; }
:focus-visible { outline: 3px solid var(--ce-blue); outline-offset: 2px; box-shadow: 0 0 0 2px var(--ce-white); border-radius: 2px; }
:focus:not(:focus-visible) { outline: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.icon { width: 1.25em; height: 1.25em; vertical-align: -0.3em; flex: none; }
.icon--left { transform: rotate(90deg); }
.icon--right { transform: rotate(-90deg); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
	white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed !important; top: var(--ce-s2); left: var(--ce-s2); z-index: 1000;
	width: auto; height: auto; margin: 0; padding: var(--ce-s3) var(--ce-s4); clip: auto; clip-path: none;
	background: var(--ce-black); color: var(--ce-white); font-weight: 600; text-decoration: none; border-radius: var(--ce-radius-btn);
}

.container { width: 100%; max-width: var(--ce-container); margin-inline: auto; padding-inline: var(--ce-s4); }
.site-main { display: block; padding-block: var(--ce-s6) var(--ce-s8); }
.site-main:focus { outline: none; }
.content-narrow { max-width: var(--ce-content); margin-inline: auto; }

/* ---------- Tables, embeds ---------- */
.table-wrap, .ce-table-wrap, .wp-block-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375em; }
th, td { padding: var(--ce-s2) var(--ce-s3); border: 1px solid var(--ce-border); text-align: left; vertical-align: top; }
th { background: var(--ce-bg-light); font-weight: 600; color: var(--ce-black); }
caption { caption-side: top; font-weight: 600; text-align: left; padding-bottom: var(--ce-s2); }
/* Block tables: the theme's light borders instead of core's currentColor ones and 3 px rules. */
.entry-content .wp-block-table :is(th, td) { border-color: var(--ce-border); }
.entry-content .wp-block-table thead { border-bottom: 2px solid var(--ce-border); }
.entry-content .wp-block-table tfoot { border-top: 2px solid var(--ce-border); }
/* Phones: fixed layout splits the width evenly and core breaks words anywhere ("Finalida/d");
   auto layout sizes the columns by their content and keeps words whole. A table still wider than
   the screen scrolls inside its figure (core: overflow-x auto) with a shadow on the side that has
   more; a table of code names (Cookies) gets the room its text columns need. */
@media (max-width: 599.98px) {
	.entry-content .wp-block-table .has-fixed-layout { table-layout: auto; }
	.entry-content .wp-block-table table { font-size: 0.9375rem; }
	.entry-content .wp-block-table :is(th, td) { padding: var(--ce-s2) 6px; word-break: normal; overflow-wrap: normal; hyphens: manual; }
	.entry-content .wp-block-table table:has(td code) { min-width: 34rem; }
	.entry-content .wp-block-table {
		background:
			linear-gradient(to right, var(--ce-white) 30%, rgba(255, 255, 255, 0)) left / 24px 100% no-repeat local,
			linear-gradient(to left, var(--ce-white) 30%, rgba(255, 255, 255, 0)) right / 24px 100% no-repeat local,
			radial-gradient(farthest-side at 0 50%, rgba(17, 17, 17, 0.3), transparent) left / 12px 100% no-repeat scroll,
			radial-gradient(farthest-side at 100% 50%, rgba(17, 17, 17, 0.3), transparent) right / 12px 100% no-repeat scroll;
	}
}
@media (max-width: 359.98px) {
	.entry-content .wp-block-table table { font-size: 0.875rem; }
}
a[href^="tel:"] { white-space: nowrap; }
.ce-embed, .wp-block-embed__wrapper, .ce-iframe-wrap { position: relative; }
.ce-iframe-wrap { aspect-ratio: 16 / 9; width: 100%; border: 1px solid var(--ce-border); border-radius: var(--ce-radius-btn); overflow: hidden; }
.ce-iframe-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.ce-lazy-iframe { display: grid; place-items: center; gap: var(--ce-s3); min-height: 240px; background: var(--ce-bg-light); text-align: center; padding: var(--ce-s5); }
.ce-lazy-iframe.is-loaded { display: block; padding: 0; }

/* ---------- Buttons ---------- */
.button, .wp-block-button__link, .wp-element-button {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--ce-s2);
	min-height: 44px; padding: var(--ce-s2) var(--ce-s5);
	font-weight: 600; text-decoration: none; line-height: 1.25;
	border-radius: var(--ce-radius-btn); border: 2px solid transparent;
	background: var(--ce-red-dark); color: var(--ce-white);
	transition: background-color 0.15s, color 0.15s;
}
/* :focus too: a button link keeps focus after opening a new tab, and the generic a:focus
   colour (red) would otherwise leave red text on the red button. */
.button:hover, .button:focus, .wp-block-button__link:hover, .wp-block-button__link:focus, .wp-element-button:hover, .wp-element-button:focus { background: var(--ce-red-darkest); color: var(--ce-white); }
.button--outline { background: transparent; color: var(--ce-black); border-color: var(--ce-black); }
.button--outline:hover, .button--outline:focus { background: var(--ce-black); color: var(--ce-white); }
.button--ghost { background: transparent; color: var(--ce-black); border-color: transparent; text-decoration: underline; }
.button--large { font-size: 1.125em; padding: var(--ce-s3) var(--ce-s6); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--ce-black); border-color: var(--ce-black); }

/* ---------- Header ---------- */
/* Masthead (brand + tools) and navbar (menu + CTAs); markup in template-parts/header.php.
   Mobile first: one row, the navbar is a panel over the page (html.nav-open). From 900 px:
   two rows. With JS the header is sticky and the masthead scrolls away (--ce-masthead-h and
   --ce-sticky-h come from main.js); .is-hidden slides it out while scrolling down. */
:root { --ce-adminbar: var(--wp-admin--admin-bar--height, 0px); }
@media (max-width: 600px) { :root { --ce-adminbar: 0px; } } /* the admin bar scrolls with the page there */
html { scroll-padding-top: calc(var(--ce-sticky-h, 0px) + var(--ce-adminbar) + var(--ce-s4)); }

.site-header { position: relative; z-index: 100; background: var(--ce-white); border-bottom: 1px solid var(--ce-border); }
.js .site-header { position: sticky; top: calc(var(--ce-adminbar) - var(--ce-masthead-h, 0px)); }
.site-header.is-stuck { box-shadow: 0 2px 12px rgba(17, 17, 17, 0.08); }
.site-header.is-hidden { transform: translateY(-100%); box-shadow: none; }
@media (prefers-reduced-motion: no-preference) {
	.site-header { transition: transform 0.25s ease-out, box-shadow 0.2s; }
}

.masthead { position: relative; }
.masthead__inner { display: flex; align-items: center; gap: var(--ce-s2); min-height: 64px; padding-block: var(--ce-s2); }
.brand__upv { display: inline-flex; flex: none; }
.brand__upv img { height: 30px; width: auto; }
.brand__sep { display: none; flex: none; width: 1px; height: 44px; background: var(--ce-border); }
.brand__wordmark { display: flex; flex-direction: column; flex: 0 1 auto; min-width: 0; text-decoration: none; color: var(--ce-black); font-family: var(--ce-font-heading); font-weight: 700; line-height: 1.1; }
.brand__name { font-size: clamp(0.9375rem, 0.8rem + 0.9vw, 1.375rem); overflow-wrap: anywhere; text-wrap: balance; }
.brand__wordmark:hover .brand__name { color: var(--ce-red-dark); }
.brand__short { font-size: 0.75rem; letter-spacing: 0.12em; color: var(--ce-red-dark); }

.masthead__tools { display: flex; align-items: center; gap: var(--ce-s1); flex: none; margin-left: auto; }
.masthead__link { font-size: 0.875rem; font-weight: 600; }
.masthead .a11y-toolbar__panel { left: auto; right: 0; }
.icon-button {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--ce-s2); flex: none;
	min-width: 44px; min-height: 44px; padding: 0 var(--ce-s2);
	border: 0; border-radius: var(--ce-radius-btn); background: none; color: var(--ce-black); font-weight: 600;
}
.icon-button:hover, .icon-button[aria-expanded="true"] { background: var(--ce-bg-light); color: var(--ce-red-dark); }
.nav-toggle { border: 2px solid var(--ce-black); }
.nav-toggle .nav-toggle__close, .nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: inline-block; }

/* Language switcher: segmented control; codes, full name as accessible name and tooltip. */
.lang-switcher { display: inline-flex; align-items: center; gap: var(--ce-s1); flex: none; }
.lang-switcher__icon { color: var(--ce-grey-light); }
.lang-switcher__list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 2px; border: 1px solid var(--ce-border); border-radius: 999px; }
.lang-switcher__link {
	display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 36px; padding: 0 var(--ce-s2);
	border-radius: 999px; font-size: 0.875rem; font-weight: 600; text-decoration: none; color: var(--ce-grey);
}
.lang-switcher__link:hover, .lang-switcher__link:focus { background: var(--ce-bg-light); color: var(--ce-black); }
.lang-switcher__link[aria-current="page"] { background: var(--ce-black); color: var(--ce-white); }
/* Mobile menu panel: full-width segmented control with native names on a light track. */
.lang-switcher--drawer { display: flex; width: 100%; }
.lang-switcher--drawer .lang-switcher__list { flex: 1; gap: 0; padding: 4px; border: 0; border-radius: var(--ce-radius-btn); background: var(--ce-bg-light); }
.lang-switcher--drawer .lang-switcher__list li { flex: 1 1 0; min-width: 0; }
.lang-switcher--drawer .lang-switcher__link { width: 100%; min-height: 40px; padding: 0 var(--ce-s1); border-radius: 6px; font-size: 0.9375rem; font-weight: 500; color: var(--ce-grey); }
.lang-switcher--drawer .lang-switcher__link:hover, .lang-switcher--drawer .lang-switcher__link:focus { background: rgba(255, 255, 255, 0.6); color: var(--ce-black); }
.lang-switcher--drawer .lang-switcher__link[aria-current="page"] { background: var(--ce-white); color: var(--ce-black); font-weight: 700; box-shadow: 0 1px 3px rgba(17, 17, 17, 0.15); }

/* Header search: rounded field with the submit icon inside. */
.search-form--header .search-form__row { position: relative; gap: 0; }
/* Border at 5.8:1 on the white header and placeholder at 5.1:1 on the grey field (1.4.11, 1.4.3). */
.search-form--header .search-form__input { width: 100%; min-height: 40px; padding: 0 44px 0 var(--ce-s4); border: 1px solid var(--ce-grey-light); border-radius: 999px; background: var(--ce-bg-light); font-size: 0.9375rem; }
.search-form--header .search-form__input:focus { background: var(--ce-white); border-color: var(--ce-black); }
.search-form--header .search-form__submit {
	position: absolute; top: 50%; right: 2px; transform: translateY(-50%);
	min-width: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ce-black);
}
.search-form--header .search-form__submit:hover, .search-form--header .search-form__submit:focus { background: var(--ce-red-dark); color: var(--ce-white); }

/* Menu: shared parts (links, triggers, panels, sub-items with icon and description). */
.nav__list, .sub-menu__list { list-style: none; margin: 0; padding: 0; }
.nav__link {
	display: flex; align-items: center; gap: var(--ce-s1); border: 0; background: none;
	font-weight: 600; color: var(--ce-black); text-decoration: none; text-align: left;
}
.nav__link:hover, .nav__trigger[aria-expanded="true"] { color: var(--ce-red-dark); }
.nav__chevron { width: 1em; height: 1em; vertical-align: 0; }
.nav__trigger[aria-expanded="true"] .nav__chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: no-preference) {
	.nav__chevron { transition: transform 0.2s; }
}
.js .sub-menu { display: none; }
.js .is-open > .sub-menu { display: block; }
.sub-menu__head {
	display: flex; align-items: center; justify-content: space-between; gap: var(--ce-s2);
	padding: var(--ce-s2); font-family: var(--ce-font-heading); font-weight: 700; color: var(--ce-black); text-decoration: none; border-radius: var(--ce-radius-btn);
}
.sub-menu__head:hover, .sub-menu__head:focus { color: var(--ce-red-dark); background: var(--ce-bg-light); }
.nav__sublink { display: flex; align-items: flex-start; gap: var(--ce-s3); padding: var(--ce-s2); border-radius: var(--ce-radius-btn); color: var(--ce-black); text-decoration: none; }
.nav__sublink:hover, .nav__sublink:focus { background: var(--ce-bg-light); }
.nav__sublink:hover .nav__title, .nav__sublink[aria-current="page"] .nav__title { color: var(--ce-red-dark); }
.nav__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: var(--ce-radius-btn); background: var(--ce-bg-light); color: var(--ce-red-dark); }
.nav__sublink:hover .nav__icon, .nav__sublink:focus .nav__icon { background: var(--ce-white); }
.nav__icon .icon { width: 20px; height: 20px; vertical-align: 0; }
.nav__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 2px; }
.nav__title { font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.nav__desc { font-size: 0.8125rem; line-height: 1.35; color: var(--ce-grey-light); }
.nav__sublink[aria-current="page"] .nav__icon { background: var(--ce-red-dark); color: var(--ce-white); }
.navbar__brand { display: none; }
.navbar__ctas { display: flex; gap: var(--ce-s2); }

/* ----- Mobile: one row; menu panel over the page ----- */
@media (max-width: 899.98px) {
	.lang-switcher--masthead { display: none; }
	.nav-toggle__label { font-size: 0.9375rem; }
	/* Search opens as a strip under the masthead. */
	.js .masthead__search { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 2; padding: var(--ce-s3) var(--ce-s4); background: var(--ce-white); border-block: 1px solid var(--ce-border); box-shadow: var(--ce-shadow); }
	.js.search-open .masthead__search { display: block; }
	html:not(.js) .search-toggle, html:not(.js) .nav-toggle { display: none; }
	html:not(.js) .masthead__inner { flex-wrap: wrap; }
	html:not(.js) .masthead__tools { flex: 1 1 100%; flex-wrap: wrap; }
	html:not(.js) .masthead__search { flex: 1 1 100%; }

	.js .navbar { display: none; }
	.js.nav-open { overflow: hidden; }
	.js.nav-open .navbar {
		display: block; position: fixed; top: var(--ce-drawer-top, 64px); left: 0; right: 0; bottom: 0; z-index: 99;
		overflow-y: auto; overscroll-behavior: contain; background: var(--ce-white); border-top: 1px solid var(--ce-border);
	}
	.navbar { border-top: 1px solid var(--ce-border); }
	.navbar__inner { display: flex; flex-direction: column; gap: var(--ce-s4); min-height: 100%; padding-top: var(--ce-s4); }
	.nav__list > li { border-bottom: 1px solid var(--ce-bg-light); }
	.nav__link { justify-content: space-between; width: 100%; min-height: 52px; padding: var(--ce-s2); font-size: 1.0625rem; border-radius: var(--ce-radius-btn); }
	.nav__link[aria-current="page"], .current-menu-ancestor > .nav__link, .current-menu-parent > .nav__link { color: var(--ce-red-dark); }
	.sub-menu { padding: 0 0 var(--ce-s3) var(--ce-s2); }
	.nav__desc { display: none; }
	.nav__text { padding-top: 0; align-self: center; }
	.nav__icon { width: 32px; height: 32px; }
	.navbar__ctas { position: sticky; bottom: 0; margin: auto calc(-1 * var(--ce-s4)) 0; padding: var(--ce-s3) var(--ce-s4); background: var(--ce-white); border-top: 1px solid var(--ce-border); }
	.navbar__ctas .button { flex: 1; }
}
@media (max-width: 899.98px) and (prefers-reduced-motion: no-preference) {
	.js.nav-open .navbar { animation: ce-panel-in 0.2s ease-out; }
}
@keyframes ce-panel-in { from { opacity: 0; transform: translateY(-8px); } }
@media (max-width: 479.98px) {
	.nav-toggle__label { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
	.masthead__tools { gap: 0; }
}
/* Narrow phones: room for "Casa de l'Estudiant" on two lines beside the three buttons. */
@media (max-width: 399.98px) {
	.masthead__inner { gap: var(--ce-s2); }
	.brand__upv img { height: 26px; }
	.brand__name { font-size: 0.875rem; overflow-wrap: normal; }
	.masthead .icon-button, .masthead .a11y-toolbar__toggle { min-width: 40px; padding-inline: 0; }
}
/* 320 px (the 1.4.10 reference width): "Estudiante" / "l'Estudiant" still fit their box. */
@media (max-width: 359.98px) {
	.masthead__inner { gap: 6px; }
	.brand__name { font-size: 0.8125rem; }
}
@media (min-width: 600px) {
	.brand__upv img { height: 36px; }
}

/* ----- Desktop: masthead row + navigation row ----- */
@media (min-width: 900px) {
	.masthead__inner { gap: var(--ce-s4); min-height: 76px; }
	.brand__upv img { height: 44px; }
	.brand__sep { display: block; }
	.masthead__tools { gap: var(--ce-s3); }
	.masthead .a11y-toolbar__label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
	.search-toggle, .nav-toggle, .lang-switcher--drawer { display: none; }
	.masthead__search { width: clamp(180px, 18vw, 240px); }

	.navbar__inner { display: flex; align-items: center; gap: var(--ce-s3); }
	.nav { min-width: 0; }
	.nav__list { display: flex; flex-wrap: nowrap; gap: var(--ce-s1); }
	.nav__list > li { position: relative; }
	.nav__link { min-height: 52px; padding: 0 var(--ce-s2); font-size: 0.9375rem; white-space: nowrap; box-shadow: inset 0 -3px 0 transparent; }
	.nav__link:hover, .nav__trigger[aria-expanded="true"] { box-shadow: inset 0 -3px 0 var(--ce-border); }
	.nav__link[aria-current="page"], .current-menu-ancestor > .nav__link, .current-menu-parent > .nav__link { box-shadow: inset 0 -3px 0 var(--ce-red); }
	.navbar__ctas { flex: none; margin-left: auto; }
	.navbar__ctas .button { min-width: 40px; min-height: 40px; padding: var(--ce-s1) var(--ce-s2); font-size: 0.875rem; white-space: nowrap; }
	.navbar__ctas .button__label { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

	/* Dropdown panels; more than four items → two columns. JS adds --right when a panel would overflow. */
	.sub-menu {
		position: absolute; top: 100%; left: calc(-1 * var(--ce-s3)); z-index: 60; width: 320px; padding: var(--ce-s3);
		background: var(--ce-white); border: 1px solid var(--ce-border); border-radius: 0 0 var(--ce-radius-card) var(--ce-radius-card); box-shadow: var(--ce-shadow);
	}
	.sub-menu--wide { width: 580px; }
	.sub-menu--wide .sub-menu__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ce-s1) var(--ce-s3); }
	.sub-menu--right { left: auto; right: calc(-1 * var(--ce-s3)); }
	.sub-menu__head { margin-bottom: var(--ce-s2); padding-bottom: var(--ce-s3); border-bottom: 1px solid var(--ce-border); border-radius: var(--ce-radius-btn) var(--ce-radius-btn) 0 0; }
	html:not(.js) .has-submenu:not(:hover):not(:focus-within) > .sub-menu { display: none; }
}
@media (min-width: 1000px) {
	.navbar__ctas .button { padding: var(--ce-s1) var(--ce-s3); }
	.navbar__ctas .button__label { position: static !important; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; clip-path: none; }
}
@media (min-width: 1200px) {
	.masthead .a11y-toolbar__label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; clip-path: none; }
	.nav__link { padding: 0 var(--ce-s3); }
	.navbar__ctas .button { padding: var(--ce-s2) var(--ce-s4); font-size: 0.9375rem; }
	/* Sticky state: short name on the left, "Opening hours" shrinks to its icon to keep one row. */
	.navbar__brand { display: block; flex: none; visibility: hidden; width: 0; overflow: hidden; white-space: nowrap; font-family: var(--ce-font-heading); font-weight: 700; color: var(--ce-black); text-decoration: none; }
	.is-stuck .navbar__brand { visibility: visible; width: auto; margin-right: var(--ce-s2); }
	.is-stuck .navbar__ctas .button--outline { padding-inline: var(--ce-s2); }
	.is-stuck .navbar__ctas .button--outline .button__label { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
}

/* ---------- Page header, breadcrumbs, meta ---------- */
.page-header { margin-bottom: var(--ce-s6); }
.page-header__desc { max-width: var(--ce-content); color: var(--ce-grey); }
.breadcrumbs { font-size: 0.875rem; margin-bottom: var(--ce-s4); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: var(--ce-s1); list-style: none; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; color: var(--ce-grey-light); margin-right: var(--ce-s1); }
.breadcrumbs [aria-current] { color: var(--ce-grey); }
/* Phones: the current page (a long title, repeated whole in the h1 just below) takes the rest of the line
   and is cut with "…", or goes to the next line when less than 3em is left. The links before it still wrap
   (larger text, text spacing) and are never clipped, so their focus ring is never cut. */
@media (max-width: 599.98px) {
	.breadcrumbs li:last-child { flex: 1 1 0; min-width: 3em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
.meta { font-size: 0.9375rem; color: var(--ce-grey); margin-bottom: var(--ce-s5); }
.meta__published { margin: 0 0 var(--ce-s2); }
.meta__list { display: flex; flex-wrap: wrap; gap: var(--ce-s2) var(--ce-s5); margin: 0; }
.meta__item { display: flex; gap: var(--ce-s1); }
.meta__item dt { font-weight: 600; }
.meta__item dt::after { content: ":"; }
.meta__item dd { margin: 0; }
.page__updated { font-size: 0.875rem; color: var(--ce-grey-light); border-top: 1px solid var(--ce-border); padding-top: var(--ce-s3); margin-top: var(--ce-s6); }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--ce-s5); list-style: none; margin: 0 0 var(--ce-s6); padding: 0; }
.card { position: relative; background: var(--ce-white); border: 1px solid var(--ce-border); border-radius: var(--ce-radius-card); overflow: hidden; transition: box-shadow 0.15s, transform 0.15s; }
.card:hover, .card:focus-within { box-shadow: var(--ce-shadow); }
.card__inner { display: flex; flex-direction: column; height: 100%; }
.card__media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--ce-bg-light); }
.card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Posters and other upright images (ce_image_fit_ratio()): whole image on the grey box, never
   cropped. Out of the flow in their box: their intrinsic height (a poster, or an old file smaller
   than the ce-card crop) would stretch the 16:10 / 16:9 box. */
.card__img.is-fit, .hero__img.is-fit { object-fit: contain; }
.card__media > .card__img, .hero__media .hero__img.is-fit { position: absolute; inset: 0; }
.card__body { display: flex; flex-direction: column; gap: var(--ce-s2); padding: var(--ce-s4); flex: 1; }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ce-s1) var(--ce-s3); margin: 0; font-size: 0.875rem; color: var(--ce-grey); }
.card__meta .icon { margin-right: var(--ce-s1); }
.card__date--event { color: var(--ce-red-darkest); font-weight: 600; }
.card__topic { display: inline-block; padding: 2px var(--ce-s2); border-radius: 999px; background: var(--ce-bg-light); color: var(--ce-grey); font-weight: 600; }
/* Post cards: the meta line is the date alone, so the titles of a row start at the same height;
   the topic closes the card, at its foot. */
.card__tags { margin: auto 0 0; padding-top: var(--ce-s1); font-size: 0.875rem; }
.card__tags .card__topic { max-width: 100%; overflow-wrap: anywhere; }
.card__title { font-size: 1.125rem; margin: 0; }
.card__title a { text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__title a:hover, .card__title a:focus { text-decoration: underline; }
.card:focus-within { outline: 3px solid var(--ce-blue); outline-offset: 2px; }
.card__title a:focus-visible { outline: none; }
.card__excerpt { margin: 0; font-size: 0.9375rem; color: var(--ce-grey); overflow-wrap: anywhere; }

.card--link .card__link { display: flex; flex-direction: column; gap: var(--ce-s2); height: 100%; padding: var(--ce-s5); text-decoration: none; }
.card--link .card__icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 12px; background: var(--ce-bg-light); color: var(--ce-red-dark); }
.card--link .card__icon .icon { width: 28px; height: 28px; }
.card--link .card__title { font-family: var(--ce-font-heading); font-weight: 700; }
.card--link .card__desc { font-size: 0.9375rem; color: var(--ce-grey); overflow-wrap: anywhere; }
.card--link:hover .card__title, .card--link:focus-within .card__title { color: var(--ce-red-dark); }
/* At most four columns: seven sub-pages make 4 + 3 rather than 5 + 2. */
.cards--links { grid-template-columns: repeat(auto-fill, minmax(min(100%, max(220px, (100% - 3 * var(--ce-s4)) / 4)), 1fr)); gap: var(--ce-s4); }
.cards--quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ce-s3); }
/* Top-aligned (not centred): icons and titles of a row stay level when one title wraps to two lines. */
.cards--quick .card__link { align-items: center; justify-content: flex-start; gap: var(--ce-s2); min-height: 96px; padding: var(--ce-s3); text-align: center; }
.cards--quick .card__icon { width: 40px; height: 40px; }
.cards--quick .card__icon .icon { width: 24px; height: 24px; }
.cards--quick .card__title { font-size: 1rem; overflow-wrap: anywhere; }
.cards--quick .card__desc { display: none; }
@media (min-width: 900px) {
	.cards--quick { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--ce-s4); }
	.cards--quick .card__link { align-items: flex-start; justify-content: flex-start; padding: var(--ce-s5); text-align: left; }
	.cards--quick .card__icon { width: 48px; height: 48px; }
	.cards--quick .card__icon .icon { width: 28px; height: 28px; }
	.cards--quick .card__title { font-size: 1.125rem; }
	.cards--quick .card__desc { display: block; }
}

.card--event .card__inner { flex-direction: row; gap: var(--ce-s4); padding: var(--ce-s4); }
.card__day { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; width: 64px; padding: var(--ce-s2); border-radius: 12px; background: var(--ce-red-dark); color: var(--ce-white); line-height: 1; }
.card__day-num { font-family: var(--ce-font-heading); font-size: 1.5rem; font-weight: 700; }
.card__day-month { font-size: 0.875rem; text-transform: uppercase; }
.cards--events { grid-template-columns: 1fr; gap: var(--ce-s3); }

/* ---------- Sections (home) ---------- */
.section { margin-bottom: var(--ce-s7); }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--ce-s3); margin-bottom: var(--ce-s5); }
.section__head h2 { margin: 0; }
.section__more { font-weight: 600; }
.section--grey { background: var(--ce-bg-light); padding-block: var(--ce-s6); border-radius: var(--ce-radius-card); padding-inline: var(--ce-s4); }
.section--grey > :last-child, .section--grey > :last-child > :last-child { margin-bottom: 0; }
.home-cols { display: grid; gap: var(--ce-s6); }
@media (min-width: 900px) { .home-cols { grid-template-columns: 3fr 2fr; } }

.hero { display: grid; gap: var(--ce-s5); margin-bottom: var(--ce-s7); border-radius: var(--ce-radius-card); overflow: hidden; background: var(--ce-black); color: var(--ce-white); }
.hero__media { position: relative; aspect-ratio: 16 / 9; }
.hero__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__body { padding: 0 var(--ce-s5) var(--ce-s5); display: flex; flex-direction: column; gap: var(--ce-s3); align-items: flex-start; }
.hero__title { color: var(--ce-white); margin: 0; }
.hero__title a { color: inherit; text-decoration: none; }
.hero__title a:hover, .hero__title a:focus { text-decoration: underline; }
.hero__date { color: var(--ce-bg-light); font-weight: 600; }
.hero__excerpt { color: var(--ce-bg-light); margin: 0; }
@media (min-width: 900px) {
	.hero { grid-template-columns: 3fr 2fr; gap: 0; }
	/* A poster (absolute, above) fills the box the text sets instead of stretching the hero. */
	.hero__media { aspect-ratio: auto; min-height: 380px; }
	.hero__body { padding: var(--ce-s6); justify-content: center; }
}

.contact-strip { display: flex; flex-wrap: wrap; gap: var(--ce-s4) var(--ce-s6); align-items: center; padding: var(--ce-s5); border-radius: var(--ce-radius-card); background: var(--ce-black); color: var(--ce-white); }
.contact-strip h2 { color: var(--ce-white); margin: 0; flex-basis: 100%; }
.contact-strip a { color: var(--ce-white); display: inline-flex; align-items: center; gap: var(--ce-s2); overflow-wrap: anywhere; }
.contact-strip a:hover, .contact-strip a:focus { color: var(--ce-yellow); }
.contact-strip p { margin: 0; }
.contact-strip__hours { display: inline-flex; align-items: center; gap: var(--ce-s2); }

/* ---------- Filters, pagination, search ---------- */
.filters { margin-bottom: var(--ce-s5); }
.filters__list { display: flex; flex-wrap: wrap; gap: var(--ce-s2); list-style: none; margin: 0; padding: 0; }
.filters__link, .filters summary { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--ce-s4); border: 1px solid var(--ce-border); border-radius: 999px; text-decoration: none; font-weight: 600; cursor: pointer; }
.filters__link[aria-current="page"] { background: var(--ce-black); color: var(--ce-white); border-color: var(--ce-black); }
.filters__group { position: relative; }
.filters__group summary::-webkit-details-marker { display: none; }
.filters__group summary::after { content: ""; width: 0.5em; height: 0.5em; margin-left: var(--ce-s2); border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); }
.filters__sub { position: absolute; z-index: 40; top: 100%; left: 0; min-width: 220px; max-height: 320px; overflow-y: auto; margin: var(--ce-s1) 0 0; padding: var(--ce-s2); list-style: none; background: var(--ce-white); border: 1px solid var(--ce-border); border-radius: 12px; box-shadow: var(--ce-shadow); }
.filters__sub a { display: block; padding: var(--ce-s2) var(--ce-s3); text-decoration: none; border-radius: var(--ce-radius-btn); }
.filters__sub a:hover, .filters__sub a[aria-current] { background: var(--ce-bg-light); }
/* Phones: the open list spans the whole filter bar instead of hanging off its button, which
   pushed "By topic" / "Per curs" past the right edge (1.4.10 at 320 px). */
@media (max-width: 599.98px) {
	.filters { position: relative; }
	.filters__group { position: static; }
	.filters__sub { left: 0; right: 0; min-width: 0; }
}

.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--ce-s2); }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 var(--ce-s3); border: 1px solid var(--ce-border); border-radius: var(--ce-radius-btn); text-decoration: none; font-weight: 600; }
.pagination .page-numbers.current { background: var(--ce-black); color: var(--ce-white); border-color: var(--ce-black); }
.pagination .page-numbers.dots { border: 0; }
.pagination .screen-reader-text + .nav-links, .pagination h2 { margin: 0; }

.search-form__label { display: block; font-weight: 600; margin-bottom: var(--ce-s1); }
.search-form__row { display: flex; gap: var(--ce-s2); }
.search-form__input { flex: 1; min-width: 0; min-height: 44px; padding: var(--ce-s2) var(--ce-s3); border: 2px solid var(--ce-grey-light); border-radius: var(--ce-radius-btn); background: var(--ce-white); }
.search-form__input::placeholder { color: var(--ce-grey-light); opacity: 1; }
.search-form__submit { padding-inline: var(--ce-s4); }
.no-results { max-width: var(--ce-content); }
.shortcuts { display: flex; flex-wrap: wrap; gap: var(--ce-s2); list-style: none; margin: var(--ce-s4) 0; padding: 0; }
.error-404 .search-form + .no-results .shortcuts { margin-top: var(--ce-s5); }

/* Search: pages as compact results (no image, date or topic) above the activities grid. */
.search-group { margin-bottom: var(--ce-s7); }
.search-group__title { font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem); }
.search-group__count { font-family: var(--ce-font); font-size: 0.875em; font-weight: 400; color: var(--ce-grey); }
.results { display: grid; gap: var(--ce-s3); max-width: var(--ce-content); list-style: none; margin: 0; padding: 0; }
.result { position: relative; display: flex; flex-direction: column; gap: 2px; padding: var(--ce-s3) var(--ce-s4); border: 1px solid var(--ce-border); border-left: 4px solid var(--ce-red); border-radius: var(--ce-radius-btn); background: var(--ce-white); }
.result:hover, .result:focus-within { box-shadow: var(--ce-shadow); }
.result:focus-within { outline: 3px solid var(--ce-blue); outline-offset: 2px; }
.result__title { order: 1; font-size: 1.125rem; margin: 0; }
.result__title a { text-decoration: none; }
.result__title a::after { content: ""; position: absolute; inset: 0; }
.result__title a:hover, .result__title a:focus { text-decoration: underline; }
.result__title a:focus-visible { outline: none; }
.result__path { order: 0; margin: 0; font-size: 0.875rem; color: var(--ce-grey); }
.result__excerpt { order: 2; margin: var(--ce-s1) 0 0; font-size: 0.9375rem; color: var(--ce-grey); overflow-wrap: anywhere; }
.results__more { max-width: var(--ce-content); margin-top: var(--ce-s3); }
.results__more > summary { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 0.15em; }
.results__more[open] > summary { margin-bottom: var(--ce-s3); }

/* ---------- Single: event box, post navigation ---------- */
.entry-header { max-width: var(--ce-content); margin-inline: auto; margin-bottom: var(--ce-s5); }
.entry-media { max-width: var(--ce-container); margin: 0 auto var(--ce-s5); }
.entry-media img { width: 100%; border-radius: var(--ce-radius-card); }
/* Upright featured image (poster): whole, centred, at most about a screen high. */
.entry-media img.is-fit { width: auto; max-height: min(85vh, 960px); margin-inline: auto; }
.entry-content { max-width: none; margin-inline: auto; }
.entry-content > * { max-width: var(--ce-content); margin-inline: auto; }
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content > .alignwide { max-width: var(--ce-container); }
.entry-content > .alignfull { max-width: none; }
.entry-content img { border-radius: var(--ce-radius-btn); }
.entry-content ul, .entry-content ol { padding-left: 1.5em; }
.entry-content .cards { padding-left: 0; } /* card grids inside a page (block Tarjetas de enlace) line up with the text */
.entry-content .wp-block-file a:first-child { font-weight: 600; }
.entry-content .wp-block-file__button { margin-left: var(--ce-s2); }
.entry-content .wp-block-image .wp-element-caption { text-align: left; }
.entry-content .wp-block-gallery { gap: var(--ce-s3); }
/* Vertical rhythm: more room above a heading than below it (scaled by level, tighter when
   headings follow each other) and a bottom margin on blocks that WordPress leaves at 0. */
.entry-content > h2 { margin-top: clamp(2rem, 1.5rem + 2vw, 3rem); }
.entry-content > h3 { margin-top: clamp(1.5rem, 1.25rem + 1vw, 2.25rem); }
.entry-content > h4, .entry-content > h5, .entry-content > h6 { margin-top: 1.5rem; }
.entry-content > :is(h2, h3, h4, h5, h6):first-child { margin-top: 0; }
.entry-content > :is(h2, h3, h4) + :is(h3, h4, h5, h6) { margin-top: var(--ce-s3); }
.entry-content > :is(.wp-block-buttons, .wp-block-file, .wp-block-table, .wp-block-image, .wp-block-gallery, .wp-block-embed, .wp-block-columns, .wp-block-group, .wp-block-media-text, .wp-block-separator, .ce-lazy-iframe, .ce-block, figure, table, ul, ol, blockquote, pre, details) { margin-bottom: var(--ce-s5); }
.entry-content > *:last-child { margin-bottom: 0; }
.has-text-align-center { text-align: center; }
/* Classic-editor alignment classes (hundreds of migrated posts): images and [caption] figures
   float beside the text from 600 px, stack centred below; aligncenter is centred. A floated
   direct child of .entry-content lines up with the 720 px text column, not the container. */
.entry-content img.aligncenter, .entry-content .wp-caption.aligncenter { display: block; margin-inline: auto; margin-bottom: var(--ce-s4); }
.entry-content :is(img, .wp-caption):is(.alignleft, .alignright) { display: block; margin: 0 auto var(--ce-s4); }
@media (min-width: 600px) {
	.entry-content :is(img, .wp-caption).alignleft { float: left; margin: 0.25em var(--ce-s5) var(--ce-s4) 0; }
	.entry-content :is(img, .wp-caption).alignright { float: right; margin: 0.25em 0 var(--ce-s4) var(--ce-s5); }
	.entry-content > .alignleft:is(img, .wp-caption) { margin-left: max(0px, calc((100% - var(--ce-content)) / 2)); }
	.entry-content > .alignright:is(img, .wp-caption) { margin-right: max(0px, calc((100% - var(--ce-content)) / 2)); }
}
/* Galleries, embeds, tables and columns start below a float: beside it they shrank to 190-360 px. */
.entry-content > :is(.wp-block-gallery, .wp-block-embed, .wp-block-video, .wp-block-table, .wp-block-columns, .wp-block-media-text, .ce-lazy-iframe) { clear: both; }
.wp-caption { max-width: 100%; }
.wp-caption img { display: block; max-width: 100%; height: auto; }
.wp-caption-text { font-size: 0.875rem; color: var(--ce-grey-light); margin: var(--ce-s2) 0 0; }
.entry-content .page__updated { clear: both; }
/* Content images smaller than their column (main.js marks them): real size, never stretched,
   centred in a figure whose caption wraps to the image width; in a gallery the item narrows
   and centres in its row. */
.entry-content img.is-natural-size { width: var(--ce-natural-w, auto); max-width: 100%; height: auto; }
.entry-content :is(.wp-block-image, .wp-caption).has-natural-size { display: table; width: auto !important; margin-inline: auto; }
.entry-content .has-natural-size > :is(figcaption, .wp-element-caption, .wp-caption-text) { display: table-caption; caption-side: bottom; }
/* Core places the lightbox "enlarge" button from the figure width it measured before the
   figure shrank to the image: back to the image's top right corner. */
.entry-content .has-natural-size > .lightbox-trigger { top: 16px !important; right: 16px !important; }
/* !important: core gallery item rules carry an ID in their selector (:not(#individual-image)). */
.entry-content .wp-block-gallery > .wp-block-image.has-natural-size { display: flex; max-width: var(--ce-natural-w); margin-inline: auto !important; }
/* Document lists: no list indent (they have their own icons). */
.entry-content :is(.ce-docs, .ce-documents) { padding-left: 0; }

.event-box { display: grid; gap: var(--ce-s3); max-width: var(--ce-content); margin: 0 auto var(--ce-s5); padding: var(--ce-s5); border: 2px solid var(--ce-red-dark); border-radius: var(--ce-radius-card); background: #fff7f7; }
.event-box h2 { display: flex; align-items: center; gap: var(--ce-s2); font-size: 1.125rem; margin: 0; color: var(--ce-red-darkest); }
.event-box dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--ce-s2) var(--ce-s4); margin: 0; }
.event-box dt { font-weight: 600; display: inline-flex; align-items: center; gap: var(--ce-s1); }
.event-box dd { margin: 0; }
.event-box__actions { display: flex; flex-wrap: wrap; gap: var(--ce-s2); }

.post-nav { max-width: var(--ce-content); margin: var(--ce-s7) auto 0; padding-top: var(--ce-s5); border-top: 1px solid var(--ce-border); }
.post-nav__list { display: grid; gap: var(--ce-s3); list-style: none; margin: 0; padding: 0; }
.post-nav__link { display: flex; flex-direction: column; gap: 2px; padding: var(--ce-s3) var(--ce-s4); border: 1px solid var(--ce-border); border-radius: var(--ce-radius-btn); text-decoration: none; }
.post-nav__label { font-size: 0.875rem; color: var(--ce-grey-light); }
.post-nav__title { font-weight: 600; }
.post-nav__link:hover .post-nav__title { text-decoration: underline; }
@media (min-width: 600px) { .post-nav__list { grid-template-columns: 1fr 1fr; } .post-nav__item--next { text-align: right; } }

.subpages { margin-top: var(--ce-s7); }

/* Agenda page */
.agenda-month { margin-bottom: var(--ce-s6); }
.agenda-month h2 { padding-bottom: var(--ce-s2); border-bottom: 2px solid var(--ce-red); text-transform: capitalize; }
.agenda-links { display: flex; flex-wrap: wrap; gap: var(--ce-s2); margin-bottom: var(--ce-s5); }

/* Series archive: latest edition, then the chronological list (short dates, one line each). */
.series-latest { max-width: var(--ce-content); margin-bottom: var(--ce-s6); }
.series-latest h2, .series-all { font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem); }
.series-latest .cards { grid-template-columns: minmax(0, 1fr); margin-bottom: 0; }
@media (min-width: 600px) {
	.series-latest .card__inner { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
	/* The image fills the height the text sets (a poster would stretch the card otherwise). */
	.series-latest .card__media { position: relative; aspect-ratio: auto; min-height: 220px; }
	.series-latest .card__img { position: absolute; inset: 0; }
}
.series-list { list-style: none; margin: 0 0 var(--ce-s6); padding: 0; max-width: var(--ce-content); }
.series-list li { display: flex; align-items: baseline; gap: var(--ce-s4); padding: var(--ce-s3) 0; border-bottom: 1px solid var(--ce-border); }
.series-list time { flex: none; width: 8.5em; color: var(--ce-grey); font-size: 0.9375rem; }
.series-list + .pagination { max-width: var(--ce-content); }
@media (max-width: 399.98px) {
	.series-list li { flex-direction: column; gap: 2px; }
	.series-list time { width: auto; }
}

/* 404: the big number is decorative (aria-hidden); #8a8a8a gives 3.4:1, enough for large text. */
.error-404 { max-width: var(--ce-content); }
.error-404__code { font-family: var(--ce-font-heading); font-size: clamp(4rem, 3rem + 6vw, 8rem); line-height: 1; color: #8a8a8a; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ce-black); color: var(--ce-bg-light); margin-top: var(--ce-s8); }
.site-footer a { color: var(--ce-white); }
.site-footer a:hover, .site-footer a:focus { color: var(--ce-yellow); }
.site-footer :focus-visible { outline-color: var(--ce-yellow); box-shadow: none; }
.footer__grid { display: grid; gap: var(--ce-s6); padding-block: var(--ce-s7); }
@media (min-width: 600px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer__title { font-size: 1.125rem; color: var(--ce-white); margin-bottom: var(--ce-s3); }
.footer__subtitle { font-size: 1rem; color: var(--ce-white); margin: var(--ce-s4) 0 var(--ce-s2); }
.footer__address { font-style: normal; }
.footer__address p, .footer__list li { margin-bottom: var(--ce-s2); }
.footer__address .icon, .footer__social .icon { margin-right: var(--ce-s2); }
.footer__address a { display: inline-flex; align-items: center; }
.footer__list { list-style: none; margin: 0; padding: 0; }
.footer__list a { text-decoration: none; }
.footer__list a:hover, .footer__list a:focus { text-decoration: underline; }
/* The header logo (dark) drawn white: one file for both, already cached from the header. */
.footer__upv img { height: 48px; width: auto; filter: brightness(0) invert(1); }
.footer__copy { font-size: 0.875rem; color: var(--ce-border); margin-top: var(--ce-s3); }
.footer__legal { border-top: 1px solid var(--ce-grey); font-size: 0.875rem; }
.footer__legal-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ce-s2) var(--ce-s5); padding-block: var(--ce-s4); }
.footer__legal-list { display: flex; flex-wrap: wrap; gap: 0 var(--ce-s3); list-style: none; margin: 0; padding: 0; }
.footer__legal-list li { margin: 0; }
.footer__legal-list a { display: inline-flex; align-items: center; min-height: 44px; padding-block: var(--ce-s2); }
.footer__legal-copy { margin: 0; color: var(--ce-border); }

/* ---------- Block extras ---------- */
.wp-block-calum-horario table, .ce-hours table { font-size: 1rem; }
.ce-hours__today { font-size: 1.25rem; font-weight: 600; }
.ce-notice { padding: var(--ce-s3) var(--ce-s4); border-left: 4px solid var(--ce-blue); background: var(--ce-bg-light); border-radius: 0 var(--ce-radius-btn) var(--ce-radius-btn) 0; }
.ce-documents { list-style: none; margin: 0; padding: 0; }
.ce-documents li { display: flex; align-items: center; gap: var(--ce-s3); padding: var(--ce-s3) 0; border-bottom: 1px solid var(--ce-border); }
.ce-documents__meta { color: var(--ce-grey-light); font-size: 0.875rem; margin-left: auto; white-space: nowrap; }

/* ---------- Windows high contrast (forced colours) ---------- */
/* Backgrounds and box-shadows are dropped there: the logos get a plate of their own colour and
   every "current" state (language, page, filter, page number) an underline or system colours. */
@media (forced-colors: active) {
	.brand__upv, .footer__upv a { display: inline-flex; padding: var(--ce-s1); border-radius: 4px; forced-color-adjust: none; }
	.brand__upv { background: #fff; }
	.footer__upv a { background: #111; }
	.lang-switcher__link[aria-current="page"], .filters__link[aria-current="page"], .pagination .page-numbers.current { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
	.nav__link[aria-current="page"], .current-menu-ancestor > .nav__link, .current-menu-parent > .nav__link, .nav__sublink[aria-current="page"] .nav__title, .filters__sub a[aria-current] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.3em; }
	.card:focus-within, .result:focus-within { outline-color: Highlight; }
}

/* ---------- Motion, print ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
@media print {
	.masthead__tools, .navbar, .site-footer, .post-nav, .skip-link, .button, .pagination, .filters { display: none !important; }
	/* Screen-only controls: calendar month buttons and subscribe links, activity actions. */
	.ce-cal__nav, .ce-cal__foot, .event-box__actions, .a11y-toolbar, .results__more > summary { display: none !important; }
	body { color: #000; font-size: 11pt; }
	a { color: #000; text-decoration: none; }
	/* The address of page links only: not of photos, files (uploads, .ics feeds), buttons or
	   jumps to a section (the horario block's "whole month" link). */
	.entry-content a[href^="http"]:not(:has(img)):not([href*="/wp-content/uploads/"]):not([href*="ce_ics"]):not([href*="ce_cal_"]):not([href*="#"]):not(.wp-block-button__link):not(.wp-block-file__button)::after { content: " (" attr(href) ")"; font-size: 0.85em; overflow-wrap: anywhere; }
	.card, .event-box, .hero { border: 1px solid #999; box-shadow: none; break-inside: avoid; }
	.hero { background: none; color: #000; }
	.hero__title, .hero__excerpt, .hero__date { color: #000; }
}

/* Editor-only notes inside page content (class ce-editor-note): never shown to visitors. */
.ce-editor-note { display: none !important; }
.ce-lazy-iframe--tall.is-loaded iframe { min-height: 720px; }
