/* =========================================================
   Societat Unió Musical d'Alberic
   Aura Concert design system — CSS pur
   ========================================================= */

/* --- Tokens --- */
:root {
  /* Surfaces */
  --surface: #131313;
  --surface-low: #1c1b1b;
  --surface-mid: #201f1f;
  --surface-high: #2a2a2a;
  --surface-bright: #3a3939;
  --charcoal: #1A1A1A;
  --lowest: #0e0e0e;

  /* Text */
  --on-surface: #e5e2e1;
  --secondary: #c8c6c5;
  --on-variant: #d0c5af;
  --ivory: #F9F9F7;

  /* Accent */
  --gold: #D4AF37;
  --gold-bright: #f2ca50;
  --gold-dim: #e9c349;
  --on-gold: #3c2f00;
  --outline: #99907c;
  --outline-soft: rgba(229, 226, 225, 0.15);
  --outline-gold-soft: rgba(212, 175, 55, 0.2);

  /* Layout */
  --container: 1280px;
  --gutter: 32px;
  --gap-desktop: 64px;
  --gap-tablet: 32px;
  --gap-mobile: 20px;

  /* Fonts */
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
::selection { background: var(--gold); color: var(--on-gold); }

/* --- Utilities --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gap-mobile);
  padding-right: var(--gap-mobile);
}
@media (min-width: 768px)  { .container { padding-left: var(--gap-tablet);  padding-right: var(--gap-tablet); } }
@media (min-width: 1024px) { .container { padding-left: var(--gap-desktop); padding-right: var(--gap-desktop); } }

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.rule-gold { width: 48px; height: 2px; background: var(--gold); border: 0; margin: 0; }

/* =========================================================
   HEADER  (smalgemesi-style: top utility bar + main nav)
   ========================================================= */
.top-bar {
  background: var(--lowest);
  color: var(--secondary);
  font-size: 13px;
  border-bottom: 1px solid var(--outline-soft);
}
.top-bar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px;
  flex-wrap: wrap;
  gap: 12px;
}
.top-bar a:hover { color: var(--gold); }
.social {
  display: flex;
  gap: 18px;
  align-items: center;
}
.social a {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  transition: color .2s ease;
}
.social svg { width: 16px; height: 16px; fill: currentColor; }

.top-info {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.top-info li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.top-info a { display: inline-flex; align-items: center; gap: 6px; }
.top-info svg { width: 14px; height: 14px; fill: var(--gold); flex: none; }

@media (max-width: 600px) {
  /* En telefon la franja de dalt (xarxes/telefon/correu/horari) queda molt
     apelotonada amb tan poc espai: s'amaga sencera i la mateixa informacio
     es mostra dins del menu mobil (vore .mobile-nav__contact-info). */
  .top-bar { display: none; }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--outline-soft);
  transition: box-shadow .3s ease, background .3s ease;
}
.site-header.is-scrolled {
  background: var(--lowest);
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 88px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--gold-bright);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand__mark {
  width: 60px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
}
.brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}
.brand__pre {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 4px;
}
.brand__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 2vw, 26px);
  color: var(--gold-bright);
  white-space: nowrap;
}
@media (max-width: 600px) {
  .brand__mark { width: 46px; height: 46px; }
  .brand__title { font-size: 16px; }
  .brand__pre { font-size: 9px; letter-spacing: 0.24em; }
}
@media (max-width: 380px) {
  .brand__text { display: none; }
}

/* Main nav */
.main-nav { display: none; }
@media (min-width: 1280px) { .main-nav { display: block; } }
.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 18px;
}
.main-nav > ul > li { position: relative; }
.main-nav a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--secondary);
  padding: 12px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: color .2s ease;
}
.main-nav a:hover,
.main-nav .is-active > a { color: var(--gold-bright); }
.main-nav .is-active > a { border-bottom: 2px solid var(--gold-bright); }
.has-submenu > a::after {
  content: "";
  width: 8px; height: 8px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  display: inline-block;
}
.submenu {
  position: absolute;
  top: 100%;
  left: -16px;
  min-width: 240px;
  background: var(--surface-mid);
  border: 1px solid var(--outline-soft);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  box-shadow: 0 20px 40px rgba(0,0,0,.6);
}
.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.submenu li a {
  padding: 10px 20px;
  display: block;
  letter-spacing: 0.1em;
}
.submenu li a:hover {
  background: var(--surface-high);
  color: var(--gold-bright);
}

/* Trailing button */
.cta-tickets {
  display: none;
  background: var(--gold);
  color: var(--on-gold);
  padding: 14px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background .2s ease;
  white-space: nowrap;
}
@media (min-width: 1280px) { .cta-tickets { display: inline-flex; } }
.cta-tickets:hover { background: var(--gold-bright); }

/* Mobile toggle */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  color: var(--gold-bright);
}
@media (min-width: 1280px) { .menu-toggle { display: none; } }
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: transform .25s ease, opacity .25s ease, top .25s ease;
}
.menu-toggle span::before { position: absolute; top: -7px; left: 0; width: 22px; }
.menu-toggle span::after  { position: absolute; top:  7px; left: 0; width: 22px; }
/* Les 3 ratlles es transformen en una X quan el menu esta obert. */
.menu-toggle.is-open span { background: transparent; }
.menu-toggle.is-open span::before { top: 0; transform: rotate(45deg); }
.menu-toggle.is-open span::after { top: 0; transform: rotate(-45deg); }

/* Mobile drawer */
.mobile-nav {
  display: none;
  background: var(--surface-low);
  border-top: 1px solid var(--outline-soft);
}
.mobile-nav.is-open {
  display: block;
  position: fixed;
  top: var(--header-h, 88px);
  left: 0; right: 0; bottom: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 99;
  box-shadow: 0 24px 48px rgba(0,0,0,.55);
}
.mobile-nav ul { padding: 8px 0; }
.mobile-nav a {
  display: block;
  padding: 14px var(--gap-mobile);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-surface);
  border-bottom: 1px solid var(--outline-soft);
}
.mobile-nav a:hover { color: var(--gold-bright); }
.mobile-nav .submenu {
  position: static;
  opacity: 1; visibility: visible; transform: none;
  box-shadow: none; border: 0; background: var(--surface);
  padding: 0;
}
.mobile-nav .submenu a {
  padding-left: calc(var(--gap-mobile) + 24px);
  font-size: 12px;
  color: var(--secondary);
}

/* Boto "PORTAL DEL MUSIC" destacat dins del menu mobil, a joc amb el CTA
   d'escriptori (.cta-tickets). */
.mobile-nav__cta { border-top: 1px solid var(--outline-soft); margin-top: 4px; padding: 12px var(--gap-mobile) 20px; }
.mobile-nav__cta a {
  border: 0; border-radius: 6px;
  background: var(--gold); color: var(--on-gold);
  text-align: center;
}
.mobile-nav__cta a:hover { background: var(--gold-bright); color: var(--on-gold); }

