/* =============================================
   ATTIVITÀ SOCIALI 2.0
   ============================================= */

/* === PAGE HERO === */
.act-page-hero {
  height: auto;
  min-height: 380px;
  padding: calc(var(--nav-height) + 48px) 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.act-page-hero .page-hero-content { position: relative; z-index: 1; }
.act-page-hero h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
.act-hero-sub {
  color: rgba(30,58,47,0.75);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  max-width: 540px;
  margin: 12px auto 16px;
}

/* Stats bar nel hero */
.act-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: rgba(30,58,47,0.10);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(30,58,47,0.18);
  border-radius: 60px;
  padding: 20px 48px;
  margin: 28px auto 0;
  width: fit-content;
  position: relative; z-index: 1;
}
.act-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 40px;
  color: var(--green-dark);
}
.act-hero-stat span:first-child {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
}
.act-hero-stat span:nth-child(2) {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
}
.act-hero-stat small {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(30,58,47,0.58);
  margin-top: 5px;
}
.act-hero-stat-sep {
  width: 1px;
  height: 40px;
  background: rgba(30,58,47,0.20);
  flex-shrink: 0;
}

/* === STATS SECTION === */
.act-stats-section {
  background: var(--white);
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.act-stats-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green-primary), var(--gold), var(--caffe));
}

.act-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.act-stat-item {
  padding: 32px 48px;
  text-align: center;
  position: relative;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.act-stat-item:nth-child(2) { transition-delay: 0.15s; }
.act-stat-item:nth-child(3) { transition-delay: 0.30s; }
.act-stats-section.in-view .act-stat-item {
  opacity: 1;
  transform: translateY(0);
}

/* Separatore verticale tra le colonne */
.act-stat-item::after {
  content: '';
  position: absolute;
  right: 0; top: 18%; bottom: 18%;
  width: 1px;
  background: var(--border);
}
.act-stat-item:last-child::after { display: none; }

.act-stat-num {
  font-family: var(--font-heading);
  font-size: clamp(3.8rem, 6vw, 5.6rem);
  font-weight: 700;
  line-height: 1;
  color: var(--green-dark);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  margin-bottom: 14px;
}
.act-stat-suffix {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  font-weight: 700;
  color: var(--green-primary);
  line-height: 1;
  margin-top: 6px;
}
.act-stat-icon {
  font-size: 1.25rem;
  color: var(--green-primary);
  margin-bottom: 10px;
}
.act-stat-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin: 0 0 6px;
}
.act-stat-sub {
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.55;
  max-width: 200px;
  margin: 0 auto;
}

/* === STICKY SUBNAV PILLS === */
.act-subnav {
  position: sticky;
  top: var(--nav-height);
  z-index: 99;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.act-subnav-pills {
  display: flex;
  gap: 4px;
  padding: 10px 0;
  justify-content: center;
}
.act-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 22px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-mid);
  transition: all 0.3s ease;
  white-space: nowrap;
}
.act-pill i { font-size: 0.78rem; }
.act-pill:hover { color: var(--green-primary); background: rgba(141,198,63,0.10); }
.act-pill.active {
  background: var(--green-primary);
  color: var(--green-dark);
  box-shadow: 0 4px 14px rgba(141,198,63,0.35);
}

/* === SPLIT SECTIONS === */
.act-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.act-split--rev { direction: rtl; }
.act-split--rev > * { direction: ltr; }

/* Testo */
.act-split-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 72px 80px 80px;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}
.act-split--dark .act-split-text {
  background: var(--tortora-light);
}
.act-split--dark .act-split-text h2 { color: var(--green-dark); }
.act-split--dark .act-split-text p { color: var(--text-mid); }
.act-split--dark .act-split-text strong { color: var(--text-dark); }

/* Numero decorativo watermark */
.act-bignum {
  position: absolute;
  top: -20px; left: 48px;
  font-family: var(--font-heading);
  font-size: 16rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(141,198,63,0.07);
  user-select: none;
  pointer-events: none;
}
.act-split--dark .act-bignum { color: rgba(255,255,255,0.04); }

/* Tag attività */
.act-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-mid);
  margin-bottom: 14px;
  position: relative;
}
.act-tag--light { color: var(--gold); }

/* Heading */
.act-split-text h2 {
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  line-height: 1.0;
  color: var(--green-dark);
  margin-bottom: 0;
  position: relative;
}

/* Testo */
.act-split-text p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-mid);
  max-width: 440px;
  position: relative;
}

/* Mini steps */
.act-split-steps {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
  position: relative;
}
.act-mini-step {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 6px 14px 6px 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green-dark);
}
.act-mini-num {
  width: 24px; height: 24px;
  background: var(--green-primary);
  border-radius: 50%;
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Visual / immagine */
.act-split-visual {
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.act-split-visual::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.05) 100%);
  z-index: 1;
}

