/* ===== REGALA.CSS: pagina Regala ===== */
/* Dipende da display.css (variabili e base). Hero 30vh, sezione 1 vuota. */

body.page-regala {
  position: relative;
  min-height: 100vh;
  background: #1a1a1a;
}

/* Sfondo body: img identica come trattamento alla sezione (cover + overlay) */
body.page-regala::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("../img/regala/regala_parallax.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

body.page-regala::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.35) 50%,
    rgba(0, 0, 0, 0.45) 100%
  );
}

/* ----- Hero: ~30% viewport, sfondo bianco, titolo + descrizione neri ----- */
.regala-hero {
  height: 30vh;
  min-height: 180px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height, 80px) + 2rem) 1.5rem 2rem;
  text-align: center;
  background: #fff;
}

.regala-hero__head {
  max-width: 560px;
}

.regala-hero__title {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
}

.regala-hero__desc {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

/* ----- Sezione 1: 2 colonne come sezione 4 (card sinistra e destra, ciascuna con img + titolo + desc + FAQ) ----- */
.regala-section-1 {
  position: relative;
  z-index: 1;
  background: transparent;
}

.regala-section-1__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1rem 5rem;
  box-sizing: border-box;
}

.regala-section-1__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 4.5rem;
  align-items: start;
}

.regala-section-1__card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  flex: 1;
  min-height: 0;
}

.regala-section-1__col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  align-items: center;
  flex: 1;
  min-height: 0;
}

.regala-section-1__faq {
  margin-top: auto;
}

/* Prima colonna: abbassa solo la domanda (FAQ) così è sulla stessa riga della seconda colonna */
.regala-section-1__grid > .regala-section-1__card:first-child .regala-section-1__faq {
  margin-top: 1.5rem;
}

/* ----- Stack due immagini sovrapposte (più piccole, angolo in basso a destra rialzato) ----- */
.regala-img-stack {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
  overflow: visible;
  margin-top: 60px;
  margin-left: 60px;
}

.regala-section-3__media.regala-img-stack {
  margin-left: auto;
  margin-right: auto;
  margin-top: 60px;
}

/* Varianti posizionamento dietro (effetto random per ogni stack) */
.regala-img-stack--v1 .regala-img-stack__layer--back { transform: translate(-60px, -60px) rotate(-2deg); }
.regala-img-stack--v2 .regala-img-stack__layer--back { transform: translate(-55px, -68px) rotate(-3deg); }
.regala-img-stack--v3 .regala-img-stack__layer--back { transform: translate(-68px, -52px) rotate(-1deg); }
.regala-img-stack--v4 .regala-img-stack__layer--back { transform: translate(-58px, -62px) rotate(-2.5deg); }
.regala-img-stack--v5 .regala-img-stack__layer--back { transform: translate(-64px, -56px) rotate(-1.5deg); }

.regala-img-stack__layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius, 12px);
  overflow: hidden;
  border: 3px solid rgba(47, 126, 167, 0.5);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
}

