/* ───────────────────────────────────────────────────────────
   Home page effects (hero, bento program, dock, scroll video,
   apple-style cards carousel, reveal on scroll).
   Loaded after style.css / header.css, only by index.html.
   ─────────────────────────────────────────────────────────── */

/* ── Reveal on scroll ── */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Hero: text generate effect ── */
.hero-main h1 .tg-word {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateX(-1.4rem);
  clip-path: inset(-10% 100% -10% -10%);
  animation: tgIn 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 380ms + 200ms);
}

.hero-main h1 .tg-word.is-static {
  opacity: 1;
  filter: none;
  clip-path: none;
  transform: none;
  animation: none;
}

@keyframes tgIn {
  to {
    opacity: 1;
    filter: blur(0);
    clip-path: inset(-10% -10% -10% -10%);
    transform: none;
  }
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-logo,
.hero-subtitle,
.hero-cta,
.hero-verse-day {
  animation: heroFadeUp 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-logo { animation-delay: 0ms; }
.hero-subtitle { animation-delay: 1300ms; }
.hero-cta { animation-delay: 1500ms; }
.hero-verse-day { animation-delay: 1700ms; }

/* ── Hero: moving border on the primary button ── */
@property --mb-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.hero-btn-primary,
.hero-btn-primary:hover {
  --mb-fill: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary) 88%, #ffffff 12%),
    var(--primary-strong)
  );
  padding: calc(0.72rem - 1px) calc(1.15rem - 1px);
  border: 2px solid transparent;
  background:
    var(--mb-fill) padding-box,
    conic-gradient(
      from var(--mb-angle),
      rgba(255, 255, 255, 0.1) 0 55%,
      #f3dcb6 80%,
      #ffffff 92%,
      rgba(255, 255, 255, 0.1) 100%
    ) border-box;
  box-shadow: 0 0 22px rgba(243, 220, 182, 0.22);
  animation: mbSpin 3.4s linear infinite;
}

.hero-btn-primary:hover {
  --mb-fill: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary-strong) 85%, var(--primary) 15%),
    color-mix(in srgb, var(--primary-strong) 95%, #000 5%)
  );
}

@keyframes mbSpin {
  to {
    --mb-angle: 360deg;
  }
}

/* ── Program: bento grid ── */
.program-layout {
  padding: 0.5rem 0 0;
}

.program-layout .schedule {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  grid-auto-rows: minmax(0, 1fr);
  gap: 1rem;
  max-width: 880px;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
}

.program-layout .schedule .timeline-item.active {
  --mx: 50%;
  --my: 50%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 0.55rem;
  min-height: 150px;
  padding: 1.35rem 1.5rem;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, #ffffff 0%, var(--surface-alt) 100%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.program-layout .schedule .timeline-item.active::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    300px circle at var(--mx) var(--my),
    rgba(176, 154, 134, 0.3),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.program-layout .schedule .timeline-item.active:hover {
  transform: translateY(-4px);
  border-color: #b09a86;
  box-shadow: 0 18px 38px rgba(94, 68, 48, 0.16);
}

.program-layout .schedule .timeline-item.active:hover::after {
  opacity: 1;
}

.program-layout .schedule .timeline-item.active .timeline-day {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--primary-strong);
}

.program-layout .schedule .timeline-item.active .timeline-tip {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
}

