/* ===== V87: calendari, cronologia, galeria, FAQ i targetes mòbils ===== */
:root{
  --branch-castors:#e87a38;
  --branch-manada:#e0b91b;
  --branch-exploradors:#3278c5;
  --branch-pioners:#c94444;
  --branch-rutes:#3d8a56;
  --branch-all:#7a5431;
}

/* Centrat real dels textos dins dels botons. */
.button,
.quick-card .button,
.calendar-control,
.gallery-filter{
  text-align:center!important;
  justify-content:center!important;
  align-items:center!important;
  line-height:1.18!important;
}
.quick-card .button{min-width:124px;white-space:normal}

/* Interacció clara, especialment en mòbil. */
.home-page .highlight-card,
.home-page .section-card,
.home-page .quick-card{
  position:relative;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.home-page .highlight-card.is-clickable-card::after,
.home-page .section-card.is-clickable-card::after,
.home-page .quick-card.is-clickable-card::after{
  content:"→";
  position:absolute;
  right:14px;
  top:14px;
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  border-radius:50%;
  background:rgba(255,255,255,.9);
  box-shadow:0 6px 18px rgba(36,24,13,.12);
  font-weight:900;
  opacity:0;
  transform:translateX(-5px);
  transition:.18s ease;
  pointer-events:none;
}
.home-page .highlight-card.is-clickable-card:hover,
.home-page .section-card.is-clickable-card:hover,
.home-page .quick-card.is-clickable-card:hover{
  transform:translateY(-4px);
  box-shadow:0 18px 42px rgba(36,24,13,.13);
}
.home-page .highlight-card.is-clickable-card:hover::after,
.home-page .section-card.is-clickable-card:hover::after,
.home-page .quick-card.is-clickable-card:hover::after{opacity:1;transform:none}
.home-page .highlight-card.is-clickable-card:active,
.home-page .section-card.is-clickable-card:active,
.home-page .quick-card.is-clickable-card:active{transform:scale(.985)}

/* Cronologia */
.home-timeline{overflow:hidden;background:#fffdf9}
.timeline-heading{max-width:760px;margin:0 auto 32px;text-align:center}
.timeline-heading>p:last-child{max-width:62ch;margin:10px auto 0;color:var(--muted)}
.timeline-track{
  position:relative;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}
.timeline-track::before{
  content:"";
  position:absolute;
  left:8%;right:8%;top:24px;height:2px;
  background:linear-gradient(90deg,#dcae63,#9c6a21);
}
.timeline-item{position:relative;padding-top:52px}
.timeline-dot{
  position:absolute;top:12px;left:22px;z-index:2;
  width:25px;height:25px;border:6px solid #fffdf9;border-radius:50%;
  background:#9c6a21;box-shadow:0 0 0 2px #9c6a21;
}
.timeline-card{
  height:100%;padding:22px;border:1px solid var(--line);border-radius:22px;
  background:#fff;box-shadow:0 12px 30px rgba(36,24,13,.07);
}
.timeline-card time{display:block;margin-bottom:8px;color:#9c6a21;font-size:.76rem;font-weight:900;letter-spacing:.1em;text-transform:uppercase}
.timeline-card h3{margin:0 0 8px;font-size:1.35rem}
.timeline-card p{margin:0;color:var(--muted);font-size:.92rem}

/* FAQ general */
.home-faq{background:#fff}
.home-faq__grid{display:grid;grid-template-columns:.72fr 1.28fr;gap:30px;align-items:start}
.home-faq__intro{position:sticky;top:92px;padding:28px;border-radius:26px;background:linear-gradient(145deg,#2a1b11,#49301f);color:#fff}
.home-faq__intro h2{margin:8px 0 12px;color:#fff}.home-faq__intro p:last-child{margin:0;color:rgba(255,255,255,.78)}
.home-faq__list{display:grid;gap:10px}
.home-faq details{border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:0 7px 22px rgba(36,24,13,.05)}
.home-faq summary{padding:17px 18px;font-weight:850;cursor:pointer;display:flex;justify-content:space-between;gap:14px;list-style:none}
.home-faq summary::-webkit-details-marker{display:none}.home-faq summary::after{content:"+";font-size:1.15rem;color:#9c6a21}.home-faq details[open] summary::after{content:"−"}
.home-faq details p{margin:0;padding:0 18px 17px;color:var(--muted)}

/* Galeria */
.gallery-page{background:#f8f3ec}
.gallery-hero{position:relative;min-height:420px;display:flex;align-items:end;overflow:hidden;color:#fff;background:#20160f}
.gallery-hero img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 48%}
.gallery-hero::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(20,13,8,.22),rgba(20,13,8,.82))}
.gallery-hero__content{position:relative;z-index:2;padding:54px 0;max-width:760px}
.gallery-hero h1{margin:7px 0 10px;font-family:Georgia,serif;font-size:clamp(3rem,7vw,5.6rem);line-height:.95}.gallery-hero p:last-child{margin:0;max-width:60ch;font-size:1.05rem;color:rgba(255,255,255,.86)}
.gallery-section{padding:52px 0 70px}
.gallery-toolbar{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-bottom:26px}
.gallery-filter{display:inline-flex;min-height:42px;padding:9px 14px;border:1px solid var(--line);border-radius:999px;background:#fff;cursor:pointer;font-weight:800}
.gallery-filter.is-active{background:#24180d;color:#fff;border-color:#24180d}
.gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:230px;gap:14px}
.gallery-item{position:relative;overflow:hidden;border:0;border-radius:20px;padding:0;background:#ddd;cursor:pointer;box-shadow:0 10px 28px rgba(36,24,13,.09)}
.gallery-item:nth-child(7n+1),.gallery-item:nth-child(7n+5){grid-row:span 2}
.gallery-item[hidden]{display:none}
.gallery-item img{width:100%;height:100%;object-fit:cover;transition:transform .3s ease}
.gallery-item:hover img{transform:scale(1.035)}
.gallery-caption{position:absolute;left:10px;right:10px;bottom:10px;padding:10px 12px;border-radius:13px;background:rgba(20,13,8,.62);backdrop-filter:blur(8px);color:#fff;text-align:left}
.gallery-caption strong{display:block}.gallery-caption span{font-size:.74rem;opacity:.82}
.gallery-lightbox{position:fixed;inset:0;z-index:300;display:grid;place-items:center;padding:18px;background:rgba(12,8,5,.92)}
.gallery-lightbox[hidden]{display:none}.gallery-lightbox__dialog{position:relative;width:min(1100px,100%);max-height:92vh}.gallery-lightbox img{width:100%;max-height:82vh;object-fit:contain;border-radius:18px;background:#111}.gallery-lightbox__caption{margin-top:10px;color:#fff;text-align:center}.gallery-lightbox__close{position:absolute;right:10px;top:10px;width:44px;height:44px;border:0;border-radius:50%;background:rgba(255,255,255,.9);cursor:pointer;font-size:1.5rem}

@media (max-width:980px){
  .timeline-track{grid-template-columns:repeat(4,minmax(250px,1fr));overflow-x:auto;padding:0 2px 12px;scroll-snap-type:x mandatory}.timeline-item{scroll-snap-align:start}.timeline-track::before{left:26px;right:-700px}
  .home-faq__grid{grid-template-columns:1fr}.home-faq__intro{position:static}.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:680px){
  .section{padding-top:42px;padding-bottom:42px}
  .home-page .highlight-card.is-clickable-card::after,.home-page .section-card.is-clickable-card::after,.home-page .quick-card.is-clickable-card::after{opacity:1;transform:none;width:29px;height:29px;right:10px;top:10px;font-size:.9rem}
  .home-page .section-card__body{padding-right:44px!important}
  .quick-card{align-items:stretch!important}.quick-card .button{width:100%;min-height:46px}
  .gallery-hero{min-height:360px}.gallery-hero__content{padding:38px 0}.gallery-grid{grid-template-columns:1fr;grid-auto-rows:260px}.gallery-item:nth-child(n){grid-row:span 1}.gallery-item:nth-child(4n+1){grid-row:span 2}
  .timeline-heading{margin-bottom:22px}.timeline-track{margin-inline:-10px;padding-left:10px}.timeline-card{padding:18px}
}
@media (min-width:981px) and (max-width:1120px){
  .site-header .brand small{display:none!important}
  .site-header .main-nav{gap:0!important}
  .site-header .main-nav>a,.site-header .nav-dropdown__toggle{padding-inline:6px!important;font-size:.79rem!important}
  .main-nav .lang-switch{margin-left:.15rem;padding-inline:6px}
}

/* ===== V88: FAQ més útil i galeria per àlbums ===== */

/* FAQ renovada */
.home-faq-v88{
  background:
    radial-gradient(circle at 12% 15%,rgba(232,122,56,.10),transparent 30%),
    radial-gradient(circle at 88% 80%,rgba(70,137,73,.10),transparent 28%),
    #fffaf4;
}
.home-faq-v88__heading{max-width:760px;margin:0 auto 28px;text-align:center}
.home-faq-v88__heading h2{margin:6px 0 10px;font-family:Georgia,serif;font-size:clamp(2.25rem,4.7vw,3.8rem);line-height:.98}
.home-faq-v88__heading>p:last-child{max-width:62ch;margin:0 auto;color:var(--muted)}
.home-faq-v88__layout{display:grid;grid-template-columns:minmax(250px,.72fr) minmax(0,1.55fr);gap:22px;align-items:stretch}
.faq-help-card{
  position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:center;min-height:100%;padding:30px;border-radius:28px;
  background:linear-gradient(145deg,#2a1b11,#4e3422);color:#fff;box-shadow:0 16px 40px rgba(36,24,13,.13)
}
.faq-help-card::after{content:"?";position:absolute;right:-8px;bottom:-62px;color:rgba(255,255,255,.07);font-family:Georgia,serif;font-size:14rem;font-weight:900;line-height:1}
.faq-help-card__icon{position:relative;z-index:1;display:grid;place-items:center;width:54px;height:54px;margin-bottom:20px;border-radius:18px;background:rgba(255,255,255,.12);font-family:Georgia,serif;font-size:2rem;font-weight:900}
.faq-help-card h3{position:relative;z-index:1;margin:0 0 10px;font-family:Georgia,serif;font-size:1.75rem;line-height:1.05}
.faq-help-card p{position:relative;z-index:1;margin:0 0 20px;color:rgba(255,255,255,.78)}
.faq-help-card__chips{position:relative;z-index:1;display:flex;flex-wrap:wrap;gap:7px;margin-bottom:22px}
.faq-help-card__chips span{padding:7px 10px;border:1px solid rgba(255,255,255,.16);border-radius:999px;background:rgba(255,255,255,.08);font-size:.73rem;font-weight:800}
.faq-help-card .button{position:relative;z-index:1;width:max-content;min-width:150px}
.home-faq-v88__list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-content:start}
.home-faq-v88 details{overflow:hidden;border:1px solid #e8dacc;border-radius:20px;background:#fff;box-shadow:0 8px 24px rgba(36,24,13,.055)}
.home-faq-v88 details[open]{border-color:#d8b58e;box-shadow:0 12px 30px rgba(36,24,13,.08)}
.home-faq-v88 summary{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:68px;padding:16px 17px;cursor:pointer;list-style:none;font-weight:850;line-height:1.28}
.home-faq-v88 summary::-webkit-details-marker{display:none}
.home-faq-v88 summary::after{content:"+";display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:50%;background:#f5eadf;color:#9c6a21;font-size:1.05rem}
.home-faq-v88 details[open] summary::after{content:"−";background:#2a1b11;color:#fff}
.home-faq-v88 details p{margin:0;padding:0 17px 17px;color:var(--muted);font-size:.92rem}

/* Galeria renovada: portada editorial + àlbums per secció */
.gallery-page{background:#f8f3ec}
.gallery-v88-hero{position:relative;min-height:390px;display:flex;align-items:flex-end;overflow:hidden;color:#fff;background:#1d140e}
.gallery-v88-hero>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 43%}
.gallery-v88-hero::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(22,14,8,.15),rgba(22,14,8,.82))}
.gallery-v88-hero__copy{position:relative;z-index:2;max-width:760px;padding:52px 0}
.gallery-v88-hero__copy h1{margin:7px 0 10px;font-family:Georgia,serif;font-size:clamp(3rem,7vw,5.5rem);line-height:.94;letter-spacing:-.045em}
.gallery-v88-hero__copy>p:last-child{max-width:58ch;margin:0;color:rgba(255,255,255,.86);font-size:1.05rem}
.gallery-v88-feature{padding:48px 0 24px}
.gallery-feature-card{display:grid;grid-template-columns:1.25fr .75fr;overflow:hidden;border:1px solid var(--line);border-radius:30px;background:#fff;box-shadow:0 16px 42px rgba(36,24,13,.09)}
.gallery-feature-card__photo{position:relative;min-height:410px;border:0;padding:0;background:#ddd;cursor:pointer;overflow:hidden}
.gallery-feature-card__photo img{width:100%;height:100%;object-fit:cover;transition:transform .35s ease}
.gallery-feature-card__photo:hover img{transform:scale(1.025)}
.gallery-feature-card__copy{display:flex;flex-direction:column;justify-content:center;padding:34px}
.gallery-feature-card__copy h2{margin:7px 0 12px;font-family:Georgia,serif;font-size:clamp(2rem,3.5vw,3rem);line-height:1}
.gallery-feature-card__copy p{margin:0 0 20px;color:var(--muted)}
.gallery-feature-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.gallery-feature-stats div{padding:12px 8px;border-radius:15px;background:#faf4ec;text-align:center}
.gallery-feature-stats strong{display:block;font-family:Georgia,serif;font-size:1.35rem}.gallery-feature-stats span{display:block;margin-top:3px;color:var(--muted);font-size:.72rem}
.gallery-v88-albums{padding:30px 0 72px}
.gallery-v88-heading{max-width:760px;margin:0 auto 28px;text-align:center}
.gallery-v88-heading h2{margin:6px 0 10px;font-family:Georgia,serif;font-size:clamp(2.25rem,4.6vw,3.75rem);line-height:.98}
.gallery-v88-heading>p:last-child{max-width:62ch;margin:0 auto;color:var(--muted)}
.gallery-albums{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.gallery-album{--album-color:#9c6a21;overflow:hidden;border:1px solid var(--line);border-top:5px solid var(--album-color);border-radius:26px;background:#fff;box-shadow:0 12px 34px rgba(36,24,13,.07)}
.gallery-album__head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 20px 15px}
.gallery-album__label{display:flex;align-items:center;gap:11px}
.gallery-album__dot{width:14px;height:14px;border-radius:50%;background:var(--album-color);box-shadow:0 0 0 6px color-mix(in srgb,var(--album-color) 15%,transparent)}
.gallery-album__head h2{margin:0;font-family:Georgia,serif;font-size:1.65rem}.gallery-album__head p{margin:3px 0 0;color:var(--muted);font-size:.82rem}
.gallery-album__head>a{flex:none;color:#7a4d23;font-size:.78rem;font-weight:900}
.gallery-album__photos{display:grid;grid-template-columns:1.35fr .65fr;grid-template-rows:repeat(2,150px);gap:7px;padding:0 7px 7px}
.gallery-shot{position:relative;overflow:hidden;border:0;border-radius:15px;padding:0;background:#ddd;cursor:pointer}
.gallery-shot:first-child{grid-row:1/3}
.gallery-shot img{width:100%;height:100%;object-fit:cover;transition:transform .3s ease}
.gallery-shot:hover img{transform:scale(1.035)}
.gallery-shot::after{content:"↗";position:absolute;right:9px;top:9px;display:grid;place-items:center;width:29px;height:29px;border-radius:50%;background:rgba(20,13,8,.62);color:#fff;font-size:.8rem;backdrop-filter:blur(6px)}
.gallery-shot__caption{position:absolute;left:8px;right:8px;bottom:8px;padding:8px 10px;border-radius:11px;background:rgba(20,13,8,.58);color:#fff;text-align:left;font-size:.72rem;font-weight:800;backdrop-filter:blur(6px)}
.gallery-lightbox{position:fixed;inset:0;z-index:300;display:grid;place-items:center;padding:18px;background:rgba(12,8,5,.92)}
.gallery-lightbox[hidden]{display:none}.gallery-lightbox__dialog{position:relative;width:min(1100px,100%);max-height:92vh}.gallery-lightbox img{width:100%;max-height:82vh;object-fit:contain;border-radius:18px;background:#111}.gallery-lightbox__caption{margin-top:10px;color:#fff;text-align:center}.gallery-lightbox__close{position:absolute;right:10px;top:10px;width:44px;height:44px;border:0;border-radius:50%;background:rgba(255,255,255,.9);cursor:pointer;font-size:1.5rem}

@media (max-width:980px){
  .home-faq-v88__layout{grid-template-columns:1fr}.faq-help-card{min-height:auto}.home-faq-v88__list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .gallery-feature-card{grid-template-columns:1fr}.gallery-feature-card__photo{min-height:360px}.gallery-albums{grid-template-columns:1fr}
}
@media (max-width:680px){
  .home-faq-v88__heading{margin-bottom:20px}.home-faq-v88__layout{gap:14px}.faq-help-card{padding:23px;border-radius:23px}.faq-help-card h3{font-size:1.55rem}.home-faq-v88__list{grid-template-columns:1fr;gap:9px}.home-faq-v88 summary{min-height:60px;padding:14px 15px;font-size:.91rem}.home-faq-v88 details p{padding:0 15px 15px;font-size:.86rem}
  .gallery-v88-hero{min-height:330px}.gallery-v88-hero__copy{padding:36px 0}.gallery-v88-feature{padding:30px 0 18px}.gallery-feature-card{border-radius:23px}.gallery-feature-card__photo{min-height:260px}.gallery-feature-card__copy{padding:23px}.gallery-feature-stats{gap:6px}.gallery-feature-stats div{padding:10px 5px}.gallery-v88-albums{padding:22px 0 52px}.gallery-albums{gap:14px}.gallery-album{border-radius:22px}.gallery-album__head{padding:17px 16px 13px}.gallery-album__head h2{font-size:1.45rem}.gallery-album__head>a{font-size:.72rem}.gallery-album__photos{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:8px;padding:0 8px 8px;scrollbar-width:none}.gallery-album__photos::-webkit-scrollbar{display:none}.gallery-shot,.gallery-shot:first-child{flex:0 0 78%;height:245px;grid-row:auto;scroll-snap-align:center;border-radius:14px}.gallery-shot__caption{font-size:.76rem}
}


/* ===== V89: FAQ al final + galeria simplificada ===== */

/* La galeria empieza directamente por los álbumes, sin portada ni bloque destacado. */
.gallery-page main{background:#f8f3ec}
.gallery-v89-albums{
  padding:clamp(54px,7vw,88px) 0 76px!important;
  min-height:calc(100vh - 90px);
  background:
    radial-gradient(circle at 12% 0%,rgba(232,122,56,.08),transparent 28%),
    radial-gradient(circle at 88% 18%,rgba(70,137,73,.08),transparent 26%),
    #f8f3ec;
}
.gallery-v89-albums .gallery-v88-heading{
  max-width:none;
  width:100%;
  margin:0 auto 34px;
  padding-inline:8px;
}
.gallery-v89-albums .gallery-v88-heading h2{
  width:100%;
  max-width:100%;
  margin:7px auto 11px;
  font-size:clamp(1.65rem,4.4vw,3.65rem);
  line-height:1;
  letter-spacing:-.04em;
  white-space:nowrap;
  text-wrap:nowrap;
}
.gallery-v89-albums .gallery-v88-heading>p:last-child{
  max-width:58ch;
}

/* El FAQ queda visualmente como el último bloque informativo antes de la llamada final. */
.home-page .home-faq-v88{
  border-top:1px solid rgba(36,24,13,.07);
  border-bottom:1px solid rgba(36,24,13,.07);
}

@media (max-width:680px){
  .gallery-v89-albums{
    padding:40px 0 58px!important;
  }
  .gallery-v89-albums .gallery-v88-heading{
    margin-bottom:24px;
    padding-inline:0;
  }
  .gallery-v89-albums .gallery-v88-heading h2{
    font-size:clamp(1.38rem,6.45vw,2rem);
    letter-spacing:-.035em;
  }
  .gallery-v89-albums .gallery-v88-heading>p:last-child{
    font-size:.9rem;
  }
}

@media (max-width:340px){
  .gallery-v89-albums .gallery-v88-heading h2{
    font-size:1.28rem;
  }
}