.regala-img-stack__layer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.regala-img-stack__layer--back {
  z-index: 0;
  transform: translate(-60px, -60px) rotate(-2deg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.regala-img-stack__layer--front {
  z-index: 1;
  transform-origin: bottom right;
  transform: perspective(800px) rotateY(-5deg) rotateX(4deg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

/* Bordi colorati per pacchetto: Romantico rosso, Gourmet verde, Solo Pernottamento giallo, Idro Dream viola */
.regala-img-stack--red .regala-img-stack__layer {
  border-color: rgba(200, 40, 40, 0.85);
}
.regala-img-stack--green .regala-img-stack__layer {
  border-color: rgba(40, 160, 60, 0.85);
}
.regala-img-stack--yellow .regala-img-stack__layer {
  border-color: rgba(220, 180, 40, 0.9);
}
.regala-img-stack--purple .regala-img-stack__layer {
  border-color: rgba(140, 60, 180, 0.85);
}

.regala-section-1__media {
  position: relative;
}


.regala-section-1__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}

.regala-section-1__desc {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.regala-section-1__faq {
  margin-top: auto;
  width: 100%;
}

.regala-section-1__faq .regala-faq-q {
  text-align: left;
  justify-content: space-between;
}

.regala-faq-item {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.regala-faq-q {
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  font-weight: 700;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.95);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9375rem;
  transition: background 0.25s ease;
}

.regala-faq-q::after {
  content: "+";
  opacity: 0.8;
  margin-left: auto;
  flex-shrink: 0;
}

.regala-faq-item.open .regala-faq-q::after {
  content: "–";
}

.regala-faq-item.open .regala-faq-q {
  background: rgba(47, 126, 167, 0.25);
}

.regala-faq-a {
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.75;
  font-size: 0.9375rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
}

.regala-faq-item.open .regala-faq-a {
  padding: 0 18px 16px;
  max-height: 420px;
  opacity: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.regala-faq-a p {
  margin: 0 0 12px;
}

.regala-faq-a p:last-child {
  margin-bottom: 0;
}

.regala-faq-a ul {
  margin: 12px 0 0;
  padding-left: 1.25rem;
  list-style: disc;
}

.regala-faq-a li {
  margin-bottom: 8px;
}

.regala-faq-a li:last-child {
  margin-bottom: 0;
}

/* CTA "Compra il pacchetto" sotto ogni FAQ pacchetto (stesso link di Procedi all'acquisto) */
.regala-package-cta-wrap {
  margin: 1rem 0 0;
  text-align: center;
}
.regala-package-cta {
  display: inline-block;
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(47, 126, 167, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.regala-package-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(47, 126, 167, 0.45);
  opacity: 0.95;
}
.regala-package-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ----- Sezione 3: centrato, img + titolo + desc + FAQ in colonna unica ----- */
.regala-section-3 {
  position: relative;
  z-index: 1;
  background: transparent;
}

.regala-section-3__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  box-sizing: border-box;
}

.regala-section-3__center {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
}

.regala-section-3__media {
  position: relative;
}

.regala-section-3__col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  width: 100%;
}

.regala-section-3__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}

.regala-section-3__desc {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
}

.regala-section-3__faq {
  margin-top: 0.25rem;
  width: 100%;
  max-width: 560px;
}

.regala-section-3__faq .regala-faq-q {
  text-align: left;
  justify-content: space-between;
}

/* ----- Sezione 4: 2 colonne identiche (sinistra e destra), ciascuna con img + titolo + desc + FAQ ----- */
.regala-section-4 {
  position: relative;
  z-index: 1;
  background: transparent;
}

.regala-section-4__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1rem 5rem;
  box-sizing: border-box;
}

.regala-section-4__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 4.5rem;
  align-items: start;
}

.regala-section-4__card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  flex: 1;
  min-height: 0;
}

.regala-section-4__col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  align-items: center;
  flex: 1;
  min-height: 0;
}

.regala-section-4__faq {
  margin-top: auto;
}

/* Prima colonna: abbassa solo la domanda (FAQ) così è sulla stessa riga della seconda colonna */
.regala-section-4__grid > .regala-section-4__card:first-child .regala-section-4__faq {
  margin-top: 1.5rem;
}

.regala-section-4__media {
  position: relative;
}


.regala-section-4__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}