/* Informacio de contacte (xarxes/telefon/correu) dins del menu mobil:
   nomes en telefon, ja que en tablet/escriptori ja ix a la franja de dalt. */
.mobile-nav__contact-info { display: none; }
@media (max-width: 600px) {
  .mobile-nav__contact-info {
    display: block;
    padding: 4px var(--gap-mobile) 20px;
    border-bottom: 1px solid var(--outline-soft);
  }
  .mobile-nav__social { display: flex; gap: 20px; padding: 4px 0 16px; }
  .mobile-nav__social a { color: var(--secondary); transition: color .2s ease; }
  .mobile-nav__social a:hover { color: var(--gold-bright); }
  .mobile-nav__social svg { width: 20px; height: 20px; fill: currentColor; }
  .mobile-nav__contact-line {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; border: 0;
    font-size: 13px; font-weight: 500; letter-spacing: normal; text-transform: none;
    color: var(--secondary);
  }
  .mobile-nav__contact-line:hover { color: var(--gold-bright); }
  .mobile-nav__contact-line svg { width: 16px; height: 16px; fill: var(--gold); flex: none; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 720px; /* fallback per a navegadors sense clamp()/svh */
  min-height: clamp(420px, 100vh, 720px);
  min-height: clamp(420px, 100svh, 720px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--lowest);
}
@media (max-width: 600px) {
  /* En telefon el carrusel ocupava tota la pantalla: es reduix un poc
     perque es note que hi ha mes contingut baix sense fer scroll. */
  .hero {
    min-height: 520px;
    min-height: clamp(380px, 78vh, 640px);
    min-height: clamp(380px, 78svh, 640px);
  }
  /* El titol "Som SUMA des de 1852" i els botons Fes-te Soci/Noticies
     quedaven centrats a mitat de les fotos del carrusel: es pugen cap
     amunt per a no tapar la part mes "carregada" de la imatge. */
  .hero--carousel { align-items: flex-start; }
  .hero--carousel .hero__inner { padding: 64px 0 40px; }
}
.hero--center { text-align: center; justify-content: center; }
.hero__bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
  mix-blend-mode: luminosity;
}

/* Carousel slides */
.hero--carousel .hero__bg img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease, transform 8s ease;
  transform: scale(1.05);
}
.hero--carousel .hero__bg img.is-active {
  opacity: 0.55;
  transform: scale(1);
  z-index: 1;
}

/* Retrats: enquadrament i ancoratge del zoom específics perquè
   la cara (i l'escut, si escau) no queden tallats. */
.hero--carousel .hero__bg img.hero__slide--director {
  object-position: center 30%;
  transform-origin: center 30%;
}
.hero--carousel .hero__bg img.hero__slide--abanderada {
  object-position: center 42%;
  transform-origin: center 42%;
}
.hero--carousel .hero__bg img.hero__slide--faces-high {
  object-position: center 28%;
  transform-origin: center 28%;
}
.hero--carousel .hero__bg img.hero__slide--faces-mid {
  object-position: center 38%;
  transform-origin: center 38%;
}
/* Percussió: enquadrament que prioritza les cares deixant veure els instruments */
.hero--carousel .hero__bg img.hero__slide--percu {
  object-position: center 38%;
  transform-origin: center 38%;
}
/* Mostra la imatge sencera sense retallar ni zoom */
.hero--carousel .hero__bg img.hero__slide--contain {
  object-fit: contain;
  object-position: center;
  background: var(--lowest);
}
.hero--carousel .hero__bg img.hero__slide--contain,
.hero--carousel .hero__bg img.hero__slide--contain.is-active {
  transform: scale(1);
}
/* Diapositiva amb color viu: trenca el mode luminosity i potencia saturació */
.hero--carousel .hero__bg img.hero__slide--vivid {
  mix-blend-mode: normal;
  filter: saturate(1.25) contrast(1.05);
}
.hero--carousel .hero__bg img.hero__slide--vivid.is-active {
  opacity: 0.9;
}

/* Controls */
.hero__controls {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gap-mobile);
}
@media (min-width: 768px) { .hero__controls { padding: 0 var(--gap-desktop); } }
.hero__nav {
  width: 44px;
  height: 44px;
  border: 1px solid var(--outline-soft);
  background: rgba(19,19,19,0.5);
  backdrop-filter: blur(4px);
  color: var(--ivory);
  font-size: 24px;
  line-height: 1;
  transition: all .25s ease;
}
.hero__nav:hover { border-color: var(--gold); color: var(--gold-bright); background: rgba(19,19,19,0.75); }
.hero__dots {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 70vw;
}
@media (max-width: 600px) {
  .hero__dots { gap: 7px; }
  .hero__dots button { width: 7px; height: 7px; }
  .hero__dots button.is-active { width: 22px; }
}
.hero__dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(229,226,225,0.3);
  transition: all .25s ease;
  padding: 0;
}
.hero__dots button:hover { background: rgba(229,226,225,0.6); }
.hero__dots button.is-active {
  width: 28px;
  border-radius: 4px;
  background: var(--gold-bright);
}
.hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, var(--surface), rgba(19,19,19,0.85) 45%, transparent),
    linear-gradient(to top,    var(--surface), transparent 60%);
}
.hero--center .hero__bg::after {
  background:
    linear-gradient(to top, var(--surface) 5%, transparent 60%),
    radial-gradient(ellipse at center, transparent, rgba(19,19,19,0.85));
}
.hero__inner {
  position: relative;
  z-index: 1;
  padding: 120px 0 80px;
  max-width: 820px;
}
.hero--center .hero__inner { margin: 0 auto; }
.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--outline);
  padding: 6px 14px;
  margin-bottom: 24px;
}
.hero__tag::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--gold-bright);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}
.hero__tag span {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--on-variant);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  color: var(--ivory);
}
.hero h1 em {
  font-style: italic;
  color: var(--gold-bright);
  font-weight: 700;
}
.hero p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--secondary);
  max-width: 600px;
  margin: 0 0 32px;
}
.hero--center p { margin-left: auto; margin-right: auto; }
.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero--center .hero__actions { justify-content: center; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: all .25s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn--primary { background: var(--gold); color: var(--on-gold); }
.btn--primary:hover { background: var(--gold-bright); }
.btn--ghost {
  background: transparent;
  color: var(--ivory);
  border-color: var(--outline-soft);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-bright); }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: 100px 0; }
@media (min-width: 768px) { .section { padding: 128px 0; } }
.section--alt { background: var(--surface-mid); }
.section--low { background: var(--surface-low); }

/* "La nostra Història", "Pròxims Actes" i "Últimes Notícies" formen un
   bloc continu a la portada: es reduix el buit entre totes tres perque
   es note que van juntes, tant en mòbil com en escriptori. */
