/* =================================================================
   HOME 2 (anteprima /index2): ritocchi grafici sopra app.css.
   Tutto è limitato a .page-home2, quindi non tocca la home attuale.
   ================================================================= */

/* ---------- Slider a tutta larghezza ---------- */
.page-home2 .h2-hero {
  position: relative;
  background: #fff;
}
.page-home2 .h2-slider {
  position: relative;
  height: 58vh;
  height: 58svh;
  min-height: 300px;
  max-height: 540px;
  overflow: hidden;
  background: var(--brand-darker);
}
@media (min-width: 768px) {
  .page-home2 .h2-slider {
    height: 66svh;
    max-height: 640px;
  }
}
@media (min-width: 992px) {
  .page-home2 .h2-slider {
    height: calc(100vh - var(--nav-h));
    height: calc(100svh - var(--nav-h));
    min-height: 600px;
    max-height: 860px;
  }
}
.page-home2 .h2-slider .carousel-inner,
.page-home2 .h2-slider .carousel-item {
  height: 100%;
}

.page-home2 .h2-foto {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-focus);
}
/* Zoom lento "cinematografico" sulla foto attiva */
.page-home2 .carousel-item.active .h2-foto {
  animation: h2-kenburns calc(var(--h2-interval) + 1.5s) ease-out both;
}
@keyframes h2-kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.07); }
}

/* Foto "intera": copia sfocata dietro, che riempie i lati */
.page-home2 .h2-foto-sfondo {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.2);
  filter: blur(26px) brightness(.7);
}
/* Le verticali restano intere anche su telefono; le altre "intere" solo da desktop */
.page-home2 .h2-foto--verticale .h2-foto-sfondo { display: block; }
.page-home2 .h2-foto--verticale .h2-foto { object-fit: contain; object-position: center; }
@media (min-width: 992px) {
  .page-home2 .h2-foto--intera .h2-foto-sfondo { display: block; }
  .page-home2 .h2-foto--intera .h2-foto { object-fit: contain; object-position: center; }
  .page-home2 .carousel-item.active.h2-foto--intera .h2-foto { animation: none; }
}

