/* ============ MetodoHost — Global animations CSS ============ */

/* KEN BURNS EFFECT — 4 varianti sfalsate su immagini */
.ken-burns-0, .ken-burns-1, .ken-burns-2, .ken-burns-3 {
  overflow: hidden;
}
.ken-burns-0 {
  animation: kenBurns0 22s ease-in-out infinite alternate;
}
.ken-burns-1 {
  animation: kenBurns1 26s ease-in-out infinite alternate;
}
.ken-burns-2 {
  animation: kenBurns2 20s ease-in-out infinite alternate;
}
.ken-burns-3 {
  animation: kenBurns3 24s ease-in-out infinite alternate;
}
@keyframes kenBurns0 {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.12) translate(-2%, -1%); }
}
@keyframes kenBurns1 {
  0%   { transform: scale(1.08) translate(1%, -1%); }
  100% { transform: scale(1) translate(0, 0); }
}
@keyframes kenBurns2 {
  0%   { transform: scale(1) translate(-1%, 1%); }
  100% { transform: scale(1.1) translate(1%, -1%); }
}
@keyframes kenBurns3 {
  0%   { transform: scale(1.06) translate(0, 0); }
  100% { transform: scale(1) translate(-1%, 1%); }
}

/* Assicura che sc-img (dentro card) resti dentro il border-radius */
.sc-card { perspective: 800px; }

