/* =====================================================================
   styles.css · Corporació municipal de Sant Just Desvern
   1. Variables   2. Base   3. Capçalera   4. Portada   5. Plens
   6. Seccions    7. Regidors   8. Fitxa   9. Documents   10. Grups
   11. Peu        12. Utilitats / accessibilitat
   ===================================================================== */

/* 1. Variables ------------------------------------------------------ */
:root {
  --blue: #0062ae;          /* blau de l'escut de l'Ajuntament */
  --blue-700: #004c88;
  --blue-900: #0b2340;
  --blue-50: #eaf3fb;
  --ink: #16202c;
  --ink-soft: #4a5666;
  --line: #dfe4ea;
  --bg: #f5f7fa;
  --card: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 32, 52, .06), 0 8px 24px rgba(16, 32, 52, .06);
  --shadow-lg: 0 2px 6px rgba(16, 32, 52, .08), 0 24px 48px rgba(16, 32, 52, .14);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --focus: 0 0 0 3px #fff, 0 0 0 6px #0062ae;
}

/* 2. Base ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; -webkit-text-size-adjust: 100%; }
html.no-scroll { overflow: hidden; }
body {
  margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6;
  color: var(--ink); background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--blue-700); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.015em; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
svg { width: 1.2em; height: 1.2em; flex: none; }
button { font: inherit; color: inherit; }

.container { width: min(1200px, 100% - 2rem); margin-inline: auto; }
@media (min-width: 720px) { .container { width: min(1200px, 100% - 4rem); } }

.eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue); margin: 0 0 .6rem;
}

/* 3. Capçalera (estil webs municipals santjust.cat) ----------------- */
.site-header { position: relative; z-index: 50; }

