/* ===== STYLES.CSS: Home (variabili/base in display.css) ===== */

/* Voce Home in nav bar e menu hamburger: grassetto e colori Floating Dream */
.nav-list a.nav-home,
.nav-list a[href="index.php"] {
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-list a.nav-home:hover,
.nav-list a.nav-home:focus-visible,
.nav-list a[href="index.php"]:hover,
.nav-list a[href="index.php"]:focus-visible {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-list a.nav-home::after,
.nav-list a[href="index.php"]::after {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 100%;
}

.nav-modal-list a.nav-home,
.nav-modal-list a[href="index.php"] {
  font-weight: 700;
  color: var(--accent);
}

/* Testo gradiente solo se il browser supporta background-clip: text.
   Altrimenti resta il colore solido sopra (mai trasparente/invisibile). */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .nav-modal-list a.nav-home,
  .nav-modal-list a[href="index.php"] {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

/* Body: base nera — il parallax sopra è al 40% di opacità */
body {
  background: #000;
  overflow-x: hidden;
  position: relative;
}

/* ===== SFONDO PARALLAX (fixed su body) ===== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Mobile-first: evita di scaricare anche l'hero desktop su PSI/mobile */
  background-image: url("../img/principale/backgroung_parallax_mobile.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.6;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

@media (min-width: 768px) and (orientation: landscape), (min-width: 1025px) {
  body::before {
    background-image: url("../img/principale/backgroung_parallax.webp");
  }
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + 2rem) 1.5rem 4rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Simbolo accessibilità: in alto a destra sulla stessa riga del logo (home, desktop; le query lo riportano accanto al logo su mobile/tablet) */
.hero-access-symbol-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: fixed;
  left: auto;
  right: 1.5rem;
  top: 1rem;
  z-index: 101;
}

.hero-access-symbol {
  font-size: 2.8rem;
  color: #fff;
  opacity: 0.9;
  display: block;
}

.hero-access-symbol-check {
  position: absolute;
  bottom: -0.1em;
  right: -0.1em;
  font-size: 0.75rem;
  font-weight: bold;
  color: #16a34a;
  background: #fff;
  border-radius: 50%;
  width: 2em;
  height: 2em;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

.hero-content {
  max-width: 640px;
}

.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45), 0 1px 4px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
  margin: 0;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: #fff;
  opacity: 0.95;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  padding: 0.875rem 1.75rem;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border: 1px solid rgba(47, 126, 167, 0.5);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(47, 126, 167, 0.28), 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(47, 126, 167, 0.35), 0 6px 16px rgba(0, 0, 0, 0.12);
  border-color: rgba(47, 126, 167, 0.6);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  color: #fff;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, #fff, transparent);
  opacity: 0.6;
  border-radius: 1px;
}

.scroll-text {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #fff;
  opacity: 0.8;
}

/* ===== SEZIONE CONTENUTO ===== */
.content-section {
  min-height: 60vh;
  padding: 4rem 1.5rem;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.content-section--transparent {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.content-section--transparent .section-title,
.content-section--transparent .section-lead {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Sezione 2: trasparente sopra, gradiente nero verso il basso (nero prende più spazio, svanisce dopo) */
.content-section--gradient-black-bottom {
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.70) 75%, rgba(0, 0, 0, 0.80) 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.content-section--gradient-black-bottom .section-title,
.content-section--gradient-black-bottom .section-lead {
  color: #f8f9fb;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Sezione 3: nero sopra, gradiente verso trasparente sotto (nero prende più spazio, svanisce dopo) */
.content-section--gradient-black-top {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.80) 0%, rgba(0, 0, 0, 0.70) 25%, transparent 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.content-section--gradient-black-top .section-title,
.content-section--gradient-black-top .section-lead {
  color: #f8f9fb;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ===== SEZIONE 2: FEATURE ===== */
.section-feature {
  position: relative;
  z-index: 1;
  padding: 120px 0;
  background: transparent;
}

.section-feature .container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-head {
  text-align: center;
  margin-bottom: 60px;
}

.section-feature .section-head h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.section-feature .section-head h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  margin: 0.85rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(47, 126, 167, 0.35);
}

.section-feature .section-head p {
  margin: 0;
  font-size: 1.0625rem;
  color: rgba(248, 249, 251, 0.92);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.feature-card {
  position: relative;
  overflow: hidden;
  height: 320px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: #f8f9fb;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  display: flex;
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.feature-media {
  position: absolute;
  inset: 0;
}

.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transform: scale(1.02);
  transition: transform 0.6s ease;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.1));
  z-index: 1;
}

.feature-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 36px;
  color: #fff;
}

.feature-content h3 {
  font-size: 28px;
  margin: 0 0 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.feature-content p {
  margin: 0 0 20px;
  font-size: 1rem;
  line-height: 1.5;
}

.feature-cta {
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
  display: inline-block;
}

.feature-cta::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.4s ease;
}

.feature-card:hover .feature-media img {
  transform: scale(1.06);
}

.feature-card:hover .feature-cta::after {
  width: 100%;
}

/* ===== SEZIONE ABOUT ===== */
.section-about {
  position: relative;
  z-index: 1;
  padding: 140px 0;
  background: transparent;
}

.section-about .container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 80px;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
}

.about-media {
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(248, 249, 251, 0.45);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.28),
    0 0 0 8px rgba(248, 249, 251, 0.08),
    0 0 0 16px rgba(248, 249, 251, 0.04);
}

.about-media::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px dashed rgba(248, 249, 251, 0.28);
  pointer-events: none;
  z-index: 2;
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-media::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1px solid rgba(248, 249, 251, 0.35);
  pointer-events: none;
  z-index: 2;
}

.about-content h2 {
  font-size: 48px;
  margin-bottom: 24px;
  color: #f8f9fb;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.about-content h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  margin: 1rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(248, 249, 251, 0.35), rgba(248, 249, 251, 0.9), rgba(248, 249, 251, 0.35));
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.2);
}

