/* ============================================================
   interactions.css – Mil anys Pau i Treva
   Micro-interaccions, hover effects i redisseny de targetes
   Inspirat en el disseny de referència: imatge + categoria + títol + botó
   ============================================================ */

/* ── Scrollbar global ── */
:root {
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) rgba(59,37,7,0.15);
}
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: rgba(59,37,7,0.12); }
::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--color-accent-light); }

/* ========================
   NORMALITZACIÓ DE CONSISTÈNCIA (overrides Componentes css)
   – Botons: alçada uniforme, padding i font normalitzats
   – Cards: radi unificat
   – Section title: clamp coherent amb h2
   ======================== */

/* Botons: padding i font-size unificats per evitar mides desiguals
   entre Button.css (0.8rem 2rem / 0.9rem) i variants. */
.btn {
  padding: 0.75rem 1.75rem;
  font-size: var(--fs-sm);
  letter-spacing: 1.5px;
  border-radius: var(--radius-sm);
  line-height: 1.2;
}
.btn--small {
  padding: 0.5rem 1.1rem;
  font-size: var(--fs-xs);
}
.btn--large {
  padding: 1rem 2.25rem;
  font-size: var(--fs-base);
}

/* Filter buttons: alinea amb btn--small */
.filter-btn {
  padding: 0.55rem 1.4rem;
  font-size: var(--fs-xs);
  border-radius: var(--radius-sm);
}

/* Radi unificat per a totes les cards */
.card-resource,
.card-conferencia,
.card-experience,
.entry-card,
.card--parchment,
.colaborador-card,
.centre-participant-card {
  border-radius: var(--radius-md);
}

/* Agenda items: ja usaven 6px → mantenir alineat amb token */
.agenda-item {
  border-radius: var(--radius-md);
}

/* Section title: usar clamp en lloc de mides fixes (2.5rem / 1.8rem) */
.section-title__main {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
}
.section-title__label {
  font-size: var(--fs-xs);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.section-title__desc {
  font-size: 1.3rem;
  line-height: 1.7;
}

/* Hero de pàgina interior: h1 i paràgrafs sota el h1.page-typewriter
   Mides iguals als títols "giant" de l'index (section-title__main--giant). */
h1.page-typewriter {
  font-size: clamp(72px, 11vw, 180px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}
header .container p,
header.section--dark .container p {
  font-size: 2.2rem;
  line-height: 1.5;
}
header .container p[style*="font-style:italic"],
header .container p[style*="italic"],
header.section--dark .container p[style*="font-style:italic"],
header.section--dark .container p[style*="italic"] {
  font-size: 2.2rem;
}

/* Hero mòbil: títol i subtítol proporcionats */
@media (max-width: 768px) {
  h1.page-typewriter,
  header h1 {
    font-size: clamp(2.6rem, 13vw, 4.5rem) !important;
    line-height: 1.05 !important;
    letter-spacing: -0.02em !important;
  }
  header .container p,
  header.section--dark .container p,
  header .container p[style*="italic"],
  header.section--dark .container p[style*="italic"] {
    font-size: clamp(1rem, 3.5vw, 1.3rem) !important;
    line-height: 1.5 !important;
  }
}
@media (max-width: 480px) {
  h1.page-typewriter,
  header h1 {
    font-size: clamp(2.2rem, 12vw, 3.2rem) !important;
  }
}

/* Espaiat vertical de seccions homogeni */
.section-wrapper {
  padding-block: var(--space-xl);
}
@media (max-width: 768px) {
  .section-wrapper {
    padding-block: var(--space-lg);
  }
}


/* ========================
   TARGETES DE RECURSOS (card-resource)
   Redessenyed: imatge gran + categoria + títol + peu
   ======================== */
.card-resource {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  cursor: pointer;
}

.card-resource:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(59, 37, 7, 0.18);
  border-color: var(--color-accent);
}

/* Imatge: proporció fixada i efecte zoom subtle */
.card-resource__img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-surface);
  position: relative;
}

.card-resource__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.card-resource:hover .card-resource__img img {
  transform: scale(1.05);
}

/* Icona placeholder: centrada i gran */
.card-resource__img > span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3.5rem;
  transition: transform 0.3s ease;
}

.card-resource:hover .card-resource__img > span {
  transform: translate(-50%, -50%) scale(1.1);
}

/* Etiqueta de categoria */
.card-resource__type {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-accent);
  margin-bottom: 0.4rem;
  font-family: var(--font-sans);
  font-weight: 500;
}

/* Títol: serif prominent */
.card-resource__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--color-primary);
  line-height: 1.3;
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.card-resource:hover .card-resource__title {
  color: var(--color-accent);
}

.card-resource__desc {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.6;
  flex-grow: 1;
}

/* Peu de la targeta */
.card-resource__footer {
  padding: 0.75rem var(--space-sm);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(245, 230, 190, 0.35);
  transition: background 0.25s ease;
}

.card-resource:hover .card-resource__footer {
  background: rgba(196, 135, 58, 0.1);
}

/* ========================
   ENTRY CARDS (ThreeEntries)
   ======================== */
.entry-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-bottom: 3px solid transparent;
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    border-bottom-color 0.28s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.entry-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(59, 37, 7, 0.15);
  border-color: var(--color-border);
  border-bottom-color: var(--color-accent);
}

.entry-card__icon {
  font-size: 2.8rem;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  transition: transform 0.3s ease;
  display: block;
}

.entry-card:hover .entry-card__icon {
  transform: scale(1.15) rotate(-3deg);
}

.entry-card__title {
  font-size: 1.45rem;
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
  transition: color 0.2s ease;
}

.entry-card:hover .entry-card__title {
  color: var(--color-accent);
}

/* ========================
   CONFERÈNCIA CARDS
   ======================== */
.card-conferencia {
  border: 1px solid var(--color-border);
  border-left: 4px solid transparent;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-left-color 0.25s ease;
}

.card-conferencia:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(59, 37, 7, 0.15);
  border-left-color: var(--color-accent-light);
}

.card-conferencia__date {
  background-color: var(--color-primary);
  transition: background-color 0.25s ease;
}

.card-conferencia:hover .card-conferencia__date {
  background-color: var(--color-accent);
}

.card-conferencia__title {
  transition: color 0.2s ease;
}

.card-conferencia:hover .card-conferencia__title {
  color: var(--color-accent);
}