#historia-section { padding-bottom: 32px; }
#events-section { padding-top: 32px; padding-bottom: 32px; }
#home-news-section { padding-top: 32px; }
@media (min-width: 768px) {
  #historia-section { padding-bottom: 48px; }
  #events-section { padding-top: 48px; padding-bottom: 48px; }
  #home-news-section { padding-top: 48px; }
}

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ivory);
  margin: 0;
}
.section__title em { font-style: normal; color: var(--gold-bright); }
.section__lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--secondary);
  margin-top: 16px;
  max-width: 600px;
}

/* Asymmetric two-col block */
.split {
  display: grid;
  gap: var(--gutter);
  align-items: center;
}
@media (min-width: 768px) {
  .split { grid-template-columns: 5fr 1fr 6fr; }
  .split--reverse { grid-template-columns: 6fr 1fr 5fr; }
  .split__spacer { display: block; }
}
.split__text > * + * { margin-top: 20px; }
.split__media {
  position: relative;
}
.split__media img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: transform .7s ease;
}

/* =========================================================
   BENTO GRID (Agrupacions)
   ========================================================= */
.bento {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .bento {
    grid-template-columns: 2fr 1fr;
    grid-auto-rows: 300px;
  }
}
.bento__item {
  position: relative;
  overflow: hidden;
  background: var(--charcoal);
  min-height: 280px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color .3s ease;
}
.bento__item:hover { border-color: var(--gold-dim); }
.bento__item img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .5;
  filter: grayscale(1);
  transition: opacity .7s ease, transform .7s ease, filter .7s ease;
}
.bento__item:hover img { opacity: .75; transform: scale(1.05); filter: grayscale(0); }
.bento__item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--surface) 0, rgba(19,19,19,.4) 40%, transparent 70%);
}
.bento__caption {
  position: absolute;
  left: 0; bottom: 0;
  padding: 28px;
  z-index: 2;
}
.bento__caption .eyebrow { margin-bottom: 8px; display: block; }
.bento__caption h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.15;
  color: var(--ivory);
  margin: 0;
}
.bento__caption p {
  margin: 12px 0 0;
  color: var(--secondary);
  font-size: 15px;
  max-width: 460px;
}
@media (min-width: 768px) {
  .bento__item--feature { grid-row: span 2; }
}

/* Group grid for agrupacions page */
.group-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gutter);
}
@media (min-width: 768px) {
  .group-grid { grid-template-columns: repeat(2, 1fr); }
}
.group-card {
  background: var(--charcoal);
  border: 1px solid var(--outline-soft);
  display: flex;
  flex-direction: column;
  transition: border-color .3s ease;
}
.group-card:hover { border-color: var(--gold); }
.group-card--feature {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .group-card--feature { grid-template-columns: 1fr 1fr; }
}
.group-card__media { position: relative; overflow: hidden; min-height: 260px; }
.group-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s ease;
}
.group-card:hover .group-card__media img { transform: scale(1.03); }
.group-card__body { padding: 36px; display: flex; flex-direction: column; gap: 16px; }
.group-card--feature .group-card__body { padding: 48px; justify-content: center; }
.group-card__body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  margin: 0;
  color: var(--ivory);
}
.group-card--feature .group-card__body h3 { font-size: clamp(32px, 4vw, 48px); }
.group-card__body p { color: var(--secondary); margin: 0; flex-grow: 1; }
.group-card__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* =========================================================
   NEWS LIST
   ========================================================= */
.news-list { border-top: 1px solid var(--outline-soft); }
.news-item {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  padding: 36px 16px;
  margin: 0 -16px;
  border-bottom: 1px solid var(--outline-soft);
  cursor: pointer;
  transition: background .3s ease;
  align-items: start;
}
.news-item:hover { background: rgba(32, 31, 31, 0.5); }
@media (min-width: 768px) {
  .news-item { grid-template-columns: 200px 1fr 40px; }
}
.news-item h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 3vw, 32px);
  margin: 0 0 12px;
  color: var(--ivory);
  transition: color .25s ease;
}
.news-item:hover h3 { color: var(--gold-bright); }
.news-item p { margin: 0; color: var(--secondary); }
.news-item__arrow {
  display: none;
  align-items: start;
  justify-content: end;
  color: var(--secondary);
  font-size: 22px;
}
@media (min-width: 768px) { .news-item__arrow { display: flex; } }
.news-item:hover .news-item__arrow { color: var(--gold-bright); }
.news-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--outline-soft);
  color: var(--secondary);
  margin-bottom: 12px;
}
.news-tag--gold {
  color: var(--gold);
  border-color: rgba(212,175,55,0.4);
}
.news-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
  transition: gap .25s ease;
}
.news-link:hover { gap: 14px; }

/* News item as link */
a.news-item {
  color: inherit;
  text-decoration: none;
}
.news-item { position: relative; }

/* News item variant with image */
.news-item--with-image { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .news-item--with-image { grid-template-columns: 140px 220px 1fr 40px; }
}
@media (min-width: 768px) and (max-width: 899px) {
  /* a 768–899px les columnes fixes (140+220px) deixaven massa poc espai per al text */
  .news-item--with-image { grid-template-columns: 90px 130px 1fr 32px; gap: 14px; }
}
.news-item__media {
  width: 100%;
  max-height: 320px;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-item__media img {
  max-width: 100%;
  max-height: 320px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(0.4);
  transition: filter .5s ease, transform .5s ease;
}
.news-item--with-image:hover .news-item__media img { filter: none; transform: scale(1.04); }

/* =========================================================
   GALERIA (àlbums + graella de fotos + lightbox)
   ========================================================= */
.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.gallery-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  background: transparent;
  border: 1px solid var(--outline-soft);
  border-radius: 999px;
  color: var(--secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color .25s ease, border-color .25s ease, background .25s ease;
}
.gallery-tab:hover { color: var(--ivory); border-color: var(--outline); }
.gallery-tab.is-active {
  color: #1a1712;
  background: var(--gold);
  border-color: var(--gold);
}
.gallery-tab__count {
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
}
.gallery-tab.is-active .gallery-tab__count { background: rgba(26, 23, 18, 0.22); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 620px)  { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 980px)  { .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

.gallery-cell {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  margin: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface-mid);
  cursor: zoom-in;
}
.gallery-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.25);
  transition: transform .5s ease, filter .5s ease;
}
.gallery-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 45%);
  opacity: 0;
  transition: opacity .3s ease;
}
.gallery-cell:hover img,
.gallery-cell:focus-visible img { transform: scale(1.06); filter: grayscale(0); }
.gallery-cell:hover::after,
.gallery-cell:focus-visible::after { opacity: 1; }
.gallery-cell__zoom {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 1;
  color: var(--ivory);
  font-size: 18px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s ease, transform .3s ease;
}
.gallery-cell:hover .gallery-cell__zoom,
.gallery-cell:focus-visible .gallery-cell__zoom { opacity: 1; transform: translateY(0); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  background: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(4px);
}
.lightbox[hidden] { display: none; }
.lightbox__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
}
.lightbox__stage img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.lightbox__cap {
  margin: 0;
  color: var(--secondary);
  font-size: 14px;
  text-align: center;
}
.lightbox__close,
.lightbox__nav {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--outline-soft);
  color: var(--ivory);
  cursor: pointer;
  border-radius: 999px;
  transition: background .25s ease, color .25s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: var(--gold); color: #1a1712; }
