/* Associació Esplai La Diana — web pública
   Identitat: vermell, negre i blanc del logotip. Tipografia Nunito (allotjada localment). */

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

:root {
  --red: #d50f1f;
  --red-dark: #a80a17;
  --red-tint: #fdeced;
  --ink: #161616;
  --ink-2: #3b3836;
  --muted: #605a55;
  --cream: #f8f4f0;
  --line: #ebe4dd;
  --white: #fff;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(22, 22, 22, .08);
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font: 500 1.0625rem/1.65 "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--white); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-underline-offset: .18em; }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-weight: 900; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
figure { margin: 0; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
.muted { color: var(--muted); font-size: .92rem; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 820px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.eyebrow { display: inline-flex; align-items: center; gap: .5em; font-weight: 800; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: .9em; }
.eyebrow::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 3px solid currentColor; box-shadow: 0 0 0 3px var(--white), 0 0 0 5px currentColor; flex: none; margin: 0 4px; }
.eyebrow--light { color: #fff; }
.eyebrow--light::before { box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px currentColor; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--ink-2); }

/* Botons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .7em 1.5em; border-radius: 999px; border: 2px solid transparent; font: 800 1rem "Nunito", sans-serif; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, color .15s; }
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); color: #fff; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; color: #fff; }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--lg { min-height: 56px; font-size: 1.1rem; width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn-row--center { justify-content: center; }
.link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 800; text-decoration: none; color: var(--red); }
.link-arrow .icon { transition: transform .15s; }
.link-arrow:hover .icon { transform: translateX(4px); }

/* Capçalera */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand img { width: 46px; height: auto; }
.brand span { font-weight: 900; font-size: 1.3rem; line-height: 1; letter-spacing: -.01em; }
.brand small { display: block; font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; font-weight: 800; margin-bottom: 3px; color: var(--ink-2); }
.brand b { color: var(--red); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav a { display: block; padding: .5em .55em; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: .95rem; white-space: nowrap; }
.nav a:hover { background: var(--red-tint); color: var(--red-dark); }
.nav a[aria-current="page"] { color: var(--red); box-shadow: inset 0 -3px 0 var(--red); border-radius: 0; }
.nav-cta a { display: inline-flex; align-items: center; gap: .4em; background: var(--red); color: #fff; padding: .6em 1.1em; margin-left: 8px; }
.nav-cta a:hover, .nav-cta a[aria-current="page"] { background: var(--red-dark); color: #fff; box-shadow: none; border-radius: 999px; }
.nav-toggle { display: none; align-items: center; gap: 8px; background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 10px 16px; font: 800 .95rem "Nunito", sans-serif; cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 1320px) {
  .nav-toggle { display: inline-flex; }
  .nav { position: fixed; inset: 76px 0 auto 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); max-height: calc(100vh - 76px); overflow-y: auto; display: none; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; padding: 12px var(--gutter) 20px; gap: 0; }
  .nav a { padding: 14px 8px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--red); padding-left: 16px; }
  .nav-cta a { justify-content: center; margin: 16px 0 0; border-radius: 999px; border: 0; }
}

/* Portada */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 90px) 0 clamp(50px, 7vw, 100px); background: linear-gradient(180deg, var(--white) 0%, var(--cream) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero-visual { position: relative; aspect-ratio: 1 / .95; }
.hero-target { position: absolute; inset: 2% 0 auto auto; width: 92%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--red) 0 9%, transparent 9% 20%, var(--red) 20% 29%, transparent 29% 40%, var(--red) 40% 49%, transparent 49%); opacity: .12; }
.hero-photo { position: absolute; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--line); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo--main { inset: 4% 0 20% 14%; }
.hero-photo--main img { object-position: 20% 75%; }
.hero-photo--small { width: 34%; aspect-ratio: 1; left: 0; bottom: 0; border: 6px solid #fff; }
.hero-symbol { position: absolute; right: 2%; bottom: 2%; width: 22%; background: #fff; border-radius: 24px; padding: 10px; box-shadow: var(--shadow); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; width: 100%; margin: 0 auto; }
}

/* Seccions */
.section { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.section--tint { background: var(--cream); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 36px; }
.section-head h2 { margin: 0; max-width: 22ch; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.about-teaser .split-img { position: relative; }
.about-teaser .split-img::after { content: ""; position: absolute; width: 110px; aspect-ratio: 1; right: -24px; top: -24px; border-radius: 50%; background: radial-gradient(circle, var(--red) 0 18%, #fff 18% 36%, var(--red) 36% 54%, #fff 54% 72%, var(--red) 72%); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .about-teaser .split-img::after { width: 72px; right: 8px; top: -20px; }
}

.cards { display: grid; gap: 22px; }
.cards--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.cards--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.card-act { display: block; background: #fff; border-radius: var(--radius); padding: 28px 24px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s, border-color .2s; }
a.card-act:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--red); color: var(--ink); }
.card-act p { color: var(--muted); margin: 0; }
.card-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--red-tint); color: var(--red); margin-bottom: 18px; }
.card-icon .icon { width: 28px; height: 28px; }

.impact { background: var(--ink); color: #fff; overflow: hidden; }
.impact h2 { color: #fff; }
.impact-list { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.impact-list li { border-top: 3px solid var(--red); padding-top: 18px; }
.impact-list strong { display: block; font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 900; line-height: 1; color: #fff; }
.impact-list span { color: #d8d2cc; font-weight: 700; }

/* Notícies */
.news-card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news-img { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--red-tint); }
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-noimg { display: grid; place-items: center; height: 100%; color: var(--red); }
.news-noimg .icon { width: 64px; height: 64px; }
.news-body { padding: 22px 24px 26px; }
.news-body h3 { margin: .4em 0 .5em; }
.news-body h3 a { color: var(--ink); text-decoration: none; }
.news-body h3 a:hover { color: var(--red); }
.news-body p:last-child { color: var(--muted); margin: 0; }
.news-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: .88rem; color: var(--muted); font-weight: 700; margin: 0; }
.tag { background: var(--red-tint); color: var(--red-dark); padding: .2em .8em; border-radius: 999px; font-weight: 800; font-size: .8rem; }
.empty { padding: 40px; text-align: center; color: var(--muted); background: var(--cream); border-radius: var(--radius); }

/* Crida a col·laborar */
.cta { background: var(--red); color: #fff; padding: clamp(56px, 8vw, 96px) 0; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; width: 560px; aspect-ratio: 1; right: -180px; top: -200px; border-radius: 50%; border: 60px solid rgba(255,255,255,.08); box-shadow: inset 0 0 0 60px transparent, 0 0 0 60px rgba(255,255,255,.05); }
.cta .wrap { position: relative; display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: center; }
.cta h2 { color: #fff; }
.cta .eyebrow--light::before { box-shadow: 0 0 0 3px var(--red), 0 0 0 5px #fff; }
.cta-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cta-card { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 24px 20px; text-decoration: none; display: grid; gap: 6px; transition: transform .2s; }
.cta-card:hover { transform: translateY(-4px); color: var(--ink); }
.cta-card .icon { width: 34px; height: 34px; color: var(--red); margin-bottom: 6px; }
.cta-card strong { font-size: 1.15rem; font-weight: 900; }
.cta-card span { color: var(--muted); font-size: .95rem; line-height: 1.4; }
@media (max-width: 960px) { .cta .wrap { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .cta-cards { grid-template-columns: 1fr; } }

/* Pàgines interiors */
.page-hero { position: relative; overflow: hidden; background: var(--cream); padding: clamp(48px, 7vw, 88px) 0; border-bottom: 1px solid var(--line); }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero--img .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.page-hero-text { max-width: 760px; }
.page-hero h1 { margin-bottom: .35em; }
.page-hero .lead { margin: 0; }
.page-hero-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.rings { position: absolute; width: 520px; aspect-ratio: 1; right: -160px; top: -160px; border-radius: 50%;
  background: radial-gradient(circle, var(--red) 0 10%, transparent 10% 22%, var(--red) 22% 31%, transparent 31% 43%, var(--red) 43% 51%, transparent 51%); opacity: .08; pointer-events: none; }
.page-hero--img .rings { left: -200px; right: auto; top: auto; bottom: -260px; }
@media (max-width: 860px) {
  .page-hero--img .wrap { grid-template-columns: 1fr; }
  .page-hero-img { max-width: 480px; }
}

.prose-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.prose { font-size: 1.1rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.mission { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 32px; position: relative; overflow: hidden; }
.mission h2 { color: #fff; font-size: 1.5rem; }
.mission p { color: #e7e2dd; font-size: 1.15rem; margin: 0; }
.mission .card-icon { background: var(--red); color: #fff; }
@media (max-width: 860px) { .prose-wrap { grid-template-columns: 1fr; } }

.values { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.values li { background: #fff; border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); }
.value-num { display: block; font-weight: 900; color: var(--red); font-size: 1rem; margin-bottom: 10px; }
.values p { color: var(--muted); margin: 0; }

.activities { display: grid; gap: clamp(48px, 7vw, 88px); }
.activity { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; scroll-margin-top: 100px; }
.activity figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.activity--rev figure { order: 2; }
.activity-text p { color: var(--ink-2); font-size: 1.1rem; }
@media (max-width: 860px) {
  .activity { grid-template-columns: 1fr; }
  .activity--rev figure { order: 0; }
}

/* Formularis */
.form-layout { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(28px, 5vw, 64px); align-items: start; scroll-margin-top: 90px; }
.form-layout--donation { grid-template-columns: 1fr 1.15fr; }
@media (max-width: 900px) { .form-layout, .form-layout--donation { grid-template-columns: 1fr; } }
.form-card { background: #fff; border-radius: var(--radius); padding: clamp(22px, 4vw, 36px); box-shadow: var(--shadow); border: 1px solid var(--line); scroll-margin-top: 100px; }
.section--tint .form-card { border-color: transparent; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; } }
[hidden] { display: none !important; }
.fld { display: block; margin: 0 0 18px; font-weight: 800; font-size: .95rem; border: 0; padding: 0; min-width: 0; }
.fld > input, .fld > select, .fld > textarea { display: block; margin-top: 6px; }
.fld legend { font-weight: 800; padding: 0; margin-bottom: 8px; }
.fld input, .fld select, .fld textarea { width: 100%; min-height: 48px; padding: .7em .9em; font: 500 1rem "Nunito", sans-serif; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: var(--radius-sm); transition: border-color .15s; }
.fld textarea { resize: vertical; min-height: 120px; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px var(--red-tint); }
.fld input[aria-invalid="true"], .fld textarea[aria-invalid="true"] { border-color: var(--red-dark); background: #fff8f8; }
.opt { font-weight: 600; color: var(--muted); }
.req { color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input, .segmented input, .amount input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-block; padding: .55em 1.1em; border: 2px solid var(--line); border-radius: 999px; font-weight: 700; cursor: pointer; transition: all .15s; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:focus-visible + span, .segmented input:focus-visible + span, .amount input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--cream); padding: 4px; border-radius: 999px; }
.segmented span { display: block; text-align: center; padding: .6em .4em; border-radius: 999px; font-weight: 800; cursor: pointer; }
.segmented input:checked + span { background: #fff; color: var(--red); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.amounts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.amount span { display: grid; place-items: center; min-height: 56px; border: 2px solid var(--line); border-radius: var(--radius-sm); font-weight: 900; font-size: 1.15rem; cursor: pointer; transition: all .15s; text-align: center; line-height: 1.1; }
.amount:last-child span { font-size: .95rem; }
.amount input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.amount-free { margin-top: 12px; }
@media (max-width: 520px) { .amounts { grid-template-columns: repeat(3, 1fr); } }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: .95rem; margin: 6px 0 8px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--red); flex: none; }
.form-legal { font-size: .85rem; color: var(--muted); background: var(--cream); border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 14px; }
.form-legal summary { cursor: pointer; font-weight: 800; color: var(--ink-2); }
.form-legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 10px 0 2px; }
.form-legal dt { font-weight: 800; color: var(--ink-2); }
.form-legal dd { margin: 0; }
@media (max-width: 480px) { .form-legal dl { grid-template-columns: 1fr; } .form-legal dd { margin-bottom: 6px; } }
.form-minors { font-size: .82rem; color: var(--muted); margin: 0 0 18px; }
.form-status { margin: 16px 0 0; padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 700; }
.form-status.is-ok { background: #e6f5ec; color: #17603a; }
.form-status.is-error { background: var(--red-tint); color: var(--red-dark); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.note { color: var(--muted); }
.notice { background: var(--red-tint); border-left: 5px solid var(--red); border-radius: var(--radius-sm); padding: 18px 20px; margin: 24px 0; }
.notice p:last-child { margin: 0; }
.ticks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 34px; font-weight: 700; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .2em; width: 22px; height: 22px; border-radius: 50%; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* Contacte */
.contact-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; font-weight: 700; font-size: 1.1rem; }
.contact-list .icon { color: var(--red); width: 26px; height: 26px; margin-top: 2px; }
.contact-list a { color: var(--ink); }
.contact-symbol { width: 160px; margin-top: 24px; opacity: .9; }
@media (max-width: 900px) { .contact-symbol { display: none; } }
.social { display: flex; gap: 10px; margin-top: 18px; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; }
.social a:hover { background: var(--red); color: #fff; }
.social--dark a { background: var(--ink); }

/* Galeria */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters a { padding: .5em 1.1em; border-radius: 999px; border: 2px solid var(--line); text-decoration: none; font-weight: 800; color: var(--ink); }
.filters a:hover { border-color: var(--ink); color: var(--ink); }
.filters a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.gallery li[hidden] { display: none; }
.gallery-item { position: relative; display: block; overflow: hidden; border-radius: var(--radius-sm); aspect-ratio: 4 / 3; background: var(--line); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px; background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; font-weight: 800; }
.draft-badge { position: absolute; top: 10px; left: 10px; background: #fff3c4; color: #6b4b00; font-weight: 800; font-size: .8rem; padding: .2em .7em; border-radius: 999px; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(10,10,10,.92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { max-width: min(92vw, 1400px); text-align: center; }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: 8px; }
.lightbox figcaption { color: #eee; margin-top: 12px; font-weight: 700; }
.lightbox-close, .lightbox-nav { position: fixed; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; }
.lightbox-close:hover, .lightbox-nav:hover { background: var(--red); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 12px; top: 50%; }
.lightbox-next { right: 12px; top: 50%; }

/* Col·laboradors */
.partners-empty { display: flex; gap: 32px; align-items: center; background: var(--cream); border-radius: var(--radius); padding: 32px; }
.partners-empty img { width: 110px; flex: none; }
.partners-empty p { margin: 0; color: var(--ink-2); }
@media (max-width: 600px) { .partners-empty { flex-direction: column; text-align: center; } }
.partners-group + .partners-group { margin-top: 48px; }
.partners-group h2 { font-size: 1.4rem; }
.partners { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.partners li { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px; text-align: center; }
.partners li > a, .partners li > div { display: grid; place-items: center; min-height: 90px; text-decoration: none; }
.partners img { max-height: 80px; width: auto; filter: grayscale(1); opacity: .85; transition: all .2s; }
.partners a:hover img { filter: none; opacity: 1; }
.partner-name { font-weight: 900; color: var(--ink); font-size: 1.1rem; }
.partners p { font-size: .88rem; color: var(--muted); margin: 10px 0 0; }

/* Notícia */
.article-head { padding: clamp(40px, 6vw, 72px) 0 32px; }
.crumbs { font-weight: 700; font-size: .92rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.article-img { margin-bottom: 40px; }
.article-img img { width: 100%; max-height: 620px; object-fit: cover; border-radius: var(--radius); }
.article-img figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.article .prose { padding-bottom: clamp(48px, 7vw, 88px); }
.related { margin-top: 40px; padding: 24px 28px; background: var(--cream); border-radius: var(--radius); }
.related h2 { font-size: 1.15rem; margin: 0 0 10px; }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 40px; }
.pager a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); text-decoration: none; font-weight: 800; color: var(--ink); }
.pager a[aria-current] { background: var(--red); border-color: var(--red); color: #fff; }

/* Legal i 404 */
.legal h2 { font-size: 1.3rem; margin-top: 1.8em; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 0 0 1em; display: block; overflow-x: auto; }
.legal-table th, .legal-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-table th { background: var(--cream); }
.notfound { text-align: center; }
.notfound img { width: 140px; margin: 0 auto 24px; }
.notfound .eyebrow::before { display: none; }

.preview-bar { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: center; background: #fff3c4; color: #5b4300; padding: 10px 16px; font-size: .95rem; }
.preview-bar a { font-weight: 800; color: #5b4300; }

/* Peu */
.site-footer { background: var(--ink); color: #cfc8c2; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-brand img { width: 220px; }
.tagline { font-weight: 800; color: #fff; margin-top: 16px; }
.site-footer h2 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: #cfc8c2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); font-size: .9rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* Selector d'idioma */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 10px; order: 3; }
.lang-switch { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; text-decoration: none; font-weight: 900; font-size: .82rem; line-height: 1; }
.lang-switch span[aria-hidden] { padding: .5em .65em; color: var(--ink); }
.lang-switch span.is-on { background: var(--ink); color: #fff; }
.lang-switch:hover span:not(.is-on) { background: var(--red-tint); color: var(--red-dark); }
.brand { order: 1; }
.nav { order: 2; }
@media (max-width: 1320px) { .header-actions { order: 2; } }
.site-header .wrap { max-width: 1400px; gap: 12px; }
.nav-cta a { margin-left: 4px; }
@media (max-width: 480px) {
  .nav-toggle { padding: 10px 12px; }
  .nav-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .brand span { font-size: 1.15rem; }
  .brand img { width: 40px; }
}

/* Donatius: Bizum i transferència */
.btn--sm { min-height: 38px; padding: .4em 1em; font-size: .9rem; }
.pay-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 22px; }
.pay-card { position: relative; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 30px 28px; }
.pay-card h3 { font-size: 1.4rem; margin-top: 14px; }
.pay-card p { color: var(--ink-2); }
.pay-badge { display: inline-block; background: var(--red); color: #fff; font-weight: 900; border-radius: 999px; padding: .3em 1em; font-size: .9rem; }
.pay-badge--dark { background: var(--ink); }
.pay-value { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: var(--cream); border-radius: var(--radius-sm); padding: 14px 16px; margin: 4px 0 14px; }
.pay-number { font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 900; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.pay-iban { font-size: clamp(1.05rem, 2.6vw, 1.35rem); word-break: break-word; }
.pay-value .btn { margin-left: auto; }
.pay-meta { font-weight: 700; margin: 0 0 6px; }
.pay-concept { margin: 0; font-size: .95rem; }
.js-copy.is-done { background: var(--ink); color: #fff; }
.pay-extra { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; margin-top: 56px; }
.pay-extra .notice { margin: 0; }
@media (max-width: 800px) { .pay-extra { grid-template-columns: 1fr; } }