.about-content {
  text-align: center;
}

.about-content p {
  font-size: 18px;
  line-height: 1.8;
  color: rgba(248, 249, 251, 0.92);
  max-width: 700px;
  margin: 0 auto;
}

.about-highlights {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.about-highlights span {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  font-weight: 600;
  color: var(--text);
  transition: transform 0.25s ease;
}

.about-highlights span:hover {
  transform: translateY(-3px);
}

.section-about.content-section--gradient-black-top .about-content h2 {
  color: #f8f9fb;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.section-about.content-section--gradient-black-top .about-content p {
  color: rgba(248, 249, 251, 0.92);
}

.section-about.content-section--gradient-black-top .about-highlights span {
  color: #f8f9fb;
  border-color: rgba(248, 249, 251, 0.35);
  background: rgba(248, 249, 251, 0.12);
}

.section-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

.section-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
}

/* ===== SEZIONE 1: CAROUSEL (desktop only) ===== */
.section-carousel {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: transparent;
}

.section-carousel > .section-inner,
.section-carousel > .carousel-container {
  position: relative;
  z-index: 1;
}

.section-carousel .section-inner {
  margin-bottom: 2rem;
}

.carousel-container {
  width: 100%;
  min-width: 900px;
}

.container--carousel {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0 3rem;
}

.carousel-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
  width: 100%;
  max-width: 1200px;
  min-height: 420px;
}