.lightbox__nav { width: 52px; height: 52px; font-size: 30px; line-height: 1; }
.lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 26px;
  line-height: 1;
}
@media (max-width: 640px) {
  .lightbox { padding: 12px; }
  .lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; font-size: 26px; }
  .lightbox__nav--prev { left: 10px; }
  .lightbox__nav--next { right: 10px; }
}

/* =========================================================
   NEWS ENTRIES (article complet inline a Notícies)
   ========================================================= */
.news-entries { border-top: 1px solid var(--outline-soft); }
.news-entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 56px 0;
  border-bottom: 1px solid var(--outline-soft);
  align-items: start;
}
@media (min-width: 900px) {
  .news-entry { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
  /* Alterna el costat de la imatge entrada per entrada */
  .news-entry--right .news-entry__media { order: 2; }
  .news-entry--right .news-entry__body  { order: 1; }
  .news-entry--full { grid-template-columns: 1fr; max-width: 820px; margin: 0 auto; }
}
.news-entry__media {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
/* La foto es veu sencera (contain): s'ajusta per ample i alt sense retallar-se. */
.news-entry__media img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  border-radius: 4px;
  transition: transform .6s ease;
}
.news-entry:hover .news-entry__media img { transform: scale(1.02); }
.news-entry__body .eyebrow { display: block; margin-bottom: 12px; }
.news-entry__body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.15;
  margin: 0 0 18px;
  color: var(--ivory);
}
.news-entry .article__body { max-width: none; }
.news-entry .article__attachments { margin-top: 24px; }
.news-entry .news-link { margin-top: 24px; }
.news-empty { color: var(--secondary); padding: 32px 0; }

/* Logos institucionals (tinta fosca sobre fons clar): fitxa clara, sencers */
.news-entry__media--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ivory);
  padding: 34px;
}
.news-entry__media--logo img {
  width: auto;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  transform: none !important;
}
.news-item__media--logo {
  background: var(--ivory);
  border-radius: 4px;
  padding: 14px;
}
.news-item__media--logo img { filter: none; }
.article__cover--logo img {
  background: var(--ivory);
  padding: 32px;
  border-radius: 6px;
  max-height: 320px;
}

/* =========================================================
   ALS MITJANS (premsa / mèdia) — targetes compactes
   ========================================================= */
.media-section { padding-top: 0; }
.media-head { text-align: center; max-width: 720px; margin: 0 auto; }
.media-head .eyebrow { color: var(--gold); display: block; margin-bottom: 12px; }
.media-lead {
  color: var(--secondary);
  font-size: 17px;
  line-height: 1.6;
  margin: 14px 0 0;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 40px;
}
.media-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px 16px;
  background: var(--surface-mid);
  border: 1px solid var(--outline-soft);
  border-radius: 10px;
  color: var(--on-surface);
  text-decoration: none;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.media-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0,0,0,.4);
}
.media-card__icon { width: 30px; height: 30px; }
.media-card__icon svg { width: 100%; height: 100%; fill: var(--gold-bright); }
.media-card__meta {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold);
}
.media-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.28;
  margin: 0;
  color: var(--ivory);
}
.media-card__link {
  margin-top: auto;
  padding-top: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
}

/* Galeria d'imatges addicionals dins d'una notícia */
.news-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 24px;
}
@media (min-width: 620px) { .news-gallery { grid-template-columns: repeat(3, 1fr); } }
.news-gallery__item {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface-mid);
}
.news-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .4s ease;
}
.news-gallery__item:hover img { transform: scale(1.05); }

/* =========================================================
   DOCUMENT CARDS (PDFs)
   ========================================================= */
.docs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) {
  .docs-grid { grid-template-columns: repeat(3, 1fr); }
}
.doc-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px;
  background: var(--surface-mid);
  border: 1px solid var(--outline-soft);
  color: var(--on-surface);
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.doc-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0,0,0,.45);
}
.doc-card__icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.3);
}
.doc-card__icon svg { width: 22px; height: 22px; fill: var(--gold-bright); }
.doc-card__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ivory);
  margin: 0;
  line-height: 1.2;
}
.doc-card__meta {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--secondary);
}
.doc-card__link {
  margin-top: auto;
  padding-top: 8px;
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  transition: gap .25s ease;
}
.doc-card:hover .doc-card__link { gap: 14px; }

/* =========================================================
   JUNTA DIRECTIVA — disseny simple i net
   ========================================================= */
.board {
  max-width: 720px;
  margin: 0 auto;
}
.board__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--outline-soft);
}
.board__role {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  flex: none;
}
.board__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--ivory);
  text-align: right;
  line-height: 1.3;
}
.board__subtitle {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  color: var(--ivory);
  text-align: center;
  margin: 72px 0 8px;
}
.board__vocals {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 720px;
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 56px;
}
@media (min-width: 600px) {
  .board__vocals { grid-template-columns: 1fr 1fr; }
}
.board__vocals li {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--on-surface);
  padding: 16px 0;
  border-bottom: 1px solid var(--outline-soft);
}

/* =========================================================
   PROSA NARRATIVA (Història, Director)
   ========================================================= */
.prose {
  max-width: 760px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.78;
  color: var(--secondary);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.prose > p { margin: 0 0 24px; }
.prose > p:last-child { margin-bottom: 0; }
.prose strong { color: var(--on-surface); font-weight: 600; }
.prose em { color: var(--on-variant); }
.prose-lead {
  max-width: 760px;
  margin: 0 auto 32px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.4;
  color: var(--ivory);
  text-align: center;
}
.prose-figure {
  max-width: 1080px;
  margin: 56px auto;
}
.prose-figure img {
  width: 100%;
  display: block;
  border: 1px solid var(--outline-soft);
}
.prose-figure figcaption {
  font-size: 13px;
  color: var(--secondary);
  letter-spacing: 0.04em;
  margin-top: 12px;
  text-align: center;
}
.prose-quote {
  max-width: 760px;
  margin: 56px auto;
  padding: 4px 0 4px 28px;
  border-left: 2px solid var(--gold);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.4;
  color: var(--ivory);
}

/* =========================================================
   ARTICLE DETALL (noticia.html)
   ========================================================= */
.article__hero { padding-bottom: 48px; }
.article__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 8px;
  transition: color .2s ease, gap .2s ease;
}
.article__back:hover { color: var(--gold-bright); gap: 12px; }
.article__hero .news-tag { display: inline-block; }
.article__hero h1 {
  margin: 16px 0 12px;
}
.article__date {
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}
.article__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gutter);
  padding-bottom: 100px;
}
@media (min-width: 900px) {
  .article__layout { grid-template-columns: 1fr 320px; align-items: start; }
}
.article__cover {
  margin-bottom: 40px;
  text-align: center;
}
.article__cover img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 80vh;
  height: auto;
  margin: 0 auto;
}
.article__body {
  font-size: 18px;
  line-height: 1.7;
  color: var(--on-surface);
}
.article__body p { margin: 0 0 20px; color: var(--secondary); }
.article__body strong { color: var(--on-surface); }
.article__body ul, .article__body ol { margin: 0 0 20px; padding-left: 22px; color: var(--secondary); }
.article__body li { margin-bottom: 8px; }
.article__body em { color: var(--on-variant); }