/* Duminică: grande card scura a sinistra */
.program-layout .schedule .timeline-item.active:nth-child(7) {
  grid-column: 1;
  grid-row: 1 / span 2;
  min-height: 320px;
  background: linear-gradient(155deg, #3b2b1f 0%, #6b4c33 100%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(59, 43, 31, 0.32);
}

.program-layout .schedule .timeline-item.active:nth-child(7)::after {
  background: radial-gradient(
    340px circle at var(--mx) var(--my),
    rgba(255, 226, 184, 0.22),
    transparent 70%
  );
}

.program-layout .schedule .timeline-item.active:nth-child(7) .timeline-day {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  color: #fdf4e6;
}

.program-layout .schedule .timeline-item.active:nth-child(7) .timeline-tip {
  font-size: 1.1rem;
  color: rgba(253, 244, 230, 0.9);
}

/* Icona decorativa in alto a destra */
.program-layout .schedule .timeline-art {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  width: 84px;
  height: 84px;
  color: var(--primary);
  opacity: 0.3;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s ease;
}

.timeline-art svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.program-layout .schedule .timeline-item.active:hover .timeline-art {
  transform: scale(1.08) rotate(-5deg);
  opacity: 0.45;
}

.program-layout .schedule .timeline-item.active:nth-child(7) .timeline-art {
  top: 1.2rem;
  right: 1.3rem;
  width: 150px;
  height: 150px;
  color: #fff;
  opacity: 0.2;
}

.timeline-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.program-layout .schedule .timeline-item.active:not(:nth-child(7)) .timeline-art img {
  filter: invert(24%) sepia(25%) saturate(900%) hue-rotate(345deg) brightness(95%);
}

.program-layout .schedule .timeline-item.active:nth-child(7):hover .timeline-art {
  opacity: 0.26;
}

/* Giorno corrente */
.program-layout .schedule .timeline-item.active.today {
  border-color: var(--primary);
  box-shadow:
    0 0 0 2px var(--primary),
    0 18px 38px rgba(94, 68, 48, 0.2);
}

.program-layout .schedule .timeline-item.active:nth-child(7).today {
  border-color: #f3dcb6;
  box-shadow:
    0 0 0 2px #f3dcb6,
    0 18px 40px rgba(59, 43, 31, 0.4);
}

.schedule .timeline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--primary);
}

.schedule .timeline-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8bd49a;
  animation: todayPulse 1.8s ease-out infinite;
}

.timeline-item.active:nth-child(7) .timeline-badge {
  color: #3b2b1f;
  background: #f3dcb6;
}

@keyframes todayPulse {
  0% { box-shadow: 0 0 0 0 rgba(139, 212, 154, 0.7); }
  100% { box-shadow: 0 0 0 9px rgba(139, 212, 154, 0); }
}

.program-layout .timeline-summary {
  display: block;
  max-width: 880px;
  margin: 1.1rem auto 0;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--glass);
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--muted);
}

@media (max-width: 560px) {
  .hero-btn-primary,
  .hero-btn-primary:hover {
    padding: calc(0.72rem - 1px) 0.5rem;
  }
}

@media (max-width: 700px) {
  .program-layout {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .program-layout .schedule {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    gap: 0.8rem;
  }

  .program-layout .schedule .timeline-item.active:nth-child(7) {
    grid-column: auto;
    grid-row: auto;
    min-height: 210px;
  }

  .program-layout .schedule .timeline-item.active {
    min-height: 130px;
    align-items: flex-start;
    text-align: left;
  }

  .program-layout .schedule .timeline-item.active .timeline-day,
  .program-layout .schedule .timeline-item.active .timeline-tip {
    text-align: left;
  }

  .program-layout .timeline-summary {
    border-radius: 18px;
  }

  /* Icone: stessa dimensione, stesso margine destro, centrate in verticale nelle card piccole */
  .program-layout .schedule .timeline-art {
    top: calc(50% - 36px);
    right: 1.25rem;
    width: 72px;
    height: 72px;
  }

  /* Duminică: icona in alto a destra, piccola abbastanza da non toccare il testo */
  .program-layout .schedule .timeline-item.active:nth-child(7) .timeline-art {
    top: 1.25rem;
    right: 1.25rem;
    width: 80px;
    height: 80px;
  }
}

/* ── Floating dock ── */
#program {
  padding-bottom: 1.2rem;
}


.dock-section {
  border-top: 0;
  padding: 1.1rem 0 0.2rem;
}

.section-featured-video {
  border-top: 0;
}

.dock {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0.8rem;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 0.4rem 1rem;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 66px;
  text-decoration: none;
  color: var(--text);
}

.dock-icon {
  --dock-scale: 1;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: #6b4c33;
  background: #fbf6ee;
  border: 1.5px solid rgba(107, 76, 51, 0.45);
  box-shadow: 0 6px 14px rgba(94, 68, 48, 0.12);
  transform: scale(var(--dock-scale));
  transform-origin: 50% 100%;
  transition: transform 0.12s ease-out, filter 0.2s;
}