/* ========================
   CARD GENÈRICA (card--parchment)
   ======================== */
a.card--parchment,
article.card--parchment {
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

a.card--parchment:hover,
article.card--parchment:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(59, 37, 7, 0.18);
  border-color: var(--color-accent);
}

/* ========================
   BOTONS – Tots els variants
   Efecte "fill from bottom" (piscina que s'omple) + cantonades rodones al hover
   ======================== */

/* Base: transicions per a border-radius, color i lift */
.btn {
  transition:
    border-radius 0.25s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    transform 0.18s ease,
    box-shadow 0.22s ease;
}

/* Fill-from-bottom via ::before (z-index: -1 dins stacking context aïllada) */
.btn::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -100%;
  width: 100%;
  height: 100%;
  background-color: var(--btn-fill-color, var(--color-accent-light));
  border-radius: inherit;
  z-index: -1;
  transition: bottom 0.45s ease-out;
  pointer-events: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 37, 7, 0.2);
  border-radius: var(--radius-pill);
}

.btn:hover::before {
  bottom: 0;
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Primary – fons accent siena, fill daurat */
.btn--primary {
  --btn-fill-color: var(--color-accent-light);
  background-color: var(--color-accent);
  color: var(--color-white);
  border: 1px solid var(--color-accent);
}
.btn--primary:hover {
  color: var(--color-primary);
  border-color: var(--color-accent-light);
}

/* Outline – contorn marró fosc, fill daurat, text fosc */
.btn--outline {
  --btn-fill-color: var(--color-accent-light);
  background-color: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn--outline:hover {
  color: var(--color-primary);
  border-color: var(--color-accent-light);
}

/* Accent – igual que primary */
.btn--accent {
  --btn-fill-color: var(--color-accent-light);
  background-color: var(--color-accent);
  color: var(--color-white);
  border: 1px solid var(--color-accent);
}
.btn--accent:hover {
  color: var(--color-primary);
  border-color: var(--color-accent-light);
}

/* Yellow – CTA destacat */
.btn--yellow {
  --btn-fill-color: #b8780a;
  background-color: #E8A030;
  color: var(--color-primary);
  border: 1px solid #E8A030;
}
.btn--yellow:hover {
  color: var(--color-white);
  border-color: #b8780a;
}

/* Blue – Conferències */
.btn--blue {
  --btn-fill-color: #1D4ED8;
  background-color: #2563EB;
  color: #ffffff;
  border: 1px solid #2563EB;
}
.btn--blue:hover {
  color: #ffffff;
  border-color: #1D4ED8;
}

/* Ghost – fill subtil, sense canvi de text fosc */
.btn--ghost {
  --btn-fill-color: rgba(59, 37, 7, 0.08);
  color: var(--color-primary);
  background: transparent;
  border: 1px solid transparent;
}
.btn--ghost:hover {
  color: var(--color-accent);
  border-color: var(--color-border);
  transform: translateY(-1px);
}

/* Small: lift menys pronunciat */
.btn--small:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(59, 37, 7, 0.15);
}

/* ========================
   LINKS DE NAVEGACIÓ
   ======================== */
.navbar__link {
  position: relative;
  isolation: isolate;
  font-size: 0.82rem;
  padding: 8px 14px !important;
  border-radius: 5px;
  overflow: hidden;
  letter-spacing: 0.5px;
  color: var(--color-bg);
  transition: color 0.28s ease;
}

.navbar__toggle {
  color: var(--color-primary) !important;
}

/* Fons que s'omple de baix a dalt */
.navbar__link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-accent);
  transform: scaleY(0);
  transform-origin: bottom center;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 5px;
  z-index: -1;
}

/* Eliminem el subratllat anterior */
.navbar__link::after {
  display: none;
}

.navbar__link:hover::before {
  transform: scaleY(1);
}

.navbar__link:hover {
  color: #fff !important;
}

.navbar__link[aria-current="page"],
.navbar__link--active {
  color: #fff !important;
  font-weight: 600;
}

.navbar__link[aria-current="page"]::before,
.navbar__link--active::before {
  transform: scaleY(1);
  background: var(--color-accent);
}

.navbar__link[aria-current="page"]::after,
.navbar__link--active::after {
  display: none;
}

/* ========================
   FOOTER LINKS
   ======================== */
.footer__link {
  opacity: 0.7;
  color: rgba(253, 246, 227, 0.85);
  transition: opacity 0.2s ease, padding-left 0.2s ease, color 0.2s ease;
  display: inline-block;
}

.footer__link:hover {
  opacity: 1;
  padding-left: 6px;
  color: var(--color-accent-light);
}

/* ========================
   LOGO NAVBAR
   ======================== */
.navbar {
  height: auto;
  padding: 12px 0;
  background: var(--color-navbar-bg) !important;
  border-bottom: none !important;
  box-shadow: none !important;
  /* Només animem propietats composites (cap reflow) */
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
  will-change: background, box-shadow;
}

.navbar--scrolled {
  /* Mateixa altura i padding — sense reflow */
  padding: 12px 0;
  background: var(--color-navbar-bg) !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25),
              0 6px 20px -4px rgba(0, 0, 0, 0.35) !important;
}

.navbar__container {
  justify-content: flex-end;
  gap: 2rem;
  max-width: 100%;
  padding-inline-end: 2rem;
}

.navbar__logo {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  flex-shrink: 0;
  gap: 10px;
  margin-right: auto;
}

.navbar__logo-main {
  display: block;
  white-space: nowrap;
  line-height: 1.2;
  font-size: 1.85rem;
}

.navbar__logo-sub {
  display: block;
  white-space: nowrap;
  color: var(--color-accent-light);
  font-size: 1.85rem;
  letter-spacing: 2px;
  line-height: 1.2;
}

/* ========================
   AGENDA ITEMS
   ======================== */
.agenda-item {
  transition: background 0.22s ease, padding-left 0.22s ease;
  border-radius: 2px;
}

.agenda-item:hover {
  background: rgba(196, 135, 58, 0.08);
  padding-left: var(--space-xs);
}

.agenda-item__title {
  transition: color 0.2s ease;
}

.agenda-item:hover .agenda-item__title {
  color: var(--color-accent);
}

/* ========================
   STEPPER DOTS
   ======================== */
