/* ==========================================================================
   Seccions de la pàgina d'inici, en l'ordre en què surten.
   (Les animacions de cada secció són a reveals.css; aquí només hi ha la maqueta.)
   ========================================================================== */

/* ---------- Funcions i entrades ---------- */
.funcions-in { padding: 72px 24px 80px; }
.funcions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.funcio { background: var(--card); border: 1px solid var(--card-line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 2px; }
.funcio-day { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.funcio-num { font-family: var(--font-display); font-weight: 700; font-size: 52px; line-height: 1.05; color: var(--forest); }
.funcio-time { font-size: 16px; }
/* Botó de cada funció: «A la venda l'1 de des.» fins que obre la venda, llavors «Compra» (js/main.js) */
.btn-funcio { margin-top: 14px; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 7px 12px; box-sizing: border-box; border-radius: 999px; font-size: 14px; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; background: transparent; color: var(--forest); border: 1.5px solid var(--forest); }
.btn-funcio.is-open { background: var(--red); color: #fff; border-color: var(--red); }
.btn-funcio.is-exhaurides, .btn-funcio.is-passada { border-style: dashed; border-color: #B8B2A6; color: var(--muted); cursor: default; }
.btn-funcio.is-exhaurides { color: var(--red-text); border-color: #E5C3BC; }
.funcio-nota { align-self: flex-start; margin-top: 6px; padding: 2px 10px; border-radius: 999px; background: #F3E3BD; color: #5E4200; font-size: 12px; font-weight: 700; }
.funcio-lloc { font-size: 14px; color: var(--muted); }

.preus { display: flex; flex-wrap: wrap; gap: 16px; }
.preu { flex: 1 1 240px; background: #E3DFD6; border-radius: 16px; padding: 18px 22px; display: flex; flex-direction: column; }
.preu-label { font-size: 14px; color: var(--muted-2); }
.preu-value { font-family: var(--font-display); font-weight: 700; font-size: 28px; color: var(--forest); }
.preu-value--sm { font-size: 22px; }

/* ---------- L'obra ---------- */
.obra-in { position: relative; z-index: 2; }
.obra-text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.prose-dark { margin: 0; font-size: 18px; color: var(--on-dark); }
.fitxa { margin: 8px 0 0; background: var(--forest-2); border-radius: 16px; padding: 4px 22px; }
.fitxa-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--forest-line); }
.fitxa-row:last-child { border-bottom: 0; }
.fitxa-value { margin: 0; font-weight: 700; text-align: right; }
.obra-media { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.obra-figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.obra-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; }
.caption-dark { font-size: 14px; color: var(--on-dark-soft); }

.video-link { display: flex; align-items: center; gap: 16px; padding: 12px; border-radius: 16px; background: var(--forest-2); color: #fff; text-decoration: none; }
.video-thumb { position: relative; width: 136px; flex: none; border-radius: 10px; overflow: hidden; display: block; }
.video-thumb-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.video-play { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 999px; background: var(--red); display: flex; align-items: center; justify-content: center; }
.video-text { display: flex; flex-direction: column; }
.video-title { font-weight: 700; font-size: 17px; }

/* ---------- Cita de Lluc 2,14 ---------- */
.cita-in { max-width: 900px; margin: 0 auto; padding: 56px 24px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.cita-text { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1.3; color: var(--forest); }
.cita-ref { margin: 0; font-size: 15px; color: var(--muted-2); }

/* ---------- Agenda ---------- */
.agenda-in { gap: 40px 56px; }
.agenda-head { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.agenda-body { flex: 2 1 560px; min-width: 0; position: relative; }
.agenda-line { position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--red); }
.agenda-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.agenda-item { display: flex; align-items: center; gap: 20px; background: var(--card); border-radius: 16px; padding: 16px 20px; flex-wrap: wrap; }
.agenda-item--featured { background: var(--forest); color: #fff; }
.agenda-date { width: 64px; text-align: center; display: flex; flex-direction: column; line-height: 1.05; }
.agenda-day { font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--forest); }
.agenda-day--gold { color: var(--gold); }
.agenda-month { font-size: 13px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.agenda-month--dark { color: var(--on-dark-soft); }
.agenda-tbd { width: 64px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--forest); }
.agenda-tbd--text { font-family: var(--font-text); font-size: 12px; font-weight: 700; line-height: 1.15; text-transform: uppercase; color: var(--muted); }
.agenda-info { flex: 1 1 240px; display: flex; flex-direction: column; }
.agenda-title { font-size: 18px; }

/* ---------- Històries ---------- */
.stories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.story-card { background: var(--card); border: 1px solid var(--card-line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.story-img { display: block; width: 100%; height: 220px; object-fit: cover; object-position: var(--focus, 50% 50%); }
.story-img--anunci { object-position: 50% 0%; background: #fff; }
.story-img--infern { object-position: 50% 35%; }
.story-year-tile { height: 220px; background: var(--lavender); display: flex; align-items: flex-end; padding: 20px; box-sizing: border-box; }
.story-year { font-family: var(--font-display); font-weight: 700; font-size: 72px; line-height: .9; color: var(--forest); }
.story-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; }
.story-tag { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--red-text); }
.story-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.2; color: var(--forest); }

/* ---------- El Casal ---------- */
.casal { background: var(--forest); color: #fff; }
.casal-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.casal-pam { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 6px; }
.casal-logo { display: block; width: 56px; height: 56px; opacity: .92; }
.casal-pam-logo { display: block; height: 64px; width: auto; border-radius: 6px; }
.casal-pam-text { font-size: 16px; color: var(--on-dark); max-width: 300px; }
.timeline { flex: 1 1 400px; min-width: 0; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline-item { display: flex; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--forest-line); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-year { width: 70px; flex: none; font-family: var(--font-display); font-size: 22px; color: var(--gold); }
.timeline-text { color: var(--on-dark); }

/* ---------- Informació pràctica ---------- */
.info-in { gap: 28px; }
.info-col { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.info-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 28px; color: var(--forest); }
.info-photo { display: block; width: 100%; height: 180px; object-fit: cover; border-radius: 16px; }
.info-text { margin: 0; font-size: 17px; }
.info-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 17px; }
.info-note { margin: 0; color: var(--muted); font-size: 15px; }

/* Info · contacte: correu i xarxes amb el seu logo */
.contacte-llista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.contacte { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.contacte-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--forest); color: #fff; transition: background .25s ease; }
.contacte:hover .contacte-ico { background: var(--red); }
.contacte-on { font-weight: 500; color: var(--muted); }

/* ---------- Col·laboradors: logos en targetes blanques (cada logo té els seus colors) ---------- */
.collab-in { display: flex; flex-direction: column; gap: 28px; padding-top: 64px; padding-bottom: 72px; }
.collab-cap { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.collab-llista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.collab { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 18px 16px; background: #fff; border: 1px solid var(--card-line); border-radius: 18px; box-shadow: 0 12px 24px -20px rgba(30, 53, 69, .45); transition: translate .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s ease; }
@media (hover: hover) { .collab:hover { translate: 0 -3px; box-shadow: 0 18px 30px -20px rgba(30, 53, 69, .55); } }
.collab-logo { display: flex; align-items: center; justify-content: center; height: 104px; width: 100%; }
.collab-img { display: block; max-width: 100%; max-height: 104px; width: auto; height: auto; object-fit: contain; }
.collab-img--ins-terrassa { max-height: 56px; }
.collab-nom { font-size: 14px; font-weight: 700; color: var(--muted); text-align: center; }
@media (max-width: 600px) {
  .collab-llista { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .collab { padding: 16px 12px 12px; }
  .collab-logo { height: 84px; }
  .collab-img { max-height: 84px; }
  .collab-img--ins-terrassa { max-height: 44px; }
}