.dock-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dock-item:hover .dock-icon,
.dock-item:focus-visible .dock-icon {
  filter: brightness(1.08) saturate(1.1);
}

.dock-item:focus-visible {
  outline: none;
}

.dock-item:focus-visible .dock-icon {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.dock-label {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  color: var(--text);
}

@media (hover: none), (max-width: 720px) {
  .dock-section {
    display: none;
  }

  .dock {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem 0.5rem;
    width: 100%;
    max-width: 440px;
    padding: 1.1rem 0.9rem;
    border-radius: 24px;
  }

  .dock-item {
    width: auto;
  }

  .dock-icon {
    transform: none;
  }
}

/* ── Featured video: card 3D che entra da lato, gira e si posa ── */
.section-featured-video {
  overflow-x: clip;
}

.featured-video-stage {
  position: relative;
  z-index: 2;
  perspective: 1500px;
}

.featured-video-card {
  position: relative;
  aspect-ratio: 16 / 9;
}

.featured-video-frame {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  padding: 0.6rem;
  border-radius: 26px;
  border: 1px solid #3a3330;
  background: #1c1917;
  box-shadow:
    0 9px 20px rgba(0, 0, 0, 0.29),
    0 37px 37px rgba(0, 0, 0, 0.26),
    0 84px 50px rgba(0, 0, 0, 0.15);
}

.featured-video-frame {
  aspect-ratio: auto;
}

.featured-video-frame iframe {
  border-radius: 18px;
}

@media (max-width: 700px) {
  .featured-video-frame {
    padding: 0.4rem;
    border-radius: 20px;
  }

  .featured-video-frame iframe {
    border-radius: 14px;
  }
}

/* ── Shorts: apple-style cards carousel ── */
.apple-shell {
  position: relative;
  margin-top: 1rem;
  /* esce dal container per usare tutto lo spazio laterale disponibile */
  width: min(1560px, calc(100vw - 2rem));
  margin-left: calc(50% - min(1560px, calc(100vw - 2rem)) / 2);
}

.apple-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.6rem 0.4rem 1.3rem;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 0.4rem;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab;
}

.apple-track::-webkit-scrollbar {
  display: none;
}

.apple-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.apple-card {
  position: relative;
  flex: 0 0 auto;
  width: clamp(210px, 20vw, 290px);
  aspect-ratio: 9 / 16;
  padding: 0;
  border: 0;
  border-radius: 24px;
  overflow: hidden;
  background: #1c1917;
  color: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease;
}

.apple-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  pointer-events: none;
  -webkit-user-drag: none;
}

.apple-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, transparent 28%, transparent 40%, rgba(0, 0, 0, 0.85) 100%);
}

.apple-card-meta {
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  top: 1.05rem;
  display: block;
}