.stepper-dot {
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.stepper-item:hover .stepper-dot {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
  transform: scale(1.1);
}

.stepper-title {
  transition: color 0.2s ease;
}

.stepper-item:hover .stepper-title {
  color: var(--color-accent);
}

/* ========================
   ETAPA TABS
   ======================== */
.etapa-tab {
  transition: color 0.2s ease, background 0.2s ease;
  border-radius: 2px 2px 0 0;
}

.etapa-tab:hover:not(.etapa-tab--active) {
  background: rgba(196, 135, 58, 0.08);
  color: var(--color-primary);
}

/* ========================
   FILTER BUTTONS
   ======================== */
.filter-btn {
  transition:
    background-color 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    transform 0.18s ease;
}

.filter-btn:hover:not(.filter-btn--active) {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-1px);
}

.filter-btn--active {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
  transform: none;
}

/* ========================
   IMATGES D'EXPERIÈNCIA
   ======================== */
.experiences-preview__img-wrapper {
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.experiences-preview__img-wrapper:hover {
  border-color: var(--color-accent);
  box-shadow: 0 6px 20px rgba(59, 37, 7, 0.15);
}

.experiences-preview__img-wrapper img {
  transition: transform 0.4s ease;
}

.experiences-preview__img-wrapper:hover img {
  transform: scale(1.06);
}

/* ========================
   FORM INPUTS – Focus elegant
   ======================== */
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-accent);
  background-color: var(--color-white);
  box-shadow: 0 0 0 3px rgba(196, 135, 58, 0.15);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ========================
   HERO – Indicador de scroll
   ======================== */
.hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(253, 246, 227, 0.65);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.hero__scroll-hint svg {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

.hero__scroll-hint.is-hidden {
  opacity: 0;
}

@media (max-width: 768px) {
  .hero__scroll-hint {
    bottom: 1.25rem;
    font-size: 0.65rem;
  }
}

/* ========================
   HERO – Botons: hover enriquit
   ======================== */
.hero__actions .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(59, 37, 7, 0.4);
  border-radius: var(--radius-pill);
}

.hero__actions .btn--outline:hover {
  box-shadow: 0 8px 24px rgba(196, 135, 58, 0.45);
}

.hero__actions .btn--primary:hover {
  box-shadow: 0 8px 24px rgba(139, 69, 19, 0.5);
}

.hero__actions .btn--yellow:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 28px rgba(232, 160, 48, 0.55);
}

/* ========================
   TOAST (notificació)
   ======================== */
.toast {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary);
  color: var(--color-accent-light);
  border: 1px solid var(--color-accent);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  max-width: 360px;
  z-index: 9999;
  transform: translateY(120%);
  opacity: 0;
  animation: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
  pointer-events: none;
}

.toast--visible {
  transform: translateY(0);
  opacity: 1;
}

.toast--error {
  background: #3d0a0a;
  border-color: #c0392b;
  color: #f5a5a5;
}

/* ========================
   SECCIÓ TÍTOLS – Línia decorativa animada
   ======================== */
.section-title__main::after {
  transition: width 0.4s ease;
  width: 60px;
}

/* Animació quan la secció és visible (s'afegeix per JS) */
.section-visible .section-title__main::after {
  width: 120px;
}

/* ========================
   SCROLL-REVEAL – Animació d'entrada
   Afegida automàticament per main.js amb IntersectionObserver
   ======================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Delay escalonat per a grups de targetes */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ========================
   MAPA LEAFLET – Cursor personalitzat
   ======================== */
.leaflet-container {
  cursor: crosshair;
}

.leaflet-marker-icon {
  transition: filter 0.2s ease;
}

.leaflet-marker-icon:hover {
  filter: brightness(1.3);
}

/* ========================
   RESPONSIVE: desactivar hover lift en mòbil
   (evita que quedi enganxat al tàctil)
   ======================== */
@media (hover: none) {
  .card-resource:hover,
  .entry-card:hover,
  .card-conferencia:hover,
  .btn:hover,
  a.card--parchment:hover,
  article.card--parchment:hover {
    transform: none;
    box-shadow: var(--shadow);
  }
}

/* ========================
   MÒBIL – Carrusel de conferències
   Alçada explícita als slides (com exp-carousel fa 320px als img-wrappers)
   perquè flex-grow:1 funcioni dins de card-conferencia
   ======================== */
@media (max-width: 768px) {
  .conf-carousel__track {
    overflow-x: scroll !important;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transform: none !important;
  }
  .conf-carousel__track::-webkit-scrollbar { display: none; }
  .conf-carousel__slide {
    scroll-snap-align: start;
    padding: 0.4rem 0.5rem !important;
    flex-shrink: 0;
    height: 330px;
  }
  /* La card estira fins a 330px (align-items:stretch del slide flex-row)
     → flex-direction:column amb altura definida → flex-grow distribueix */
  .conf-carousel__slide .card-conferencia__img {
    height: 120px !important;
  }
  .conf-carousel__btn--prev { left: 2px; }
  .conf-carousel__btn--next { right: 2px; }
}

/* ========================
   RECURSOS DESTACATS — estil cc-card
   ======================== */
.card-resource {
  background: #fdf3dc;
  border-radius: 18px;
  border: none;
  box-shadow: 0 4px 24px rgba(42,22,4,.18), 0 1px 4px rgba(42,22,4,.1);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card-resource:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(42,22,4,.25);
  border-color: transparent;
}
.card-resource__img {
  border-bottom: none;
}
.card-resource__footer {
  border-top: none;
  padding: var(--space-sm) var(--space-md) var(--space-md);
}

/* ========================
   ICONES SVG DEL PROJECTE
   ======================== */
.icon-svg {
  display: block;
  margin: 0 auto;
  filter: brightness(0) saturate(100%) invert(28%) sepia(100%) saturate(400%) hue-rotate(350deg);
}
.icon-svg--light {
  display: block;
  margin: 0 auto;
  filter: brightness(0) invert(1) sepia(20%) saturate(300%) hue-rotate(20deg) brightness(1.05);
}

/* Botó d'inscripció (summary) – contorn daurat, rellena en hover */
.summary-inscripcio {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--color-accent-light);
  background: transparent;
  color: var(--color-accent-light);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  transition: var(--transition);
}
.summary-inscripcio:hover {
  background: var(--color-accent-light);
  color: var(--color-white);
}

/* ========================
   CONFERÈNCIES: text explicatiu més llegible
   ======================== */