/* Velature: in alto per le barre (telefono), in basso per card e frecce */
.page-home2 .h2-slider .carousel-item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 22%),
    linear-gradient(to top, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 40%);
  pointer-events: none;
}
.page-home2 .h2-caption {
  position: absolute;
  left: 0;
  right: 0;
  top: 2.2rem;
  z-index: 3;
  margin: 0;
  padding: 0 1.25rem;
  text-align: center;
  font-size: .9rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
@media (min-width: 992px) {
  .page-home2 .h2-caption { top: auto; bottom: 6.5rem; text-align: right; padding: 0 3rem; }
}

/* ---------- Navigazione dello slider ---------- */
/* Telefono: barre in alto tipo "storie"; desktop: in basso a destra */
.page-home2 .h2-slider__nav {
  position: absolute;
  z-index: 4;
  left: 1rem;
  right: 1rem;
  top: .85rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
@media (min-width: 992px) {
  .page-home2 .h2-slider__nav {
    top: auto;
    left: auto;
    right: max(2rem, calc((100vw - 1320px) / 2 + 1rem));
    bottom: 2.5rem;
    width: 360px;
  }
}
/* Barre di avanzamento al posto dei pallini */
.page-home2 .h2-progress {
  position: static;
  flex: 1 1 auto;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.page-home2 .h2-progress [data-bs-target] {
  position: relative;
  flex: 1 1 0;
  width: auto;
  height: 18px;          /* area di tocco: la barra visibile è sottile */
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  opacity: 1;
  text-indent: 0;
}
.page-home2 .h2-progress [data-bs-target]::before,
.page-home2 .h2-progress [data-bs-target] span {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 3px;
}
.page-home2 .h2-progress [data-bs-target]::before {
  right: 0;
  background: rgba(255,255,255,.4);
}
.page-home2 .h2-progress [data-bs-target] span {
  width: 0;
  background: #fff;
}
.page-home2 .h2-progress .active span {
  animation: h2-progress var(--h2-interval) linear forwards;
}
@keyframes h2-progress {
  from { width: 0; }
  to   { width: 100%; }
}
.page-home2 .h2-counter {
  display: none;
  flex: 0 0 auto;
  font-size: .85rem;
  letter-spacing: .08em;
  color: rgba(255,255,255,.8);
}
.page-home2 .h2-counter b {
  color: #fff;
}
.page-home2 .h2-arrow {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  backdrop-filter: blur(6px);
  transition: background-color .2s ease, color .2s ease;
}
.page-home2 .h2-arrow:hover,
.page-home2 .h2-arrow:focus-visible {
  background: #fff;
  color: var(--brand-darker);
}
/* Su telefono si sfoglia col dito: contatore e frecce solo da tablet in su */
@media (min-width: 768px) {
  .page-home2 .h2-counter { display: inline; }
  .page-home2 .h2-arrow { display: inline-flex; }
}

/* ---------- Card di benvenuto ---------- */
/* Telefono: la card sale sul bordo inferiore della foto */
.page-home2 .h2-hero__overlay {
  position: relative;
  z-index: 5;
  margin-top: -3rem;
}
.page-home2 .h2-welcome {
  position: relative;
  padding: 1.75rem 1.5rem;
  border-radius: calc(var(--radius) + 6px);
  background: #fff;
  box-shadow: 0 14px 40px rgba(60, 40, 25, .16);
}
/* Desktop: la card si appoggia sulla foto, in basso a sinistra */
@media (min-width: 992px) {
  .page-home2 .h2-hero__overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2.5rem;
    margin-top: 0;
    pointer-events: none;   /* lascia cliccare frecce e barre intorno alla card */
  }
  .page-home2 .h2-welcome {
    max-width: 560px;
    padding: 2.25rem 2.5rem;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(10px);
    pointer-events: auto;
  }
}
.page-home2 .h2-welcome h1 {
  font-weight: 800;
  color: var(--brand-darker);
  line-height: 1.15;
  margin-bottom: .9rem;
}
@media (min-width: 992px) {
  .page-home2 .h2-welcome h1 { font-size: 2.4rem; }
}
.page-home2 .h2-welcome h1::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: .9rem;
  border-radius: 2px;
  background: var(--brand);
}
.page-home2 .h2-welcome p:not(.eyebrow) {
  font-size: 1.02rem;
  line-height: 1.7;
  color: #5b5149;
  margin-bottom: .85rem;
}
.page-home2 .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.page-home2 .eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

/* Animazioni disattivate se il dispositivo chiede meno movimento */
@media (prefers-reduced-motion: reduce) {
  .page-home2 .carousel-item.active .h2-foto { animation: none; }
  .page-home2 .h2-progress .active span { animation: none; width: 100%; }
}

/* Bottoni a pillola, con un po' di profondità */
.page-home2 .h2-actions .btn,
.page-home2 .h2-famiglie .btn {
  border-radius: 999px;
  padding: .6rem 1.25rem;
  font-weight: 700;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.page-home2 .h2-actions .btn-cat,
.page-home2 .h2-famiglie .btn-cat {
  box-shadow: 0 6px 16px rgba(142, 111, 85, .35);
}
.page-home2 .h2-actions .btn:hover,
.page-home2 .h2-famiglie .btn:hover {
  transform: translateY(-1px);
}

/* ---------- In evidenza: Gruppo famiglie ---------- */
.page-home2 .h2-famiglie {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  margin: 2rem 0 0;
  padding: 1.5rem;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand-tint) 0%, #fff 70%);
  box-shadow: 0 10px 30px rgba(110, 83, 64, .12);
}
@media (min-width: 576px) {
  .page-home2 .h2-famiglie {
    grid-template-columns: 150px 1fr;
  }
}
@media (min-width: 768px) {
  .page-home2 .h2-famiglie {
    grid-template-columns: 200px 1fr;
    gap: 2.5rem;
    margin-top: 3rem;
    padding: 2rem 2.5rem;
  }
}
.page-home2 .h2-famiglie__poster {
  display: block;
  width: min(200px, 60%);
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  transform: rotate(-3deg);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
  transition: transform .25s ease;
}
@media (min-width: 576px) {
  .page-home2 .h2-famiglie__poster {
    width: 100%;
  }
}
.page-home2 .h2-famiglie:hover .h2-famiglie__poster {
  transform: rotate(0deg) scale(1.03);
}
.page-home2 .h2-famiglie__poster img {
  display: block;
  width: 100%;
  height: auto;
}
.page-home2 .h2-famiglie__body {
  text-align: center;
}
@media (min-width: 576px) {
  .page-home2 .h2-famiglie__body {
    text-align: left;
  }
}
.page-home2 .h2-famiglie h2 {
  font-weight: 800;
  color: var(--brand-darker);
  margin-bottom: .4rem;
}
.page-home2 .h2-famiglie__lead {
  font-size: 1.1rem;
  font-style: italic;
  color: #5b5149;
  margin-bottom: 1.25rem;
}

/* ---------- Card informative ---------- */
.page-home2 .h2-blocks {
  padding-bottom: 2rem;
}
.page-home2 .h2-card {
  position: relative;
  border-top: 4px solid var(--brand);
  transition: transform .2s ease, box-shadow .2s ease;
}
.page-home2 .h2-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(110, 83, 64, .12);
}
.page-home2 .h2-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.15rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 4px 10px rgba(142, 111, 85, .3);
}
.page-home2 .block-title {
  gap: .75rem;
}