/* 3a. Franja negra */
.topbar { background: #000; color: #fff; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.3rem; letter-spacing: -.01em; }
.brand:hover { color: #fff; opacity: .85; }
.brand img { width: 36px; height: 36px; }
.social-mini { list-style: none; display: flex; gap: .25rem; }
.social-mini a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; }
.social-mini a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.social-mini svg { width: 18px; height: 18px; }

/* 3b. Franja gris: títol, cercador i menú */
.mastbar { background: #414141; color: #fff; }
.mast-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.4rem 0 .9rem; }
.site-title { color: #d2d2d2; text-decoration: none; font-weight: 300; font-size: clamp(1.75rem, 3.6vw, 2.6rem); line-height: 1.1; letter-spacing: -.01em; white-space: nowrap; }
.site-title:hover { color: #fff; }

.search { position: relative; flex: 0 1 400px; }
.search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #555; pointer-events: none; }
.search input {
  width: 100%; height: 48px; padding: 0 1rem 0 2.75rem; border: 0; border-radius: 999px;
  background: #fff; color: var(--ink); font: inherit; font-size: 1rem; box-shadow: inset 0 0 0 1px transparent;
}
.search input::placeholder { color: #6b7380; }
.search input:focus { outline: none; box-shadow: 0 0 0 3px #414141, 0 0 0 6px #6db7f2; }
.search input::-webkit-search-cancel-button { cursor: pointer; }

.search-results {
  position: absolute; top: calc(100% + .5rem); left: 0; right: 0; z-index: 60;
  max-height: min(70vh, 560px); overflow: auto; padding: .5rem;
  background: #fff; color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
@media (min-width: 901px) { .search-results { left: auto; width: max(100%, 460px); } }
.sr-group + .sr-group { border-top: 1px solid var(--line); margin-top: .35rem; padding-top: .35rem; }
.sr-title { margin: .35rem .6rem .25rem; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.sr-list { list-style: none; }
.sr-item {
  display: flex; align-items: center; gap: .75rem; width: 100%; padding: .55rem .6rem; border: 0; border-radius: 10px;
  background: none; text-align: left; text-decoration: none; color: var(--ink); cursor: pointer; font: inherit;
}
.sr-item:hover, .sr-item:focus-visible { background: var(--blue-50); box-shadow: none; outline: none; }
.sr-item:focus-visible { box-shadow: inset 0 0 0 2px var(--blue); }
.sr-thumb { width: 38px; height: 38px; flex: none; border-radius: 50%; object-fit: cover; object-position: top; background: #e9edf2; }
.sr-icon { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); }
.sr-icon svg { width: 20px; height: 20px; }
.sr-text { display: flex; flex-direction: column; min-width: 0; }
.sr-name { font-weight: 700; line-height: 1.3; }
.sr-sub { font-size: .86rem; color: var(--ink-soft); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sr-item mark { background: #fff1a8; color: inherit; border-radius: 3px; padding: 0 .05em; }
.sr-empty { margin: .75rem; color: var(--ink-soft); }

.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; }
.site-nav a {
  position: relative; display: inline-block; padding: .55rem 0 .95rem; color: #fff;
  text-decoration: none; font-weight: 600; font-size: .98rem;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 3px 3px 0 0;
  background: #2f8fe0; transform: scaleX(0); transition: transform .2s ease;
}
.site-nav a:hover { color: #fff; }
.site-nav a:hover::after { transform: scaleX(.5); }
.site-nav a[aria-current="true"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none; width: 44px; height: 44px; flex: none; border: 1px solid rgba(255, 255, 255, .3); border-radius: 12px;
  background: transparent; cursor: pointer; place-items: center;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; position: relative; transition: transform .2s, opacity .2s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .mast-row { flex-wrap: wrap; gap: .9rem 1rem; padding: 1.1rem 0 1.1rem; }
  .site-title { flex: 1; font-size: 1.75rem; }
  .nav-toggle { display: grid; }
  .search { order: 3; flex: 1 1 100%; }
  .site-nav { display: none; padding-bottom: 1rem; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: .8rem .25rem; border-top: 1px solid rgba(255, 255, 255, .12); }
  .site-nav a::after { left: 0; right: auto; top: .7rem; bottom: .7rem; width: 4px; height: auto; transform: scaleY(0); left: -.75rem; border-radius: 0 3px 3px 0; }
  .site-nav a[aria-current="true"]::after { transform: scaleY(1); }
}
@media (max-width: 380px) { .site-title { font-size: 1.5rem; } }

/* 4. Portada -------------------------------------------------------- */
.hero {
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(0, 98, 174, .12), transparent 60%),
    linear-gradient(#fff, var(--bg));
  padding: clamp(2rem, 5vw, 4.5rem) 0 2rem;
}
.hero-grid { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } }
.nowrap { white-space: nowrap; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; color: var(--blue-900); }
.hero .lead { font-size: 1.2rem; color: var(--ink); }
.hero p { color: var(--ink-soft); max-width: 62ch; }
.hero strong { color: var(--ink); }
.hero-figure { margin: 0; position: relative; }
.hero-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow-lg); }
.hero-figure::before {
  content: ""; position: absolute; inset: auto -14px -14px auto; width: 45%; height: 45%;
  border-radius: calc(var(--radius) + 6px); background: var(--blue); opacity: .12; z-index: -1;
}

.composition {
  margin-top: clamp(2rem, 4vw, 3rem); background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.1rem, 2.5vw, 1.5rem) clamp(1.1rem, 3vw, 1.75rem);
}
.comp-title { font-size: 1rem; font-weight: 700; color: var(--ink-soft); margin: 0 0 .75rem; letter-spacing: 0; }
.comp-title span { font-size: 1.5rem; font-weight: 800; color: var(--blue-900); margin-right: .15rem; }
.comp-bar { display: flex; gap: 3px; height: 14px; border-radius: 999px; overflow: hidden; }
.comp-seg { min-width: 10px; }
.seats-legend { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-top: .9rem; }
.seats-legend li { display: inline-flex; align-items: center; gap: .45rem; font-size: .95rem; white-space: nowrap; }
.seats-legend strong { font-variant-numeric: tabular-nums; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }

/* 5. Plens ---------------------------------------------------------- */
.plens { padding: 1rem 0 0; }
.plens-card {
  display: grid; grid-template-columns: auto 1fr; gap: 1.25rem;
  background: var(--blue-900); color: #e6edf5; border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2.25rem);
}
.plens-card h2 { color: #fff; font-size: 1.4rem; }
.plens-card p:last-child { margin-bottom: 0; }
.plens-card a { color: #9fd0ff; font-weight: 600; }
.plens-card a:hover { color: #fff; }
.plens-icon { width: 52px; height: 52px; border-radius: 14px; background: rgba(255, 255, 255, .1); display: grid; place-items: center; color: #9fd0ff; }
.plens-icon svg { width: 26px; height: 26px; }
@media (max-width: 560px) { .plens-card { grid-template-columns: 1fr; } }

/* 6. Seccions ------------------------------------------------------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); color: var(--blue-900); margin: 0; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; min-height: 44px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; font-size: .95rem;
}
.chip:hover { border-color: var(--blue); }
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip-count { font-size: .8rem; padding: .05rem .5rem; border-radius: 999px; background: var(--blue-50); color: var(--blue-700); }
.chip[aria-pressed="true"] .chip-count { background: rgba(255, 255, 255, .2); color: #fff; }

.btn-outline {
  display: inline-flex; align-items: center; gap: .55rem; padding: .7rem 1.1rem; min-height: 44px;
  border: 1.5px solid var(--blue); border-radius: 999px; font-weight: 700; text-decoration: none; font-size: .95rem;
}
.btn-outline:hover { background: var(--blue); color: #fff; }

/* 7. Regidors ------------------------------------------------------- */
.people-block + .people-block { margin-top: 3rem; }
.people-title { display: flex; align-items: center; gap: .6rem; font-size: 1.3rem; margin-bottom: 1.25rem; }
.people-title span { font-size: .85rem; font-weight: 700; color: var(--blue-700); background: var(--blue-50); border-radius: 999px; padding: .1rem .6rem; }
.people-grid { list-style: none; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
@media (max-width: 480px) { .people-grid { grid-template-columns: repeat(2, 1fr); gap: .8rem; } }

.person-btn {
  all: unset; box-sizing: border-box; display: flex; flex-direction: column; height: 100%; width: 100%; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
}
.person-btn:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.person-btn:focus-visible { box-shadow: var(--focus); }
.person-photo { display: block; aspect-ratio: 2 / 3; background: #e9edf2; overflow: hidden; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.person-btn:hover .person-photo img { transform: scale(1.03); }
.person-info { display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem 1rem; flex: 1; }
.person-party { display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.person-party::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--party); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.person-name { font-weight: 800; font-size: 1.08rem; line-height: 1.25; color: var(--ink); }
.person-role { font-size: .9rem; color: var(--ink-soft); line-height: 1.35; }
.person-more { margin-top: auto; padding-top: .6rem; display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; font-weight: 700; color: var(--blue); }
.person-more svg { width: 1em; height: 1em; transition: transform .2s; }
.person-btn:hover .person-more svg { transform: translate(2px, -2px); }
@media (max-width: 480px) {
  .person-info { padding: .7rem .75rem .8rem; }
  .person-name { font-size: .98rem; }
  .person-role { font-size: .82rem; }
}

/* 8. Fitxa (diàleg) ------------------------------------------------- */
.profile-dialog {
  width: min(1000px, 100% - 2rem); max-height: min(92vh, 900px); padding: 0; border: 0;
  border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow-lg); color: var(--ink); overflow: auto;
}
.profile-dialog::backdrop { background: rgba(11, 35, 64, .6); backdrop-filter: blur(3px); }
.profile-dialog[open] { animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.profile { display: grid; grid-template-columns: 1fr; }
@media (min-width: 780px) { .profile { grid-template-columns: 340px 1fr; } }
.profile-photo { background: #eef1f4; }
.profile-photo img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: contain; }
@media (min-width: 780px) { .profile-photo img { position: sticky; top: 0; } }
@media (max-width: 779px) { .profile-photo { display: flex; justify-content: center; } .profile-photo img { width: auto; max-width: 100%; height: 52vh; } }
.profile-body { padding: clamp(1.25rem, 3.5vw, 2.5rem); }
.profile-team { font-size: .85rem; font-weight: 700; color: var(--ink-soft); margin-bottom: .5rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.profile-body h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--blue-900); padding-right: 2.5rem; }
.profile-bio { color: var(--ink-soft); }
.profile-block { border-top: 1px solid var(--line); padding-top: 1.1rem; margin-top: 1.1rem; }
.profile-block h3 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: .6rem; }
.profile-spokes { font-weight: 700; margin-bottom: .6rem; }
.profile-links { list-style: none; display: grid; gap: .4rem; }
.profile-links a { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; overflow-wrap: anywhere; }
.profile-roles { list-style: none; display: grid; gap: .35rem; }
.profile-roles li { padding-left: 1.1rem; position: relative; }
.profile-roles li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.profile-pay { background: var(--blue-50); border: 0; border-radius: var(--radius-sm); padding: 1rem 1.1rem; }
.profile-pay p { margin-bottom: .4rem; font-weight: 600; }
.profile-pay p:last-child { margin-bottom: 0; }
.profile-pay ul { padding-left: 1.1rem; display: grid; gap: .25rem; font-size: .96rem; }
.dialog-close {
  position: absolute; top: .75rem; right: .75rem; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .95); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center;
}
.dialog-close:hover { background: var(--blue); color: #fff; }

/* 9. Documents ------------------------------------------------------ */
.docs-grid { list-style: none; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.doc a {
  display: flex; align-items: center; gap: 1rem; height: 100%; padding: 1.1rem 1.2rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
  text-decoration: none; color: var(--ink); transition: border-color .2s, background .2s, transform .2s;
}
.doc a:hover { border-color: var(--blue); background: #fff; transform: translateY(-2px); }
.doc-icon { width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); }
.doc-icon svg { width: 24px; height: 24px; }
.doc-text { display: flex; flex-direction: column; flex: 1; }
.doc-type { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.doc-title { font-weight: 700; line-height: 1.3; }
.doc-arrow { color: var(--blue); }
.doc-featured a { background: var(--blue); border-color: var(--blue); color: #fff; }
.doc-featured a:hover { background: var(--blue-700); border-color: var(--blue-700); }
.doc-featured .doc-icon { background: rgba(255, 255, 255, .16); color: #fff; }
.doc-featured .doc-type, .doc-featured .doc-arrow { color: rgba(255, 255, 255, .85); }

/* 10. Grups --------------------------------------------------------- */
.groups-grid { list-style: none; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.group { scroll-margin-top: 24px; transition: box-shadow .3s; }
.group.is-highlight { box-shadow: 0 0 0 3px var(--blue), var(--shadow-lg); }
.group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.group-logo { background: #fff; border-bottom: 1px solid var(--line); display: grid; place-items: center; padding: 1.25rem; }
.group-logo img { width: 120px; height: 120px; object-fit: contain; border-radius: 12px; }
.group-body { padding: 1.1rem 1.2rem 1.3rem; }
.group-body h3 { font-size: 1.1rem; margin-bottom: .2rem; }
.group-mail { font-weight: 600; font-size: .95rem; overflow-wrap: anywhere; }
.group-links { list-style: none; margin-top: .9rem; display: grid; gap: .35rem; }
.group-links a { display: flex; align-items: center; gap: .5rem; color: var(--ink-soft); text-decoration: none; font-size: .92rem; overflow-wrap: anywhere; }
.group-links a:hover { color: var(--blue); text-decoration: underline; }
.group-links svg { color: var(--blue); width: 1.05em; height: 1.05em; }

/* 11. Peu ----------------------------------------------------------- */
.site-footer { background: var(--blue-900); color: #c9d6e4; padding-top: clamp(2.5rem, 6vw, 4rem); font-size: .97rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #9fd0ff; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); padding-bottom: 2.5rem; }
.footer-title { font-size: 1.5rem; margin-bottom: .75rem; }
.footer-title a { text-decoration: none; }
.footer-sub { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: #9fd0ff; margin: 1.25rem 0 .7rem; }
.footer-grid > div > .footer-sub:first-child { margin-top: 0; }
.footer-links, .social, .footer-contact { list-style: none; display: grid; gap: .45rem; }
.social { grid-auto-flow: column; justify-content: start; gap: .5rem; }
.social a { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: 999px; background: rgba(255, 255, 255, .08); text-decoration: none; font-size: .9rem; }
.social a:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.footer-contact li { display: flex; gap: .6rem; align-items: flex-start; }
.footer-contact svg { margin-top: .2em; color: #9fd0ff; }
address { font-style: normal; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 1.1rem 0; font-size: .85rem; }
.footer-bottom-inner { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; align-items: center; }
.footer-bottom p { margin: 0; }
.footer-bottom ul { list-style: none; display: flex; gap: 1.25rem; }
@media (max-width: 480px) { .social { grid-auto-flow: row; } }

/* 13. Avís de galetes ----------------------------------------------- */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 90;
  max-width: 1100px; margin-inline: auto; max-height: calc(100vh - 2rem); overflow: auto;
  background: var(--blue-900); color: #e6edf5; border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35); animation: cookie-in .3s ease;
}
@keyframes cookie-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.cookie-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding: 1.1rem 1.4rem; }
.cookie-text { flex: 1 1 520px; }
.cookie-text h2 { font-size: 1rem; color: #fff; margin-bottom: .3rem; letter-spacing: 0; }
.cookie-text p { margin: 0; font-size: .93rem; line-height: 1.5; }
.cookie-text a { color: #9fd0ff; font-weight: 600; }
.cookie-text a:hover { color: #fff; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
/* Tots els botons amb el mateix format: cap opció destaca sobre les altres (criteri AEPD) */
.cookie-btn {
  min-width: 120px; min-height: 44px; padding: .6rem 1.2rem; border-radius: 999px; cursor: pointer;
  border: 2px solid #fff; background: #fff; color: var(--blue-900); font-weight: 700; font-size: .95rem;
}
.cookie-btn:hover { background: #dbe9f7; border-color: #dbe9f7; }
.cookie-btn:focus-visible { box-shadow: 0 0 0 3px var(--blue-900), 0 0 0 6px #9fd0ff; }
.cookie-config ul { list-style: none; display: grid; gap: .6rem; margin-top: 1rem; }
.cookie-cat { background: rgba(255, 255, 255, .07); border-radius: var(--radius-sm); padding: .7rem .9rem; }
.cookie-cat label { display: flex; align-items: center; gap: .55rem; font-weight: 700; color: #fff; cursor: pointer; }
.cookie-cat input { width: 20px; height: 20px; accent-color: #2f8fe0; }
.cookie-cat p { margin: .3rem 0 0 1.9rem; font-size: .88rem; }
.cookie-sempre { margin-left: auto; font-size: .78rem; font-weight: 600; color: #9fd0ff; }
@media (max-width: 600px) {
  .cookie-banner { left: .5rem; right: .5rem; bottom: .5rem; }
  .cookie-inner { padding: 1rem; }
  .cookie-actions { width: 100%; }
  .cookie-btn { flex: 1; }
}
.link-btn { all: unset; cursor: pointer; color: #fff; text-decoration: underline; text-underline-offset: .18em; }
.link-btn:hover { color: #9fd0ff; }
.link-btn-dark { color: var(--blue); font-weight: 600; }
.link-btn-dark:hover { color: var(--blue-700); }
.link-btn:focus-visible { box-shadow: var(--focus); border-radius: 4px; }

/* 14. Pàgina de text legal ------------------------------------------- */
.legal { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.legal-inner { max-width: 820px; }
.legal h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); color: var(--blue-900); font-weight: 800; }
.legal h2 { font-size: 1.35rem; color: var(--blue-900); margin-top: 2.2rem; }
.legal h3 { font-size: 1.05rem; margin-top: 1.4rem; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 1.2rem; margin-bottom: 1em; }
.legal li { margin-bottom: .35rem; }
.legal-meta { color: var(--ink-soft); font-size: .95rem; }
.legal-box { background: var(--blue-50); border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin: 1.2rem 0; }
.legal-box p:last-child { margin-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 1rem 0 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.legal table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 620px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: .7rem .85rem; border-bottom: 1px solid var(--line); }
.legal th { background: var(--bg); font-weight: 700; }
.legal tr:last-child td { border-bottom: 0; }
.legal code { font-size: .9em; background: var(--bg); padding: .1em .35em; border-radius: 4px; }
.back-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; margin-bottom: 1.25rem; }

/* 15. Contingut sense JavaScript (també el que llegeixen cercadors i IA) */
.js .static-profiles { display: none; }
.static-profiles { margin-top: 3rem; }
.static-profile {
  margin-top: 1.25rem; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: 16px;
}
@media (min-width: 780px) { .static-profile.profile { grid-template-columns: 260px 1fr; } }
.static-profile .profile-photo img { position: static; }
.static-profile h3 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); color: var(--blue-900); }
.static-profile h4 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin: 0 0 .6rem; }
.no-js .filters, .no-js .search, .no-js .nav-toggle, .no-js .person-more { display: none; }
@media (max-width: 900px) { .no-js .site-nav { display: block; } }

/* 12. Utilitats / accessibilitat ------------------------------------ */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--blue); color: #fff;
  padding: .75rem 1rem; border-radius: 10px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; color: #fff; }
main:focus { outline: none; }
.notice { padding: 1rem 1.25rem; background: #fff7e0; border: 1px solid #f0d78c; border-radius: var(--radius-sm); }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

@media print {
  .cookie-banner, .site-header, .filters, .nav-toggle, .person-more, .dialog-close, .composition { display: none; }
  body { background: #fff; }
  .person-btn { box-shadow: none; }
}