.conferencia-detail p {
  font-size: 1.1rem;
  line-height: 1.85;
}

/* ========================
   AGENDA: items destacats del fons de pergamí
   ======================== */
.agenda-item {
  background: rgba(255, 252, 240, 0.75);
  border-radius: 6px;
  border: 1px solid rgba(139, 69, 19, 0.18);
  border-bottom: 1px solid rgba(139, 69, 19, 0.18);
  padding: var(--space-md);
}

.agenda-item__title {
  font-size: 1.15rem;
}

.agenda-item__date {
  font-size: 1.1rem;
}

/* ============================================================
   MILLORES MODERNES — Franci (UI Expert)
   ============================================================ */

/* Micro-interaccions modernes amb cubic-bezier i GPU hints */
.card-resource,
.entry-card,
.card-conferencia,
a.card--parchment,
article.card--parchment {
  will-change: transform;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.25s ease;
}

/* Shimmer subtil al hover de cards */
.card-resource, .entry-card { position: relative; }
.card-resource::before,
.entry-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(196, 135, 58, 0.10), transparent);
  transition: left 0.8s ease;
  pointer-events: none;
  z-index: 1;
}
.card-resource:hover::before,
.entry-card:hover::before { left: 100%; }

/* Botons: fill-from-bottom + ripple-light al click */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.35) 0%, transparent 60%);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.btn:active::after { opacity: 1; transition: opacity 0.05s ease; }

/* Reveal millorat */
.reveal {
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Scroll-driven animations (Chrome 115+) */
@supports (animation-timeline: view()) {
  .reveal {
    animation: revealOnScroll linear both;
    animation-timeline: view();
    animation-range: entry 5% cover 25%;
  }
  @keyframes revealOnScroll {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* Hero scroll hint: bounce subtil */
@keyframes scrollHintBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}
.hero__scroll-hint:not(.is-hidden) {
  animation: scrollHintBounce 2.2s ease-in-out infinite;
}

/* ========================
   BOTONS cc-btn: unificació amb btn--accent / btn--outline
   (overrides ConferenciesCarousel.css i CardResource)
   ======================== */
.cc-btn-accent {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background-color: var(--color-accent);
  color: var(--color-white);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.5rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: border-radius 0.25s ease, color 0.22s ease,
              border-color 0.22s ease, transform 0.18s ease, box-shadow 0.22s ease;
}
.cc-btn-accent::before {
  content: '';
  position: absolute;
  left: 0; bottom: -100%;
  width: 100%; height: 100%;
  background-color: var(--color-accent-light);
  z-index: -1;
  transition: bottom 0.45s ease-out;
  pointer-events: none;
}
.cc-btn-accent:hover {
  color: var(--color-primary);
  border-color: var(--color-accent-light);
  border-radius: var(--radius-pill);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 37, 7, 0.2);
}
.cc-btn-accent:hover::before { bottom: 0; }

.cc-btn-ghost {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background-color: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.5rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: border-radius 0.25s ease, color 0.22s ease,
              border-color 0.22s ease, transform 0.18s ease, box-shadow 0.22s ease;
}
.cc-btn-ghost::before {
  content: '';
  position: absolute;
  left: 0; bottom: -100%;
  width: 100%; height: 100%;
  background-color: var(--color-accent-light);
  z-index: -1;
  transition: bottom 0.45s ease-out;
  pointer-events: none;
}
.cc-btn-ghost:hover {
  color: var(--color-primary);
  border-color: var(--color-accent-light);
  border-radius: var(--radius-pill);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 37, 7, 0.2);
}
.cc-btn-ghost:hover::before { bottom: 0; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVITAT MÒBIL — Auditoria 10 pàgines
   ============================================================ */

/* Tablet (≤960px) */
@media (max-width: 960px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
}

/* Mòbil (≤768px) */
@media (max-width: 768px) {
  /* Tipografia fluida */
  h1 { font-size: clamp(1.75rem, 6vw, 2.5rem) !important; line-height: 1.2; }
  h2, .section-title__main { font-size: clamp(1.4rem, 5vw, 2rem) !important; }
  h3 { font-size: clamp(1.15rem, 4.5vw, 1.5rem) !important; }

  /* Hero */
  .hero, .hero--home { padding: var(--space-lg) 1rem; }
  .hero__actions { flex-direction: column; gap: var(--space-sm); width: 100%; }
  .hero__actions .btn { width: 100%; justify-content: center; }

  /* Sections */
  .section-wrapper { padding: var(--space-lg) 0 !important; }

  /* Grids col·lapsen */
  .grid, [class*="grid--"], .three-entries, .features-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-md);
  }

  /* Cards padding */
  .card--parchment, .entry-card { padding: var(--space-md) !important; }

  /* Footer stacking */
  .footer__grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-md);
    text-align: center;
  }
  .footer__bottom { flex-direction: column; gap: var(--space-xs); text-align: center; }

  /* Subnav d'àncores: scroll horitzontal */
  nav[aria-label="Subapartats"] > .container {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    justify-content: flex-start !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  nav[aria-label="Subapartats"] > .container::-webkit-scrollbar { display: none; }
  nav[aria-label="Subapartats"] .btn { flex-shrink: 0; }

  /* Mapa */
  #mapHome, #mapFull { height: 320px !important; }

  /* Toast amplada útil */
  .toast {
    left: var(--space-sm);
    right: var(--space-sm);
    bottom: var(--space-sm);
    max-width: none;
  }

  /* Filtre: scroll horitzontal */
  .filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-btn { flex-shrink: 0; white-space: nowrap; }
}

/* Mòbil petit (≤480px) */
@media (max-width: 480px) {
  .navbar__container { padding: 0 0.75rem; }
  .navbar__logo-main { font-size: 1.2rem; }
  .navbar__logo-sub { font-size: 0.75rem; }
  #mapHome, #mapFull { height: 280px !important; }
}

/* Targets tàctils (mín. 44×44px segons HIG) */
@media (pointer: coarse) {
  .btn, .filter-btn {
    min-height: 44px;
  }
  .btn--small { min-height: 38px; }
}