/* ============ MARQUEE CITTÀ ITALIA (auto-scroll infinito) ============ */
.marquee-cities-wrap {
  overflow: hidden;
  background: linear-gradient(90deg, rgba(212,162,76,0.12), rgba(212,162,76,0.05), rgba(212,162,76,0.12));
  border-top: 1px solid rgba(212,162,76,0.25);
  border-bottom: 1px solid rgba(212,162,76,0.25);
  padding: 16px 0;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
}
.marquee-cities-track {
  display: flex;
  gap: 42px;
  width: max-content;
  animation: marqueeScroll 30s linear infinite;
  will-change: transform;
}
.marquee-cities-wrap:hover .marquee-cities-track { animation-play-state: paused; }
.marquee-city {
  color: #D4A24C;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 22px;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.marquee-city::before {
  content: '📍';
  margin-right: 8px;
  font-style: normal;
  font-size: 18px;
}
.marquee-city.dot::before { content: '·'; margin-right: 20px; font-size: 26px; color: rgba(212,162,76,0.5); }
@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============ BEFORE / AFTER SLIDER ============ */
.ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 18px;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  border: 1px solid rgba(212,162,76,0.3);
}
.ba-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ba-overlay {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 50%;
  overflow: hidden;
  z-index: 2;
}
.ba-overlay img {
  width: calc(100% * 2);
  height: 100%;
  object-fit: cover;
  object-position: left;
}
.ba-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.4));
  z-index: 3;
  pointer-events: none;
  transform: translateX(-50%);
}
.ba-handle::before, .ba-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.ba-handle::before {
  width: 44px;
  height: 44px;
  background: #D4A24C;
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.ba-handle::after {
  content: '⇔';
  color: #1A0F02;
  font-size: 22px;
  font-weight: 900;
  z-index: 1;
}
.ba-label {
  position: absolute;
  top: 20px;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  z-index: 4;
  backdrop-filter: blur(6px);
}
.ba-label.before { left: 20px; background: rgba(255,107,71,0.85); color: #fff; }
.ba-label.after  { right: 20px; background: rgba(108,191,132,0.85); color: #0B1F2E; }

/* ============ TIMELINE ORIZZONTALE 3 ANNI ============ */
.timeline-3yr {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1100px;
  margin: 40px auto;
  padding: 40px 0;
}
.timeline-3yr::before {
  content: '';
  position: absolute;
  top: 88px;
  left: 3%;
  right: 3%;
  height: 3px;
  background: linear-gradient(90deg, rgba(212,162,76,0.15), rgba(212,162,76,0.7), rgba(108,191,132,0.7));
  border-radius: 2px;
  z-index: 0;
}
.timeline-item {
  position: relative;
  flex: 1;
  text-align: center;
  z-index: 1;
  padding: 0 12px;
}
.timeline-year {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 32px;
  font-weight: 500;
  color: #E6BD75;
  line-height: 1;
  margin-bottom: 18px;
}
.timeline-dot {
  width: 26px;
  height: 26px;
  background: #D4A24C;
  border: 4px solid #0B1F2E;
  border-radius: 50%;
  margin: 0 auto 20px;
  box-shadow: 0 0 0 4px rgba(212,162,76,0.25);
}
.timeline-title {
  font-weight: 800;
  color: #fff;
  font-size: 16px;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}
.timeline-desc {
  font-size: 12.5px;
  color: rgba(255,255,255,0.65);
  line-height: 1.55;
}
.timeline-item.now .timeline-dot {
  background: #6CBF84;
  box-shadow: 0 0 0 4px rgba(108,191,132,0.3), 0 0 20px rgba(108,191,132,0.4);
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(108,191,132,0.3), 0 0 20px rgba(108,191,132,0.4); }
  50%     { box-shadow: 0 0 0 8px rgba(108,191,132,0.5), 0 0 30px rgba(108,191,132,0.6); }
}
@media(max-width:720px) {
  .timeline-3yr {
    flex-direction: column;
    gap: 34px;
    align-items: flex-start;
    padding-left: 40px;
  }
  .timeline-3yr::before {
    top: 0;
    bottom: 0;
    left: 12px;
    right: auto;
    width: 3px;
    height: auto;
    background: linear-gradient(180deg, rgba(212,162,76,0.15), rgba(212,162,76,0.7), rgba(108,191,132,0.7));
  }
  .timeline-item { text-align: left; padding: 0; }
  .timeline-dot { position: absolute; left: -34px; top: 8px; margin: 0; }
}

/* ============ MAPPA STRUTTURE INTERATTIVA ============ */
.map-strutture {
  position: relative;
  max-width: 720px;
  margin: 40px auto;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #143246, #1A405A);
  border-radius: 18px;
  border: 1px solid rgba(212,162,76,0.25);
  overflow: hidden;
  padding: 30px;
}
.map-bg-label {
  position: absolute;
  top: 22px;
  left: 22px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(212,162,76,0.7);
  font-weight: 800;
}
.map-pin {
  position: absolute;
  width: 44px;
  height: 44px;
  cursor: pointer;
  transform: translate(-50%, -100%);
  z-index: 2;
  transition: transform 0.25s;
}
.map-pin:hover { transform: translate(-50%, -100%) scale(1.15); z-index: 5; }
.map-pin .pin-dot {
  width: 44px;
  height: 44px;
  background: #D4A24C;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-pin .pin-dot::before {
  content: '🏡';
  transform: rotate(45deg);
  font-size: 18px;
}
.map-pin .pin-label {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11,31,46,0.95);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  border: 1px solid rgba(212,162,76,0.4);
}
.map-pin:hover .pin-label { opacity: 1; }
@keyframes pinPulse {
  0%,100% { filter: drop-shadow(0 0 0 rgba(212,162,76,0)); }
  50%     { filter: drop-shadow(0 0 12px rgba(212,162,76,0.6)); }
}

/* ============ ATMO GALLERY — Ken Burns pronto ============ */
.atmo-item {
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ============ VISIBLE-BY-DEFAULT (v6 — NO fade animation, tutto visibile) ============ */
/* Rimosso fade-up: causava loop con Google Translate che re-triggerava animation */
/* Il dinamismo del sito è dato da: video hero, carosello, marquee, timeline, before/after, mappa, counter, Ken Burns, cursor magnetico */

/* SAFETY OVERRIDE: elementi visibili ma preserva animazioni ken-burns/marquee/carosello */
.mh-anim, .mh-word,
.tw-card, .path-card, .persona-tile, .inc, .step, .pro-card, .stat,
section h2, section h3 {
  opacity: 1 !important;
  transform: none !important;
}
/* NON tocco .sc-card e .atmo-item — vogliono Ken Burns e tilt */
.sc-card, .atmo-item { opacity: 1 !important; }

/* Solo hover subtile su card */
.tw-card, .path-card, .persona-tile, .inc, .step, .pro-card {
  transition: transform .25s, border-color .25s;
}
.tw-card:hover, .path-card:hover, .inc:hover, .pro-card:hover {
  transform: translateY(-4px);
}