.apple-card-cat {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.apple-card-text {
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  bottom: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

/* prime due righe del canto sotto il titolo */
.apple-card-lyrics {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.apple-card-lyrics:empty {
  display: none;
}

.apple-card-lyrics > span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.apple-card-title {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.22;
  text-wrap: balance;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.apple-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  opacity: 0.85;
  transform: scale(0.9);
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

.apple-card-play svg {
  width: 48px;
  height: 48px;
  margin-left: 4px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.3;
  stroke-linejoin: round;
}

.apple-card:hover,
.apple-card:focus-visible {
  transform: translateY(-6px);
}

.apple-card:hover img,
.apple-card:focus-visible img {
  transform: scale(1.07);
}

.apple-card:hover .apple-card-play,
.apple-card:focus-visible .apple-card-play {
  opacity: 1;
  transform: scale(1);
  background: rgba(255, 255, 255, 0.34);
}

.apple-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* ingresso a cascata delle card */
.reveal-ready .apple-shell:not(.is-visible) .apple-card {
  opacity: 0;
  transform: translateX(46px);
}

.reveal-ready .apple-shell .apple-card {
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.35s ease;
  transition-delay: calc(var(--i, 0) * 70ms);
}

.reveal-ready .apple-shell.reveal-done .apple-card {
  transition-delay: 0ms;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.35s ease;
}

.video-nav-btn:disabled,
.video-nav-btn:disabled:hover {
  opacity: 0.38;
  cursor: default;
  transform: none;
  border-color: #d9cdbf;
  background: linear-gradient(180deg, #ffffff, var(--surface-alt));
  color: var(--primary);
  box-shadow: none;
}

@media (min-width: 1000px) {
  .apple-card {
    /* esattamente 5 reel per schermata: niente pezzo del sesto a destra */
    width: calc((100% - 4rem) / 5);
  }
}

@media (max-width: 600px) {
  .apple-card {
    /* un solo reel per schermata: niente pezzo della card successiva */
    width: calc(100vw - 2rem - 0.8rem);
    border-radius: 20px;
  }
}

/* riproduzione diretta nella card (mobile) */
.apple-card-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* modale video */
/* con il reel aperto il tasto cookie (z-index più alto) non deve restare sopra la modale */
body:has(.apple-modal) .cc-fab {
  display: none !important;
}

.apple-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(10, 8, 6, 0.66);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.apple-modal.is-open {
  opacity: 1;
}

.apple-modal-box {
  --video-h: min(78vh, 720px);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: min(92vw, calc(var(--video-h) * 9 / 16));
  transform: translateY(24px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.apple-modal.is-open .apple-modal-box {
  transform: none;
}

.apple-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  color: #fff;
}

.apple-modal-title {
  margin: 0;
  font-family: 'Cinzel', serif;
  flex: 1;
  min-width: 0;
  font-size: clamp(1.05rem, 4.4vw, 1.7rem);
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.apple-modal-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  opacity: 0.85;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.2s;
}

.apple-modal-close:hover {
  opacity: 1;
  transform: rotate(90deg) scale(1.1);
}

.apple-modal-close:active {
  transform: rotate(90deg) scale(0.92);
}

.apple-modal-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 8px;
}

.apple-modal-close svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.apple-modal-body {
  display: flex;
  align-items: stretch;
  gap: 1.2rem;
}

.apple-modal-video {
  flex: none;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.apple-modal-lyrics {
  display: none;
}

@media (min-width: 900px) {
  .apple-modal-box.has-song {
    width: min(94vw, calc(var(--video-h) * 9 / 16 + 1.2rem + 460px));
  }

  .apple-modal-box.has-song .apple-modal-video {
    width: calc(var(--video-h) * 9 / 16);
  }

  .apple-modal-box.has-song .apple-modal-lyrics {
    display: block;
    flex: 1;
    min-width: 0;
    max-height: calc(var(--video-h) * 1);
    overflow-y: auto;
    padding: 1.4rem 1.6rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #fdf4e6;
    scrollbar-width: none;
  }

  .apple-modal-box.has-song .apple-modal-lyrics::-webkit-scrollbar {
    display: none;
  }
}

.apple-lyrics-stanza + .apple-lyrics-stanza {
  margin-top: 1.3rem;
}

.apple-lyrics-stanza span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f3dcb6;
}

.apple-lyrics-stanza p {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.6;
  white-space: pre-line;
}

.apple-modal-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ── Rispetta prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  .reveal-ready .reveal,
  .reveal-ready .apple-shell:not(.is-visible) .apple-card {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-main h1 .tg-word,
  .hero-logo,
  .hero-subtitle,
  .hero-cta,
  .hero-verse-day {
    opacity: 1;
    filter: none;
    transform: none;
    animation: none;
  }

  .hero-btn-primary,
  .hero-btn-primary:hover {
    animation: none;
  }

  .schedule .timeline-badge::before {
    animation: none;
  }

  .program-layout .schedule .timeline-item.active,
  .apple-card,
  .apple-card img,
  .dock-icon,
  .apple-modal,
  .apple-modal-box {
    transition: none;
  }

  .program-layout .schedule .timeline-item.active:hover,
  .apple-card:hover,
  .apple-card:focus-visible {
    transform: none;
  }

  .apple-card:hover img,
  .apple-card:focus-visible img {
    transform: none;
  }

  .featured-video-card {
    transform: none !important;
  }

  .apple-track {
    scroll-behavior: auto;
  }
}

/* Frecce del carosello: centrate sotto le card */
.video-controls-below {
  margin-top: 1.1rem;
  justify-content: center;
}

/* dots sotto i reel */
.video-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.video-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d9cdbf;
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.video-dot:hover { background: var(--primary); }

/* tasto canale YouTube sotto i dots */
.videos-channel {
  display: flex;
  justify-content: center;
  margin-top: 1.1rem;
}

.videos-channel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--primary);
  border-radius: 999px;
  color: var(--primary-strong);
  background: transparent;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s, background 0.18s, color 0.18s;
}

.videos-channel-btn:hover {
  transform: translateY(-1px);
  background: var(--primary);
  color: #fff;
}

/* Mobile: tasto pieno (senza hover) */
@media (max-width: 768px) {
  .videos-channel-btn {
    background: var(--primary);
    color: #fff;
  }
}

.video-dot.is-active {
  width: 24px;
  background: var(--primary);
}

.video-dot:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}


/* ── Cântări care zidesc: serpentelli di titoli sullo sfondo ── */
#video-shorturi {
  position: relative;
  border-top: 0;
  overflow: hidden;
}

/* Evenimente trecute: niente linea di separazione, serpentello di testo sullo sfondo */
#invitatii {
  position: relative;
  border-top: 0;
  overflow-x: clip;
}

