/*
Theme Name: CàmeresiAcció
Theme URI: https://cameresiaccio.org
Author: CàmeresiAcció
Description: Tema de blocs lleuger per a cameresiaccio.org, sense constructors visuals.
Version: 0.1.205
Requires at least: 6.5
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: cameresiaccio
*/

/* ---------- Base ---------- */
:root { --ao-gap: 1rem; --ao-nav-h: 4rem; }
@media (min-width: 735px) { :root { --ao-gap: 2rem; --ao-nav-h: 6rem; } }

body { -webkit-font-smoothing: antialiased; }
img { height: auto; max-width: 100%; }
a { text-decoration: none; } /* sense subratllat per defecte; activable des del menú d'accessibilitat (data-a11y-underline) */
html[data-a11y-underline="1"] a { text-decoration: underline; }
.wp-site-blocks > * + * { margin-block-start: 0; }
main > * + * { margin-block-start: 0; }

/* ---------- Capçalera ---------- */
.ao-header { position: relative; z-index: 50; min-height: var(--ao-nav-h); display: flex; align-items: center; }
.ao-header > .wp-block-group { width: 100%; }
.ao-header a { color: inherit; text-decoration: none; }
.ao-header .wp-block-navigation-item__content { padding-bottom: 5px; border-bottom: 1px solid transparent; }
.ao-header .current-menu-item > a { border-bottom-color: currentColor; }
/* A la portada la capçalera flota transparent sobre el vídeo */
.home .ao-header, .post-type-archive .ao-header { position: absolute; inset: 0 0 auto 0; color: #fff; }
.home .ao-header .wp-block-navigation__responsive-container-open, .post-type-archive .ao-header .wp-block-navigation__responsive-container-open { color: #fff; }
/* Podcast: mateixa capçalera transparent sobre el hero (body.ao-hero-bajo-menu, inc/ficha.php). */
.ao-hero-bajo-menu .ao-header { position: absolute; inset: 0 0 auto 0; color: #fff; }
.ao-hero-bajo-menu .ao-header .wp-block-navigation__responsive-container-open { color: #fff; }
.ao-hero-bajo-menu .ao-logo img { filter: none; }

/* ---------- Botons flotants: idioma + accessibilitat (petició de Xose, 2026-11-03) ---------- */
.ao-float-botones { position: fixed; z-index: 100; right: 1rem; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: .75rem; }
.ao-float-item { position: relative; }
.ao-float-boto { display: flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; padding: 0; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); border-radius: 50%; background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15); transition: background-color .25s ease, color .25s ease; }
/* Mateix comportament que la resta d'enllaços: en hover, focus o obert, s'inverteixen els colors (fons negre, icona blanca). */
.ao-float-boto:hover, .ao-float-boto:focus-visible, .ao-float-boto[aria-expanded="true"] { background: #000; color: #fff; border-color: #000; }
.ao-float-boto__icona { width: 2.3rem; height: 2.3rem; }
.ao-float-popup { position: absolute; right: calc(100% + .75rem); top: 50%; transform: translateY(-50%); min-width: 12rem; padding: 1rem; border-radius: .5rem; background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); box-shadow: 0 4px 20px rgba(0,0,0,.2); }
#ao-popup-lang { min-width: 0; width: max-content; } /* ample segons el nom d'idioma més llarg (Castellano) */
.ao-float-popup__lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.ao-float-popup__lista a { display: block; padding: .4rem .5rem; text-decoration: none; color: inherit; border-radius: .3rem; }
.ao-float-popup__lista a:hover, .ao-float-popup__lista a:focus-visible { background: color-mix(in srgb, currentColor 10%, transparent); }
.ao-popup-a11y:not([hidden]) { min-width: 14rem; display: flex; flex-direction: column; gap: .9rem; }
.ao-a11y-fila { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.ao-a11y-fila__etiqueta { font-size: .9rem; }
.ao-a11y-font { display: flex; gap: .3rem; }
.ao-a11y-font button { width: 2rem; height: 2rem; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); border-radius: .3rem; background: transparent; color: inherit; cursor: pointer; font-size: .85rem; }
.ao-a11y-switch { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: .5rem .6rem; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); border-radius: .3rem; background: transparent; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.ao-a11y-switch[aria-pressed="true"] { background: var(--wp--preset--color--accent); color: #fff; border-color: var(--wp--preset--color--accent); }
@media (max-width: 480px) { .ao-float-botones { right: .5rem; } .ao-float-boto { width: 2.6rem; height: 2.6rem; } .ao-float-boto__icona { width: 2rem; height: 2rem; } }

/* Alt contrast: fons negre, text blanc, enllaços grocs; aplicat amb l'atribut data-a11y-contrast a <html> */
html[data-a11y-contrast="1"] { --wp--preset--color--base: #000; --wp--preset--color--contrast: #fff; } /* els fons i textos del tema es pinten amb aquests tokens (també .has-base-background-color de les fitxes) */
html[data-a11y-contrast="1"] body { background: #000 !important; color: #fff !important; }
html[data-a11y-contrast="1"] a { color: #ffe14d !important; }
html[data-a11y-contrast="1"] .ao-video__title { color: #ffe14d !important; } /* sense franja negra sòlida (igual que Visuals antiracistes): es manté el degradat de la línia 379, text groc */
html[data-a11y-contrast="1"] img { filter: grayscale(.2) contrast(1.15); }
html[data-a11y-contrast="1"] .wp-block-button__link { background: #ffe14d !important; color: #000 !important; }
html[data-a11y-contrast="1"] .ao-float-boto, html[data-a11y-contrast="1"] .ao-float-popup { background: #000 !important; color: #fff !important; border-color: #fff !important; }

/* Tipografia per a dislèxia (OpenDyslexic, autoallotjada igual que Albert Sans). */
@font-face { font-family: 'OpenDyslexic'; src: url('assets/fonts/OpenDyslexic-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'OpenDyslexic'; src: url('assets/fonts/OpenDyslexic-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Albert Sans'; src: url('assets/fonts/AlbertSans-latin-ext.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Albert Sans'; src: url('assets/fonts/AlbertSans-latin.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; 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; }
html[data-a11y-dislexia="1"] body { font-family: 'OpenDyslexic', Verdana, Arial, sans-serif !important; letter-spacing: .01em; line-height: 1.8 !important; }
html[data-a11y-dislexia="1"] * { font-family: inherit !important; }

/* ---------- Portada (hero) ---------- */
.ao-hero { background: #173a61; }
.ao-hero.wp-block-cover { min-height: 100svh; color: #fff; }
.ao-hero h1, .ao-hero p { color: #fff; }
.ao-hero .wp-block-cover__video-background { object-fit: cover; }
.ao-hero h1 { margin: 0; font-size: clamp(2.8rem, 8vw, 5rem); }
.ao-hero p { font-size: clamp(.7rem, 3vw, 1.2rem); margin-top: .5rem; white-space: nowrap; }
.ao-hero .ao-hero__arrow { font-size: 2rem; margin-top: 1.5rem; animation: ao-bob 2.4s ease-in-out infinite; }
.ao-hero h1, .ao-hero p { animation: ao-fade 3s ease both; }
@keyframes ao-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ao-bob { 50% { transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .ao-hero * { animation: none !important; } }

/* ---------- Seccions ---------- */
.ao-section { padding-block: var(--wp--preset--spacing--80); }
.ao-section h1, .ao-section h2:first-child { margin-top: 0; }
.ao-section-title { margin-bottom: 2rem; }
.ao-section-title a { color: inherit; text-decoration: none; }
/* Projectes, Col·lectius i Documentals: en hover s'inverteixen els colors del títol (petició de Xose, 2026-11-03: abans hi havia una fletxa animada). */
.ao-invert--projectes, .ao-invert--colectius, .ao-invert--documentals { display: inline-block; padding: 0 .2em; background: transparent; color: inherit; transition: background-color .25s ease, color .25s ease; }
.ao-invert--projectes:hover, .ao-invert--projectes:focus-visible,
.ao-invert--colectius:hover, .ao-invert--colectius:focus-visible,
.ao-invert--documentals:hover, .ao-invert--documentals:focus-visible { background: #000; color: #fff; }
/* Mateix hover (fons negre, text blanc) a la resta d'enllaços de text del lloc: menú, peu i enllaços dins
   el cos de les fitxes (petició de Xose, 2026-11-03). No afecta botons, targetes ni vídeos. */
.ao-header .wp-block-navigation-item__content,
.ao-footer a,
.ao-ficha__cuerpo a,
#cooperativa a {
	display: inline-block;
	padding: 0 .2em;
	background: transparent;
	transition: background-color .25s ease, color .25s ease;
}
.ao-header .wp-block-navigation-item__content:hover, .ao-header .wp-block-navigation-item__content:focus-visible,
.ao-footer a:hover, .ao-footer a:focus-visible,
.ao-ficha__cuerpo a:not(.ao-video > a):hover, .ao-ficha__cuerpo a:not(.ao-video > a):focus-visible,
html[data-theme="dark"] .ao-ficha__cuerpo a:not(.ao-video > a):hover, html[data-theme="dark"] .ao-ficha__cuerpo a:not(.ao-video > a):focus-visible,
#cooperativa a:hover, #cooperativa a:focus-visible {
	background: #000;
	color: #fff;
}

/* Contacte a la part inferior del menú: més petit i separat */
.ao-header .wp-block-navigation__container .ao-menu-contacto .wp-block-navigation-item__content {
	font-size: clamp(0.9rem, 2.5vw, 1.25rem);
	font-weight: 400;
	line-height: 1.1;
}
.ao-header .wp-block-navigation__container .ao-menu-contacto--bold .wp-block-navigation-item__content {
	font-weight: 700;
}
.ao-header .wp-block-navigation__container .ao-menu-contacto--first {
	margin-top: 0;
	padding-top: 1.5rem;
	border-top: 1px solid #ff00ff;
}
.ao-header .wp-block-navigation__container .ao-menu-contacto .wp-block-navigation-item__content:hover,
.ao-header .wp-block-navigation__container .ao-menu-contacto .wp-block-navigation-item__content:focus-visible {
	background: transparent;
	color: inherit;
}

/* Nota gris (p. ex. autoría de los vídeos de Portaveus, justo encima de la rejilla). Gris medio en claro y más claro en oscuro. */
.ao-nota { color: #6b6b6b; }
html[data-theme="dark"] .ao-nota { color: #a6a6a6; }

/* Desplegables (core/details) */
.ao-drawers .wp-block-details { border-top: 1px solid currentColor; padding-block: 1rem; margin: 0; }
.ao-drawers .wp-block-details:last-child { border-bottom: 1px solid currentColor; }
.ao-drawers summary { font-weight: 700; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.2; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.ao-drawers summary::-webkit-details-marker { display: none; }
.ao-drawers summary::after { content: ""; flex: none; width: .6em; height: .6em; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.ao-drawers details[open] > summary::after { transform: rotate(-135deg); }
.ao-drawers .wp-block-details > :not(summary) { max-width: var(--ao-ancho, 60rem); } /* --ao-ancho solo existe en las fichas; en la home vale 60rem */

/* Carrusel de novetats (sense JS: scroll-snap) */
.ao-scroller { display: flex; gap: var(--ao-gap); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0; scrollbar-width: none; }
.ao-scroller::-webkit-scrollbar { display: none; }
.ao-scroller > * { flex: 0 0 100%; scroll-snap-align: start; margin: 0 !important; }
@media (min-width: 735px) { .ao-scroller > * { flex-basis: calc((100% - 2 * var(--ao-gap)) / 3); } }
.ao-scroller img { display: block; width: 100%; height: auto; }
/* Home: Novetats también a 16:9, amb zoom in suau en hover (no les logos de «Amb qui treballem»). Propagat a tots els idiomes (2026-11-03). */
.ao-scroller:not(.ao-scroller--logos) > * { overflow: hidden; }
.ao-zoomh--novetats img { aspect-ratio: 16 / 9; object-fit: cover; transition: transform .3s ease; }
.ao-zoomh--novetats > *:hover img, .ao-zoomh--novetats > *:focus-within img { transform: scale(1.06); }

/* ---------- Graella de targetes: imatges fins a la vora, sense separació ---------- */
.ao-grid { display: grid !important; grid-template-columns: 1fr; gap: 0; row-gap: 0; column-gap: 0; align-items: start; list-style: none; padding: 0; margin: 0; }
@media (min-width: 735px) { .ao-grid { grid-template-columns: repeat(3, 1fr); } }
/* Documentals: 2 per fila (clase en la plantilla archive-documental.html) */
@media (min-width: 735px) { .ao-grid--dos { grid-template-columns: repeat(2, 1fr); } }
/* Projectes: filas 2×3×2×3×2×3 (15 tarjetas) en 6 columnas, desde 735 px. Cada fila ocupa 6 unidades: las de 2 tarjetas, span 3; las de 3, span 2. */
@media (min-width: 735px) { .ao-grid.ao-grid--filas { grid-template-columns: repeat(6, 1fr); } .ao-grid.ao-grid--filas > li { grid-column: span 3; } .ao-grid.ao-grid--filas > li:nth-child(n+3):nth-child(-n+5), .ao-grid.ao-grid--filas > li:nth-child(n+8):nth-child(-n+10), .ao-grid.ao-grid--filas > li:nth-child(n+13):nth-child(-n+15) { grid-column: span 2; } }
/* Curtmetratges: 2 por fila y la última de 3 (ao-grid--ultima3). 6 columnas: filas de 2 con span 3; las 3 últimas con span 2. Vale para un nº impar de tarjetas (13 ahora). */
@media (min-width: 735px) { .ao-grid.ao-grid--ultima3 { grid-template-columns: repeat(6, 1fr); } .ao-grid.ao-grid--ultima3 > li { grid-column: span 3; } .ao-grid.ao-grid--ultima3 > li:nth-last-child(-n+3) { grid-column: span 2; } }
.ao-grid--dos > li img { aspect-ratio: 16 / 9; }
/* Home, Col·lectius: 4 targetes (2 per fila des de 735px, 4 en una fila des de 1000px). */
@media (min-width: 735px) { .ao-grid--cuatro { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .ao-grid--cuatro { grid-template-columns: repeat(4, 1fr); } }
.ao-card { position: relative; overflow: hidden; margin: 0 !important; line-height: 1.5; }
.ao-grid > .ao-card { height: 100%; }
.ao-card figure, .ao-card .wp-block-post-featured-image { margin: 0; display: block; line-height: 0; }
.ao-card figure a { display: block; line-height: 0; }
.ao-card img { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; transition: transform .35s ease; }
.ao-card a { color: inherit; text-decoration: none; }
/* Zoom in variat per secció en hover (petició de Xose 2026-11-02; propagat a tots els idiomes 2026-11-03). */
.ao-zoomh--projectes .ao-card img { transition: transform .4s ease-out; }
.ao-zoomh--projectes .ao-card:hover img, .ao-zoomh--projectes .ao-card:focus-within img { transform: scale(1.1); }
/* Tarjeta de «La veu de les veïnes»: la imagen pasa periódicamente de color a blanco y negro (ciclo de 8 s). */
@keyframes ao-bn { 0%, 45% { filter: none; } 55%, 90% { filter: grayscale(1); } 100% { filter: none; } }
.ao-card:has(a[href*="/projectes/la-veu-de-les-veines"]) img { animation: ao-bn 8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .ao-card:has(a[href*="/projectes/la-veu-de-les-veines"]) img { animation: none; } }
/* Vídeo principal de «La veu de les veïnes»: texto negro sobre el logo (imagen clara), con degradado claro en vez de oscuro. */
.ao-video[data-embed*="22eTFKinm6k"] > .ao-video__title { color: #000; background: linear-gradient(to top, rgba(255,255,255,.85), rgba(255,255,255,0)); }
.ao-zoomh--colectius .ao-card img { transition: transform .5s ease; }
.ao-zoomh--colectius .ao-card:hover img, .ao-zoomh--colectius .ao-card:focus-within img { transform: scale(1.15); }
.ao-zoomh--documentals .ao-card img { transition: transform .25s ease-in-out; }
.ao-zoomh--documentals .ao-card:hover img, .ao-zoomh--documentals .ao-card:focus-within img { transform: scale(1.08); }
@media (prefers-reduced-motion: reduce) {
	.ao-zoomh--novetats img, .ao-card img { transition: none; }
	.ao-zoomh--novetats > *:hover img, .ao-card:hover img { transform: none; }
}
/* Panell amb etiqueta, títol i descripció: puja en passar-hi el ratolí o amb el focus del teclat */
.ao-card__info { position: absolute; left: 0; right: 0; bottom: 0; padding: .6rem .75rem; text-align: left; color: #fff;
	display: flex; flex-direction: column; align-items: flex-start; gap: .2rem;
	transform: translateY(100%); transition: transform .25s ease; }
.ao-card:hover .ao-card__info, .ao-card:focus-within .ao-card__info { transform: translateY(0); }
.ao-card__info > * { margin: 0; color: #fff; background: #000; width: fit-content; max-width: 100%; padding: .1em .4em; }
.ao-card__info h3 { font-size: 1.2rem; margin: .25rem 0; }
.ao-card__info .ao-desc { font-size: .9rem; line-height: 1.4; }
.ao-tag { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) { .ao-card__info { transition: none; } }

/* ---------- Botons ---------- */
.wp-block-button__link { text-decoration: none; }

/* ---------- Correu de contacte (a tota l'amplada, sense negreta) ---------- */
.ao-correu-bloc { padding-block: calc(var(--wp--preset--spacing--80) * 2) var(--wp--preset--spacing--80); }
.ao-correu { margin: 0; padding-inline: var(--ao-p); text-align: center; white-space: nowrap; font-size: 7.6vw; font-weight: 400; line-height: 1.1; }
.ao-correu a { color: inherit; text-decoration: none; }
.ao-correu a:hover, .ao-correu a:focus-visible { background: #000; color: #fff; }
.ao-correu-intro { margin: 0 0 .6rem; padding-inline: var(--ao-p); text-align: center; font-size: 1.1rem; line-height: 1.3; }
/* Móvil: menys espai en blanc al voltant de Novetats i del bloc del correu (la meitat a Novetats). */
@media (max-width: 734px) {
	.ao-novetats { padding-block: calc(var(--wp--preset--spacing--80) / 2); }
	.ao-correu-bloc { padding-block: calc(var(--wp--preset--spacing--80) / 2); }
	.ao-section:has(+ .ao-novetats) { padding-bottom: calc(var(--wp--preset--spacing--80) / 2 - 8px); }
	.ao-novetats + .ao-section { padding-top: calc(var(--wp--preset--spacing--80) / 2 - 8px); }
}

/* ---------- Socis (carrusel de logos: 3 en mòbil, 5 en escriptori) ---------- */
.ao-scroller.ao-scroller--logos > * { flex-basis: calc((100% - 2 * var(--ao-gap)) / 3); }
@media (min-width: 735px) { .ao-scroller.ao-scroller--logos > * { flex-basis: calc((100% - 4 * var(--ao-gap)) / 5); } }
.ao-scroller--logos img { height: 5rem; object-fit: contain; }

/* ---------- Peu ---------- */
.ao-footer { font-size: .9rem; text-align: center; }
.ao-footer a { color: inherit; }
.ao-footer .wp-block-social-links { justify-content: center; }

/* ---------- Mode fosc (opcional, amb botó) ---------- */
html[data-theme="dark"] {
	color-scheme: dark;
	--wp--preset--color--base: #121212;
	--wp--preset--color--contrast: #ececec;
}
html[data-theme="dark"] .ao-scroller--logos figure { background: #fff; padding: .5rem; }
.ao-footer .wp-social-link { color: inherit; }

/* Logo de la capçalera: PNG blanc; es veu negre sobre fons clar */
.ao-logo { margin: 0; line-height: 0; }
.ao-logo img { filter: invert(1); }
.home .ao-logo img, .post-type-archive .ao-logo img, html[data-theme="dark"] .ao-logo img { filter: none; }

/* El menú va a la derecha; el botón de mode fosc queda al final */
.ao-header .wp-block-navigation { margin-left: auto; }
/* El mode fosc no toca el hero: capa i text sempre amb colors fixos */
.ao-hero .wp-block-cover__background { background-color: #313131 !important; }

/* Punts del carrusel */
.ao-dots { display: flex; justify-content: center; gap: .25rem; margin-top: .75rem; }
.ao-dots button { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.ao-dots button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 1px solid currentColor; background: transparent; color: inherit; }
.ao-dots button[aria-current="true"]::before { background: var(--wp--preset--color--accent); border-color: var(--wp--preset--color--accent); }
.ao-dots button { color: var(--wp--preset--color--contrast); }

/* Menú sempre en hamburguesa: panell a alçada completa que entra per la DRETA (com el d'escolataro.cat),
   amb el logo a dalt, els enllaços alineats a l'esquerra i centrats en vertical, i els colors del tema. */
.ao-header .wp-block-navigation__responsive-container-open { color: inherit; }
.ao-header .wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); padding: 0;
	animation: ao-panel-in .3s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes ao-panel-in { from { transform: translateX(100%); } to { transform: none; } }
/* Tancar: el panell es replega cap a la dreta (camí invers). El JS (tema.js) afegeix .is-closing i espera el final. */
.ao-header .wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open.is-closing {
	animation: ao-panel-out .3s cubic-bezier(.4, 0, 1, 1) both;
}
@keyframes ao-panel-out { from { transform: none; } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .ao-header .wp-block-navigation__responsive-container.is-menu-open.is-closing { animation: none; } }
@media (prefers-reduced-motion: reduce) { .ao-header .wp-block-navigation__responsive-container.is-menu-open { animation: none; } }
.ao-header .is-menu-open .wp-block-navigation__responsive-close { width: 100%; max-width: none; height: 100%; }
.ao-header .is-menu-open .wp-block-navigation__responsive-dialog {
	box-sizing: border-box; height: 100%; margin: 0; display: flex; flex-direction: column; position: relative; overflow-y: auto;
	padding: 1rem max(1rem, calc((100% - 44rem) / 2)) 3rem;
}
/* Creu = les dues barres exteriors de la hamburguesa, al mateix punt (fixed: dreta 16 px, centre a 48 px, com l'obertura),
   que s'obren en aspes. El botó apareix quan el panell ja ha entrat (la hamburguesa queda tapada pel panell). */
.ao-header .is-menu-open .wp-block-navigation__responsive-container-close {
	position: fixed; top: var(--ao-x-t, 37px); right: var(--ao-x-r, 16px); z-index: 2; width: 32px; height: 22px; padding: 0; margin: 0; color: var(--wp--preset--color--contrast);
}
.ao-header .wp-block-navigation__responsive-container-close svg { display: none; }
.ao-header .is-menu-open .wp-block-navigation__responsive-container-close::before,
.ao-header .is-menu-open .wp-block-navigation__responsive-container-close::after {
	content: ""; position: absolute; left: 0; top: 50%; width: 32px; height: 3px; margin-top: -1.5px; background: currentColor;
}
.ao-header .is-menu-open:not(.is-closing) .wp-block-navigation__responsive-container-close { animation: ao-x-mostra .01s .3s both; }
.ao-header .is-menu-open:not(.is-closing) .wp-block-navigation__responsive-container-close::before { animation: ao-x-a .3s .3s cubic-bezier(.2, .8, .2, 1) both; }
.ao-header .is-menu-open:not(.is-closing) .wp-block-navigation__responsive-container-close::after { animation: ao-x-b .3s .3s cubic-bezier(.2, .8, .2, 1) both; }
.ao-header .is-menu-open.is-closing .wp-block-navigation__responsive-container-close::before { animation: ao-x-a-fora .3s cubic-bezier(.4, 0, 1, 1) both; }
.ao-header .is-menu-open.is-closing .wp-block-navigation__responsive-container-close::after { animation: ao-x-b-fora .3s cubic-bezier(.4, 0, 1, 1) both; }
@keyframes ao-x-mostra { from { opacity: 0; } to { opacity: 1; } }
@keyframes ao-x-a { from { transform: translateY(-9.5px) rotate(0); } to { transform: translateY(0) rotate(45deg); } }
@keyframes ao-x-b { from { transform: translateY(9.5px) rotate(0); } to { transform: translateY(0) rotate(-45deg); } }
@keyframes ao-x-a-fora { from { transform: translateY(0) rotate(45deg); } to { transform: translateY(-9.5px) rotate(0); } }
@keyframes ao-x-b-fora { from { transform: translateY(0) rotate(-45deg); } to { transform: translateY(9.5px) rotate(0); } }
@media (prefers-reduced-motion: reduce) {
	.ao-header .is-menu-open .wp-block-navigation__responsive-container-close::before { transform: rotate(45deg); }
	.ao-header .is-menu-open .wp-block-navigation__responsive-container-close::after { transform: rotate(-45deg); }
}
.ao-menu-logo { margin: 0; line-height: 0; flex: none; }
.ao-menu-logo img { display: block; width: 96px; height: 96px; filter: invert(1); }
html[data-theme="dark"] .ao-menu-logo img { filter: none; }
.ao-header .is-menu-open .wp-block-navigation__responsive-container-content { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; width: 100%; padding: 0 !important; margin: 0; overflow: visible; }
.ao-header .is-menu-open .wp-block-navigation__container { width: 100%; flex: none; align-items: flex-start !important; justify-content: flex-start; text-align: left; gap: 1rem; padding: 0; margin-top: 3rem; }
.ao-header .is-menu-open .wp-block-navigation-item { align-items: flex-start !important; justify-content: flex-start; }
.ao-header .is-menu-open .wp-block-navigation-item__content { font-size: clamp(1.8rem, 5vw, 2.5rem); font-weight: 700; line-height: 1.15; }

/* Hamburguesa més gruesa: tres barres de 3 px dibuixades amb CSS (substitueixen l'SVG) */
.ao-header .wp-block-navigation__responsive-container-open { padding: 0; margin-left: 1rem; }
.ao-header .wp-block-navigation__responsive-container-open svg { display: none; }
.ao-header .wp-block-navigation__responsive-container-open::before {
	content: ""; display: block; width: 32px; height: 22px;
	background:
		linear-gradient(currentColor, currentColor) 0 0 / 100% 3px no-repeat,
		linear-gradient(currentColor, currentColor) 0 50% / 100% 3px no-repeat,
		linear-gradient(currentColor, currentColor) 0 100% / 100% 3px no-repeat;
}
.ao-header .wp-block-navigation__responsive-container-close svg { stroke: currentColor; stroke-width: 2.5; }

/* Títol del hero: en vertical pot anar en dues línies; en horitzontal, en una */
.ao-hero .wp-block-cover__inner-container > * { max-width: 1400px; }
.ao-hero h1 { font-size: clamp(2.4rem, 12vw, 3.4rem); line-height: 1.1; text-wrap: balance; white-space: normal; }
@media (min-width: 735px) { .ao-hero h1 { font-size: clamp(2.8rem, 6vw, 4.5rem); white-space: nowrap; } }

/* Fletxa del hero: enllaç que baixa al primer panell */
/* Reserva sempre l'espai de la barra de desplaçament: en obrir el menú (overflow hidden) la pàgina no es desplaça de lloc. */
html { scroll-behavior: smooth; overflow-x: hidden; scrollbar-gutter: stable; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.ao-hero .ao-hero__arrow a { display: inline-block; padding: .25rem 1rem; color: #fff; text-decoration: none; line-height: 1; }
.ao-hero .ao-hero__arrow a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Títols de secció més grans */
.ao-section-title, .ao-section h1 { font-size: clamp(2.8rem, 7vw, 5rem); line-height: 1.05; }
/* Títols grans de la home (Intervenció audiovisual, Som cooperativa): més grans i sense negreta */
.home .ao-section-title, .home .ao-hero h1, .home #cooperativa h1 { font-size: clamp(3.2rem, 9.5vw, 9rem); font-weight: 400; line-height: 1; }
.home .ao-hero h1 { white-space: normal; text-wrap: balance; }
/* Vertical (mòbil i tauleta en vertical): títols de la home més grans */
@media (orientation: portrait) { .home .ao-hero h1, .home #cooperativa h1 { font-size: clamp(3.2rem, 14vw, 12rem); } .home .ao-section-title { font-size: clamp(2.8rem, 12vw, 12rem); } }

/* Targetes generades per Query Loop (arxius): mateix aspecte que les de la Home */
.ao-grid > li { position: relative; overflow: hidden; margin: 0 !important; list-style: none; line-height: 1.5; }
.ao-grid > li .wp-block-post-featured-image { margin: 0; line-height: 0; }
.ao-grid > li .wp-block-post-featured-image a { display: block; }
.ao-grid > li img { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
.ao-grid--169 > li img { aspect-ratio: 16 / 9; } /* después de la regla de arriba: la de 4/3 gana a .ao-grid--dos > li img por orden (Curtmetratges) */
.ao-grid > li a { color: inherit; text-decoration: none; }
.ao-grid > li:hover .ao-card__info, .ao-grid > li:focus-within .ao-card__info { transform: translateY(0); }
/* Zoom in a les targetes de Projectes: cada targeta té una variant (a…d, com als vídeos de Visuals antimasclistes), en cicle. */
.ao-grid--169 > li:nth-child(4n+1) img { transition: transform .3s ease; }
.ao-grid--169 > li:nth-child(4n+1):hover img, .ao-grid--169 > li:nth-child(4n+1):focus-within img { transform: scale(1.05); }
.ao-grid--169 > li:nth-child(4n+2) img { transition: transform .4s ease-out; }
.ao-grid--169 > li:nth-child(4n+2):hover img, .ao-grid--169 > li:nth-child(4n+2):focus-within img { transform: scale(1.1); }
.ao-grid--169 > li:nth-child(4n+3) img { transition: transform .6s ease; }
.ao-grid--169 > li:nth-child(4n+3):hover img, .ao-grid--169 > li:nth-child(4n+3):focus-within img { transform: scale(1.15); }
.ao-grid--169 > li:nth-child(4n) img { transition: transform .2s ease-in-out; }
.ao-grid--169 > li:nth-child(4n):hover img, .ao-grid--169 > li:nth-child(4n):focus-within img { transform: scale(1.08); }
@media (prefers-reduced-motion: reduce) { .ao-grid--169 > li img { transition: none !important; } .ao-grid--169 > li:hover img, .ao-grid--169 > li:focus-within img { transform: none !important; } }
.ao-card__info .ao-desc, .ao-card__info .ao-desc p { margin: 0; }
.ao-card__info .wp-block-post-title { font-size: 1.2rem; margin: .25rem 0; }
.ao-card__info .wp-block-post-title a { color: #fff; }
/* Tàctil (sense hover): el panell només es desplega mentre el dit és sobre la targeta (tema.js hi posa .ao-tocada).
   Sense això, el hover que el mòbil manté després del toc deixaria el panell obert. */
@media (hover: none) {
	.ao-card:hover .ao-card__info, .ao-grid > li:hover .ao-card__info,
	.ao-card:focus-within .ao-card__info, .ao-grid > li:focus-within .ao-card__info { transform: translateY(100%); }
	.ao-tocada .ao-card__info { transform: translateY(0) !important; }
}
.post-type-archive .wp-block-query { margin-top: 0; }

/* Panell d'introducció (arxius): text gran sobre fons de pàgina */
.ao-intro { padding-block: clamp(4rem, 9vw, 9rem); }
.ao-intro p { font-size: clamp(1.4rem, 2.8vw, 2.4rem); line-height: 1.25; font-weight: 400; max-width: 64rem; margin: 0; text-wrap: pretty; }

/* ---------- Fitxes individuals (single-projecte / -curtmetratge / -colectiu) ---------- */
/* Capçalera transparent sobre el hero, com als arxius. Documentals NO porten hero (ficha-documental.php,
   vídeo a dalt en comptes de foto): amb fons blanc, la capçalera blanca es feia invisible (detectat a «El
   carro pel pedregar», 2026-11-03); per això .single-documental ja no entra en aquesta regla. */
:is(.single-projecte, .single-curtmetratge, .single-colectiu) .ao-header { position: absolute; inset: 0 0 auto 0; color: #fff; }
:is(.single-projecte, .single-curtmetratge, .single-colectiu) .ao-header .wp-block-navigation__responsive-container-open { color: #fff; }
:is(.single-projecte, .single-curtmetratge, .single-colectiu) .ao-logo img { filter: none; }

/* Hero de fitxa: més baix que el d'arxiu, títol i subtítol a baix a l'esquerra, degradat per al contrast */
.ao-hero.ao-hero--ficha { min-height: clamp(20rem, 58svh, 34rem); padding: 0; align-items: flex-end; }
.ao-hero--ficha::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,0) 65%); pointer-events: none; }
.ao-hero.ao-hero--ficha .wp-block-cover__inner-container { width: 100%; max-width: 1400px; margin-inline: auto; padding: 6rem var(--ao-gap) 2rem; box-sizing: border-box; }
.ao-hero.ao-hero--ficha .wp-block-cover__inner-container > * { max-width: 60rem; margin-inline: 0; text-align: left; }
.ao-hero--ficha h1 { margin: 0; white-space: normal; font-size: clamp(2.4rem, 7vw, 4.5rem); }
.ao-hero--ficha .ao-hero__sub { margin: .75rem 0 0; }
.ao-hero--ficha .ao-hero__sub p { margin: 0; font-size: clamp(1rem, 2.4vw, 1.4rem); line-height: 1.3; white-space: normal; }
.ao-hero--ficha .wp-block-cover__image-background { object-fit: cover; }

/* Cos: amplada de lectura còmoda */
/* Aire vertical único de la ficha (--ao-aire): hero → primer bloque, último bloque → rejilla de vídeos, último bloque/rejilla → navegación y ficha externa.
   = clamp(2.5rem, 6vw, 5rem) de padding-top de .ao-ficha + 1rem que ya separa el hero del grupo .ao-ficha (medido: 96 px a 1440, 77 a 1024, 56 a 390). */
.ao-ficha { --ao-aire: calc(clamp(2.5rem, 6vw, 5rem) + 1rem); --ao-p: clamp(1rem, 4vw, 3rem);
	/* --ao-ancho: UNA sola anchura para la columna de la ficha (texto, títulos de sección, desplegables, ficha técnica, vídeo principal,
	   ficha externa y navegación: misma línea izquierda y derecha). Máximo 68rem (≈1088 px; no pasa de ahí en pantallas grandes); en tablet y móvil la
	   columna ocupa el ancho disponible menos los márgenes --ao-p. La rejilla a sangre y el hero no dependen de ella, salvo la alineación del título de la rejilla. */
	--ao-ancho: 68rem; padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); }
.wp-block-group.ao-ficha { padding-inline: var(--ao-p); } /* márgenes laterales proporcionales; --ao-p también lo usa la rejilla a sangre */
.ao-ficha__cuerpo { font-size: 1.125rem; line-height: 1.7; }
.ao-sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px !important; padding: 0 !important; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* Una sola columna de --ao-ancho (68rem) para texto, desplegables y ficha técnica; letra e interlineado algo mayores en escritorio para compensar la línea larga */
@media (min-width: 735px) { .ao-ficha__cuerpo { font-size: 1.3rem; line-height: 1.65; } } /* 1.3rem: una sola escala de lectura (fichas y «Som cooperativa» de la home); con 68rem ≈105-110 caracteres por línea a ≥1440 */
.ao-ficha > .ao-ficha__cuerpo { max-width: var(--ao-ancho); } /* gana al contentSize del layout (64rem) */
.ao-ficha__cuerpo > :is(p, h1, h2, h3, h4, ul, ol, blockquote) { max-width: min(var(--ao-ancho), 100%); }
.ao-ficha__cuerpo > .ao-drawers--ficha { max-width: min(var(--ao-ancho), 100%); }
.ao-ficha__cuerpo > .ao-videos:not(.ao-videos--sangre) { max-width: none; margin-inline: 0 !important; } /* vídeo principal = la misma columna que el texto */
/* Todo el cuerpo arranca en la misma línea izquierda: la de la columna --ao-ancho (centrada). El texto (ragged right) ocupa la misma columna. */
.ao-ficha__cuerpo.is-layout-constrained > :is(p, h1, h2, h3, h4, ul, ol, blockquote, .ao-drawers--ficha) { margin-left: max(0px, calc((100% - var(--ao-ancho)) / 2)) !important; margin-right: auto !important; }
.ao-ficha > :is(.ao-ficha-extern, .ao-ficha-nav) { max-width: min(var(--ao-ancho), 100%); margin-left: max(0px, calc((100% - var(--ao-ancho)) / 2)) !important; margin-right: auto !important; }
.ao-ficha__cuerpo > .ao-videos--sangre > h2 { padding-left: calc(var(--ao-p) + max(0px, (100cqw - var(--ao-ancho)) / 2)); }
.ao-ficha__cuerpo > * + * { margin-block-start: 1.25rem; }
.ao-ficha__cuerpo > .ao-videos { margin-block: 2.5rem; }
.ao-ficha__cuerpo p { text-wrap: pretty; }
html[data-theme="dark"] .ao-ficha__cuerpo a { color: #ff7aa6; } /* l'accent sobre #121212 no arriba a 4.5:1 */
/* Text i fitxa tècnica de la fitxa: desplegables natius (core/details) i llista de definició, sense JS */
.ao-kicker { font-size: .85rem; font-weight: 700; letter-spacing: .08em; }
.ao-ficha__cuerpo > .ao-drawers--ficha { margin-block: 2.5rem; }
.ao-drawers--ficha summary { font-size: 1.2rem; min-height: 2.75rem; }
@media (min-width: 735px) { .ao-drawers--ficha summary { font-size: 1.35rem; } }
/* Mismo tamaño de letra del contenido en cualquier desplegable (fichas y home: antes solo las fichas lo
   tenían explícito y la home quedaba en el tamaño base, más pequeño). */
.ao-drawers .wp-block-details > :not(summary) { margin-block-start: 1rem; font-size: 1.05rem; line-height: 1.6; }
.ao-drawers .wp-block-details > :not(summary) + :not(summary) { margin-block-start: .75rem; }
@media (min-width: 735px) { .ao-drawers .wp-block-details > :not(summary) { font-size: 1.3rem; line-height: 1.65; } .ao-drawers dl.ao-fitxa { font-size: 1.15rem; line-height: 1.5; } }
.ao-drawers--ficha summary:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
dl.ao-fitxa { margin: 0; }
.ao-fitxa > div { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: 1rem; padding: .55rem 0; border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
.ao-fitxa dt { font-weight: 700; }
.ao-fitxa dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .ao-fitxa > div { grid-template-columns: 1fr; gap: .1rem; } }
.ao-ficha-extern { margin-block: 2rem 0; }
.ao-ficha-extern a { display: inline-block; padding: .8rem 1.4rem; background: var(--wp--preset--color--accent); color: #fff; font-weight: 700; text-decoration: none; }
.ao-ficha-extern a:hover { filter: brightness(.9); }
.ao-ficha-extern a:focus-visible, .ao-ficha-nav a:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

/* Anterior / següent */
.ao-ficha-nav { margin-top: var(--ao-aire); padding-top: 1.5rem; border-top: 1px solid currentColor; display: grid; gap: 1.5rem; }
.ao-ficha-nav a { color: inherit; text-decoration: none; }
.ao-ficha-nav__back { font-weight: 700; }
.ao-ficha-nav__pn { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ao-ficha-nav__pn a { display: grid; gap: .25rem; }
.ao-ficha-nav__pn small { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.ao-ficha-nav__pn strong { font-size: 1.1rem; line-height: 1.25; }
.ao-ficha-nav__next { grid-column: 2; text-align: right; }
@media (max-width: 734px) { .ao-ficha-nav__pn { grid-template-columns: 1fr; } .ao-ficha-nav__next { grid-column: 1; text-align: left; } }

/* Fatxada de vídeo: sense JS és un enllaç a tota la caixa; amb JS, un <button> i l'iframe només es crea en prémer */
.ao-video { position: relative; aspect-ratio: 16 / 9; background: #173a61; color: #fff; overflow: hidden; margin: 0; }
.ao-video__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .8; }
/* Prova (2026-11-02, només a Visuals antiracistes): 4 variants de zoom in al poster en hover, per comparar. */
/* Zoom al pasar el ratón en TODOS los vídeos (el póster crece dentro de la caja con overflow hidden). Las variantes ao-zoom-a…d, más abajo, lo ajustan por tarjeta. */
.ao-video .ao-video__poster { transition: transform .4s ease-out; }
.ao-video:hover .ao-video__poster, .ao-video:focus-within .ao-video__poster { transform: scale(1.08); }
@media (prefers-reduced-motion: reduce) { .ao-video .ao-video__poster { transition: none; } .ao-video:hover .ao-video__poster, .ao-video:focus-within .ao-video__poster { transform: none; } }
.ao-zoom-a .ao-video__poster { transition: transform .3s ease; }
.ao-zoom-a:hover .ao-video__poster { transform: scale(1.05); }
.ao-zoom-b .ao-video__poster { transition: transform .4s ease-out; }
.ao-zoom-b:hover .ao-video__poster { transform: scale(1.1); }
.ao-zoom-c .ao-video__poster { transition: transform .6s ease; }
.ao-zoom-c:hover .ao-video__poster { transform: scale(1.15); }
.ao-zoom-d .ao-video__poster { transition: transform .2s ease-in-out; }
.ao-zoom-d:hover .ao-video__poster { transform: scale(1.08); }
@media (prefers-reduced-motion: reduce) { .ao-zoom-a .ao-video__poster, .ao-zoom-b .ao-video__poster, .ao-zoom-c .ao-video__poster, .ao-zoom-d .ao-video__poster { transition: none; } .ao-zoom-a:hover .ao-video__poster, .ao-zoom-b:hover .ao-video__poster, .ao-zoom-c:hover .ao-video__poster, .ao-zoom-d:hover .ao-video__poster { transform: none; } }
.ao-video::before { content: ""; position: absolute; z-index: 1; left: 50%; top: 40%; width: 3.75rem; height: 3.75rem; margin: -1.875rem 0 0 -1.875rem; border-radius: 50%; background: rgba(0,0,0,.65) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E") center / 60% no-repeat; border: 2px solid #fff; transition: transform .2s; pointer-events: none; }
.ao-video:hover::before { transform: scale(1.1); }
.ao-video.is-playing::before { display: none; }
.ao-video > a, .ao-video__title { position: absolute; inset: auto 0 0 0; z-index: 2; box-sizing: border-box; padding: 3rem 1rem .9rem; background: linear-gradient(to top, rgba(0,0,0,.8), rgba(0,0,0,0)); color: #fff; font-weight: 700; line-height: 1.25; text-decoration: none; pointer-events: none; }
.ao-video > a { inset: 0; display: flex; align-items: flex-end; pointer-events: auto; }
.ao-video__play { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.ao-video__play:focus-visible, .ao-video > a:focus-visible { outline: 3px solid #fff; outline-offset: -8px; box-shadow: inset 0 0 0 11px rgba(0,0,0,.55); }
.ao-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ao-videos h2 { margin: 0 0 1rem; }
.ao-videos__grid { display: grid !important; gap: 1rem; grid-template-columns: 1fr; }
.ao-videos__grid > * { margin: 0 !important; }
@media (min-width: 735px) { .ao-videos__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .ao-videos__grid { grid-template-columns: repeat(3, 1fr); } }
/* Rejilla de vídeos a sangre (clase ao-videos--sangre en el grupo): borde a borde, sin separación, como .ao-grid. Previews = data-poster. */
.ao-ficha:has(.ao-videos--sangre) { container-type: inline-size; }
/* Ancho = la caja de la ficha (100cqw = contenido de .ao-ficha, sin --ao-p) más los dos márgenes; el margen izquierdo
   resta exactamente la sangría de la columna --ao-ancho. No se usa 100vw: incluye la barra de desplazamiento y desplaza la rejilla. */
.ao-ficha__cuerpo > .ao-videos--sangre { max-width: none; width: calc(100cqw + 2 * var(--ao-p)); margin-left: calc(-1 * (var(--ao-p) + max(0px, (100cqw - var(--ao-ancho)) / 2))) !important; margin-right: auto !important; }
.ao-videos--sangre > h2 { padding-inline: var(--ao-p); }
.ao-videos--sangre .ao-videos__grid { gap: 0; }
@media (min-width: 735px) { .ao-videos--sangre .ao-videos__grid { grid-template-columns: repeat(3, 1fr); } }
.ao-videos--sangre .ao-video { aspect-ratio: 16 / 9; }
.ao-videos--sangre .ao-video__poster { opacity: 1; filter: brightness(.72); }
.ao-videos--sangre .ao-video::before { z-index: 2; top: 42%; width: 1.9rem; height: 1.9rem; margin: -.95rem 0 0 -.95rem; border-width: 1.5px; }
/* Filas finales incompletas (solo ≥735 px). Per defecte, TOTA rejilla a sangre estira la última fila (v1) per omplir l'ample; les rejilles amb disseny propi (--dos, --cuatro, --tres, --v2, --v3) no es toquen.
   v1 = la última fila se estira para llenar el ancho (misma altura de fila); v2 = tarjeta de cierre de marca que llena los huecos; v3 = columnas por nº de vídeos y última fila centrada. */
@media (min-width: 735px) {
	:is(.ao-videos--sangre:not(.ao-videos--dos):not(.ao-videos--cuatro):not(.ao-videos--tres):not(.ao-videos--v2):not(.ao-videos--v3), .ao-videos--v1) .ao-videos__grid, .ao-videos--v2 .ao-videos__grid, .ao-videos--v3 .ao-videos__grid { grid-template-columns: repeat(6, 1fr); }
	:is(.ao-videos--sangre:not(.ao-videos--dos):not(.ao-videos--cuatro):not(.ao-videos--tres):not(.ao-videos--v2):not(.ao-videos--v3), .ao-videos--v1) .ao-videos__grid > *, .ao-videos--v2 .ao-videos__grid > *, .ao-videos--v3 .ao-videos__grid > * { grid-column: span 2; }
	/* v1 */
	:is(.ao-videos--sangre:not(.ao-videos--dos):not(.ao-videos--cuatro):not(.ao-videos--tres):not(.ao-videos--v2):not(.ao-videos--v3), .ao-videos--v1) .ao-video { aspect-ratio: auto; height: calc((100cqw + 2 * var(--ao-p)) / 3 * 9 / 16); }
	:is(.ao-videos--sangre:not(.ao-videos--dos):not(.ao-videos--cuatro):not(.ao-videos--tres):not(.ao-videos--v2):not(.ao-videos--v3), .ao-videos--v1) .ao-videos__grid > :last-child:nth-child(3n+1) { grid-column: span 6; }
	:is(.ao-videos--sangre:not(.ao-videos--dos):not(.ao-videos--cuatro):not(.ao-videos--tres):not(.ao-videos--v2):not(.ao-videos--v3), .ao-videos--v1) .ao-videos__grid > :last-child:nth-child(3n+2), :is(.ao-videos--sangre:not(.ao-videos--dos):not(.ao-videos--cuatro):not(.ao-videos--tres):not(.ao-videos--v2):not(.ao-videos--v3), .ao-videos--v1) .ao-videos__grid > :nth-last-child(2):nth-child(3n+1) { grid-column: span 3; }
	/* v2 */
	.ao-videos--v2 .ao-videos__grid::after { content: ""; display: block; background: var(--wp--preset--color--accent) url("assets/img/logo-blanc-192.png") center / auto 38% no-repeat; min-height: 6rem; grid-column: span 2; }
	.ao-videos--v2 .ao-videos__grid:has(> :last-child:nth-child(3n+1))::after { grid-column: span 4; }
	.ao-videos--v2 .ao-videos__grid:has(> :last-child:nth-child(3n))::after { display: none; }
	/* v3 */
	.ao-videos--v3 .ao-videos__grid > :last-child:nth-child(3n+1) { grid-column: 3 / span 2; }
	.ao-videos--v3 .ao-videos__grid > :nth-last-child(2):nth-child(3n+1) { grid-column: 2 / span 2; }
	.ao-videos--v3 .ao-videos__grid > :last-child:nth-child(3n+2) { grid-column: 4 / span 2; }
	.ao-videos--v3 .ao-videos__grid > :first-child:last-child:nth-child(3n+1) { grid-column: 2 / span 4; }
	.ao-videos--v3 .ao-videos__grid > :first-child:nth-last-child(2), .ao-videos--v3 .ao-videos__grid > :first-child:nth-last-child(2) + * { grid-column: span 3; }
}
@media (prefers-reduced-motion: reduce) { .ao-video::before { transition: none; } .ao-hero--ficha .ao-hero__sub { animation: none; } }

/* Home, «Som cooperativa»: el texto del cuerpo al mismo tamaño que el de las fichas (1.125rem en móvil, 1.3rem a partir de 735 px). */
#cooperativa .wp-block-group > p { font-size: 1.125rem; line-height: 1.7; }
@media (min-width: 735px) { #cooperativa .wp-block-group > p { font-size: 1.3rem; line-height: 1.65; } }

/* Aire entre el texto y la rejilla de vídeos a sangre: el mismo que hay entre el hero y el texto (padding superior de .ao-ficha + el margen del primer párrafo). */
.ao-ficha__cuerpo > .ao-videos--sangre { margin-top: var(--ao-aire); }
/* Sin márgenes propios en los extremos del cuerpo: arriba manda el padding, abajo manda el margen de la navegación (mismo valor) */
.ao-ficha__cuerpo > :first-child { margin-block-start: 0 !important; }
.ao-ficha__cuerpo > :last-child { margin-block-end: 0 !important; }
.ao-ficha__cuerpo + .ao-ficha-extern { margin-top: var(--ao-aire); }

/* Título de la introducción de los archivos (Què fem? / Com ho fem? / Amb qui ho fem?): grande y en negrita, sobre el texto. */
.ao-intro .ao-intro__title { font-size: clamp(2.4rem, 5.5vw, 4.5rem); line-height: 1.05; font-weight: 700; margin: 0 0 clamp(1rem, 2.5vw, 2rem); text-wrap: balance; }
/* Títols d'introducció grans (Documentals, Projectes, Curtmetratges, Col·lectius) */
.ao-intro .ao-intro__title--gran, .ao-intro .ao-intro__title--gran strong { font-size: clamp(3rem, 7.5vw, 7rem); font-weight: 400; line-height: 1; }
@media (orientation: portrait) { .ao-intro .ao-intro__title--gran { font-size: clamp(3rem, 11vw, 9rem); } }

/* Rejilla a sangre de 4 vídeos en UNA fila (clase ao-videos--cuatro junto a ao-videos--sangre): 4 columnas desde 1000 px,
   2 en 735-999 px y 1 en móvil; sin separación, 16:9 y play pequeño como el resto. Título de la tarjeta algo menor para que quepa en 4 columnas. */
@media (min-width: 735px) { .ao-videos--sangre.ao-videos--cuatro .ao-videos__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) {
	.ao-videos--sangre.ao-videos--cuatro .ao-videos__grid { grid-template-columns: repeat(4, 1fr); }
	.ao-videos--cuatro .ao-video > a, .ao-videos--cuatro .ao-video__title { padding: 2rem .75rem .7rem; font-size: clamp(.85rem, 1.05vw, 1rem); line-height: 1.2; }
}

/* Rejilla a sangre en 2 columnas siempre, cualquier nº de vídeos (Visuals antiracistes; clase ao-videos--dos junto a ao-videos--sangre):
   filas de 2; a diferencia de ao-videos--cuatro, no pasa a más columnas en pantallas anchas. 1 columna en móvil (por defecto). */
@media (min-width: 735px) { .ao-videos--sangre.ao-videos--dos .ao-videos__grid { grid-template-columns: repeat(2, 1fr); } }

/* Rejilla a sangre en 3 columnas siempre, cualquier nº de vídeos (Visuals antimasclistes; clase ao-videos--tres junto a ao-videos--sangre):
   filas de 3 (8 vídeos = 3+3+2); 2 columnas en 735-999 px, 1 en móvil. */
@media (min-width: 735px) { .ao-videos--sangre.ao-videos--tres .ao-videos__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .ao-videos--sangre.ao-videos--tres .ao-videos__grid { grid-template-columns: repeat(3, 1fr); } }

/* Vídeo que su propietario no deja incrustar (videos-noembed.json): la tarjeta es un enlace a YouTube en pestaña nueva, sin play ni iframe. */
.ao-video--ext::before { display: none; }
.ao-video--ext > a { flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: .5rem; }

/* Tarjeta que enlaza a la ficha propia del vídeo (en vez de reproducir inline): mismo preview/overlay, sin el
   botón de reproducir (data-embed ausente: tema.js/video.js no la toca, es un enlace normal). */
.ao-video--pagina::before { display: none; }

/* Fitxa de vídeo (subpágina propia dentro de un projecte/col·lectiu), esquema del Grav: vídeo grande arriba
   (misma preview que su tarjeta en la rejilla del padre, como póster de la fachada de clic), título mediano
   debajo del vídeo, texto y desplegables después. Sin hero de foto aparte. */
.ao-ficha--video, .ao-ficha--documental { padding-top: clamp(2rem, 5vw, 3.5rem); }
/* Prova (2026-11-03, només «El carro pel pedregar», post 34): ample de la fitxa igual que la capçalera
   (logo a l'esquerra, hamburguesa a la dreta), en comptes de la columna de lectura --ao-ancho (68rem)
   habitual. Es treu el padding lateral (--ao-p) i es desactiva el mecanisme de columna centrada
   (max-width + margin-left calc, línies 316-322) que si no deixava el text/desplegables/navegació més
   estrets encara que el vídeo ja arribés a banda i banda. */
/* Fitxes amb vídeo a dalt (documentals i vídeos amb fitxa pròpia). Només en horitzontal: en pantalla vertical es manté l'ample habitual de la fitxa. */
@media (orientation: landscape) {
	/* Fitxes horitzontals (body.ao-horitzontal, veure inc/ficha.php): projecte, documental, curtmetratge i vídeo. */
	.ao-horitzontal .ao-ficha, .ao-horitzontal .ao-ficha__cuerpo { padding-left: 0 !important; padding-right: 0 !important; }
	/* Contingut entre el logo (96 px) i la hamburguesa (32 px), amb la mateixa caixa que la capçalera
	   (màxim 1400 px centrat, 16 px de marge a cada costat). Fluid: en reduir la finestra segueix entre els dos. */
	.ao-horitzontal .ao-ficha > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
	.ao-horitzontal .ao-ficha > .alignwide,
	.ao-horitzontal .ao-ficha > .ao-ficha__cuerpo,
	.ao-horitzontal .ao-ficha > :is(.ao-ficha-extern, .ao-ficha-nav) { width: calc(min(1400px, 100% - 32px) - 128px) !important; max-width: calc(min(1400px, 100% - 32px) - 128px) !important; margin-left: calc(max(16px, (100% - 1400px) / 2) + 96px) !important; margin-right: auto !important; }
	.ao-horitzontal .ao-ficha__cuerpo.is-layout-constrained > :is(p, h1, h2, h3, h4, ul, ol, blockquote, .ao-drawers--ficha),
	.ao-horitzontal .ao-ficha__cuerpo > :is(p, h1, h2, h3, h4, ul, ol, blockquote, .ao-drawers--ficha) { max-width: 100% !important; margin-left: 0 !important; margin-right: auto !important; }
	/* Rejilla a sangre dentro de la fitxa horitzontal: el cuerpo ocupa el mateix espai que la capçalera (sangría igual a la de la regla de dalt), així que la rejilla va des del borde de la pantalla fins al borde de la pantalla. */
	.ao-horitzontal .ao-ficha__cuerpo > .ao-videos--sangre { width: 100cqw !important; margin-left: calc(-1 * (max(16px, (100cqw - 1400px) / 2) + 96px)) !important; margin-right: auto !important; }
	.ao-horitzontal .ao-ficha__cuerpo > .ao-mapa { max-width: 100% !important; margin-left: 0 !important; margin-right: auto !important; }
}
.ao-ficha-video__titulo { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; line-height: 1.25; }
/* Sense el títol sobre la miniatura del vídeo principal: el títol va entre el vídeo i el text (h2.ao-ficha-video__titulo). L'enllaç conserva el text per a lectors de pantalla. */
:is(.single-video, .single-documental, .single-curtmetratge) .ao-videos--uno .ao-video__title { font-size: 0; background: none; color: transparent; }
/* Vídeo principal: mateix ample que el text de la fitxa (com El carro pel pedregar), no el «alignwide» de 1400 px. */
.ao-ficha__cuerpo > .ao-videos--uno.alignwide { width: 100% !important; max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
.ao-ficha-nav--video { display: block; }
.ao-video__ext { display: inline-block; padding: .25em .75em; border: 1.5px solid #fff; border-radius: 999px; font-size: .85em; font-weight: 600; line-height: 1.3; background: rgba(0,0,0,.35); }
.ao-video--ext > a:hover .ao-video__ext { background: #fff; color: #000; }
/* Pàgines de col·lectiu: el títol de cada vídeo es comporta com el panell de les targetes (.ao-card__info).
   En repòs queda fora de la vista; puja en passar-hi el ratolí o amb el focus del teclat; fons negre només al text;
   la imatge fa zoom (regla .ao-video:hover de més amunt). A les pantalles tàctils es veu sempre. Els vídeos externs (.ao-video--ext) no canvien. */
.single-colectiu .ao-video:not(.ao-video--ext) > a { background: none; padding: 0 0 .75rem .75rem; }
.single-colectiu .ao-video__etiqueta, .single-colectiu .ao-video__title { display: block; width: fit-content; max-width: calc(100% - 1.5rem); padding: .1em .4em; background: #000; color: #fff; font-weight: 700; line-height: 1.3; text-shadow: none; transform: translateY(calc(100% + 1rem)); transition: transform .25s ease; }
.single-colectiu .ao-video__title { inset: auto auto .75rem .75rem; }
.single-colectiu .ao-video:hover .ao-video__etiqueta, .single-colectiu .ao-video:focus-within .ao-video__etiqueta,
.single-colectiu .ao-video:hover .ao-video__title, .single-colectiu .ao-video:focus-within .ao-video__title { transform: none; }
@media (hover: none) {
	.single-colectiu .ao-video:hover .ao-video__etiqueta, .single-colectiu .ao-video:hover .ao-video__title,
	.single-colectiu .ao-video:focus-within .ao-video__etiqueta, .single-colectiu .ao-video:focus-within .ao-video__title { transform: translateY(calc(100% + 1rem)); }
	.single-colectiu .ao-video.ao-tocada .ao-video__etiqueta, .single-colectiu .ao-video.ao-tocada .ao-video__title { transform: none !important; }
}
@media (prefers-reduced-motion: reduce) { .single-colectiu .ao-video__etiqueta, .single-colectiu .ao-video__title { transition: none; } }

/* Mapa (Leaflet, solo al pulsar: ver assets/js/mapa.js). Fachada = caja con botón; activo = contenedor del mapa. */
.ao-mapa { position: relative; z-index: 0; isolation: isolate; /* contexto propi: els panells de Leaflet (z-index 400–1000) no passen per sobre del menú de la capçalera */ margin-top: var(--ao-aire); min-height: 22rem; border-radius: .75rem; display: flex; align-items: center; justify-content: center;
	background: color-mix(in srgb, var(--wp--preset--color--contrast) 6%, transparent); }
.ao-mapa__boto { padding: .9em 1.8em; border-radius: 999px; border: 1.5px solid var(--wp--preset--color--contrast); background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.ao-mapa__boto:hover { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); }
.ao-mapa.is-actiu { min-height: 0; background: none; display: block; }
.ao-mapa__caixa { height: 30rem; max-height: 70vh; width: 100%; border-radius: .75rem; overflow: hidden; }
.ao-mapa .leaflet-popup-content { font-size: .95rem; line-height: 1.4; }
.ao-mapa .leaflet-popup-content a { color: #000 !important; display: inline-block; padding: .35em 0; } /* enllaç del marcador: negre i una mica més alt (àrea de clic) */
.ao-mapa .leaflet-marker-icon { filter: brightness(0); } /* marcadors negres (la icona blava de Leaflet passa a negre sòlid) */
.entry-content:has(> .ao-mapa) { max-width: none; } /* /mapa: el mapa ocupa tot el contenidor de la pàgina */
.entry-content > .ao-mapa { width: min(var(--ao-ancho, 68rem), 100%); max-width: none; margin-left: auto; margin-right: auto; }
@media (min-width: 735px) { .entry-content > .ao-mapa { --ao-l: max(16px, (100vw - 15px - 1400px) / 2); margin-left: calc(var(--ao-l) + 80px) !important; margin-right: auto !important; width: calc(100vw - 15px - 2 * var(--ao-l) - 128px) !important; } } /* /mapa, escriptori: del lateral dret del logo (96 px) fins al lateral esquerre de la hamburguesa (32 px a la dreta). Mateixa columna de 1400 px que la capçalera; mesurat a 1024, 1440 i 1920. */
.entry-content:not(.ao-ficha__cuerpo) > .ao-mapa .ao-mapa__caixa { height: 80vh; max-height: none; } /* /mapa: més alt (només fora de les fitxes) */
.ao-mapa .leaflet-marker-icon.ao-pin { filter: none; } /* marcadors de color (capes): sense el filtre negre */
.ao-mapa__lleg { display: flex; flex-direction: column; gap: .15rem; padding: .45rem; background: #fff; border-radius: .75rem; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.ao-mapa__capa { display: flex; align-items: center; gap: .55rem; padding: .35rem .7rem .35rem .5rem; border: 0; border-radius: 999px; background: none; color: #111; font: 600 .9rem/1.2 inherit; cursor: pointer; text-align: left; }
.ao-mapa__capa:hover, .ao-mapa__capa:focus-visible { background: #f0f0f0; }
.ao-mapa__capa.is-off { opacity: .38; }
.ao-mapa__capa.is-off .ao-mapa__punt { filter: grayscale(1); }
.ao-mapa__punt { width: .85rem; height: .85rem; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0, 0, 0, .18); }
.ao-mapa__n { font-weight: 400; opacity: .55; font-size: .8em; }

.ao-ficha__cuerpo > .ao-mapa { max-width: min(var(--ao-ancho), 100%); margin-left: max(0px, calc((100% - var(--ao-ancho)) / 2)) !important; margin-right: auto !important; } /* mateix ample que el text de la fitxa */

/* Podcast: hero, intro y rejilla de dos tarjetas a todo el ancho de la ventana (la columna de la página mide 650 px). */
.wp-block-post-content > .alignfull.ao-podcast-hero, .wp-block-post-content > .alignfull.ao-podcast-intro, .wp-block-post-content > .alignfull.ao-podcast-grid { width: 100vw; max-width: none; position: relative; left: 50%; translate: -50% 0; }
.wp-singular:has(.ao-podcast-hero) h1.wp-block-post-title { display: none; } /* el título de la página ya va en el hero (oculto a la vista); solo el h1, no los h3 de las tarjetas */
/* Podcast: cabecera transparente sobre el hero (como Projectes) y el hero empieza en el borde superior de la página. */
.wp-singular:has(.ao-podcast-hero) .ao-header { position: absolute; inset: 0 0 auto 0; color: #fff; }
.ao-podcast-hero h1 { display: table; margin: 0 auto; background: #000; padding: .05em .3em .1em; } /* título del hero: caja negra centrada detrás de «Podcast» */
.post-type-archive .ao-hero h1 { display: table; margin: 0 auto; background: #000; padding: .05em .3em .1em; } /* mismo título con caja negra en Projectes, Documentals, Col·lectius y Curtmetratges */
.wp-singular:has(.ao-podcast-hero) .ao-logo img { filter: none; } /* logo blanco como la hamburguesa (cabecera sobre hero oscuro) */
.wp-singular:has(.ao-podcast-hero) main { padding-top: 0 !important; }
.wp-singular:has(.ao-podcast-hero) .wp-block-post-content { margin-top: 0 !important; }
/* Nosaltres: bloques «alignwide» dentro de la columna de 650 px de la página; se ensanchan a 1400 px centrados. */
.wp-block-post-content > .alignwide { width: min(1400px, calc(100vw - 2 * var(--ao-p, 1rem))); max-width: none; position: relative; left: 50%; translate: -50% 0; }
.wp-block-post-content > .ao-persona { width: min(1400px, calc(100vw - 2 * var(--ao-p, 1rem))); max-width: none; position: relative; left: 50%; translate: -50% 0; }
.ao-persona { gap: clamp(1.5rem, 3vw, 3rem); align-items: start; }
.ao-persona__foto img { width: 100%; height: auto; display: block; }
@media (max-width: 734px) { .wp-block-post-content > .alignwide, .wp-block-post-content > .ao-persona { width: 100%; left: 0; translate: none; } }

/* Títols dels heros (arxius i fitxes): mateix tractament que els títols grans de la home */
.ao-hero h1, .ao-hero--ficha h1 { font-size: clamp(3.2rem, 9.5vw, 9rem); font-weight: 400; line-height: 1; }
@media (orientation: portrait) { .ao-hero h1, .ao-hero--ficha h1 { font-size: clamp(2rem, 11vw, 9rem); } } /* vertical: una palabra larga («Curtmetratges») tiene que caber en la pantalla */


/* Títols grans (home, arxius i fitxes): Albert Sans 200. El mode dislèxia manda: no s'aplica allà. */
html:not([data-a11y-dislexia="1"]) :is(.ao-section-title, .ao-intro__title, .ao-intro__title strong, .ao-hero h1, #cooperativa h1) { font-weight: 200 !important; }

/* Nosaltres: sin el título de página (queda solo para lectores de pantalla) y «Equip CàmeresiAcció» al tamaño de los títulos de sección de la home. */
.wp-singular:has(.ao-persona) h1.wp-block-post-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wp-singular:has(.ao-persona) .wp-block-heading.alignwide { font-size: clamp(3.2rem, 9.5vw, 9rem); line-height: 1; }

/* Albert Sans también en botones (idioma, accesibilidad, leyenda del mapa) y en los controles de Leaflet del mapa (no heredan la fuente por defecto del navegador). */
button, input, select, textarea { font-family: inherit; }
.ao-mapa .leaflet-container, .ao-mapa .leaflet-control-zoom-in, .ao-mapa .leaflet-control-zoom-out { font-family: inherit; }
svg text { font-family: inherit; } /* la etiqueta «Lan» del botón de idioma es texto SVG */

/* Títulos de página en peso 200: el título de los colectivos (.ao-panel-titulo) y el de /mapa (h1 de la página). El modo dislexia manda. */
html:not([data-a11y-dislexia="1"]) .ao-panel-titulo,
html:not([data-a11y-dislexia="1"]) .wp-singular:has(.ao-mapa) h1.wp-block-post-title { font-weight: 200 !important; }
/* Nosaltres: «Equip CàmeresiAcció» en 200, como los títulos grandes (no en modo dislexia). */
html:not([data-a11y-dislexia="1"]) .wp-singular:has(.ao-persona) .wp-block-heading.alignwide { font-weight: 200 !important; }
