/* ─────────────────────────────────────────────
   DIRECTIU — Socis & Junta styles
───────────────────────────────────────────── */

/* Hero */
.directiu-hero {
  width: 100%;
  min-height: 280px;
  background: linear-gradient(135deg, var(--primary) 0%, #1a1a6e 60%, #3a0a2e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.directiu-hero::before,
.directiu-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  background: #fff;
}
.directiu-hero::before {
  width: 500px; height: 500px;
  top: -200px; right: -100px;
}
.directiu-hero::after {
  width: 300px; height: 300px;
  bottom: -150px; left: -50px;
}

.directiu-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 600px;
}

.directiu-hero__eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.directiu-hero__title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.directiu-hero__desc {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.88rem, 2vw, 1rem);
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  max-width: 500px;
  margin-top: 0.25rem;
}

/* Tabs (Socis / Junta) */
.directiu-tabs {
  background: #fff;
  border-bottom: 1px solid rgba(47,47,150,0.08);
  position: sticky;
  top: 62px;
  z-index: 100;
}

.directiu-tabs__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  padding: 0 2rem;
}

.directiu-tabs__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-light);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.directiu-tabs__btn:hover {
  color: var(--pink);
}

.directiu-tabs__btn.is-active {
  color: var(--pink);
  border-bottom-color: var(--pink);
}

/* Panells de contingut */
.directiu-panel {
  display: none;
}

.directiu-panel.is-visible {
  display: block;
}

/* Animació d'entrada del panel */
@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.directiu-panel.is-visible {
  animation: panelFadeIn 0.3s ease forwards;
}

/* ─── Secció genèrica ─── */
.directiu-section {
  width: 100%;
  padding: clamp(3.5rem, 8vw, 5.5rem) clamp(1rem, 4vw, 2rem);
}

.directiu-section--alt {
  background: var(--bg-light);
}

.directiu-section__inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* Capçalera de secció */
.directiu-section__header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.directiu-section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  background: rgba(218, 26, 93, 0.08);
  color: var(--pink-dark);   /* contrast AA sobre el fons rosa clar */
  font-family: 'Montserrat', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.directiu-section__eyebrow::before {
  content: '';
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--pink);
}

.directiu-section__title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.directiu-section__title span {
  color: var(--pink);
}

.directiu-section__divider {
  width: 42px;
  height: 3px;
  background: var(--pink);
  border-radius: 99px;
  margin: 1rem auto 1.1rem;
}

.directiu-section__subtitle {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.9rem, 1.8vw, 1rem);
  color: var(--text-light);
  line-height: 1.75;
  max-width: 520px;
  margin: 0 auto;
}

/* ─── Grid de socis ─── */
.socis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1.25rem;
}

.soci-card {
  background: #fff;
  border: 1px solid rgba(47,47,150,0.08);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.7rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  opacity: 0;
  transform: translateY(18px);
}

.soci-card.dir-visible {
  opacity: 1;
  transform: translateY(0);
}

.soci-card:hover {
  transform: translateY(-4px);
  border-color: rgba(218,26,93,0.18);
  box-shadow: 0 10px 28px rgba(47,47,150,0.1);
}