/* ── HERO TYPEWRITER CURSOR ── */
.hero-cursor {
  display: inline-block;
  width: 0.5ch;
  height: 0.88em;
  background: var(--color-accent-light);
  margin-left: 0.06em;
  vertical-align: -0.06em;
  animation: heroBlinkCursor 1.05s steps(2, end) infinite;
}
.hero-cursor.done { animation: heroBlinkCursor 1.4s steps(2, end) infinite; opacity: 0.4; }
.hero-cursor.gone { display: none; }
@keyframes heroBlinkCursor { 50% { opacity: 0; } }

/* ========================
   SCROLL REVEAL
   ======================== */
.sr {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.sr--visible {
  opacity: 1;
  transform: translateY(0);
}
/* Delays per a elements fills */
.sr:nth-child(2) { transition-delay: 0.1s; }
.sr:nth-child(3) { transition-delay: 0.2s; }

/* ========================
   CONNEXIONS — seccions pantalla completa
   ======================== */
.connexio-section {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}
.connexio-section--dark {
  background-color: var(--color-primary);
}
.connexio-section--aged {
  background-color: var(--color-bg);
}
.connexio-section__visual {
  position: relative;
  overflow: hidden;
  min-height: 300px;
}
.connexio-section__visual-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.connexio-section__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 60%, #1a0e03 100%);
  opacity: 0.7;
}
.connexio-section--aged .connexio-section__placeholder {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-accent-light) 50%, var(--color-accent) 100%);
  opacity: 0.5;
}
.connexio-section__placeholder-icon {
  position: absolute;
  font-size: clamp(5rem, 12vw, 10rem);
  opacity: 0.18;
  user-select: none;
  pointer-events: none;
}
.connexio-section__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) clamp(var(--space-lg), 6vw, 6rem);
}
.connexio-section__label {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.connexio-section__label::after {
  content: '';
  display: block;
  height: 1px;
  width: 3rem;
  background: var(--color-accent-light);
  opacity: 0.5;
}
.connexio-section--aged .connexio-section__label {
  color: var(--color-accent);
}
.connexio-section--aged .connexio-section__label::after {
  background: var(--color-accent);
}
.connexio-section__name {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: 0.95;
  letter-spacing: -2px;
  color: var(--color-accent-light);
  margin-bottom: var(--space-md);
  font-style: italic;
}
.connexio-section--aged .connexio-section__name {
  color: var(--color-primary);
}
.connexio-section__role {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  color: rgba(253, 246, 227, 0.6);
  margin-bottom: var(--space-md);
  font-style: italic;
}
.connexio-section--aged .connexio-section__role {
  color: var(--color-text-light);
}
.connexio-section__desc {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.8;
  color: rgba(253, 246, 227, 0.8);
  max-width: 440px;
  margin-bottom: var(--space-lg);
}
.connexio-section--aged .connexio-section__desc {
  color: var(--color-text);
}
/* Botons outline sobre fons fosc amb text daurat: fill crema per evitar text invisible */
.btn--on-dark {
  --btn-fill-color: var(--color-bg);
}
.btn--on-dark:hover {
  color: var(--color-primary) !important;
  border-color: var(--color-bg) !important;
}

.connexio-section .btn--outline {
  --btn-fill-color: var(--color-bg);
  border-color: var(--color-accent-light);
  color: var(--color-accent-light);
  align-self: flex-start;
}
.connexio-section .btn--outline:hover {
  color: var(--color-primary);
  border-color: var(--color-bg);
}
.connexio-section--aged .btn--outline {
  --btn-fill-color: var(--color-accent-light);
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.connexio-section--aged .btn--outline:hover {
  color: var(--color-primary);
  border-color: var(--color-accent-light);
}

/* Ordre invers: text esquerra, imatge dreta */
.connexio-section--reverse .connexio-section__content {
  order: -1;
}

/* ========================
   CONTACT FINAL — "CONNECTEM"
   ======================== */
.contact-final {
  background-color: var(--color-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: calc(var(--space-xl) * 1.5) var(--space-lg) calc(var(--space-xl) * 4.5);
}
.contact-final__word {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 12.5vw, 12rem);
  line-height: 0.9;
  color: var(--color-accent-light);
  opacity: 0.15;
  letter-spacing: -4px;
  pointer-events: none;
  user-select: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  max-width: 100vw;
}
.contact-final__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}
.contact-final__title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--color-accent-light);
  letter-spacing: -1px;
  font-style: italic;
  line-height: 1.1;
}
.contact-final__sub {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  color: rgba(253, 246, 227, 0.65);
  max-width: 480px;
  line-height: 1.7;
}

/* ========================
   CONNEXIONS — responsiu mòbil
   ======================== */
@media (max-width: 768px) {
  .connexio-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .connexio-section__visual {
    min-height: 220px;
    order: 0 !important;
  }
  .connexio-section--reverse .connexio-section__content {
    order: 0;
  }
  .connexio-section__content {
    padding: var(--space-lg) var(--space-md);
  }
  .contact-final__word {
    font-size: clamp(3rem, 18vw, 8rem);
  }
}
.sr:nth-child(4) { transition-delay: 0.3s; }

/* ========================
   CONNEXIONS — SCROLL PINNING (stacking cards)
   ======================== */
.connexions-stack {
  position: relative;
  padding: 0 1.5rem 2rem;
}

/* spacer entre targetes: dona temps de "dwell" a cada card */
.connexio-spacer {
  height: 80vh;
}

.connexions-stack .connexio-section {
  position: sticky;
  top: 10vh;
  height: 78vh;
  min-height: unset;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 8px 60px rgba(0, 0, 0, 0.14);
  will-change: transform, opacity;
  transform-origin: center center;
}

/* Línia de metadades (origen · preu) sota la descripció */
.connexio-section__meta {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  color: var(--color-accent);
  margin-top: var(--space-sm);
}

/* Fila de botons d'acció a les targetes de Connexions */
.connexio-section__actions,
.cantautor-card__info .connexio-section__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

/* Evita que el contingut (i els botons) quedi tallat per l'alçada fixa
   de les targetes apilades: es pot desplaçar internament si cal */
.connexions-stack .connexio-section__content {
  overflow-y: auto;
  padding-bottom: var(--space-lg);
}

/* z-index per ordre directe en el contenidor */
.connexions-stack .connexio-section:nth-of-type(1) { z-index: 1; }
.connexions-stack .connexio-section:nth-of-type(2) { z-index: 2; }
.connexions-stack .connexio-section:nth-of-type(3) { z-index: 3; }
.connexions-stack .connexio-section:nth-of-type(4) { z-index: 4; }
.connexions-stack .connexio-section:nth-of-type(5) { z-index: 5; }