/* ----- Frecce stile Floating Dream (pill glass + gradient accent) ----- */
.carousel-arrow {
  position: relative;
  z-index: 20;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(47, 126, 167, 0.35);
  background: linear-gradient(135deg, rgba(248, 249, 251, 0.92) 0%, rgba(247, 249, 250, 0.88) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(47, 126, 167, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.carousel-arrow:hover {
  background: linear-gradient(135deg, var(--accent-soft) 0%, rgba(127, 155, 143, 0.12) 100%);
  color: var(--accent-2);
  border-color: rgba(47, 126, 167, 0.5);
  transform: scale(1.06);
  box-shadow: 0 12px 32px rgba(47, 126, 167, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.carousel-arrow:focus-visible {
  outline-offset: 2px;
  outline-color: var(--accent);
}

/* ----- Card slide ----- */
.slide-card {
  position: absolute;
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  transition: transform 0.4s ease, opacity 0.4s ease, z-index 0.4s ease, box-shadow 0.4s ease;
}

.slide-card--nudge {
  animation: carousel-nudge 1.5s ease-in-out 0s infinite;
}

@keyframes carousel-nudge {
  0% {
    transform: translateX(0);
  }
  4% {
    transform: translateX(-4px);
  }
  8% {
    transform: translateX(4px);
  }
  12% {
    transform: translateX(-2px);
  }
  16% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(0);
  }
}

/* Effetto 3D: lato verso la centrale più “grosso” (vicino), lato esterno più “piccolo” (lontano) */
.slide-card.is-prev {
  transform: scale(0.91) rotateY(-14deg);
  transform-origin: right center;
  opacity: 0.9;
  z-index: 1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  backface-visibility: hidden;
}

.slide-card.is-next {
  transform: scale(0.91) rotateY(14deg);
  transform-origin: left center;
  opacity: 0.9;
  z-index: 1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  backface-visibility: hidden;
}

.slide-card.is-active {
  transform: scale(1);
  left: 50%;
  margin-left: -360px;
  top: 0;
  z-index: 2;
  box-shadow: var(--shadow);
}

.slide-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Didascalia suite — solo sulla card centrale */
.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 2rem 1.25rem 1.15rem;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(47, 126, 167, 0.08) 45%,
    rgba(30, 35, 40, 0.42) 100%
  );
}

.slide-card:not(.is-active) .slide-caption {
  display: none;
}

.slide-caption__text {
  display: inline-block;
  max-width: calc(100% - 1.5rem);
  padding: 0.7rem 1.85rem;
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 3.2vw, 1.4rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow:
    0 10px 28px rgba(47, 126, 167, 0.38),
    0 2px 10px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slide-caption.is-animate .slide-caption__text {
  animation: carousel-caption-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.slide-caption.is-enter-prev.is-animate .slide-caption__text {
  animation-name: carousel-caption-in-prev;
}

.slide-caption.is-enter-next.is-animate .slide-caption__text {
  animation-name: carousel-caption-in-next;
}

@keyframes carousel-caption-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes carousel-caption-in-prev {
  from {
    opacity: 0;
    transform: translateY(14px) translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(0);
  }
}

@keyframes carousel-caption-in-next {
  from {
    opacity: 0;
    transform: translateY(14px) translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(0);
  }
}

/* Dimensioni card: active 720x420, side 70% = 504x294 */
.slide-card.is-active .slide-frame {
  width: 720px;
  height: 420px;
}

.slide-card.is-prev .slide-frame,
.slide-card.is-next .slide-frame {
  width: 504px;
  height: 294px;
}

.carousel-track {
  position: relative;
  z-index: 0;
  margin: 0 auto;
  max-width: 1728px;
  perspective: 1400px;
  transform-style: preserve-3d;
}

/* Laterali sotto la centrale del 30% (la centrale le sovrappone) */
.slide-card.is-prev {
  position: absolute;
  left: calc(50% - 360px - 504px + 151px);
  top: 50%;
  margin-top: -134px;
}

.slide-card.is-next {
  position: absolute;
  left: calc(50% + 360px - 151px);
  top: 50%;
  margin-top: -134px;
}

/* ----- Stack immagini + hover ----- */
.img-stack {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.img-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.img-main {
  z-index: 1;
}

.slide-card:hover .img-main {
  transform: translateY(-100%);
}

.img-hover {
  z-index: 0;
  transform: translateY(100%);
}

.slide-card:hover .img-hover {
  transform: translateY(0);
}

.slide-card:hover .img-blur-main {
  transform: translateY(-100%) scale(1.05);
}

.slide-card:hover .img-blur-hover {
  transform: translateY(0) scale(1.05);
}


/* Overlay hover: nero 40% + SCOPRI DI PIÙ */
.hover-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.slide-card:hover .hover-overlay {
  opacity: 1;
}

/* Mobile: gestione hover controllata da classi (touch) */
.slide-card.is-finger-hover .img-main {
  transform: translateY(-100%);
}

.slide-card.is-finger-hover .img-hover {
  transform: translateY(0);
}

.slide-card.is-finger-hover .img-blur-main {
  transform: translateY(-100%) scale(1.05);
}

.slide-card.is-finger-hover .img-blur-hover {
  transform: translateY(0) scale(1.05);
}


.slide-card.is-finger-hover .hover-overlay {
  opacity: 1;
}

/* Subito dopo il rilascio del dito: forza ritorno alla img principale
   (anche se il browser mantiene :hover attivo per touch) */
.carousel-track.is-post-touch .img-main {
  transform: none !important;
}

.carousel-track.is-post-touch .img-hover {
  transform: translateY(100%) !important;
}

.carousel-track.is-post-touch .hover-overlay {
  opacity: 0 !important;
}

.hover-overlay span {
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ----- Side cards: blur gradiente (img-blur con mask) ----- */
.slide-card .img-blur-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.slide-card.is-active .img-blur-wrap {
  display: none;
}

.slide-card.is-prev .img-blur-wrap,
.slide-card.is-next .img-blur-wrap {
  display: block;
}

.img-blur-wrap .img-blur {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px);
  transform: scale(1.05);
  transition: transform 0.45s ease, opacity 0.45s ease;
}

/* Blur layers follow main/hover switching */
.img-blur-main {
  z-index: 1;
  opacity: 1;
}

.img-blur-hover {
  z-index: 0;
  opacity: 1;
  transform: translateY(100%) scale(1.05);
}

/* Left side: nitido verso interno (destra), blur verso esterno (sinistra) */
.slide-card.is-prev .img-blur-wrap {
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 35%);
  mask-image: linear-gradient(to right, transparent 0%, black 35%);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
}

/* Right side: nitido verso interno (sinistra), blur verso esterno (destra) */
.slide-card.is-next .img-blur-wrap {
  -webkit-mask-image: linear-gradient(to left, transparent 0%, black 35%);
  mask-image: linear-gradient(to left, transparent 0%, black 35%);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
}

/* Cerchio Regala in basso a destra */
.floating-regala-wrap {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.floating-regala-label {
  font-size: 0.85rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: center;
  max-width: 10em;
  line-height: 1.3;
}

/* Carosello home: loop hover robusto (2s main + 2s hover infinito) */
.carousel-track.is-hover-timer .img-main {
  animation: carouselHoverTimerMain 4s infinite linear;
}

.carousel-track.is-hover-timer .img-hover {
  animation: carouselHoverTimerHover 4s infinite linear;
}

.carousel-track.is-hover-timer .img-blur-main {
  animation: carouselHoverTimerMain 4s infinite linear;
}

.carousel-track.is-hover-timer .img-blur-hover {
  animation: carouselHoverTimerHover 4s infinite linear;
}

.carousel-track.is-hover-timer .hover-overlay {
  animation: carouselHoverTimerOverlay 4s infinite linear;
}

@keyframes carouselHoverTimerMain {
  0%,
  49.999% {
    transform: translateY(0);
  }
  50%,
  100% {
    transform: translateY(-100%);
  }
}

@keyframes carouselHoverTimerHover {
  0%,
  49.999% {
    transform: translateY(100%);
  }
  50%,
  100% {
    transform: translateY(0);
  }
}

@keyframes carouselHoverTimerOverlay {
  0%,
  49.999% {
    opacity: 0;
  }
  50%,
  100% {
    opacity: 1;
  }
}

.floating-regala {
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  border: 5px solid #0ea5e9;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text, #1a1a1a);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.floating-regala:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.floating-regala-icon {
  font-size: 3.5rem;
  line-height: 1;
}

/* Utility: evita saltini su scroll (riserva spazio per header fixed) */
main {
  position: relative;
  z-index: 1;
  padding-top: 0;
}

/* ===== MEDIA QUERIES: MOBILE & TABLET (4 breakpoint) ===== */

/* 1. Mobile portrait (max-width 767px) */
@media (max-width: 767px) and (orientation: portrait) {
  body {
    background: #000;
    overflow-x: hidden;
  }

  body::before {
    position: fixed;
    inset: 0;
    height: auto;
    min-height: auto;
  }

  .hero {
    padding: calc(var(--header-height) + 1.5rem) 1rem 3rem;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-access-symbol-wrap {
    position: relative;
    right: auto;
    top: auto;
    left: auto;
    margin-left: 0.75rem;
  }

  .hero-access-symbol {
    font-size: 2rem;
    color: var(--text);
    opacity: 0.85;
  }

  .scroll-indicator {
    bottom: 1.5rem;
  }

  .scroll-line {
    height: 32px;
  }

  .content-section {
    padding: 2.5rem 1rem;
    min-height: 50vh;
  }

  .section-inner {
    padding: 0 0.5rem;
  }

  .section-title {
    font-size: 1.375rem;
  }

  .section-lead {
    font-size: 0.9375rem;
  }

  /* Feature: 1 colonna, card più basse */
  .section-feature {
    padding: 60px 0;
  }

  .section-feature .container {
    padding: 0 1rem;
  }

  .section-head {
    margin-bottom: 32px;
  }

  .section-feature .section-head h2 {
    font-size: clamp(1.5rem, 5vw, 1.875rem);
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .feature-card {
    height: 240px;
    border-radius: 18px;
  }

  .feature-content {
    padding: 24px;
  }

  .feature-content h3 {
    font-size: 1.25rem;
  }

  .feature-content p {
    font-size: 0.9375rem;
  }

  /* About: stack verticale */
  .section-about {
    padding: 60px 0;
  }

  .section-about .container {
    padding: 0 1rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .about-media {
    width: 220px;
    height: 220px;
    margin: 0 auto;
  }

  .about-content h2 {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
  }

  .about-content p {
    font-size: 1rem;
  }

  .about-highlights {
    justify-content: center;
    margin-top: 24px;
  }

  /* Carousel: singola card a larghezza piena */
  .carousel-container {
    min-width: 0;
    width: 100%;
    overflow: hidden;
  }

  .container--carousel {
    padding: 0 1rem;
  }

  .carousel {
    padding: 1rem 0 2rem;
  }

  .carousel-track {
    min-height: clamp(320px, 42vw, 390px);
    max-width: 100%;
  }

  .slide-card.is-prev,
  .slide-card.is-next {
    display: none;
  }

  .slide-card.is-active {
    position: relative;
    left: 0;
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }

  .slide-card.is-active .slide-frame {
    width: 100%;
    height: clamp(320px, 42vw, 390px);
    max-width: 100%;
  }

  .carousel-arrow {
    display: none !important;
  }

  /* Mobile: disattivo :hover sul carosello (lo gestiamo con classi touch) */
  .slide-card:hover .img-main {
    transform: none;
  }

  .slide-card:hover .img-hover {
    transform: translateY(100%);
  }

  .slide-card:hover .hover-overlay {
    opacity: 0;
  }

  /* Floating Regala */
  .floating-regala-wrap {
    bottom: 1rem;
    right: 1rem;
  }

  .floating-regala {
    width: 5rem;
    height: 5rem;
    border-width: 3px;
  }

  .floating-regala-icon {
    font-size: 2.25rem;
  }

  .floating-regala-label {
    font-size: 0.75rem;
  }
}

/* 2. Mobile landscape (max-width 767px) */
@media (max-width: 767px) and (orientation: landscape) {
  body {
    background: #000;
    overflow-x: hidden;
  }

  body::before {
    position: fixed;
    inset: 0;
    height: auto;
    min-height: auto;
  }

  .hero {
    min-height: 100vh;
    padding: calc(var(--header-height) + 1rem) 1rem 2rem;
  }

  .hero-title {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
  }

  .hero-subtitle {
    font-size: 0.9375rem;
  }

  .hero-access-symbol-wrap {
    position: relative;
    right: auto;
    top: auto;
    left: auto;
    margin-left: 0.75rem;
  }

  .hero-access-symbol {
    font-size: 1.75rem;
    color: var(--text);
    opacity: 0.85;
  }

  .scroll-indicator {
    bottom: 1rem;
  }

  .scroll-line {
    height: 28px;
  }

  .content-section {
    padding: 2rem 1rem;
    min-height: 50vh;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .section-feature {
    padding: 48px 0;
  }

  .section-feature .container {
    padding: 0 1rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-card {
    height: 200px;
  }

  .feature-content {
    padding: 20px;
  }

  .feature-content h3 {
    font-size: 1.125rem;
  }

  .section-about {
    padding: 48px 0;
  }

  .section-about .container {
    padding: 0 1rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .about-media {
    width: 180px;
    height: 180px;
    margin: 0 auto;
  }

  .about-content h2 {
    font-size: 1.5rem;
  }

  .about-content p {
    font-size: 0.9375rem;
  }

  /* Carousel: stessa struttura di mobile portrait (singola card a larghezza piena) */
  .carousel-container {
    min-width: 0;
    width: 100%;
    overflow: hidden;
  }

  .container--carousel {
    padding: 0 1rem;
  }

  .carousel {
    padding: 1rem 0 2rem;
  }

  .carousel-track {
    min-height: 0;
    max-width: 100%;
  }

  .slide-card.is-prev,
  .slide-card.is-next {
    display: none;
  }

  .slide-card.is-active {
    position: relative;
    left: 0;
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }

  .slide-card.is-active .slide-frame {
    width: 100%;
    height: auto;
    aspect-ratio: 12 / 7; /* come desktop (720x420) */
    max-width: 100%;
  }

  /* Tablet portrait: mostra tutta l'immagine senza crop */
  .img-layer {
    object-fit: contain;
  }

  .carousel-arrow {
    display: none !important;
  }

  /* Mobile landscape: disattivo :hover sul carosello (touch gestito da classi) */
  .slide-card:hover .img-main {
    transform: none;
  }

  .slide-card:hover .img-hover {
    transform: translateY(100%);
  }

  .slide-card:hover .hover-overlay {
    opacity: 0;
  }

  .floating-regala-wrap {
    bottom: 0.75rem;
    right: 0.75rem;
  }

  .floating-regala {
    width: 4rem;
    height: 4rem;
    border-width: 2px;
  }

  .floating-regala-icon {
    font-size: 1.75rem;
  }

  .floating-regala-label {
    font-size: 0.65rem;
  }
}

/* 3. Tablet portrait (768px – 1024px): stesso menu hamburger di mobile (logo, simbolo disabili, lingue + hamburger) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .hero-access-symbol-wrap {
    position: relative;
    right: auto;
    top: auto;
    left: auto;
    margin-left: 0.75rem;
  }

  .hero-access-symbol {
    color: var(--text);
    opacity: 0.85;
  }

  .hero {
    padding: calc(var(--header-height) + 2rem) 1.5rem 3.5rem;
  }

  .hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  .hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
  }

  .content-section {
    padding: 3rem 1.5rem;
    min-height: 55vh;
  }

  .section-title {
    font-size: clamp(1.5rem, 4vw, 1.75rem);
  }

  .section-feature {
    padding: 80px 0;
  }

  .section-feature .container {
    padding: 0 1.5rem;
  }

  .section-head {
    margin-bottom: 40px;
  }

  .section-feature .section-head h2 {
    font-size: clamp(1.625rem, 4vw, 2rem);
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .feature-card {
    height: 280px;
    border-radius: 20px;
  }

  .feature-content {
    padding: 28px;
  }

  .feature-content h3 {
    font-size: 1.5rem;
  }

  .section-about {
    padding: 80px 0;
  }

  .section-about .container {
    padding: 0 1.5rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .about-media {
    width: 280px;
    height: 280px;
    margin: 0 auto;
  }

  .about-content h2 {
    font-size: clamp(2rem, 5vw, 2.75rem);
  }

  .about-content p {
    font-size: 1.0625rem;
  }

  .about-highlights {
    justify-content: center;
    margin-top: 28px;
  }

  /* Carousel: stessa struttura di mobile portrait (singola card a larghezza piena) */
  .carousel-container {
    min-width: 0;
    width: 100%;
    overflow: hidden;
  }

  .container--carousel {
    padding: 0 1rem;
  }

  .carousel {
    padding: 1rem 0 2rem;
  }

  .carousel-track {
    min-height: 0;
    max-width: 100%;
  }

  .slide-card.is-prev,
  .slide-card.is-next {
    display: none;
  }

  .slide-card.is-active {
    position: relative;
    left: 0;
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }

  .slide-card.is-active .slide-frame {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9; /* come le immagini “punti di interesse” */
    max-width: 100%;
  }

  .carousel-arrow {
    display: none !important;
  }

  .floating-regala {
    width: 6.5rem;
    height: 6.5rem;
    border-width: 4px;
  }

  .floating-regala-icon {
    font-size: 2.75rem;
  }
}

/* 4. Tablet landscape (768px – 1024px) */
@media (min-width: 768px) and (max-width: 1360px) and (orientation: landscape) {
  .hero-access-symbol-wrap {
    position: relative;
    right: auto;
    top: auto;
    left: auto;
    margin-left: 0.75rem;
  }

  .hero-access-symbol {
    color: var(--text);
    opacity: 0.85;
  }

  .hero {
    padding: calc(var(--header-height) + 1.5rem) 2rem 3rem;
  }

  .hero-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
  }

  .hero-subtitle {
    font-size: clamp(1rem, 1.8vw, 1.125rem);
  }

  .content-section {
    padding: 3rem 1.5rem;
    min-height: 55vh;
  }

  .section-feature {
    padding: 80px 0;
  }

  .section-feature .container {
    padding: 0 1.5rem;
  }

  .section-head {
    margin-bottom: 40px;
  }

  .feature-grid {
    gap: 28px;
  }

  .feature-card {
    height: 280px;
    border-radius: 20px;
  }

  .feature-content {
    padding: 28px;
  }

  .feature-content h3 {
    font-size: 1.375rem;
  }

  .section-about {
    padding: 100px 0;
  }

  .section-about .container {
    padding: 0 1.5rem;
  }

  .about-grid {
    gap: 48px;
    max-width: 100%;
  }

  .about-media {
    width: 260px;
    height: 260px;
  }

  .about-content h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
  }

  .about-content p {
    font-size: 1rem;
  }

  .carousel-container {
    min-width: 0;
    width: 100%;
  }

  .container--carousel {
    padding: 0 1.5rem;
  }

  .carousel-track {
    min-height: 320px;
    max-width: 100%;
  }

  .slide-card.is-active .slide-frame {
    width: min(520px, 55vw);
    height: 320px;
  }

  .slide-card.is-active {
    margin-left: calc(-1 * min(260px, 27.5vw));
  }

  .slide-card.is-prev .slide-frame,
  .slide-card.is-next .slide-frame {
    width: min(320px, 34vw);
    height: 200px;
  }

  .slide-card.is-prev {
    left: 0;
    margin-left: 0;
    margin-top: -100px;
  }

  .slide-card.is-next {
    left: auto;
    right: 0;
    margin-left: 0;
    margin-top: -100px;
  }

  .carousel-arrow {
    display: none !important;
  }

  .floating-regala {
    width: 7rem;
    height: 7rem;
  }

  .floating-regala-icon {
    font-size: 3rem;
  }
}