.article__aside { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 900px) {
  .article__aside { position: sticky; top: 110px; }
}
.article__meta-card {
  background: var(--surface-mid);
  border: 1px solid var(--outline-soft);
  border-left: 3px solid var(--gold);
  padding: 28px;
}
.article__meta-card .eyebrow { color: var(--gold); display: block; margin-bottom: 6px; }
.article__meta-card p { margin: 0; color: var(--on-surface); font-size: 16px; }

.article__attachments {
  background: var(--surface-mid);
  border: 1px solid var(--outline-soft);
  padding: 28px;
}
.article__attachments-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ivory);
  margin: 0 0 16px;
}
.article__attachments ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.article__attachment {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--outline-soft);
  color: var(--on-surface);
  font-size: 14px;
  transition: border-color .25s ease, background .25s ease;
}
.article__attachment:hover { border-color: var(--gold); background: var(--surface-high); }
.article__attachment svg { width: 20px; height: 20px; fill: var(--gold-bright); flex: none; }
.article__attachment span:nth-child(2) { flex: 1; }
.article__attachment-arrow { color: var(--gold-bright); }

/* Related news */
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gutter);
}
@media (min-width: 768px) { .related-grid { grid-template-columns: repeat(3, 1fr); } }
.related-card {
  background: var(--charcoal);
  border: 1px solid var(--outline-soft);
  color: var(--on-surface);
  display: flex;
  flex-direction: column;
  transition: border-color .3s ease, transform .3s ease;
}
.related-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.related-card__media { aspect-ratio: 16/10; overflow: hidden; background: var(--surface-mid); }
.related-card__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.4); transition: filter .5s ease, transform .5s ease; }
.related-card:hover .related-card__media img { filter: none; transform: scale(1.04); }
.related-card__media--empty { background: linear-gradient(135deg, var(--surface-mid), var(--charcoal)); }
.related-card__body { padding: 24px; }
.related-card__body .eyebrow { color: var(--gold); display: block; margin-bottom: 10px; }
.related-card__body h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ivory);
  margin: 0;
  line-height: 1.25;
}

/* Section subheading inside news */
.news-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3.5vw, 36px);
  color: var(--ivory);
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}
.news-section-title em { font-style: normal; color: var(--gold-bright); }
.news-section-divider {
  margin: 80px 0 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.news-section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--outline-soft);
}

/* =========================================================
   TIMELINE (Història)
   ========================================================= */
.timeline { position: relative; }
@media (min-width: 768px) {
  .timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0; bottom: 0;
    width: 1px;
    background: var(--surface-bright);
    transform: translateX(-50%);
  }
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gutter);
  margin-bottom: 96px;
  align-items: center;
}
.tl-item:last-child { margin-bottom: 0; }
@media (min-width: 768px) {
  .tl-item { grid-template-columns: 5fr 2fr 5fr; }
  .tl-item--right .tl-text { grid-column: 3; text-align: left; }
  .tl-item--right .tl-media { grid-column: 1; }
  .tl-item--left  .tl-text { text-align: right; }
  .tl-item::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--gold);
    transform: translate(-50%, -50%);
  }
  .tl-item--current::after { background: var(--gold); box-shadow: 0 0 0 6px rgba(212,175,55,0.18); }
}
.tl-text h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  color: var(--ivory);
  margin: 8px 0 12px;
}
.tl-media {
  background: var(--surface-mid);
  border: 1px solid var(--outline-gold-soft);
  padding: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,.6);
}
.tl-media img {
  width: 100%; height: auto;
  filter: grayscale(1);
  transition: filter .7s ease;
}
.tl-media:hover img { filter: grayscale(0); }
.tl-quote {
  background: var(--surface-mid);
  border: 1px solid var(--outline-gold-soft);
  padding: 36px;
  box-shadow: 0 20px 40px rgba(0,0,0,.6);
}
.tl-quote blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 24px;
  line-height: 1.4;
  color: var(--ivory);
  margin: 0 0 18px;
}
.tl-quote cite {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary);
  font-style: normal;
}

/* =========================================================
   PALMARÈS
   ========================================================= */
.section--palmares { padding-top: 0; }
.palmares__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 34px;
  color: var(--ivory);
  margin: 0 0 18px;
}
.palmares__hint {
  margin: 14px 0 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--secondary);
  font-style: italic;
}
.palmares {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}
.palmares__item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "year event"
    "year award";
  column-gap: 24px;
  row-gap: 4px;
  padding: 20px 0;
  border-top: 1px solid var(--outline-gold-soft);
}
.palmares__item:last-child { border-bottom: 1px solid var(--outline-gold-soft); }
.palmares__year {
  grid-area: year;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  color: var(--gold);
  min-width: 64px;
}
.palmares__event {
  grid-area: event;
  color: var(--on-surface);
  font-size: 16px;
}
.palmares__award {
  grid-area: award;
  color: var(--on-variant);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.palmares__item--highlight .palmares__award {
  color: var(--gold-bright);
  font-weight: 600;
}
a.palmares__award {
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px dashed var(--outline-gold-soft);
  padding-bottom: 2px;
  transition: color .2s ease, border-color .2s ease;
}
a.palmares__award:hover,
a.palmares__award:focus-visible {
  color: var(--gold-bright);
  border-bottom-color: var(--gold-bright);
  outline: none;
}
@media (min-width: 768px) {
  .palmares__item {
    grid-template-columns: 96px 1fr auto;
    grid-template-areas: "year event award";
    align-items: baseline;
    column-gap: 32px;
  }
  .palmares__award { text-align: right; }
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gutter);
}
@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: 7fr 5fr; }
}
.contact-form {
  background: var(--charcoal);
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,.5);
}
@media (min-width: 768px) { .contact-form { padding: 56px; } }
.field { display: flex; flex-direction: column; margin-bottom: 28px; }
.field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 8px;
  transition: color .2s ease;
}
.field input, .field select, .field textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(249, 249, 247, 0.3);
  color: var(--on-surface);
  font-family: inherit;
  font-size: 16px;
  padding: 8px 0;
  outline: none;
  transition: border-color .2s ease;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 100px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 14px) 18px, calc(100% - 9px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background: var(--surface-mid); color: var(--on-surface); }
