/* =========================================
   INSTITUTS: estils propis
   Depèn de ../style.css (variables, botons,
   nav, seccions, trust, data-grid, badge,
   footer). Aquí només components nous.
   ========================================= */

/* Accessibilitat: salt al contingut */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--seal);
  color: var(--on-seal);
  border-radius: 4px;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* El logo és un enllaç a la landing */
.logo-link {
  text-decoration: none;
  margin-left: 0 !important;
  color: var(--logo-brown) !important;
}

/* Àncores: que el nav sticky no tapi el títol */
section[id] {
  scroll-margin-top: 80px;
}

/* =========================================
   HERO A DUES COLUMNES
   ========================================= */
.hero-split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 48px;
}

.h1-accent {
  font-style: italic;
  color: var(--seal);
}

.hero-media {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-media-caption {
  font-size: 13px;
  color: var(--ink-dim);
  padding-left: 12px;
  border-left: 2px solid var(--ochre);
}

/* =========================================
   ESPAI RESERVAT PER A IMATGES
   ========================================= */
.img-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 220px;
  padding: 16px;
  border: 1.5px dashed rgba(176, 125, 60, 0.45);
  border-radius: 6px;
  background:
    repeating-linear-gradient(-45deg,
      transparent 0 14px,
      rgba(176, 125, 60, 0.05) 14px 28px),
    var(--paper-2);
  color: var(--ink-dim);
  font-size: 14px;
  text-align: center;
}

.img-slot i {
  font-size: 30px;
  color: var(--ochre);
}

.img-slot-hero {
  aspect-ratio: 4 / 3;
  min-height: 0;
  box-shadow: var(--shadow-md);
}

/* =========================================
   TRES IDEES (reutilitza .trust)
   ========================================= */
section.ideas {
  padding: 8px 0 40px;
  border-top: none;
}

section.ideas .trust {
  margin-top: 0;
  padding: 24px 28px;
  border-top: none;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}

/* =========================================
   ACTIVITATS
   ========================================= */
.act-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.act-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-top: 3px solid var(--ochre);
  border-radius: 6px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.act-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* La primera activitat ocupa dues files: és la central de l'itinerari */
.act-featured {
  grid-row: span 2;
  border-top-color: var(--seal);
  background:
    linear-gradient(180deg, var(--seal-wash), transparent 140px),
    var(--surface);
}

.act-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.act-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ochre-wash);
  color: var(--ochre-deep);
  font-size: 21px;
}

.act-featured .act-icon {
  background: var(--seal);
  color: var(--on-seal);
}

.act-num {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 500;
  color: rgba(43, 37, 33, 0.18);
  line-height: 1;
}

.act-card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.25;
}

.act-featured h3 {
  font-size: 26px;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chips li {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-dim);
}

.chips .chip-alt {
  background: var(--seal-wash);
  color: var(--seal);
}

.act-body dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ochre-deep);
  margin-top: 12px;
}

.act-body dt:first-child {
  margin-top: 0;
}

.act-body dd {
  font-size: 15px;
  margin-top: 3px;
  line-height: 1.55;
}

.act-more {
  margin-top: auto;
  padding: 16px 18px;
  background: var(--paper);
  border-radius: 6px;
  font-size: 14.5px;
}

.act-more-title {
  font-weight: 600;
  color: var(--seal);
  margin-bottom: 8px;
}

.act-more ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.act-more li {
  position: relative;
  padding-left: 22px;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 16px;
}

.act-more li::before {
  content: "?";
  position: absolute;
  left: 0;
  top: 0;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 600;
  color: var(--ochre);
}

.act-note,
.step-note {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  font-size: 13px;
  color: var(--ochre-deep);
}

.act-note i,
.step-note i {
  font-size: 17px;
}

/* =========================================
   EXEMPLE DE L'EINA
   ========================================= */
.example {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
  margin-top: 28px;
  padding: 24px;
  background: var(--paper-2);
  border-radius: 8px;
}

.example-col {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

/* Barra de finestra decorativa */
.example-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.example-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
}

.example-arrow {
  display: flex;
  align-items: center;
  color: var(--ochre);
  font-size: 26px;
}

.example-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
}

.example-label i {
  font-size: 18px;
  color: var(--ochre-deep);
}

.example-img {
  
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
}

.tag-ia {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--seal);
  color: var(--seal);
}

.bubble {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 8px;
}

.bubble-q {
  align-self: flex-end;
  max-width: 70%;
  background: var(--seal);
  color: var(--on-seal);
  border-bottom-right-radius: 2px;
}

.bubble-a {
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom-left-radius: 2px;
}

/* Cites i fonts: només informatives (no són enllaços) */
.cite {
  color: var(--seal);
  font-size: 12px;
  font-weight: 600;
  margin-left: 1px;
}

.sources-title {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ochre-deep);
}

.sources {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.sources li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-dim);
}

.src-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--seal-wash);
  color: var(--seal);
  font-weight: 600;
  font-size: 11px;
}

.src-shown {
  font-style: normal;
  font-size: 12px;
  color: var(--ochre-deep);
}

.example-doc .img-slot {
  min-height: 180px;
}

.transcript {
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.transcript-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ochre-deep);
  margin-top: 6px;
}

.transcript-orig {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--ink-dim);
}

.note-small {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-dim);
}

/* =========================================
   PER A CENTRES: ITINERARI
   ========================================= */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
  position: relative;
}