/* Badge flottante sull'immagine */
.act-split-badge {
  position: absolute;
  bottom: 48px; left: 48px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 140px;
  text-align: center;
}
.act-split-badge--gold {
  background: rgba(201,168,76,0.15);
  border-color: rgba(201,168,76,0.4);
  color: var(--gold);
}
.act-badge-num {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.act-badge-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-top: 4px;
}
.act-split-badge--gold .act-badge-lbl { color: var(--gold); }

/* Label in basso a destra sull'immagine */
.act-split-tag-img {
  position: absolute;
  top: 32px; right: 32px;
  z-index: 2;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  color: rgba(255,255,255,0.7);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
}

/* =============================================
   EVENTI SLIDER
   ============================================= */

/* Elevare l'overlay ::before sopra le slide */
.act-split-visual--slider::before { z-index: 4; }

/* Badge e label sopra overlay */
.act-split-visual--slider .act-split-badge,
.act-split-visual--slider .act-split-tag-img,
.act-split-visual--slider .act-slider-dots { z-index: 5; }

/* Singola slide */
.act-slide {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.act-slide.active {
  z-index: 2;
  pointer-events: auto;
}

/* Wipe da destra: la slide entra da destra verso sinistra */
.act-slide.enter-from-right {
  z-index: 3;
  animation: actWipeFromRight 0.92s cubic-bezier(.77, 0, .18, 1) forwards;
}
/* Wipe da sinistra: la slide entra da sinistra verso destra */
.act-slide.enter-from-left {
  z-index: 3;
  animation: actWipeFromLeft 0.92s cubic-bezier(.77, 0, .18, 1) forwards;
}
@keyframes actWipeFromRight {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes actWipeFromLeft {
  from { clip-path: inset(0 0 0 100%); }
  to   { clip-path: inset(0 0 0 0); }
}

/* Background di ogni slide */
.act-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

/* Ken Burns — slide dispari: zoom in dal basso-destra */
.act-slide.active .act-slide-bg,
.act-slide.enter-from-right .act-slide-bg,
.act-slide.enter-from-left .act-slide-bg {
  animation: actKenBurns 8s ease-out forwards;
}
/* Ken Burns — slide pari: zoom in dall'alto-sinistra (varietà) */
.act-slide:nth-child(even).active .act-slide-bg,
.act-slide:nth-child(even).enter-from-right .act-slide-bg,
.act-slide:nth-child(even).enter-from-left .act-slide-bg {
  animation-name: actKenBurnsAlt;
}
@keyframes actKenBurns {
  0%   { transform: scale(1.09) translate(1.5%,  0.8%); }
  100% { transform: scale(1.00) translate(0,     0); }
}
@keyframes actKenBurnsAlt {
  0%   { transform: scale(1.09) translate(-1.5%, -0.8%); }
  100% { transform: scale(1.00) translate(0,      0); }
}

/* Dots di navigazione */
.act-slider-dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  align-items: center;
}
.act-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.38);
  border: 1.5px solid rgba(255,255,255,0.55);
  padding: 0;
  cursor: pointer;
  transition: width 0.32s ease, background 0.32s ease,
              border-radius 0.32s ease, border-color 0.32s ease;
}
.act-dot.active {
  width: 22px;
  border-radius: 4px;
  background: var(--white);
  border-color: var(--white);
}
.act-dot:hover:not(.active) {
  background: rgba(255,255,255,0.72);
  border-color: rgba(255,255,255,0.85);
}

/* ============================================= */

/* Animazione di entrata scroll */
.act-split-text,
.act-split-visual {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.act-split-visual { transition-delay: 0.15s; }
.act-split.in-view .act-split-text,
.act-split.in-view .act-split-visual {
  opacity: 1;
  transform: translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .act-split-text { padding: 60px 48px; }
}

@media (max-width: 768px) {
  .act-split { grid-template-columns: 1fr; min-height: auto; direction: ltr; }
  .act-split > * { direction: ltr; }
  .act-split-visual { min-height: 320px; order: -1; }
  .act-split-text { padding: 48px 28px; }
  .act-bignum { font-size: 9rem; top: -10px; left: 20px; }
  .act-split-text h2 { font-size: clamp(2.2rem, 8vw, 3.2rem); }
  .act-subnav-pills { gap: 2px; }
  .act-pill { padding: 7px 14px; font-size: 0.76rem; }
  .act-split-badge { bottom: 24px; left: 24px; padding: 14px 20px; }

  /* Stats section mobile */
  .act-stats-section { padding: 52px 0; }
  .act-stats-grid { grid-template-columns: 1fr; }
  .act-stat-item { padding: 32px 24px; }
  .act-stat-item::after {
    right: 20%; left: 20%; top: auto; bottom: 0;
    width: auto; height: 1px;
  }
  .act-stat-item:last-child::after { display: none; }
}