.field:focus-within label { color: var(--gold-bright); }
.field:focus-within input,
.field:focus-within select,
.field:focus-within textarea { border-color: var(--gold); }

.info-cards { display: flex; flex-direction: column; gap: var(--gutter); }
.info-card {
  background: var(--surface-mid);
  border: 1px solid rgba(77, 70, 53, 0.6);
  padding: 32px;
  transition: border-color .3s ease;
}
.info-card:hover { border-color: var(--outline); }
.info-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  margin: 0 0 14px;
  color: var(--ivory);
  display: flex;
  align-items: center;
  gap: 12px;
}
.info-card h3 svg { width: 24px; height: 24px; fill: var(--gold); flex: none; }
.info-card p { margin: 4px 0; color: var(--secondary); }
.info-card a { color: var(--secondary); }
.info-card a:hover { color: var(--gold-bright); }

.map {
  width: 100%;
  height: 420px;
  background: var(--surface-mid);
  position: relative;
  overflow: hidden;
  margin-top: 80px;
}
.map iframe { width: 100%; height: 100%; border: 0; filter: invert(0.92) hue-rotate(180deg) saturate(0.4) brightness(0.85); }
.map__link {
  position: absolute;
  right: 16px;
  bottom: 16px;
  background: var(--surface);
  color: var(--gold-bright);
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--outline-soft);
  transition: border-color .25s ease, color .25s ease;
}
.map__link:hover { border-color: var(--gold); color: var(--gold); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  margin-top: auto;
  background: var(--lowest);
  border-top: 1px solid var(--outline-soft);
  padding: 80px 0 32px;
}
.footer-grid {
  display: grid;
  gap: var(--gutter);
  grid-template-columns: 1fr;
  margin-bottom: 60px;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; }
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  color: var(--gold-bright);
  letter-spacing: -0.01em;
}
.footer-brand + p { color: var(--secondary); margin-top: 12px; max-width: 320px; }
.footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivory);
  margin: 0 0 18px;
}
.footer-col ul li { margin-bottom: 12px; }
.footer-col a { color: var(--secondary); font-size: 14px; transition: color .2s ease; }
.footer-col a:hover { color: var(--gold-bright); }
.newsletter {
  display: flex;
  border-bottom: 1px solid var(--outline);
  margin-top: 4px;
}
.newsletter input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--on-surface);
  padding: 8px 0;
  outline: none;
  font-family: inherit;
  font-size: 14px;
}
.newsletter input::placeholder { color: var(--outline); }
.newsletter button { color: var(--gold); padding: 0 12px; font-size: 18px; }
.footer-social { display: flex; gap: 16px; margin-top: 18px; }
.footer-social a {
  width: 36px; height: 36px;
  border: 1px solid var(--outline-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  transition: all .25s ease;
}
.footer-social a:hover { color: var(--gold); border-color: var(--gold); }
.footer-social svg { width: 16px; height: 16px; fill: currentColor; }

.legal {
  border-top: 1px solid var(--outline-soft);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
@media (min-width: 768px) {
  .legal { flex-direction: row; justify-content: space-between; text-align: left; }
}
.legal p { margin: 0; color: var(--secondary); font-size: 13px; opacity: .8; }
.legal ul { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.legal a { color: var(--secondary); font-size: 13px; }
.legal a:hover { color: var(--gold-bright); }

/* =========================================================
   PAGE HEADER (for inner pages)
   ========================================================= */
.page-hero {
  padding: 160px 0 80px;
  background: var(--surface);
  text-align: left;
  position: relative;
}
@media (max-width: 600px) { .page-hero { padding: 120px 0 56px; } }
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  color: var(--ivory);
  margin: 16px 0 24px;
  letter-spacing: -0.02em;
}
.page-hero p { color: var(--secondary); font-size: 18px; line-height: 1.6; max-width: 640px; }

/* Variant amb fotografia de fons */
.page-hero--media { padding: 200px 0 90px; overflow: hidden; }
.page-hero__bg { position: absolute; inset: 0; z-index: 0; }
.page-hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
  mix-blend-mode: luminosity;
}
.page-hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, var(--surface), rgba(19,19,19,0.82) 48%, rgba(19,19,19,0.35)),
    linear-gradient(to top, var(--surface), transparent 65%);
}
.page-hero--media .container { position: relative; z-index: 1; }
.page-hero--media p { color: var(--on-surface); }
@media (max-width: 600px) { .page-hero--media { padding: 150px 0 64px; } }

/* =========================================================
   SPONSORS / COL·LABORADORS
   ========================================================= */
.sponsors {
  padding: 80px 0;
  background: var(--surface-low);
  border-top: 1px solid var(--outline-soft);
  border-bottom: 1px solid var(--outline-soft);
}
.sponsors__title {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 36px;
}
.sponsors__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 18px;
  max-width: 1080px;
  margin: 0 auto;
}
.sponsor-tile {
  background: var(--ivory);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  border: 1px solid transparent;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.sponsor-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0,0,0,.5);
  border-color: var(--gold);
}
.sponsor-tile img {
  max-width: 100%;
  max-height: 96px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* =========================================================
   FORM EXTENSIONS (Fes-te soci)
   ========================================================= */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 24px;
}
@media (min-width: 600px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}
.form-section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--gold-bright);
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--outline-soft);
}
.form-help {
  font-size: 14px;
  color: var(--secondary);
  margin: 0 0 16px;
}
.field--checkbox { flex-direction: row; align-items: flex-start; }
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  color: var(--secondary);
}
.checkbox input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 1px solid var(--outline);
  background: transparent;
  flex: none;
  margin-top: 2px;
  cursor: pointer;
  position: relative;
  transition: border-color .2s ease, background .2s ease;
}
.checkbox input[type="checkbox"]:checked {
  background: var(--gold);
  border-color: var(--gold);
}
.checkbox input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid var(--on-gold);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* =========================================================
   FORM EMBED (legacy iframe styles, conservat per altres usos)
   ========================================================= */
.form-embed {
  background: var(--charcoal);
  padding: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,.5);
  border: 1px solid var(--outline-soft);
}
.form-embed iframe {
  display: block;
  width: 100%;
  height: 1200px;
  border: 0;
  background: var(--ivory);
}
.form-embed__note {
  color: var(--secondary);
  font-size: 14px;
  margin-top: 24px;
  text-align: center;
}
.form-embed__note a { color: var(--gold-bright); }
.form-embed__note a:hover { text-decoration: underline; }

/* CTA banner */
.cta-banner {
  background: var(--surface-high);
  border-top: 1px solid var(--outline-gold-soft);
  border-bottom: 1px solid var(--outline-gold-soft);
  padding: 64px 32px;
  text-align: center;
  margin-top: 64px;
}
.cta-banner h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--ivory);
  margin: 0 0 12px;
}
.cta-banner p { color: var(--secondary); max-width: 600px; margin: 0 auto 24px; }
.cta-banner a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: gap .25s ease;
}
.cta-banner a:hover { gap: 20px; }