/* Elenco orari messe: puntino e righe ben separate */
.page-home2 .h2-times {
  list-style: none;
  padding: 0;
}
.page-home2 .h2-times li {
  position: relative;
  padding: .35rem 0 .35rem 1.1rem;
}
.page-home2 .h2-times li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--brand);
}

/* Segreteria: giorno a sinistra, orario a destra */
.page-home2 .h2-days {
  list-style: none;
  padding: 0;
}
.page-home2 .h2-days li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .25rem 1rem;
  padding: .65rem 0;
  border-bottom: 1px dashed #e6ddd5;
}
.page-home2 .h2-days li:last-child {
  border-bottom: 0;
}
.page-home2 .h2-days .block-label {
  margin: 0;
}

/* Contatti: un'icona per riga */
.page-home2 .h2-contacts {
  list-style: none;
  padding: 0;
}
.page-home2 .h2-contacts li {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .4rem 0;
  min-width: 0;
}
.page-home2 .h2-contacts i {
  color: var(--brand);
  flex: 0 0 auto;
}
.page-home2 .h2-contacts a {
  overflow-wrap: anywhere;
  text-decoration: none;
}
.page-home2 .h2-contacts a:hover {
  text-decoration: underline;
}

/* ---------- Comparsa allo scorrimento ---------- */
.page-home2 .h2-reveal--on {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.page-home2 .h2-reveal--on.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Presepe vivente: fascia "notte di Natale" ---------- */
.page-home2 .h2-presepe {
  margin-top: 2.5rem;
  padding: 2.5rem 0;
  color: #fff;
  background:
    radial-gradient(50% 100% at 15% 0%, rgba(232, 194, 122, .25) 0%, rgba(232, 194, 122, 0) 60%),
    linear-gradient(160deg, #1f1a2e 0%, #3a2b2a 100%);
}
@media (min-width: 768px) {
  .page-home2 .h2-presepe { margin-top: 3.5rem; padding: 3.5rem 0; }
}
.page-home2 .h2-presepe__grid {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}
@media (min-width: 992px) {
  .page-home2 .h2-presepe__grid {
    grid-template-columns: 1fr 1.35fr;
    gap: 3rem;
  }
}
.page-home2 .h2-presepe__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .4rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #e8c27a;
}
.page-home2 .h2-presepe h2 {
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: .4rem;
}
.page-home2 .h2-presepe__lead {
  margin-bottom: 1.1rem;
  opacity: .85;
}
.page-home2 .h2-presepe__anni {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1.4rem;
}
.page-home2 .h2-presepe__anni a {
  padding: .25rem .8rem;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.page-home2 .h2-presepe__anni a:hover {
  border-color: #fff;
  background: rgba(255,255,255,.1);
}
.page-home2 .h2-presepe__btn {
  border-radius: 999px;
  padding: .6rem 1.25rem;
  font-weight: 700;
  background: #e8c27a;
  border-color: #e8c27a;
  color: #1f1a2e;
  transition: transform .15s ease, background-color .15s ease;
}
.page-home2 .h2-presepe__btn:hover {
  background: #f0d197;
  border-color: #f0d197;
  color: #1f1a2e;
  transform: translateY(-1px);
}

/* Mosaico: una foto grande e due piccole (si adatta se le foto sono meno) */
.page-home2 .h2-presepe__mosaic {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: .6rem;
  height: 260px;
}
@media (min-width: 768px) {
  .page-home2 .h2-presepe__mosaic { height: 380px; gap: .8rem; }
}
.page-home2 .h2-presepe__mosaic img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  transition: transform .35s ease, filter .35s ease;
}
.page-home2 .h2-presepe__mosaic img:first-child {
  grid-row: 1 / 3;
}
.page-home2 .h2-presepe__mosaic--2 { grid-template-rows: 1fr; }
.page-home2 .h2-presepe__mosaic--2 img:first-child { grid-row: auto; }
.page-home2 .h2-presepe__mosaic--1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.page-home2 .h2-presepe__mosaic--1 img:first-child { grid-row: auto; }
.page-home2 .h2-presepe__mosaic:hover img {
  filter: brightness(1.08);
}

/* La fascia è a tutta larghezza: niente spostamento laterale nella comparsa */
.page-home2 .h2-presepe + .h2-blocks {
  padding-top: 2.5rem;
}
