/* About us: logos afegits des de l'ACF sense variant de mida (la maqueta només dimensiona bc3, maeztu, upv i jrl) */
.ab-logo:not([class*="ab-logo--"]) img { width: auto; max-width: 200px; max-height: 120px; }

/* Pàgines de categoria: element gràfic dels projectes a l'esquerra (per defecte va a la dreta, com a la maqueta). La línia es gira en mirall; el JS només n'anima el stroke. */
.knowledge-projects.kn-projects--art-left .kn-blob { right: auto; left: 13%; }
.knowledge-projects.kn-projects--art-left .kn-line { right: auto; left: calc(100% - 100vw); transform: scaleX(-1); }

/* Pàgines de categoria: Lenis mou el scroll; amb `scroll-behavior: smooth` a html, ScrollTrigger.refresh() (p. ex. en obrir una fila) mesura amb el scroll a mig camí i deixa el pin del hero amb un inici negatiu, i en tornar amunt queda un buit. Mateix criteri que About us a la maqueta. */
html:has(body.knowledge-page) { scroll-behavior: auto; }

/* Resources: la maqueta només té l'hover groc a les files simples (només títol + Download) de la secció Participation (selector per data-resource-category="participation"). Les categories que no són una de les cinc àrees tenen una altra clau (p. ex. «extratest»), i el PHP no pot canviar-la sense trencar el filtre del JS: aquí es dóna el mateix hover a qualsevol fila simple del llistat. */
.resource-catalog .knowledge-row:not(.knowledge-expandable):hover,
.resource-catalog .knowledge-row:not(.knowledge-expandable):focus-within { background: #F7D777; }
.resource-catalog .knowledge-row:not(.knowledge-expandable):hover h3,
.resource-catalog .knowledge-row:not(.knowledge-expandable):focus-within h3 { font-family: 'Figtree-Bold'; }


/* Categories: Resources use template-parts/resources/item.php (same markup as the Resources page: row > .row > h3 + details + a, with image). The category row already carries the gutter, so the inner .row is neutral, and the page-Resources rules (link top-right, text + image grid) are repeated under .kn-resources. */
.kn-resources .knowledge-row > .row { width: auto; max-width: none; margin: 0; padding: 0; }
.kn-resources .knowledge-row > .row.d-flex { align-items: center; gap: 36px; }
.kn-resources .knowledge-row > .row > h3 { flex: 1; }
.kn-resources .knowledge-open h3 { font-family: 'Figtree-Bold'; }
.kn-resources .knowledge-expandable > .row > h3 { padding-right: 120px; }
.kn-resources .knowledge-expandable > .row > a { position: absolute; right: max(var(--knowledge-gutter), calc((50vw - 1320px) / 2)); top: 26px; padding-top: 0; }
.kn-resources .knowledge-details > div { display: grid; grid-template-columns: minmax(0, 780px) minmax(200px, 275px); justify-content: space-between; gap: 40px; align-items: end; }
.kn-resources .knowledge-details > div:not(:has(> img)) { grid-template-columns: minmax(0, 1fr); }
.kn-resources .knowledge-details img { width: 100%; height: auto; margin-bottom: 16px; }
.kn-resources .knowledge-row:not(.knowledge-expandable):hover,
.kn-resources .knowledge-row:not(.knowledge-expandable):focus-within { background: #F7D777; }
@media (max-width: 767px) {
    .kn-resources .knowledge-row > .row.d-flex { flex-direction: column; align-items: flex-start; gap: 18px; }
    .kn-resources .knowledge-expandable > .row > h3 { padding-right: 0; }
    .kn-resources .knowledge-expandable > .row > a { position: static; display: inline-block; margin-top: 18px; }
    .kn-resources .knowledge-details > div { display: flex; flex-direction: column; align-items: stretch; gap: 24px; }
    .kn-resources .knowledge-details img { max-width: 360px; margin: 0 auto 8px; }
}

/* Home: vídeo de fons de YouTube (print_home_media). El contenidor porta la classe de la imatge (hero-media__img / nv-video__img), de manera que el JS l'escala com abans. L'iframe fa de "cover" a qualsevol proporció (vídeo 16:9) i no rep clics; el pòster queda a sota. */
.home-yt { position: relative; overflow: hidden; container-type: size; }
.home-yt__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.home-yt__frame { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: max(100cqw, 177.78cqh); height: max(100cqh, 56.25cqw); border: 0; pointer-events: none; }

/* Spinner de càrrega del llistat de notícies (veure_mes): post-list.js el mostra amb fadeIn() i l'amaga en acabar. Sobreescriu .loader (style.css). */
.kn-news .kn-news__loader { display: none; box-sizing: border-box; width: 40px; height: 40px; margin: 40px auto; background: none; border: 4px solid rgba(41, 111, 124, 0.2); border-top-color: var(--helios-teal); border-radius: 50%; animation: kn-news-spin 0.8s linear infinite; }
@keyframes kn-news-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .kn-news .kn-news__loader { animation-duration: 2.4s; } }

/* Cards de notícia: zoom de la imatge al hover dins del seu marc (el fons groc el posa la maqueta) */
.news-card__media { display: block; overflow: hidden; }
.knowledge-news li .news-card__media { margin-bottom: 16px; }
.kn-news:not(.knowledge-news) li .news-card__media { margin-bottom: 18px; }
.kn-news li .news-card__media img { margin-bottom: 0; transition: transform .6s ease; }
.knowledge-news li > a:focus-visible .news-card__media img,
.kn-news:not(.knowledge-news) li a:focus-visible .news-card__media img,
.kn-news:not(.knowledge-news) li.is-hover a .news-card__media img { transform: scale(1.06); }
@media (hover: hover) {
    .knowledge-news li > a:hover .news-card__media img,
    .kn-news:not(.knowledge-news) li a:hover .news-card__media img { transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
    .kn-news li .news-card__media img { transition: none; transform: none !important; }
}

/* Text només per a lectors de pantalla (etiqueta del selector d'idioma) */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); border: 0; white-space: nowrap; word-wrap: normal !important; }