/* ---- estil blanc (connexio-section--white) ---- */
.connexio-section--white {
  background: #fff;
  grid-template-columns: 55% 45%;
}
.connexio-section--white .connexio-section__content {
  order: 0;
  padding: clamp(var(--space-lg), 6vw, 5rem) clamp(var(--space-lg), 5vw, 5rem);
  justify-content: center;
  background: #fff;
}
.connexio-section--white .connexio-section__label {
  color: var(--color-accent);
  font-size: var(--fs-xs);
  letter-spacing: 3px;
}
.connexio-section--white .connexio-section__label::after {
  background: var(--color-accent);
}
.connexio-section--white .connexio-section__name {
  font-size: clamp(3rem, 5.5vw, 6.5rem);
  color: var(--color-primary);
  letter-spacing: -2px;
}
.connexio-section--white .connexio-section__role {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  color: var(--color-accent);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: inline-block;
  border: 1px solid var(--color-accent-light);
  border-radius: 2rem;
  padding: 0.2em 0.9em;
  margin-bottom: var(--space-md);
}
.connexio-section--white .connexio-section__desc {
  color: #555;
  font-size: var(--fs-base);
  line-height: 1.75;
  max-width: 420px;
}
/* zona visual: fons blanc amb padding per tots costats — imatge inset */
.connexio-section--white .connexio-section__visual {
  background: #fff;
  /* el padding visual el fem via inset a l'inner */
}
.connexio-section--white .connexio-section__visual-inner {
  /* sobreescriu inset: 0 del base per crear el marge blanc al voltant */
  inset: 2rem 2rem 2rem 1.5rem;
  /* 3 cantonades rectes, bottom-left corba (com la referència) */
  border-radius: 0 0 0 4rem;
  overflow: hidden;
}
.connexio-section--white .connexio-section__placeholder {
  background: linear-gradient(135deg, #f5e6c8 0%, #e8c98a 50%, #c4873a 100%);
  opacity: 0.65;
}

/* botó en context blanc */
.btn--connexio {
  align-self: flex-start;
  margin-top: var(--space-sm);
  border-color: var(--color-accent);
  cursor: pointer;
  color: var(--color-accent);
  --btn-fill-color: var(--color-accent-light);
}
.btn--connexio:hover {
  color: var(--color-primary);
  border-color: var(--color-accent-light);
}

/* ---- mòbil ---- */
@media (max-width: 768px) {
  .connexions-stack {
    padding: 0;
  }
  .connexio-spacer {
    display: none;
  }
  .connexions-stack .connexio-section {
    position: relative;
    top: 0;
    height: auto;
    border-radius: 0;
    box-shadow: none;
  }
  .connexio-section--white {
    grid-template-columns: 1fr;
  }
  .connexio-section--white .connexio-section__visual {
    min-height: 220px;
    padding: 1rem;
    order: -1;
  }
  .connexio-section--white .connexio-section__visual-inner {
    position: relative;
    height: 220px;
  }
}

/* ── PARTICIPA CARDS mòbil: amaga el reveal, la face ja és visible per ParticipaCurtain.css ── */
@media (max-width: 768px) {
  .participa-card__reveal {
    display: none !important;
  }
}

/* ── PARTICIPA CARDS: imatge + títol ── */
.participa-card__face {
  gap: 0;
  justify-content: flex-end;
  padding: 0;
}

.participa-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
  z-index: 0;
  opacity: 0.88;
  mix-blend-mode: luminosity;
  filter: sepia(0.3) contrast(1.05);
}

.participa-card__face .participa-card__name {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 16px 20px 20px;
  background: linear-gradient(to top, oklch(18% 0.02 60 / 0.88) 0%, transparent 100%);
  border-radius: 0 0 16px 16px;
  text-align: left;
  margin: 0;
}

/* ── CONNEXIONS: imatge al visual ── */
.connexio-section__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

/* --white: visual-inner sense inset i sense tall perquè la il·lustració es vegi sencera */
.connexio-section--white .connexio-section__visual-inner {
  inset: 0;
  border-radius: 0;
  overflow: visible;
}

/* Laura de Castellet: foto al costat del nom, descripció a sota amb tot l'ample */
.laura-name-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}
.laura-name-row__photo {
  width: 180px;
  height: 180px;
  margin-top: -1.5rem;
  flex-shrink: 0;
  border: 4px solid var(--color-accent-light);
  border-radius: 4px;
  box-shadow: 3px 3px 10px rgba(59,37,7,0.15);
  object-fit: cover;
}
#laura-castellet .connexio-section__desc {
  margin: 0 0 0.75rem;
  line-height: 1.5;
  max-width: none;
}
@media (max-width: 600px) {
  .laura-name-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .laura-name-row__photo {
    width: 110px;
    height: 110px;
    margin-top: 0;
  }
}

/* Compactar la secció de Laura perquè el botó no quedi tallat (alçada fixa de la stack) */
#laura-castellet .connexio-section__name {
  font-size: clamp(2.5rem, 5vw, 5rem);
  margin-bottom: 0.5rem;
}
#laura-castellet .connexio-section__role {
  margin-bottom: 0.5rem;
}

/* ── CANTAUTORS: grid de targetes ── */
.cantautors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  grid-column: 1 / -1;
  width: 100%;
  background: inherit;
}