/* =========================================================
   ACCESSIBILITAT
   ========================================================= */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  background: var(--gold);
  color: var(--on-gold);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 14px;
  border-radius: 2px;
  transform: translateY(-150%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); outline: 2px solid var(--ivory); outline-offset: 2px; }

/* Anell de focus coherent per a teclat */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }
[tabindex="-1"]:focus { outline: none; }

.no-scroll { overflow: hidden; }

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

/* =========================================================
   CERCADOR
   ========================================================= */
.site-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: 8px;
  color: var(--on-surface);
  border: 1px solid var(--outline-soft);
  border-radius: 50%;
  transition: color .2s ease, border-color .2s ease;
}
.site-search-btn:hover { color: var(--gold-bright); border-color: var(--gold); }
.site-search-btn svg { width: 18px; height: 18px; fill: currentColor; }

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 14vh 20px 40px;
}
.search-overlay[hidden] { display: none; }
.search-modal {
  width: 100%;
  max-width: 640px;
  background: var(--surface-mid);
  border: 1px solid var(--outline-soft);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--outline-soft);
}
.search-box svg { width: 20px; height: 20px; fill: var(--gold); flex: none; }
.search-input {
  flex: 1;
  background: none;
  border: 0;
  color: var(--on-surface);
  font-family: inherit;
  font-size: 18px;
  outline: none;
}
.search-input::placeholder { color: var(--secondary); opacity: .7; }
.search-close {
  color: var(--secondary);
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: none;
}
.search-close:hover { color: var(--gold-bright); background: var(--surface-high); }
.search-results { max-height: 56vh; overflow-y: auto; padding: 8px; }
.search-hint { color: var(--secondary); padding: 24px 14px; margin: 0; text-align: center; font-size: 15px; }
.search-result {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  transition: background .15s ease;
}
.search-result:hover,
.search-result:focus-visible { background: var(--surface-high); }
.search-result__type {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.search-result__title { display: block; color: var(--ivory); font-weight: 600; font-size: 16px; }
.search-result__desc {
  display: block;
  color: var(--secondary);
  font-size: 14px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   BANNER DE CONSENTIMENT DE COOKIES
   ========================================================= */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 950;
  background: var(--surface-low);
  border-top: 1px solid var(--outline-gold-soft);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
}
.cookie-banner__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
@media (min-width: 860px) {
  .cookie-banner__inner { flex-direction: row; align-items: center; justify-content: space-between; padding: 18px var(--gap-desktop); }
}
.cookie-banner__text { margin: 0; color: var(--secondary); font-size: 14px; line-height: 1.5; max-width: 760px; }
.cookie-banner__text a { color: var(--gold); text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: 12px; flex: none; }
.cookie-banner__actions .btn { padding: 10px 22px; }

/* =========================================================
   SO AMBIENT (pasdoble de fons, opcional)
   ========================================================= */
.sound-fab {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 900;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--surface-mid);
  border: 1px solid var(--outline-gold-soft);
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.sound-fab:hover { transform: translateY(-2px) scale(1.05); background: var(--surface-high); }
.sound-fab svg { width: 20px; height: 20px; fill: currentColor; }
@media (max-width: 600px) {
  .sound-fab { width: 38px; height: 38px; left: 16px; bottom: 16px; }
  .sound-fab svg { width: 17px; height: 17px; }
}
/* Pols suau per a cridar l'atenció mentre es mostra l'avís "Polsa ací" */
.sound-fab--pulse { animation: sound-fab-pulse 1.6s ease-out infinite; }
@keyframes sound-fab-pulse {
  0%   { box-shadow: 0 8px 24px rgba(0,0,0,.4), 0 0 0 0 rgba(212,175,55,.55); }
  70%  { box-shadow: 0 8px 24px rgba(0,0,0,.4), 0 0 0 14px rgba(212,175,55,0); }
  100% { box-shadow: 0 8px 24px rgba(0,0,0,.4), 0 0 0 0 rgba(212,175,55,0); }
}
@media (prefers-reduced-motion: reduce) {
  .sound-fab--pulse { animation: none; }
}

.sound-hint {
  position: fixed;
  left: 20px;
  bottom: 76px;
  z-index: 901;
  background: var(--surface-mid);
  border: 1px solid var(--outline-gold-soft);
  color: var(--ivory);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 8px 14px;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  white-space: nowrap;
  animation: sound-hint-in .35s ease;
}
.sound-hint::after {
  content: "";
  position: absolute;
  left: 22px; bottom: -6px;
  width: 12px; height: 12px;
  background: var(--surface-mid);
  border-right: 1px solid var(--outline-gold-soft);
  border-bottom: 1px solid var(--outline-gold-soft);
  transform: rotate(45deg);
}
@keyframes sound-hint-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (max-width: 600px) {
  .sound-hint { left: 16px; bottom: 62px; font-size: 11.5px; padding: 7px 12px; }
  .sound-hint::after { left: 18px; }
}
/* No tapar el banner de cookies quan és visible (el banner ocupa tot
   l'ample de baix i, si no, amaga el botó del so). */
.cookie-banner ~ .sound-fab { bottom: 96px; }
.cookie-banner ~ .sound-hint { bottom: 138px; }
@media (min-width: 860px) {
  .cookie-banner ~ .sound-fab { bottom: 20px; }
  .cookie-banner ~ .sound-hint { bottom: 76px; }
}

/* =========================================================
   PÀGINES LEGALS (prosa)
   ========================================================= */
.legal-page { padding: 56px 0 96px; }
.legal-prose { max-width: 760px; }
.legal-prose h2 {
  font-family: var(--font-display);
  color: var(--ivory);
  font-size: 26px;
  margin: 40px 0 12px;
}
.legal-prose h2:first-child { margin-top: 0; }
.legal-prose h3 { color: var(--on-variant); font-size: 18px; margin: 24px 0 8px; }
.legal-prose p,
.legal-prose li { color: var(--secondary); line-height: 1.7; font-size: 16px; }
.legal-prose ul { list-style: disc; padding-left: 22px; margin: 12px 0; }
.legal-prose a { color: var(--gold); text-decoration: underline; }
.legal-prose strong { color: var(--on-surface); }
.legal-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}
.legal-prose th,
.legal-prose td {
  border: 1px solid var(--outline-soft);
  padding: 10px 12px;
  text-align: left;
  color: var(--secondary);
}
.legal-prose th { color: var(--on-surface); background: var(--surface-low); }
.legal-prose .legal-updated { color: var(--outline); font-size: 14px; font-style: italic; }

/* =========================================================
   ANIMACIONS — aparició en scroll
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.22, .61, .36, 1),
              transform .7s cubic-bezier(.22, .61, .36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   FRANJA DE XIFRES (comptadors animats)
   ========================================================= */