.soci-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ececf5, #f5f5fb);
  border: 3px solid rgba(47,47,150,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.soci-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.soci-card__avatar-initials {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.02em;
  line-height: 1;
}

.soci-card__name {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

/* ─── Grid de junta ─── */
.junta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}



.junta-card {
  background: #fff;
  border: 1px solid rgba(47,47,150,0.08);
  border-radius: var(--radius);
  padding: 2rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  opacity: 0;
  transform: translateY(20px);
}


.junta-card.dir-visible {
  opacity: 1;
  transform: translateY(0);
}

.junta-card:hover {
  transform: translateY(-5px);
  border-color: rgba(218,26,93,0.2);
  box-shadow: 0 14px 36px rgba(47,47,150,0.12);
}

.junta-card--featured .junta-card__photo {
  width: 110px;
  height: 110px;
}

.junta-card__photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ececf5, #f5f5fb);
  border: 3px solid rgba(47,47,150,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color 0.25s ease;
}

.junta-card:hover .junta-card__photo {
  border-color: rgba(218,26,93,0.3);
}

.junta-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.junta-card__photo-initials {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.02em;
  line-height: 1;
}

.junta-card--featured .junta-card__photo-initials {
  font-size: 1.8rem;
}

.junta-card__role-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(218,26,93,0.08);
  color: var(--pink);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.junta-card--featured .junta-card__role-badge {
  background: var(--pink);
  color: #fff;
  font-size: 0.72rem;
  padding: 0.3rem 0.85rem;
}

.junta-card__name {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.junta-card--featured .junta-card__name {
  font-size: 1.15rem;
}

/* Transicions escalonades */
.soci-card:nth-child(1)  { transition-delay: 0.02s; }
.soci-card:nth-child(2)  { transition-delay: 0.05s; }
.soci-card:nth-child(3)  { transition-delay: 0.08s; }
.soci-card:nth-child(4)  { transition-delay: 0.11s; }
.soci-card:nth-child(5)  { transition-delay: 0.14s; }
.soci-card:nth-child(6)  { transition-delay: 0.17s; }
.soci-card:nth-child(7)  { transition-delay: 0.20s; }
.soci-card:nth-child(8)  { transition-delay: 0.23s; }
.soci-card:nth-child(9)  { transition-delay: 0.26s; }
.soci-card:nth-child(10) { transition-delay: 0.29s; }
.soci-card:nth-child(11) { transition-delay: 0.32s; }
.soci-card:nth-child(12) { transition-delay: 0.35s; }
.soci-card:nth-child(13) { transition-delay: 0.38s; }
.soci-card:nth-child(14) { transition-delay: 0.41s; }
.soci-card:nth-child(15) { transition-delay: 0.44s; }
.soci-card:nth-child(16) { transition-delay: 0.47s; }
.soci-card:nth-child(17) { transition-delay: 0.50s; }
.soci-card:nth-child(18) { transition-delay: 0.53s; }
.soci-card:nth-child(19) { transition-delay: 0.56s; }
.soci-card:nth-child(20) { transition-delay: 0.59s; }

.junta-card:nth-child(1)  { transition-delay: 0.02s; }
.junta-card:nth-child(2)  { transition-delay: 0.06s; }
.junta-card:nth-child(3)  { transition-delay: 0.10s; }
.junta-card:nth-child(4)  { transition-delay: 0.14s; }
.junta-card:nth-child(5)  { transition-delay: 0.18s; }
.junta-card:nth-child(6)  { transition-delay: 0.22s; }
.junta-card:nth-child(7)  { transition-delay: 0.26s; }
.junta-card:nth-child(8)  { transition-delay: 0.30s; }
.junta-card:nth-child(9)  { transition-delay: 0.34s; }
.junta-card:nth-child(10) { transition-delay: 0.38s; }

/* Responsive */
@media (max-width: 768px) {
  .directiu-tabs__btn {
    padding: 0.875rem 1rem;
    font-size: 0.82rem;
  }
  .directiu-hero {
    padding: 4rem 1.5rem 3rem;
    min-height: 220px;
  }
  .socis-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  .junta-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1.1rem;
  }
  .junta-card--featured {
    max-width: 260px;
  }
}

@media (max-width: 992px) {
  .directiu-tabs {
    top: 68px;
  }
}

@media (max-width: 480px) {
  .directiu-section {
    padding: 2.5rem 1.1rem;
  }
  .socis-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .junta-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .directiu-tabs__inner {
    padding: 0 1rem;
  }
  .junta-card {
    padding: 1.25rem 0.9rem 1.25rem;
  }
  .junta-card__photo {
    width: 72px;
    height: 72px;
  }
  .junta-card--featured .junta-card__photo {
    width: 88px;
    height: 88px;
  }
  .junta-card__role-badge {
    padding: 0.22rem 0.6rem;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
  }
  .junta-card__name {
    font-size: 0.92rem;
  }
  .soci-card__avatar {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 380px) {
  .directiu-tabs {
    top: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .soci-card, .junta-card {
    opacity: 1;
    transform: none;
  }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
}


/* ═════════════════════════════════════════════
   JUNTA: organigrama animat (directiu.js)
   El president a dalt; una línia baixa, s'obre cap als costats i
   arriba a cada càrrec, que apareix quan la línia hi arriba.
   ═════════════════════════════════════════════ */
.junta-grid.organi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  --linia: linear-gradient(180deg, var(--blue, #2f2f96), #9b2a85);
}
.organi .junta-card {
  opacity: 0;
  transform: none;
  transition-delay: 0s !important;
}
.organi.is-in .junta-card { opacity: 1; }
.organi__cap {
  position: relative;
  padding-bottom: 2.6rem;
  display: flex;
  justify-content: center;
}
.organi__cap .junta-card { width: 290px; max-width: 100%; }
.organi__fila {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr));
  gap: 1rem;
  padding-top: 2.2rem;
}
.organi__fila .junta-card {
  position: relative;
  padding: 1.3rem .8rem 1.2rem;
  gap: .6rem;
}
.organi__fila .junta-card__photo { width: 72px; height: 72px; }
.organi__fila .junta-card__photo-initials { font-size: 1.25rem; }
.organi__fila .junta-card__role-badge { font-size: .62rem; letter-spacing: .08em; padding: .25rem .6rem; }
.organi__fila .junta-card__name { font-size: .92rem; }
/* seqüència */
.organi.is-in .organi__cap .junta-card { animation: orgPop .6s cubic-bezier(.34, 1.56, .64, 1) both; }
.organi.is-in .organi__fila .junta-card { animation: orgPop .55s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: calc(1.45s + var(--i) * .12s); }
@keyframes orgPop { from { opacity: 0; scale: .6; translate: 0 14px; } to { opacity: 1; scale: 1; translate: 0 0; } }
@keyframes orgBaixa { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes orgObre { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* el president, en destacat */
.organi__cap .junta-card {
  background: linear-gradient(160deg, var(--blue, #2f2f96) 0%, #1a1a6e 100%);
  border-color: transparent;
  box-shadow: 0 22px 40px -18px rgba(47, 47, 150, .6);
}
.organi__cap .junta-card__photo { background: #fff; border-color: var(--pink); }
.organi__cap .junta-card__name { color: #fff; }
/* càrrec encara sense persona */
.junta-card--buida { background: transparent; border: 1.5px dashed rgba(47, 47, 150, .22); box-shadow: none; }
.junta-card--buida .junta-card__photo { background: transparent; border: 2px dashed rgba(47, 47, 150, .25); }
.junta-card--buida .junta-card__photo-initials { display: grid; place-items: center; color: rgba(47, 47, 150, .45); }
.junta-card--buida .junta-card__photo-initials svg { width: 26px; height: 26px; }
.junta-card--buida .junta-card__name { color: var(--text-light); font-weight: 600; font-style: italic; font-size: .82rem; }

/* ═════════════════════════════════════════════
   SOCIS: mural d'avatars rodons amb comptador
   ═════════════════════════════════════════════ */
.mural__compta {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .5rem;
  margin: -1rem 0 2rem;
  font: 700 .85rem/1 'Montserrat', sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-light);
}
.mural__num {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--pink);
  font-variant-numeric: tabular-nums;
}
.socis-grid.mural {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.6rem 1.2rem;
  max-width: 880px;
  margin: 0 auto;
}
.mural .soci-card {
  position: relative;
  width: 108px;
  padding: 0;
  gap: .55rem;
  background: none;
  border: 0;
  box-shadow: none;
  opacity: 0;
  transform: none;
  transition-delay: 0s !important;
}
.mural.is-in .soci-card { opacity: 1; animation: orgPop .55s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: calc(var(--i) * 55ms); }
.mural .soci-card:hover { transform: none; box-shadow: none; }
.mural .soci-card__avatar {
  width: 84px;
  height: 84px;
  background: #fff;
  border: 3px solid transparent;
  background-image: linear-gradient(#fff, #fff), linear-gradient(135deg, var(--blue, #2f2f96), #9b2a85);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 10px 22px -12px rgba(47, 47, 150, .45);
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s ease;
}
.mural .soci-card:nth-child(3n+2) .soci-card__avatar-initials { color: #9b2a85; }
.mural .soci-card:nth-child(3n) .soci-card__avatar-initials { color: var(--pink); }
.mural .soci-card__name { font-size: .82rem; }
@media (hover: hover) {
  .mural .soci-card:hover .soci-card__avatar {
    transform: translateY(-6px) scale(1.08) rotate(-4deg);
    background-image: linear-gradient(#fff, #fff), linear-gradient(135deg, var(--pink), #9b2a85);
    box-shadow: 0 16px 28px -12px rgba(218, 26, 93, .55);
  }
}
/* membres de la Junta: estrella rosa i el càrrec a sota */
.soci-card__estrella {
  position: absolute;
  top: 0;
  left: 50%;
  margin-left: 22px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(218, 26, 93, .35);
}
.soci-card__estrella svg { width: 12px; height: 12px; }
.soci-card__rol {
  margin-top: -.3rem;
  font: 700 .6rem/1.2 'Montserrat', sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--pink);
}

/* Mòbil: l'organigrama baixa en vertical */
@media (max-width: 760px) {
  .junta-grid.organi { align-items: stretch; }
  .organi__cap { justify-content: flex-start; padding-left: 0; }
  .organi__cap .junta-card { width: 100%; display: grid; grid-template-columns: 72px 1fr; align-content: center; justify-items: start; column-gap: 1rem; row-gap: .35rem; text-align: left; padding: 1.1rem 1.2rem; }
  .organi__cap .junta-card__photo { width: 72px; height: 72px; grid-row: 1 / span 2; }
  .organi__cap .junta-card__role-badge { align-self: end; }
  .organi__cap .junta-card__name { align-self: start; }
  .organi__fila { grid-template-columns: 1fr; gap: .8rem; padding: 0 0 0 2.6rem; }
  .organi__fila .junta-card { display: grid; grid-template-columns: 56px 1fr; justify-items: start; column-gap: .9rem; row-gap: .3rem; text-align: left; padding: .8rem 1rem; }
  .organi__fila .junta-card__photo { width: 56px; height: 56px; grid-row: 1 / span 2; }
  .organi__fila .junta-card__role-badge { align-self: end; }
  .organi__fila .junta-card__name { align-self: start; }
  .socis-grid.mural { gap: 1.2rem .6rem; }
  .mural .soci-card { width: 96px; }
  .mural .soci-card__avatar { width: 70px; height: 70px; }
  .soci-card__estrella { margin-left: 16px; }
}

/* ═════════════════════════════════════════════
   SOCIS EN RODONA (directiu.js): els noms fan un cercle al voltant
   del logo; en tocar-ne un s'obre la seva fitxa.
   ═════════════════════════════════════════════ */
.socis-grid.mural.roda {
  position: relative;
  display: block;
  width: min(760px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
}
/* anell discontinu que gira a poc a poc (passa pel centre dels avatars) */
.roda::before,
.roda::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.roda::before {
  inset: 10.5%;
  border: 2px dashed rgba(47, 47, 150, .18);
  animation: rodaGira 60s linear infinite;
}
.roda::after {
  inset: 26%;
  background: radial-gradient(circle, rgba(218, 26, 93, .08) 0%, rgba(155, 42, 133, .05) 45%, rgba(47, 47, 150, 0) 70%);
}
@keyframes rodaGira { to { transform: rotate(360deg); } }
/* cada soci: --x i --y (en %) els posa directiu.js */
.roda .soci-card {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  z-index: 1;
  width: 130px;
  margin: -46px 0 0 -65px;
  transform: none !important;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  cursor: pointer;
  outline: none;
}
.roda.is-in .soci-card { animation: rodaSurt .9s cubic-bezier(.34, 1.3, .64, 1) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes rodaSurt {
  from { left: 50%; top: 50%; opacity: 0; scale: .3; }
  to { left: var(--x, 50%); top: var(--y, 50%); opacity: 1; scale: 1; }
}
.roda .soci-card__avatar { width: 76px; height: 76px; transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s ease, background-image .3s ease; }
.roda .soci-card.is-actiu .soci-card__avatar { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(218, 26, 93, .18), 0 14px 26px -10px rgba(218, 26, 93, .6); }
.roda .soci-card__avatar-initials { font-size: 1.25rem; }
.roda .soci-card__name { font-size: 0; line-height: 1.15; white-space: nowrap; }
.roda .soci-card__name::after { content: attr(data-mig); font-size: .78rem; }
.roda .soci-card__rol { display: none; }
.roda .soci-card--junta .soci-card__avatar {
  background-image: linear-gradient(#fff, #fff), linear-gradient(135deg, var(--pink), #9b2a85);
}
.roda .soci-card__estrella { margin-left: 18px; width: 24px; height: 24px; }
.roda .soci-card:focus-visible .soci-card__avatar { outline: 3px solid var(--pink); outline-offset: 3px; }
.roda .soci-card.is-actiu .soci-card__avatar {
  background-image: linear-gradient(var(--pink), var(--pink)), linear-gradient(135deg, var(--pink), #9b2a85);
}
.roda .soci-card.is-actiu .soci-card__avatar-initials { color: #fff !important; }
/* centre: logo, comptador i pista */
.roda__centre {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 52%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .4rem;
}
.roda__logo { width: 150px; height: auto; margin-bottom: .3rem; }
.roda .mural__compta { margin: 0; }
.roda__pista {
  font: 600 .78rem/1.4 'Montserrat', sans-serif;
  color: var(--text-light);
}

/* ── La fitxa: targeta que s'obre al costat de la rodona ── */
.roda-escena {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}
.roda-escena .socis-grid.mural.roda {
  flex: 0 0 auto;
  width: min(760px, 100%);
  margin: 0;
  transition: width .7s cubic-bezier(.2, .8, .2, 1);
}
.roda-escena.is-oberta .socis-grid.mural.roda { width: min(690px, 100%); }
.fitxa {
  position: relative;
  z-index: 2;
  flex: 0 0 370px;
  perspective: 1200px;
}
.fitxa[hidden] { display: none; }
.fitxa__card {
  position: relative;
  padding: 0 2rem 1.5rem;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 40px 70px -28px rgba(26, 26, 110, .55);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .65rem;
  overflow: hidden;
  opacity: 0;
  transform: translateX(80px) rotateY(-28deg) scale(.92);
  transform-origin: left center;
  transition: opacity .45s ease, transform .7s cubic-bezier(.2, .9, .25, 1.1);
}
.fitxa.is-open .fitxa__card { opacity: 1; transform: none; }
/* capçalera de color amb cercles que es mouen */
.fitxa__card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 128px;
  background:
    radial-gradient(circle at 15% 30%, rgba(255, 255, 255, .22) 0 34px, transparent 35px),
    radial-gradient(circle at 88% 85%, rgba(255, 255, 255, .14) 0 52px, transparent 53px),
    linear-gradient(120deg, var(--blue, #2f2f96), #9b2a85);
  background-size: 100% 100%, 100% 100%, 200% 100%;
  animation: fitxaCel 8s ease-in-out infinite alternate;
}
.fitxa--junta .fitxa__card::before {
  background:
    radial-gradient(circle at 15% 30%, rgba(255, 255, 255, .22) 0 34px, transparent 35px),
    radial-gradient(circle at 88% 85%, rgba(255, 255, 255, .14) 0 52px, transparent 53px),
    linear-gradient(120deg, var(--pink), #9b2a85, var(--blue, #2f2f96));
  background-size: 100% 100%, 100% 100%, 200% 100%;
}
@keyframes fitxaCel { to { background-position: 0 0, 0 0, 100% 0; } }
/* en obrir o canviar de persona, cada part entra una darrere l'altra */
.fitxa__card--canvi > *:not(.fitxa__tanca) { animation: fitxaCanvi .5s cubic-bezier(.2, .8, .2, 1) both; }
.fitxa__card--canvi > .fitxa__avatar { animation: fitxaAvatar .6s cubic-bezier(.34, 1.56, .64, 1) both; }
.fitxa__card--canvi > :nth-child(3) { animation-delay: .08s; }
.fitxa__card--canvi > :nth-child(4) { animation-delay: .14s; }
.fitxa__card--canvi > :nth-child(5) { animation-delay: .2s; }
.fitxa__card--canvi > :nth-child(6) { animation-delay: .26s; }
.fitxa__card--canvi > :nth-child(7) { animation-delay: .3s; }
.fitxa__card--canvi > :nth-child(8) { animation-delay: .34s; }
@keyframes fitxaCanvi { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes fitxaAvatar { from { opacity: 0; scale: .4; rotate: -20deg; } to { opacity: 1; scale: 1; rotate: 0deg; } }
.fitxa__tanca {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  cursor: pointer;
  transition: background .2s ease, transform .3s ease;
}
.fitxa__tanca svg { width: 17px; height: 17px; }
.fitxa__tanca:hover { background: rgba(255, 255, 255, .35); transform: rotate(90deg); }
.fitxa__avatar {
  position: relative;
  margin-top: 56px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: #fff;
  border: 6px solid #fff;
  box-shadow: 0 16px 30px -12px rgba(47, 47, 150, .55);
  display: grid;
  place-items: center;
}
/* anell que batega al voltant de l'avatar */
.fitxa__avatar::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(218, 26, 93, .5);
  animation: fitxaAnell 2.4s ease-out infinite;
}
@keyframes fitxaAnell { from { opacity: 1; scale: 1; } to { opacity: 0; scale: 1.3; } }
.fitxa__ini { font: 800 2.4rem/1 'Montserrat', sans-serif; color: var(--blue, #2f2f96); }
.fitxa--junta .fitxa__ini { color: var(--pink); }
.fitxa__rol {
  padding: .32rem .9rem;
  border-radius: 999px;
  background: rgba(47, 47, 150, .08);
  color: var(--blue, #2f2f96);
  font: 700 .7rem/1 'Montserrat', sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.fitxa--junta .fitxa__rol { background: var(--pink); color: #fff; }
.fitxa__nom { margin: 0; font: 800 1.65rem/1.2 'Montserrat', sans-serif; color: var(--text); }
.fitxa__estudis { margin: 0; font: 600 .88rem/1.4 'Montserrat', sans-serif; color: #9b2a85; }
.fitxa__text { margin: 0; font-size: .96rem; line-height: 1.65; color: var(--text-light); }
.fitxa__ig { font: 700 .86rem/1 'Montserrat', sans-serif; color: var(--pink); text-decoration: none; }
.fitxa__ig[hidden], .fitxa__estudis[hidden] { display: none; }
.fitxa__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: .8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(47, 47, 150, .08);
}
.fitxa__pos { font: 700 .78rem/1 'Montserrat', sans-serif; color: var(--text-light); letter-spacing: .08em; }
.fitxa__fletxa {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(47, 47, 150, .08);
  color: var(--blue, #2f2f96);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.fitxa__fletxa svg { width: 20px; height: 20px; }
.fitxa__fletxa:hover { background: var(--pink); color: #fff; transform: scale(1.08); }
.fitxa button:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.fitxa-fons { display: none; }

/* Pantalles estretes: la rodona ocupa tot l'ample i la fitxa puja des de baix */
@media (max-width: 1000px) {
  .roda-escena { display: block; }
  .roda-escena .socis-grid.mural.roda,
  .roda-escena.is-oberta .socis-grid.mural.roda { width: min(680px, 100%); margin: 0 auto; }
  .fitxa {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    perspective: none;
  }
  .fitxa__card {
    max-width: 520px;
    margin: 0 auto;
    border-radius: 28px 28px 0 0;
    padding-bottom: calc(1.3rem + env(safe-area-inset-bottom, 0px));
    max-height: 88vh;
    overflow-y: auto;
    transform: translateY(105%);
    transition: opacity .3s ease, transform .55s cubic-bezier(.2, .9, .25, 1);
  }
  .fitxa__avatar { width: 112px; height: 112px; margin-top: 48px; }
  .fitxa__card::before { height: 112px; }
  .fitxa-fons {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(26, 26, 110, .45);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .4s ease;
  }
  .fitxa-fons.is-open { opacity: 1; }
  .fitxa-fons[hidden] { display: none; }
}

@media (max-width: 700px) {
  .roda .soci-card { width: 64px; margin: -24px 0 0 -32px; gap: .12rem; }
  .roda .soci-card__avatar { width: 44px; height: 44px; border-width: 2px; }
  .roda .soci-card__avatar-initials { font-size: .8rem; }
  .roda .soci-card__name { font-size: 0; white-space: nowrap; }
  .roda .soci-card__name::after { content: attr(data-curt); font-size: .6rem; }
  .roda .soci-card__estrella { margin-left: 10px; width: 18px; height: 18px; }
  .roda .soci-card__estrella svg { width: 9px; height: 9px; }
  .roda__logo { width: 76px; }
  .roda .mural__num { font-size: 1.9rem; }
  .roda .mural__compta { font-size: .7rem; }
  .roda__pista { font-size: .66rem; }
}
@media (prefers-reduced-motion: reduce) {
  .roda::before, .roda.is-in .soci-card, .fitxa__card--canvi > *, .fitxa__card::before, .fitxa__avatar::after { animation: none; }
  .fitxa__card, .roda-escena .socis-grid.mural.roda { transition: none; }
}


/* Línies de l'organigrama: un SVG darrere les targetes que directiu.js
   dibuixa segons on són (així sempre encaixen, a qualsevol amplada) */
.junta-grid.organi { position: relative; }
.organi__cap, .organi__fila { position: relative; z-index: 1; }
.organi__linies {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.organi__linies path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.organi.is-in .organi__linies path { animation: orgTraç .45s ease-out both; animation-delay: var(--d, 0s); }
@keyframes orgTraç { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
/* amb l'organigrama les targetes no s'inclinen ni salten: les línies hi queden enganxades */
.organi .junta-card:hover { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .organi__linies path { stroke-dashoffset: 0; animation: none !important; }
}
.organi__linies.is-quiet path { stroke-dashoffset: 0; animation: none !important; }