.cantautor-card {
  display: flex;
  flex-direction: row;
  gap: var(--space-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(139, 69, 19, 0.2);
  border-radius: 12px;
  padding: var(--space-md);
  flex: 1 1 340px;
  max-width: 520px;
}

.cantautor-card__photo-wrap {
  flex-shrink: 0;
  width: 130px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 8px;
}

.cantautor-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.cantautor-card__info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cantautor-card__name {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  color: var(--color-primary);
  margin: 0;
}

.cantautor-card__origin {
  font-size: 0.8rem;
  color: var(--color-accent);
  font-style: italic;
  margin: 0;
}

.cantautor-card__style {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-accent-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.cantautor-card__desc {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.5;
  margin: 0.4rem 0 0;
  flex: 1;
}

.cantautor-card__price {
  font-size: 0.9rem;
  color: var(--color-accent);
  margin: 0.5rem 0 0.6rem;
}

@media (max-width: 600px) {
  .cantautor-card {
    flex-direction: column;
    max-width: 100%;
  }
  .cantautor-card__photo-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
  }
}

/* ============================================================
   FORMULARIS — Redisseny premium (overrides Componentes css/)
   ============================================================ */

/* ── Modal: contenidor ── */
.modal {
  border-radius: var(--radius-lg);
  border: none;
  box-shadow:
    0 2px 8px rgba(59, 37, 7, 0.06),
    0 12px 40px rgba(59, 37, 7, 0.18),
    0 32px 80px rgba(59, 37, 7, 0.14);
  /* overflow:visible perquè el botó de tancar (posicionat a la cantonada) no quedi
     retallat per l'arrodoniment — l'arrodoniment es trasllada a capçalera/cos */
  overflow: visible;
}

/* ── Modal: capçalera ── */
.modal__header {
  background: linear-gradient(135deg, var(--color-primary) 0%, #5a3510 100%);
  border-bottom: none;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  position: relative;
  overflow: hidden;
}

.modal__header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space-lg);
  right: var(--space-lg);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 135, 58, 0.5), transparent);
}

.modal__header h3 {
  color: var(--color-accent-light) !important;
  font-family: var(--font-serif) !important;
  font-size: 1.5rem !important;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* ── Modal: botó de tancar ── */
.modal__close {
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 5;
  transform: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(196, 135, 58, 0.15);
  border: 1px solid rgba(196, 135, 58, 0.35);
  color: var(--color-accent-light) !important;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  padding: 0;
}

.modal__close:hover {
  background: rgba(196, 135, 58, 0.30);
  border-color: rgba(196, 135, 58, 0.65);
  transform: rotate(90deg);
}

/* ── Modal: cos ── */
.modal__body {
  padding: var(--space-lg);
  background: var(--color-white);
}
.modal__body:last-child,
.modal__footer:last-child {
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  overflow: hidden;
}

/* ── Contenidor de formulari ── */
.form-adhesio {
  background: transparent;
  border: none;
  padding: 0;
}

/* Quan el formulari és també una card--parchment, li cal padding propi */
.form-adhesio.card--parchment {
  padding: var(--space-lg) var(--space-xl);
}

/* ── Grup de camp ── */
.form-group {
  margin-bottom: var(--space-md);
}

/* ── Labels ── */
.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--color-text-light) !important;
  margin-bottom: 0.4rem;
  display: block;
}

/* ── Inputs, textareas i selects ── */
.form-input,
.form-textarea,
.form-select {
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background-color: #fffdf7;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--color-text);
  box-shadow: inset 0 1px 3px rgba(59, 37, 7, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(107, 79, 42, 0.45);
  font-style: italic;
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
  border-color: var(--color-accent-light);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-accent);
  background-color: #ffffff;
  box-shadow:
    inset 0 1px 3px rgba(59, 37, 7, 0.04),
    0 0 0 3px rgba(196, 135, 58, 0.18);
}

/* Select: fletxa personalitzada */
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238B4513' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Textarea: resize només vertical */
.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

/* ── Etiquetes de checkboxes (grup etapes educatives) ── */
.form-group label:has(input[type="checkbox"]) {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-text);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-group label:has(input[type="checkbox"]):hover {
  border-color: var(--color-accent-light);
  background: rgba(196, 135, 58, 0.07);
}

.form-group label:has(input[type="checkbox"]:checked) {
  border-color: var(--color-accent);
  background: rgba(139, 69, 19, 0.09);
}

/* ── Checkbox base ── */
.form-input[type="checkbox"],
input[type="checkbox"].form-checkbox {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--color-border);
  background: #fffdf7;
  cursor: pointer;
  accent-color: var(--color-accent);
  box-shadow: none;
  padding: 0;
}

/* ── Consentiment ── */
.form-group--consent {
  padding: var(--space-sm) var(--space-md);
  background: rgba(196, 135, 58, 0.06);
  border-radius: var(--radius-md);
  border: 1px solid rgba(196, 135, 58, 0.18);
  margin-bottom: var(--space-md);
}

.form-label--consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.5;
  font-family: var(--font-sans);
}

.form-consent-link {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: rgba(139, 69, 19, 0.4);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.form-consent-link:hover {
  color: var(--color-primary);
  text-decoration-color: var(--color-primary);
}

/* ── Missatges d'error ── */
.form-error {
  display: block;
  font-size: 0.78rem;
  color: #b33a1a;
  margin-top: 0.35rem;
  font-family: var(--font-sans);
  font-style: italic;
}

/* ── Botó enviar: arrodonit i prominent ── */
.form-adhesio .btn--accent,
.form-adhesio .btn--outline,
.form-adhesio [type="submit"] {
  border-radius: var(--radius-md);
  padding: 1rem 1.75rem;
  font-size: 0.85rem;
  letter-spacing: 2px;
  font-weight: 700;
}

/* ── Upload area (FormExperiencia) ── */
.form-experiencia__upload {
  border-radius: var(--radius-md);
  border: 2px dashed var(--color-accent-light);
  background: rgba(196, 135, 58, 0.04);
}

.form-experiencia__upload:hover {
  background: rgba(196, 135, 58, 0.09);
  border-color: var(--color-accent);
}

/* ── Responsiu: mòbil ── */
@media (max-width: 768px) {
  .modal__body {
    padding: var(--space-md);
  }
  .modal__header {
    padding: var(--space-md);
  }
}

@media (max-width: 480px) {
  .modal {
    border-radius: var(--radius-md);
  }
}

@media (max-width: 768px) {
  .form-adhesio.card--parchment {
    padding: var(--space-md);
  }
}

/* ── PARTICIPA CURTAIN: text més gran ── */
.participa-reveal-title {
  font-size: clamp(16px, 1.6vw, 22px);
}

.participa-reveal-desc {
  font-size: clamp(14px, 1.1vw, 16px);
  -webkit-line-clamp: 5;
}

/* ── PESTANYES DE CONTACTE (formulari acompanyament) ── */
.contact-tabs {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-xs);
}
.contact-tab {
  padding: 0.5rem 1.2rem;
  border: 1.5px solid var(--color-accent);
  border-radius: 4px;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-accent);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.contact-tab--active,