#invitatii > .container,
#invitatii > .ev-carousel-wrap {
  position: relative;
  z-index: 1;
}

#video-shorturi > .container {
  position: relative;
  z-index: 1;
}

.songs-head-inner {
  position: relative;
  isolation: isolate;
}

/* alone sfumato dietro titolo e descrizione: il serpentello svanisce in prossimità del testo */
.songs-head-inner::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2.2rem -9rem;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, var(--bg) 0%, var(--bg) 55%, rgba(250, 248, 245, 0) 100%);
  pointer-events: none;
}

.songs-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.songs-bg-text {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.02em;
  fill: var(--primary);
  opacity: 0.13;
}

@media (max-width: 700px) {
  .songs-bg-text { opacity: 0.1; }

  /* serpentelli di testo nascosti su mobile */
  .songs-bg {
    display: none;
  }
}

/* Salvataggio in calendario integrato nella card di Duminică (solo mobile) */
.program-layout .schedule .timeline-cal {
  display: none;
}

@media (max-width: 900px) {
  .program-layout .schedule .timeline-cal {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.35rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(253, 244, 230, 0.18);
  }

  .timeline-cal .calendar-actions-note {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: rgba(253, 244, 230, 0.7);
  }

  .timeline-cal .calendar-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    width: auto;
  }

  .timeline-cal .calendar-btn {
    flex: none;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(253, 244, 230, 0.35);
    background: rgba(253, 244, 230, 0.12);
    color: #fdf4e6;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: none;
  }

  .timeline-cal .calendar-btn:hover,
  .timeline-cal .calendar-btn:active {
    background: rgba(253, 244, 230, 0.22);
  }

  .timeline-cal .calendar-btn svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

/* Video in evidenza: sfondo musicale con dissolvenza sopra e sotto, così si fonde con le sezioni vicine */
.section-featured-video {
  position: relative;
  isolation: isolate;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.section-featured-video::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("../images/sfondo-video-evidenza.avif") center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.35) 12%, #000 32%, #000 68%, rgba(0, 0, 0, 0.35) 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.35) 12%, #000 32%, #000 68%, rgba(0, 0, 0, 0.35) 88%, transparent 100%);
}

/* Evenimente trecute: sfondo con dissolvenza sopra e sotto (solo desktop) */
@media (min-width: 901px) {
  #invitatii {
    isolation: isolate;
  }

  #invitatii::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: url("../images/sfondo-evenimente-trecute.avif") center / cover no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.35) 12%, #000 32%, #000 68%, rgba(0, 0, 0, 0.35) 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.35) 12%, #000 32%, #000 68%, rgba(0, 0, 0, 0.35) 88%, transparent 100%);
  }
}

/* Cântări care zidesc: sfondo verticale per mobile (al posto dei serpentelli di testo) */
@media (max-width: 700px) {
  #video-shorturi {
    isolation: isolate;
  }

  #video-shorturi::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: url("../images/sfondo-cantari-zidesc-mobile.avif") center / cover no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
  }
}