.regala-section-4__desc {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.regala-section-4__faq {
  margin-top: auto;
  width: 100%;
}

.regala-section-4__faq .regala-faq-q {
  text-align: left;
  justify-content: space-between;
}

/* Reveal: stesso effetto di punti di interesse (entra dal basso) */
.regala-reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Mobile: colonna unica, img sopra */
@media (max-width: 767px) {
  .regala-hero {
    height: auto;
    min-height: 0;
    align-items: flex-start;
    padding: calc(var(--header-height, 80px) + 1.25rem) 1.25rem 1rem;
  }

  .regala-hero__title {
    font-size: 1.5rem;
  }

  .regala-section-1__inner {
    padding: 2rem 1.25rem 3rem;
  }

  .regala-section-1__inner {
    padding: 2rem 1.25rem 3rem;
  }

  .regala-section-1__grid,
  .regala-section-4__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Tutto centrato quando è in colonna */
  .regala-section-1__inner,
  .regala-section-3__inner,
  .regala-section-4__inner {
    text-align: center;
  }

  .regala-section-1__grid,
  .regala-section-4__grid {
    justify-items: center;
  }

  .regala-img-stack {
    margin-top: 40px;
    margin-left: auto;
    margin-right: auto;
  }

  /* In mobile il collage a due immagini deve risultare centrato:
     sovrascriviamo le varianti in modo che il rettangolo complessivo (fronte+retro)
     sia centrato rispetto al contenitore. */
  .regala-img-stack--v1 .regala-img-stack__layer--back,
  .regala-img-stack--v2 .regala-img-stack__layer--back,
  .regala-img-stack--v3 .regala-img-stack__layer--back,
  .regala-img-stack--v4 .regala-img-stack__layer--back,
  .regala-img-stack--v5 .regala-img-stack__layer--back {
    transform: translate(-18px, -26px) rotate(-2deg);
  }

  .regala-section-1__title,
  .regala-section-3__title,
  .regala-section-4__title {
    font-size: 1.25rem;
  }

  .regala-section-3__inner,
  .regala-section-4__inner {
    padding: 2rem 1.25rem 3rem;
  }

  .regala-faq-q {
    padding: 12px 14px;
    font-size: 0.875rem;
  }
}

/* Tablet landscape: allinea prezzo + CTA (pkg 4 e 5) */
@media (min-width: 768px) and (max-width: 1360px) and (orientation: landscape) {
  .regala-section-4__grid {
    align-items: stretch;
  }

  /* Forza allineamento FAQ + CTA su entrambi i card (pkg 4 e 5) */
  .regala-section-4__grid > .regala-section-4__card {
    height: 100%;
  }

  .regala-section-4__col {
    height: 100%;
  }

  .regala-section-4__faq {
    margin-top: auto !important;
  }

  /* Rimuove eventuali offset manuali del primo card */
  .regala-section-4__grid > .regala-section-4__card:first-child .regala-section-4__faq {
    margin-top: auto !important;
  }
}

/* Tablet portrait: allinea FAQ + CTA (pkg 4 e 5) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .regala-section-4__grid {
    align-items: stretch;
  }

  .regala-section-4__card {
    height: 100%;
  }

  .regala-section-4__col {
    height: 100%;
  }

  .regala-section-4__faq {
    margin-top: auto !important;
  }

  /* Rimuove offset manuale del primo card */
  .regala-section-4__grid > .regala-section-4__card:first-child .regala-section-4__faq {
    margin-top: auto !important;
  }
}

/* ----- Sezione 5: 3 domande FAQ, sfondo come il footer (gradiente) ----- */
.regala-section-5 {
  position: relative;
  z-index: 1;
  background: linear-gradient(to bottom, transparent 0%, #ffffff 35%);
}

.regala-section-5__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  box-sizing: border-box;
}

.regala-section-5__wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.regala-section-5__title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text, #1a1a1a);
  text-align: center;
}

.regala-section-5__faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.regala-section-5__faq .regala-faq-q {
  text-align: left;
  justify-content: space-between;
}

.regala-section-5__faq .regala-faq-a {
  text-align: center;
}

.regala-section-5__faq .regala-faq-a ul {
  text-align: left;
  display: inline-block;
}

/* CTA sotto le 3 domande: Per ulteriore info → Contatti */
.regala-section-5__cta-wrap {
  margin: 2rem 0 0;
  text-align: center;
}

.regala-section-5__cta {
  display: inline-block;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(47, 126, 167, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.regala-section-5__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(47, 126, 167, 0.45);
  opacity: 0.95;
}

.regala-section-5__cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* FAQ su sfondo chiaro: testo scuro, bordo e stile come FAQ globale */
.regala-faq-item--light {
  border: 1px solid rgba(30, 35, 40, 0.14);
  background: rgba(248, 249, 251, 0.55);
}

.regala-faq-item--light .regala-faq-q {
  color: #1e2328;
}

.regala-faq-item--light.open .regala-faq-q {
  background: rgba(47, 126, 167, 0.14);
}

.regala-faq-item--light .regala-faq-a {
  color: rgba(30, 35, 40, 0.72);
}

/* Footer pagina Regala: sfondo bianco */
body.page-regala .footer {
  background: #fff;
}