/* Publicaciones: la llista d'articles (.kn-articles) té el format de les pàgines de categoria. Aquelles regles de la maqueta
   depenen de body.knowledge-page i de body:has(.kn-diagram), que aquí no hi són (el diagrama i el hero de categoria no s'hi volen);
   es repeteixen només les de la llista, amb body.publications-page. El JS és assets/js/knowledge-list.js. */
body.publications-page .kn-articles .kn-news-reveal-pending { opacity: 0; transform: translate3d(0, 60px, 0); }
body.publications-page .kn-articles .kn-news-reveal-visible { opacity: 1; transform: translate3d(0, 0, 0); transition: opacity 1s ease, transform 1s cubic-bezier(.25, 1, .5, 1); transition-delay: var(--kn-news-reveal-delay, 0s); }
body.publications-page .kn-articles .kn-news-reveal-instant { opacity: 1; transform: none; transition: none; }
body.publications-page .knowledge-list .knowledge-row.kn-news-reveal-visible:not(.kn-news-reveal-instant) { transition: opacity 1s ease, transform 1s cubic-bezier(.25, 1, .5, 1), background-color .45s ease, color .45s ease, padding-block .45s ease; transition-delay: var(--kn-news-reveal-delay, 0s), var(--kn-news-reveal-delay, 0s), 0s, 0s, 0s; }
body.publications-page { --knowledge-gutter: max(48px, calc((100vw - 1560px) / 2 + 48px)); }
body.publications-page .knowledge-list > .row > ul { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
body.publications-page .knowledge-list .knowledge-row > .d-flex,
body.publications-page .knowledge-list .knowledge-open .d-flex { display: flex; width: 100%; justify-content: space-between; align-items: flex-start; gap: 24px; }
body.publications-page .knowledge-row > .d-flex > a { transition: opacity .2s ease; }
body.publications-page .knowledge-row:not(.knowledge-open):focus-within { background: transparent; color: #0b1418; padding-block: 20px; }
@media (hover: hover) { body.publications-page .knowledge-row > .d-flex > a:hover { opacity: .65; } }
@media (prefers-reduced-motion: reduce) {
    body.publications-page .kn-articles [data-news-reveal] { opacity: 1; transform: none; transition: none; }
    body.publications-page .knowledge-row > .d-flex > a { transition: none; }
    body.publications-page .knowledge-row { transition: none; }
}
@media screen and (max-width: 1023px) { body.publications-page { --knowledge-gutter: 24px; } body.publications-page .row { width: calc(100% - 2 * var(--knowledge-gutter)); } }
@media screen and (max-width: 767px) { body.publications-page { --knowledge-gutter: 20px; } body.publications-page .row { width: 100%; padding-inline: var(--knowledge-gutter); } }
@media screen and (max-width: 767px) {
    body.publications-page .kn-articles > .row > p { margin: 0 0 30px; font-size: 26px; line-height: 32px; }
    body.publications-page .kn-articles > .row > h3 { margin: 0 0 20px; font-size: 26px; line-height: 30px; }
    body.publications-page .kn-articles > .row > ul + h3 { margin: 0; padding: 34px 0; }
    body.publications-page .knowledge-list .knowledge-row { display: flex; flex-direction: column; padding: 24px var(--knowledge-gutter); }
    body.publications-page .knowledge-list .knowledge-row.knowledge-open { padding-block: 32px; }
    body.publications-page .knowledge-list .knowledge-row > .d-flex { display: contents; }
    body.publications-page .knowledge-list .knowledge-row > .d-flex > a { order: 2; align-self: flex-start; padding-top: 20px; font-size: 14px; line-height: 18px; }
    body.publications-page .knowledge-list .knowledge-row h4 { font-size: 22px; line-height: 28px; }
    body.publications-page .knowledge-list .knowledge-open > .d-flex h4 { font-size: 22px; }
    body.publications-page .knowledge-list .knowledge-details .d-flex { flex-direction: column; gap: 26px; padding-top: 20px; }
    body.publications-page .kn-articles .knowledge-details p { font-size: 18px; line-height: 26px; }
}


/* Resources: llista de descàrregues i enllaços */
.knowledge-details .resource-links { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 22px 0 0; padding: 0 0 8px; list-style: none; }
.knowledge-details .resource-links li { margin: 0; padding: 0; border: 0; }
.knowledge-details .resource-links a.resource-link { position: static; right: auto; top: auto; display: inline-flex; align-items: center; gap: 8px; height: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: #0B1418; font-size: 15px; line-height: 22px; text-decoration: none; background-image: none; }
.knowledge-details .resource-links a.resource-link::before,
.knowledge-details .resource-links a.resource-link::after { content: none; }
.knowledge-details .resource-links a.resource-link span { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color .3s ease; }
.knowledge-details .resource-links a.resource-link:hover,
.knowledge-details .resource-links a.resource-link:focus-visible { background: transparent; color: #0B1418; text-decoration: none; }
.knowledge-details .resource-links a.resource-link:hover span,
.knowledge-details .resource-links a.resource-link:focus-visible span { text-decoration-color: transparent; }
.knowledge-details .resource-links a.resource-link:focus-visible { outline: 2px solid #0B1418; outline-offset: 3px; }
.knowledge-details .resource-links a.resource-link img { width: 22px; height: 22px; margin: 0; max-width: none; flex-shrink: 0; transition: transform .3s ease; }
.knowledge-details .resource-links a.resource-link--file img { transform: rotate(90deg); }
.knowledge-details .resource-links a.resource-link--link img { transform: rotate(-45deg); }
.knowledge-details .resource-links a.resource-link--file:hover img,
.knowledge-details .resource-links a.resource-link--file:focus-visible img { transform: rotate(90deg) translateX(3px); }
.knowledge-details .resource-links a.resource-link--link:hover img,
.knowledge-details .resource-links a.resource-link--link:focus-visible img { transform: rotate(-45deg) translateX(3px); }
@media (max-width: 767px) {
    .knowledge-details .resource-links a.resource-link img { max-width: none; margin: 0; }
}

/* Footer normal, sense efecte d'scroll */
.ft { position: relative; transform: none; clip-path: none; }

/* Categoria: destacats en llista simple */
body.knowledge-page section.kn-systems { overflow: visible; padding: 70px 0 40px; scrollbar-width: auto; -ms-overflow-style: auto; }
body.knowledge-page section.kn-systems::-webkit-scrollbar { display: initial; }
body.knowledge-page section.kn-systems ul { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 40px; width: auto; max-width: none; margin: 0; padding: 0; overflow: visible; list-style: none; }
body.knowledge-page section.kn-systems li { flex: 0 0 auto; width: 100%; margin: 0; padding: 0; border: 0; text-align: left; }
body.knowledge-page section.kn-systems li h3 { max-width: none; margin: 0 0 12px; font-family: 'Figtree-Bold'; font-size: 30px; line-height: 32px; }
body.knowledge-page section.kn-systems > .row > h2 { margin: 0 0 28px; font-family: 'Figtree-Bold'; font-size: 62px; line-height: 62px; letter-spacing: -0.045em; color: #0B1418; }
body.knowledge-page section.kn-systems p { max-width: 760px; margin: 0; font-family: 'Figtree-SemiBold'; font-size: 18px; line-height: 24px; color: #1a140e; }
@media (max-width: 1280px) {
    body.knowledge-page section.kn-systems > .row > h2 { font-size: 52px; line-height: 56px; }
}
@media (max-width: 1023px) {
    body.knowledge-page section.kn-systems > .row > h2 { font-size: 44px; line-height: 48px; }
    body.knowledge-page section.kn-systems > .row { width: calc(100% - 2 * var(--knowledge-gutter)); padding-inline: 24px; }
}
@media (max-width: 767px) {
    body.knowledge-page section.kn-systems > .row > h2 { font-size: 42px; line-height: 44px; }
    body.knowledge-page section.kn-systems { padding: 40px 0 28px; }
    body.knowledge-page section.kn-systems > .row { width: 100%; padding-inline: var(--knowledge-gutter); }
    body.knowledge-page section.kn-systems ul { gap: 28px; }
}

/* Notícia: llistes (ul/ol) escrites al bloc «Texto» amb el format que tenia el bloc «Listado» (news-2.html), tant a la fitxa curta com a l'estesa. */
.news-detail .news-content > :is(ul, ol) { margin-bottom: 40px; }
.news-detail .news-content > p:has(+ :is(ul, ol)) { margin-bottom: 14px; }
.news-detail .news-content > :is(ul, ol) > li { padding-left: 30px; margin-bottom: 10px; background: url('../../resources/maquetes/images/ico-list-news-logohelios.svg') no-repeat left 6px / 16px 16px; font-family: 'Figtree-SemiBold'; font-size: 18px; line-height: 28px; color: #0B1418; list-style: none; }
.news-detail .news-content > :is(ul, ol) > li > span { font-family: 'Figtree-Bold'; }
@media (max-width: 767px) {
    .news-detail .news-content > p:has(+ :is(ul, ol)) { margin-bottom: 16px; }
    .news-detail .news-content > :is(ul, ol) > li { padding-left: 28px; margin-bottom: 12px; }
}

/* Notícia: imatge principal i bloc «Imagen» del contingut flexible, mateix format (figure.news-figure). Les regles són les de `.news-article .row > img` de la maqueta
   (que ja no apliquen perquè la imatge va dins del figure) més el peu opcional. La maqueta no té peu: usa la tipografia i el color de la data (Figtree-Bold, #276C75). */
.news-article .news-figure { display: block; width: 100%; margin: 0 0 44px; }
.news-article .news-figure img { display: block; width: 100%; margin: 0; aspect-ratio: 2.54; object-fit: cover; object-position: center; }
.news-article .news-figure figcaption { margin: 12px 0 0; font-family: 'Figtree-SemiBold'; font-size: 14px; line-height: 20px; color: #276C75; }
.news-detail .news-content > .news-figure:last-child { margin-bottom: 0; }
@media (max-width: 767px) {
    .news-detail .news-article .news-figure { margin-bottom: 32px; }
    .news-detail .news-article .news-figure img { aspect-ratio: 1.4; }
    .news-article .news-figure figcaption { font-size: 13px; line-height: 18px; }
}

/* Notícia: carrusel d imatges de la capçalera (figure.news-figure.news-carousel). Mateixa amplada i proporció que la imatge sola (hi apliquen les regles de `.news-article .news-figure img`). Sense JS es veu la primera imatge. Els peus formen una graella apilada: la fila fa l alçada del peu més llarg i el contingut de sota no salta. */
.news-carousel__viewport { overflow: hidden; touch-action: pan-y; cursor: grab; }
.news-carousel__viewport:focus-visible { outline: 2px solid #276C75; outline-offset: 4px; }
.news-carousel.is-dragging .news-carousel__viewport { cursor: grabbing; }
.news-carousel__track { display: flex; will-change: transform; }
.news-carousel__slide { flex: 0 0 100%; min-width: 0; }
.news-carousel__slide img { -webkit-user-drag: none; user-select: none; }
.news-carousel__foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.news-carousel__captions { display: grid; flex: 1 1 auto; min-width: 0; }
.news-article .news-carousel__captions .news-carousel__caption { grid-area: 1 / 1; visibility: hidden; }
.news-article .news-carousel__captions .news-carousel__caption.is-active { visibility: visible; }
.news-carousel__controls { display: flex; align-items: center; gap: 12px; margin: 12px 0 0 auto; flex: 0 0 auto; font-family: 'Figtree-SemiBold'; font-size: 14px; line-height: 20px; color: #276C75; }
.news-carousel__controls[hidden] { display: none; }
.news-carousel__count { min-width: 3.2em; text-align: center; font-variant-numeric: tabular-nums; }
.news-carousel__btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid #276C75; border-radius: 50%; background: transparent; color: #276C75; cursor: pointer; transition: background-color .3s ease, color .3s ease; }
.news-carousel__btn:disabled { opacity: .35; cursor: default; }
.news-carousel__btn:focus-visible { outline: 2px solid #276C75; outline-offset: 3px; }
@media (hover: hover) {
    .news-carousel__btn:not(:disabled):hover { background: #276C75; color: #fff; }
}
@media (max-width: 767px) {
    .news-carousel__btn { width: 36px; height: 36px; }
    .news-carousel__controls { font-size: 13px; line-height: 18px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .news-carousel__btn { transition: none; }
}

/* Pàgines de categoria (escriptori): el diagrama de la capçalera és absolut i no compta per a l'alçada del hero; amb text curt quedava tallat per l'overflow:hidden. Alçada mínima = top del diagrama (40px) + alçada del diagrama (57% de l'amplada, màx. 836px, relació del knowledge-stage 1010.66/980 = .97) + 20px d'aire. Per sota de 1024px el diagrama és dins del flux. */
@media screen and (min-width: 1024px) {
    body.knowledge-page .kn-hero:has(.kn-diagram) { min-height: calc(60px + min(57vw, 836px) * .97); }
}

/* Home: frase del hero (home_hero_frase), sota/davant del logotip, a baix a l'esquerra. Mateix gutter que la capçalera (48px; 24px fins a 1024; 20px en mòbil; contenidor màx. 1560px). El logotip (centre vertical, alçada ≈ .149 × amplada) acaba molt per sobre: la frase ocupa la meitat inferior. Visible per defecte; hero.php només l'arma (.is-armed) si hero-phrase.js la pot revelar. */
.hero-phrase {
    position: absolute;
    z-index: 2;
    left: max(48px, calc((100% - 1560px) / 2 + 48px));
    bottom: clamp(32px, 7vh, 72px);
    width: max-content;
    max-width: 60%;
    white-space: nowrap; /* escriptori: exactament les línies del camp (salt manual a l'admin), cap tall automàtic */
    margin: 0;
    font-family: 'Figtree-Light', 'Figtree-Regular', sans-serif;
    font-weight: normal;
    font-size: clamp(17px, 1.65vw, 42px);
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-align: left;
    color: #fff;
    text-shadow: 0 1px 14px rgba(20, 16, 10, .35);
    pointer-events: none;
}
.hero-phrase.is-armed { opacity: 0; }

/* Escrim reforçat només a la zona de la frase (cantonada inferior esquerra) perquè el blanc es llegeixi sobre les zones clares de la imatge */
.hero-media__scrim {
    background:
        radial-gradient(ellipse 80% 62% at 0% 100%, rgba(20, 16, 10, .6) 0%, rgba(20, 16, 10, .3) 50%, rgba(20, 16, 10, 0) 100%),
        linear-gradient(180deg, rgba(20, 16, 10, .5) 0%, rgba(20, 16, 10, 0) 30%, rgba(20, 16, 10, 0) 60%, rgba(20, 16, 10, .3) 100%);
}

@media screen and (max-width: 1024px) {
    .hero-phrase { left: 24px; width: 70%; max-width: none; white-space: normal; text-wrap: balance; font-size: clamp(22px, 2.9vw, 30px); }
    .hero-phrase br { display: none; } /* tauleta/mòbil: s'ignora el salt manual (el \n de nl2br fa d'espai) i el navegador equilibra les línies */
}
@media screen and (max-width: 767px) {
    .hero-phrase { left: 20px; width: calc(100% - 40px); font-size: 24px; line-height: 1.25; bottom: 40px; }
}

/* Home, participació multiactor: Safari pot calcular l'alçada de les imatges transformades a partir
   de la mida intrínseca i deixar-les sortir de la graella. En treure-les del flux i retallar-les dins
   del seu contenidor, object-fit conserva la forma completa sense envair la llegenda. */
.ms-shape,
.ms-shape__media { min-height: 0; }
.ms-shape__media { position: relative; overflow: hidden; clip-path: inset(0); }
.ms-shape img { position: absolute; inset: 0; max-width: 100%; max-height: 100%; }

/* En escriptori es reserva també l'espai de l'animació d'entrada i es fixa l'ordre de capes. */
@media screen and (min-width: 1024px) {
    .ms-section { isolation: isolate; }
    .ms-gallery { position: relative; z-index: 1; }
    .ms-legend { z-index: 2; margin-top: 120px; }
}

/* Home, Stakeholders: en els escriptoris més estrets la llegenda era més ampla que la secció
   i quedava retallada pel seu overflow. Compacta-la progressivament fins a la mida original. */
@media screen and (min-width: 1024px) and (max-width: 1119px) {
    .ms-legend { gap: clamp(22px, calc(12.5vw - 106px), 34px); }
    .ms-legend li {
        gap: clamp(10px, calc(4.1667vw - 32.667px), 14px);
        font-size: clamp(27px, calc(3.125vw - 5px), 30px);
        line-height: clamp(29px, calc(3.125vw - 3px), 32px);
    }
    .ms-mark svg { height: clamp(50px, calc(6.25vw - 14px), 56px); }
}

@media screen and (min-width: 1280px) and (max-width: 1479px) {
    .ms-legend { gap: clamp(36px, calc(19vw - 207.2px), 74px); }
    .ms-legend li {
        gap: clamp(14px, calc(4vw - 37.2px), 22px);
        font-size: clamp(32px, calc(3vw - 6.4px), 38px);
        line-height: clamp(34px, calc(3vw - 4.4px), 40px);
    }
}

/* Descripció de la capçalera de categoria: text normal del cos; en negreta només el que marqui l'editora (strong/b). */
body:has(.kn-diagram) :is(.kn-hero__copy, .kn-reading) > p:not(.x):not(.y) { font-family: 'Figtree-Regular'; font-weight: 400; }
body:has(.kn-diagram) :is(.kn-hero__copy, .kn-reading) > p:not(.x):not(.y) :is(strong, b) { font-family: 'Figtree-Bold'; font-weight: 400; }

/* Recursos: descripció i hover lent. Pàgina Resources (.resource-catalog) i categoria (.kn-resources): descripció en pes normal, text alineat a dalt i obrir/tancar a 1.2s (mateixa corba que la maqueta). El retard de 400 ms del hover és al JS (knowledge-list.js i resources-hover.js). */
:is(.resource-catalog, .kn-resources) .knowledge-details .resource-body p { font-family: 'Figtree-Regular'; font-weight: 400; }
@media (min-width: 768px) {
    :is(.resource-catalog, .kn-resources) .knowledge-details > div { align-items: start; }
}
:is(.resource-catalog, .kn-resources) .knowledge-details { transition-duration: 1.2s, .3s; }
:is(.resource-catalog, .kn-resources) .knowledge-row { transition-duration: 1.2s; }
body:is(.knowledge-page, .resources-page) :is(.resource-catalog, .kn-resources) .knowledge-row.knowledge-row.kn-news-reveal-visible:not(.kn-news-reveal-instant) { transition-duration: 1s, 1s, 1.2s, 1.2s, 1.2s; }
:is(.resource-catalog, .kn-resources) .knowledge-row.knowledge-expandable .row h3 { transition-duration: 1.2s; }

/* Home, spinner «how we work»: sencer i al 100 % d'opacitat d'entrada (la porció només s'activa en hover) */
.hw-diagram { opacity: 1; }

/* Capçalera: entre 1280 i 1439 px el menú xocava amb el selector d idioma; gaps i text una mica més petits abans del tram de 15px */
@media screen and (min-width: 1280px) and (max-width: 1439px) {
    .hdr-right { column-gap: 28px; }
    .hm-menu ul { column-gap: 20px; }
    .hm-menu ul li a,
    .select-lang .select_box_input,
    .select-lang .nice-select { font-size: 16px; line-height: 20px; }
}

/* Still diagram (category pages and Home "How we work"): no rotation. Layers, all with the same artwork (SVG):
   .dg-base (dimmed when .dg-art has .is-dim), .dg-core (the centre, always 100 %), and one .dg-hl per area, at 100 % when
   it has .is-on, cut to its 72-degree sector with a conic mask. --dg-from is the sector start in conic degrees (0 = top,
   clockwise); --dg-cx/--dg-cy is the ring centre and --dg-rx/--dg-ry the radius of the always-visible centre (106 viewBox units). */
.dg-art { position: relative; aspect-ratio: var(--dg-vw, 1010.66) / var(--dg-vh, 980); --dg-dim: .35; }
.dg-art > img.dg-layer { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.dg-art > img.dg-base { opacity: 1; transition: opacity .3s ease; }
.dg-art.is-dim > img.dg-base { opacity: var(--dg-dim); }
.dg-art > img.dg-core {
    -webkit-mask-image: radial-gradient(ellipse var(--dg-rx) var(--dg-ry) at var(--dg-cx) var(--dg-cy), #000 99%, transparent 100%);
    mask-image: radial-gradient(ellipse var(--dg-rx) var(--dg-ry) at var(--dg-cx) var(--dg-cy), #000 99%, transparent 100%);
}
.dg-art > img.dg-hl {
    opacity: 0; transition: opacity .3s ease;
    -webkit-mask-image: conic-gradient(from var(--dg-from) at var(--dg-cx) var(--dg-cy), #000 0deg, #000 72deg, transparent 72deg);
    mask-image: conic-gradient(from var(--dg-from) at var(--dg-cx) var(--dg-cy), #000 0deg, #000 72deg, transparent 72deg);
}
.dg-art > img.dg-hl.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .dg-art > img.dg-base, .dg-art > img.dg-hl { transition: none; }
}

/* Category pages: the wrapper keeps the maqueta position (absolute, right) on desktop and takes the pointer for the hover */
body.knowledge-page .kn-diagram.kn-diagram--hl { pointer-events: auto; }
body.knowledge-page .kn-diagram.kn-diagram--hl.is-pointing { cursor: pointer; }
body.knowledge-page .kn-diagram.kn-diagram--hl:focus-visible { outline: 2px solid #0071bc; outline-offset: 4px; }
/* Below 1024px: still image in the flow, no hover; the page's own area stays highlighted */
@media screen and (max-width: 1023px) {
    body.knowledge-page .kn-diagram.kn-diagram--hl { position: relative; top: auto; right: auto; left: auto; width: min(100%, 640px); max-width: none; margin: 28px auto 20px; pointer-events: none; cursor: default; }
}

/* Home: still diagram in the HELIOS-OHLL art; the old rotation layers no longer exist */
.hw-diagram .hw-art.dg-art { width: 100%; }
.hw-diagram { cursor: default; }
.hw-diagram.is-pointing { cursor: pointer; }
@media screen and (max-width: 1023px) {
    .hw-diagram { pointer-events: none; }
    .hw-hotspot { display: none; }
    .hw-tabs, .hw-tabs button { pointer-events: auto; }
}
/* Home: quan el fade d'entrada del text ha acabat, l'estat final es conserva en tornar amunt.
   Les formes, els vídeos i els diagrames continuen vinculats al progrés de l'scroll. */
body.home-motion .what-helios.helios-text-reveal-complete .wh-heading,
body.home-motion .what-helios.helios-text-reveal-complete .wh-text p,
body.home-motion .ms-section.helios-text-reveal-complete .ms-heading,
body.home-motion .ms-section.helios-text-reveal-complete .ms-lead,
body.home-motion .hw-section.helios-text-reveal-complete .hw-heading,
body.home-motion .hw-section.helios-text-reveal-complete .hw-copy p,
body.home-motion .oh-section.helios-text-reveal-complete .oh-eyebrow .ab-word,
body.home-motion .oh-section.helios-text-reveal-complete .oh-heading .ab-word,
body.home-motion .oh-section.helios-text-reveal-complete .oh-more,
body.home-motion .oh-section.helios-text-reveal-complete .oh-more .ab-word {
    opacity: 1 !important;
}

body.home-motion .ms-section.helios-text-reveal-complete .ms-legend li,
body.home-motion .oh-section.helios-text-reveal-complete .oh-more {
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) scale(1) !important;
}

/* Textos interiors: els helpers compartits hi afegeixen aquesta classe quan el fade ha acabat.
   L'opacitat queda consolidada, però els pins, formes i canvis narratius continuen funcionant. */
.helios-text-once-complete,
.helios-text-once-complete .ab-word,
.helios-text-once-complete .helios-scroll-word,
.helios-text-word-once-complete {
    opacity: 1 !important;
}

[data-meta-reveal="mission"].helios-text-once-position {
    transform: translate3d(0, 0, 0) !important;
}

/* Pàgina 404: reaprofita legal-page (gutters i capçalera); només afegeix el «404» gran. */
.page-404 .news-article { padding-bottom: 112px; }
.page-404 .kn-hero__copy > .page-404__code { margin: 0 0 12px; font-family: 'Figtree-Bold'; font-size: 160px; line-height: 1; letter-spacing: -0.045em; color: #276C75; }
.page-404 .kn-hero__copy > .page-404__text { margin: 0 0 40px; }
.page-404 .news-article h1 { margin-bottom: 0; }

@media (max-width: 1024px) {
    .page-404 .kn-hero__copy > .page-404__code { font-size: 120px; }
    .page-404 .news-article { padding-bottom: 80px; }
}

@media (max-width: 767px) {
    .page-404 .kn-hero__copy > .page-404__code { font-size: 88px; }
    .page-404 .kn-hero__copy > .page-404__text { margin-bottom: 32px; }
    .page-404 .news-article { padding-bottom: 64px; }
}