.contact-tab:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ── MODAL SCROLL — el modal ha de fer scroll intern, no el body ── */
.modal-overlay {
  overflow-y: auto !important;
  align-items: flex-start !important;
  padding: var(--space-md) 0;
}
.modal {
  overflow-y: visible !important;
  max-height: none !important;
  margin: auto;
}

/* ── HERO ESTÀTIC — mides definitives (aquí per cache-busting) ── */
.hero-static__eyebrow {
  font-size: clamp(1.8rem, 4vw, 2.4rem) !important;
}
.hero-static__title {
  font-size: clamp(2rem, 15vw, 10rem) !important;
}

/* ─── Page Back Bar ──────────────────────────────────────────── */
.page-back-bar {
  background: transparent;
  border-bottom: 1px solid var(--color-border);
  padding: 0.9rem 0;
}
.page-back-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.page-back-bar__breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 1.75rem;
  color: var(--color-text-light);
}
.page-back-bar__home {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}
.page-back-bar__home:hover { color: var(--color-primary); text-decoration: underline; }
.page-back-bar__sep { opacity: 0.5; }
.page-back-bar__current { color: var(--color-text-light); font-style: italic; }

/* ─── Next-Step CTA (al final de pàgines sense CTA final) ───── */
.next-step-cta {
  padding: var(--space-lg) 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
}
.next-step-cta__label {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-text-light);
  display: block;
  margin-bottom: var(--space-sm);
}
.next-step-cta__actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* Fila de selects per filtrar la grid de recursos */
.filter-bar--selects {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}
.filter-select {
  min-width: 200px;
  max-width: 280px;
  padding: 0.55rem 2.2rem 0.55rem 0.9rem;
  border: 1.5px solid var(--color-accent);
  border-radius: 3px;
  background-color: var(--color-bg);
  color: var(--color-primary);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238B4513' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-select:hover { border-color: var(--color-accent-light); }
.filter-select:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(139,69,19,0.18); }

/* Separador visual entre filtres i links de navegació */
.filter-bar--links {
  border-top: 1px solid rgba(139,69,19,0.2);
  padding-top: var(--space-sm);
  margin-top: var(--space-xs) !important;
}

/* Filter button that acts as a link (orientacions didàctiques) */
.filter-btn--link {
  text-decoration: none;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: var(--color-bg) !important;
  border-color: var(--color-accent);
  font-weight: 600;
}
.filter-btn--link:hover {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
  color: var(--color-primary) !important;
  transform: translateY(-1px);
}

/* Prevent mobile drawer flash on desktop */
@media (min-width: 768px) {
  .navbar__mobile-drawer { display: none !important; }
}

/* ============================================================
   Cookie consent banner
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  left: auto;
  transform: translateY(20px);
  width: 260px;
  max-width: 260px;
  background: var(--color-primary);
  color: var(--color-bg);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-family: var(--font-sans);
}

.cookie-banner__content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}

.cookie-banner__text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cookie-banner__text strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-bg);
}

.cookie-banner__text span {
  font-size: 0.82rem;
  color: rgba(245, 230, 200, 0.82);
  line-height: 1.4;
}

.cookie-banner__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.cookie-banner__btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
  width: 100%;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cookie-banner__btn--reject {
  background: transparent;
  color: var(--color-bg);
  border-color: rgba(245, 230, 200, 0.4);
}

.cookie-banner__btn--reject:hover {
  border-color: var(--color-bg);
}

.cookie-banner__btn--accept {
  background: var(--color-accent-light);
  color: var(--color-primary);
  border-color: var(--color-accent-light);
}

.cookie-banner__btn--accept:hover {
  background: var(--color-bg);
  border-color: var(--color-bg);
}

@media (max-width: 500px) {
  .cookie-banner {
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
    max-width: 100%;
    bottom: 0.5rem;
  }
}

/* Modal preguntes: amplada augmentada */
.modal-overlay#modal-preguntes .modal {
  max-width: 860px;
}

/* Modal joc de rol: amplada augmentada */
.modal-overlay#modal-joc-rol .modal {
  max-width: 860px;
}

/* Botó de recurs amb modal_id: cursor de mà */
button[data-modal-id] {
  cursor: pointer;
}

/* Modal preguntes: intro, seccions i subtítols */
.modal__intro {
  font-style: italic;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
  font-size: 0.95rem;
  line-height: 1.5;
}
.modal__section-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--color-primary);
  margin: var(--space-md) 0 0.3rem;
  border-bottom: 1px solid rgba(59,37,7,0.15);
  padding-bottom: 0.25rem;
}
.modal__subtitle {
  font-size: 0.85rem;
  color: var(--color-accent);
  font-style: italic;
  margin: 0 0 0.4rem;
}

/* Modal bibliografia: llista sense numeració, estil referència acadèmica */
.modal__list--bibliography {
  list-style: none;
  padding-left: 0;
}
.modal__list--bibliography li {
  padding-left: 0;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(59,37,7,0.1);
}
.modal__list--bibliography li:last-child {
  border-bottom: none;
}

/* ── Spinner de càrrega ───────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spinner {
  display: inline-block;
  vertical-align: middle;
  width: 1em;
  height: 1em;
  margin-right: 0.5em;
  border: 2px solid rgba(139,69,19,0.25);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner--lg {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto var(--space-sm);
  border-width: 3px;
}

/* =============================================
   LOGOTIP MIL·LENARI (navbar)
   ============================================= */
.navbar__logo {
  background-color: transparent;
  padding: 8px 16px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  height: 100%;
}

.navbar__logo-img {
  height: 64px;
  width: auto;
  display: block;
}

@media (max-width: 480px) {
  .navbar__logo-img {
    height: 42px;
  }
  .navbar__logo {
    padding: 5px 10px;
  }
}

/* Imatges de capítols del lector (od-section__img / od-section__image) */
.od-section__image,
.od-section__img {
  width: 100%;
  max-width: 760px;
  border: 1px solid var(--color-accent-light);
  border-radius: 4px;
  display: block;
  margin: 0 auto 2rem;
}

.od-section__figure {
  margin: 0 auto 2rem;
  text-align: center;
}

/* ========================
   SCROLL HINT — fletxa flotant
   ======================== */
.scroll-hint {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-primary);
  opacity: 0.75;
  animation: scrollHintBounce 1.4s ease-in-out infinite;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 900;
}
.scroll-hint.is-hidden {
  opacity: 0;
}
@keyframes scrollHintBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}