.stats {
  background: var(--surface-low);
  border-top: 1px solid var(--outline-soft);
  border-bottom: 1px solid var(--outline-soft);
  padding: 72px 0;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 24px;
  text-align: center;
}
@media (min-width: 860px) { .stats__grid { grid-template-columns: repeat(4, 1fr); } }
.stat { position: relative; }
.stat + .stat::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  height: 48px;
  width: 1px;
  background: var(--outline-soft);
}
@media (max-width: 859px) { .stat:nth-child(odd)::before { display: none; } }
.stat__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 60px);
  line-height: 1;
  color: var(--gold);
  letter-spacing: -0.02em;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 2px;
}
.stat__suffix { color: var(--gold-dim); font-size: 0.6em; }
.stat__label {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
}

/* =========================================================
   PRÒXIMS ACTES (agenda d'inici)
   ========================================================= */
.section-head-center { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head-center .eyebrow { display: block; margin-bottom: 14px; }
.section-head-center .section__title { margin: 0 auto; }
.section-head-center p { color: var(--secondary); margin: 16px auto 0; }

.events {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}
.events-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--secondary);
  background: var(--surface-mid);
  border: 1px dashed var(--outline-soft);
  border-radius: 8px;
  padding: 40px 24px;
  margin: 0;
}
.event-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  background: var(--surface-mid);
  border: 1px solid var(--outline-soft);
  border-left: 3px solid var(--gold);
  padding: 24px 28px;
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.event-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0,0,0,.45);
}
.event-card__date {
  flex: none;
  width: 88px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  background: var(--surface);
  border: 1px solid var(--outline-gold-soft);
}
.event-card__day {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
  color: var(--gold-bright);
}
.event-card__month {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-variant);
  margin-top: 6px;
}
.event-card__year { font-size: 12px; color: var(--secondary); margin-top: 2px; }
.event-card__body { min-width: 0; }
.event-card__when {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 8px;
}
.event-card__body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.2;
  color: var(--ivory);
  margin: 0;
}
.event-card__location {
  margin: 10px 0 0;
  color: var(--on-surface);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.event-card__location svg { width: 16px; height: 16px; fill: var(--gold); flex: none; }
.event-card__desc { margin: 8px 0 0; color: var(--secondary); font-size: 15px; }
@media (max-width: 540px) {
  .event-card { grid-template-columns: 1fr; gap: 16px; padding: 20px; }
  .event-card__date { flex-direction: row; width: auto; gap: 8px; align-self: start; padding: 8px 14px; }
  .event-card__day { font-size: 28px; }
  .event-card__month, .event-card__year { margin-top: 0; }
}

/* Avisos de resultat dels formularis */
.form-alert { padding: 14px 18px; border-radius: 8px; margin: 0 0 24px; font-size: 15px; }
.form-alert--ok { background: rgba(74, 222, 128, 0.12); border: 1px solid rgba(74, 222, 128, 0.4); color: #4ade80; }
.form-alert--err { background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.4); color: #f87171; }

/* Botons dins de pàgines de prosa (descàrrega de PDF): que no els afecte l'estil d'enllaç */
.legal-prose a.btn--primary { color: var(--on-gold); text-decoration: none; font-weight: 600; }
.legal-prose a.btn--primary:hover { color: var(--on-gold); }

/* Pàgines de documents de l'Escola (PEC, RRI): espaiat més compacte */
.page-hero--compact { padding: 104px 0 28px; }
.legal-page--compact { padding-top: 8px; }
.legal-prose--compact h2 { margin-top: 26px; }

/* ============================================================
   POPUP DE SUBSCRIPCIÓ A LA NEWSLETTER (targeta lliscant)
   ============================================================ */
.nl-popup {
  position: fixed;
  right: 20px;
  /* per damunt del botó flotant de WhatsApp (44px + marges) */
  bottom: 80px;
  z-index: 950;
  width: min(300px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  transform: translateY(24px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.nl-popup.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
/* si el banner de cookies està en pantalla, WhatsApp puja a 96px: el popup puja també */
.cookie-banner ~ .nl-popup { bottom: 156px; }
.nl-popup__close {
  position: absolute; top: 8px; right: 10px;
  background: none; border: 0; color: var(--secondary);
  font-size: 16px; cursor: pointer; padding: 4px; line-height: 1;
}
.nl-popup__close:hover { color: var(--ivory); }
.nl-popup h4 {
  font-family: var(--font-display);
  color: var(--ivory);
  font-size: 17px;
  margin: 0 0 4px;
}
.nl-popup h4 em { color: var(--gold-bright, #f2ca50); font-style: normal; }
.nl-popup p { margin: 0 0 10px; font-size: 12.5px; color: var(--secondary); line-height: 1.45; }
.nl-popup form { display: flex; gap: 6px; }
.nl-popup input[type="email"] {
  flex: 1; min-width: 0;
  background: var(--lowest, #111);
  border: 1px solid rgba(229, 226, 225, 0.18);
  border-radius: 7px;
  color: var(--ivory);
  padding: 8px 10px;
  font-size: 13px;
}
.nl-popup input[type="email"]:focus { outline: none; border-color: var(--gold); }
.nl-popup button[type="submit"] {
  background: var(--gold);
  color: var(--on-gold, #1a1611);
  border: 0; border-radius: 7px;
  padding: 8px 12px;
  font-weight: 600; font-size: 13px;
  cursor: pointer;
}
.nl-popup button[type="submit"]:hover { background: var(--gold-bright, #f2ca50); }
.nl-popup__feedback { margin: 8px 0 0; font-size: 12px; }
@media (max-width: 560px) {
  .nl-popup { right: 14px; left: 14px; bottom: 68px; width: auto; }
  /* .cookie-banner ~ .nl-popup (fora de media query) té més especificitat que
     ".nl-popup" sol i, si no es repeteix ací, guanyava sempre i tapava el
     banner de cookies en mòbil malgrat el valor de dalt */
  .cookie-banner ~ .nl-popup { bottom: 148px; }
}

/* Llista de dates de la pàgina de Matrícula (text pla des del panell) */
.matricula-dates li { color: var(--on-surface); font-weight: 600; }

/* ============================================================
   AJUSTOS PER A MÒBIL
   ============================================================ */
/* Taules de les pàgines legals (p. ex. cookies): scroll horitzontal propi
   en lloc de desbordar la pàgina */
@media (max-width: 600px) {
  .legal-prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Files de la Junta Directiva: càrrec dalt, nom baix */
  .board__row { flex-direction: column; align-items: flex-start; gap: 4px; }
  /* Palmarès: una mica menys de lletra perquè els noms llargs no toquen */
  .palmares__event { font-size: 14px; }
}
/* Correus i URL llargues: que es partisquen en lloc de desbordar */
.info-card a, .info-card span, .legal-prose a, .top-info a { overflow-wrap: anywhere; }

/* Etiquetes de grup del menú mòbil (no clicables; els subapartats van baix) */
.mobile-nav__label {
  display: block;
  padding: 14px var(--gap-mobile) 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-bright, #f2ca50);
}