/* Línia que uneix els tres moments */
.steps::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--ochre) 0 6px, transparent 6px 12px);
  opacity: 0.5;
}

.steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--seal);
  color: var(--on-seal);
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 18px;
  box-shadow: 0 0 0 6px var(--paper);
}

.step-when {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ochre-deep);
}

.steps h3,
.info-card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 21px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.steps p:not(.step-when):not(.step-note),
.info-card p,
.info-card li {
  font-size: 15px;
  color: var(--ink-dim);
  line-height: 1.55;
}

.step-note {
  margin-top: 4px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 20px;
  margin-top: 36px;
}

.info-card {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}

.info-card h3 {
  margin-bottom: 12px;
}

.info-card h3 i {
  color: var(--seal);
  font-size: 22px;
}

.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-list li {
  position: relative;
  padding-left: 26px;
}

/* Marca de check en CSS pur (no depèn de la font d'icones) */
.check-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 5px;
  width: 6px;
  height: 11px;
  border: solid var(--seal);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* =========================================
   TRANSPARÈNCIA (reutilitza .data-grid)
   ========================================= */
#ia .data-grid,
.icon-grid {
  grid-template-columns: repeat(4, 1fr);
}

.icon-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

#ia .data-grid i,
.icon-grid i {
  display: block;
  font-size: 24px;
  color: var(--seal);
  margin-bottom: 10px;
}

/* =========================================
   FAQ
   ========================================= */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: start;
}

.faq details {
  border-top: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  cursor: pointer;
  font-weight: 500;
  font-size: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 400;
  color: var(--seal);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq summary:hover {
  color: var(--seal);
}

.faq p {
  padding: 0 32px 16px 0;
  color: var(--ink-dim);
  line-height: 1.6;
}

/* =========================================
   CONTACTE
   ========================================= */
section#contacte {
  border-top: none;
}

.contact-box {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 40px;
  background: var(--paper-2);
  border-top: 3px solid var(--seal);
  border-radius: 6px;
}

.contact-box p {
  margin-top: 12px;
  color: var(--ink-dim);
  max-width: 60ch;
}

.contact-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.contact-cta .btn {
  width: 100%;
}

.contact-also {
  font-size: 13px;
}

/* =========================================
   QUINES ACTES (reutilitza .doc-panel, .facts-list, .diff-note)
   ========================================= */
#actes .doc-panel {
  margin-top: 28px;
}

.img-slot-panel {
  width: 100%;
  min-height: 280px;
}

#actes .facts-list {
  margin-bottom: 0;
}

#actes .facts-list strong {
  text-align: right;
}

.diff-note a,
.contact-also a {
  color: var(--seal);
  font-weight: 500;
}

/* =========================================
   PER A QUI + QUÈ CAL
   ========================================= */
.who-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.info-wide {
  margin-top: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 32px;
  background: var(--paper-2);
  border-color: transparent;
}

.info-wide h3 {
  margin-bottom: 0;
}

.check-inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 28px;
}

/* =========================================
   UNIVERSITAT: propostes 2x2 i mètode
   ========================================= */
.act-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.method-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  margin-top: 28px;
}

.method-list {
  list-style: none;
  counter-reset: pas;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.method-list li {
  counter-increment: pas;
  position: relative;
  padding-left: 36px;
  font-size: 15px;
  color: var(--ink-dim);
  line-height: 1.55;
}

.method-list li::before {
  content: counter(pas);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ochre-wash);
  color: var(--ochre-deep);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.method-list strong,
.warn-list strong {
  color: var(--ink);
}

.info-warn {
  background: var(--seal-wash);
  border-color: transparent;
}

.warn-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.warn-list li {
  position: relative;
  padding-left: 18px;
}

.warn-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--seal);
}

#metode .icon-grid {
  margin-top: 20px;
}

/* Enllaç cap a l'altra pàgina */
.cross-link {
  margin-top: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 16px 20px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  font-size: 15px;
  color: var(--ink-dim);
}

.cross-link a {
  color: var(--seal);
  font-weight: 500;
}

/* =========================================
   FOCUS
   ========================================= */
summary:focus-visible,
.logo-link:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 3px;
}

/* =========================================
   MOVIMENT REDUÏT
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  .act-card,
  .faq summary::after {
    transition: none;
  }

  .act-card:hover {
    transform: none;
  }
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1100px) {
  .act-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #ia .data-grid,
  .icon-grid,
  .icon-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero-split,
  .who-grid,
  .method-grid,
  .info-grid,
  .contact-box,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .hero-split {
    gap: 28px;
  }

  .faq-grid {
    gap: 8px;
  }

  .example {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .example-arrow {
    justify-content: center;
    transform: rotate(90deg);
  }

  /* Itinerari en vertical */
  .steps {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .steps::before {
    top: 20px;
    bottom: 20px;
    left: 19px;
    right: auto;
    width: 2px;
    height: auto;
    background: repeating-linear-gradient(180deg, var(--ochre) 0 6px, transparent 6px 12px);
  }

  .steps li {
    padding-left: 60px;
  }

  .step-num {
    position: absolute;
    left: 0;
    top: 0;
  }
}

@media (max-width: 760px) {
  .act-grid,
  #ia .data-grid,
  .icon-grid,
  .icon-grid-3 {
    grid-template-columns: 1fr;
  }

  .act-featured {
    grid-row: auto;
  }

  .contact-box {
    padding: 24px;
  }

  section.ideas .trust {
    padding: 20px;
  }
}