/* ======================================================
   EVENTI.CSS - ALA Atletica Leggera Abbiategrasso
====================================================== */

:root {
  --primary: #e6007e;
  --primary-dark: #c4006a;
  --secondary: #123a67;
  --text: #0f172a;
  --text-light: #475569;
  --bg: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

/* ======================================================
   PAGINA
====================================================== */

.page-eventi {
  background: #fff;
  color: var(--text);
}

.section {
  padding: 88px 0;
}

.container {
  width: min(1180px, 92%);
  margin-inline: auto;
}

/* ======================================================
   HERO
====================================================== */

.hero-eventi {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroZoom 18s ease-in-out infinite alternate;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(15, 23, 42, 0.32), rgba(15, 23, 42, 0.5));
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-divider {
  width: 90px;
  height: 3px;
  background: var(--primary);
  margin: 22px auto;
  border-radius: 999px;
}

.hero-eventi h1 {
  font-size: clamp(3rem, 6vw, 5.4rem);
  line-height: 0.95;
  margin: 0 0 14px;
}

.hero-eventi h1 span {
  color: #ff5ab4;
}

.hero-subtitle {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-eventi p {
  font-size: 1.08rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.92);
}

.hero-buttons {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-light {
  background: #fff;
  color: var(--secondary);
}

.btn-light:hover {
  transform: translateY(-2px);
}

/* ======================================================
   TITOLI SEZIONE
====================================================== */

.section-header,
.section-heading {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 56px;
}

.section-kicker,
.section-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(230, 0, 126, 0.08);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-header h2,
.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  color: var(--secondary);
  margin: 18px 0;
}

.section-header p,
.section-heading p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-light);
}

/* ======================================================
   EVENTO IN EVIDENZA
====================================================== */

.featured-event {
  background: #fff;
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  background: #fff;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.featured-image {
  min-height: 420px;
}

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

.featured-info {
  padding: 38px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.event-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.event-date-box {
  width: 84px;
  min-width: 84px;
  border-radius: 20px;
  background: var(--secondary);
  color: #fff;
  text-align: center;
  padding: 14px 10px;
}

.event-date-box .day {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.event-date-box .month {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.event-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.event-status.open {
  background: #dcfce7;
  color: #166534;
}

.featured-info h3 {
  margin: 0;
  font-size: 2rem;
  color: var(--secondary);
}

.featured-info p {
  margin: 0;
  color: var(--text-light);
  line-height: 1.8;
}

.event-separator {
  height: 1px;
  background: var(--border);
}

.event-info {
  display: grid;
  gap: 12px;
}

.event-info div {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-light);
}

.event-info i {
  color: var(--primary);
}

.featured-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: auto;
}

/* ======================================================
   PROSSIMI EVENTI
====================================================== */

.events-list {
  background: var(--bg);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}

.event-card {
  background: #fff;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.event-image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.event-card:hover .event-image img {
  transform: scale(1.05);
}

.event-content {
  padding: 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.event-date {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--primary);
  font-weight: 800;
}

.event-date .day {
  font-size: 1.5rem;
}

.event-date .month {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-content h3 {
  margin: 0 0 12px;
  color: var(--secondary);
  font-size: 1.35rem;
}

.event-content p {
  margin: 0 0 16px;
  color: var(--text-light);
  line-height: 1.75;
}

.event-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.event-content li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
}

.event-content li i {
  color: var(--primary);
}

.event-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.event-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

/* ======================================================
   TIMELINE
====================================================== */

.season-calendar {
  background: #fff;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.timeline-item {
  background: var(--bg);
  border-radius: 22px;
  padding: 24px;
  text-align: center;
}

.timeline-month {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timeline-content {
  color: var(--secondary);
  font-weight: 700;
}

/* ======================================================
   RIVIVI GLI EVENTI
====================================================== */

.past-events {
  background: var(--bg);
}

.past-events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.past-card {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  min-height: 340px;
  box-shadow: var(--shadow);
}

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

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

.past-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  padding: 26px;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.88),
    rgba(15, 23, 42, 0.1)
  );
  color: #fff;
}

.past-date {
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.82rem;
  font-weight: 700;
}

.past-overlay h3 {
  margin: 0;
  font-size: 1.5rem;
}

.past-overlay p {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.7;
}

/* ======================================================
   CTA FINALE
====================================================== */

.events-cta {
  position: relative;
  background:
    linear-gradient(135deg, rgba(18, 58, 103, 0.94), rgba(10, 24, 48, 0.96)),
    url("../img/eventi/hero-eventi.webp") center/cover no-repeat;
  color: #fff;
}

.events-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.18);
}

.events-cta .container {
  position: relative;
  z-index: 2;
}

.events-cta-box {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.events-cta-box h2 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin: 18px 0;
}

.events-cta-box p {
  font-size: 1.08rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.92);
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button.button-primary {
  background: var(--primary);
  border: none;
}

.button.button-primary:hover {
  background: var(--primary-dark);
}

/* ======================================================
   ANIMAZIONI
====================================================== */

@keyframes heroZoom {
  from {
    transform: scale(1.04);
  }
  to {
    transform: scale(1.1);
  }
}

/* ======================================================
   RESPONSIVE
====================================================== */

@media (max-width: 1024px) {
  .featured-card {
    grid-template-columns: 1fr;
  }

  .events-grid,
  .past-events-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .section {
    padding: 72px 0;
  }

  .hero-eventi {
    min-height: 72vh;
  }

  .hero-content {
    padding: 110px 0 72px;
  }

  .hero-eventi h1 {
    font-size: 2.8rem;
  }

  .hero-eventi p {
    font-size: 1rem;
  }

  .events-grid,
  .past-events-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .featured-info {
    padding: 28px;
  }

  .featured-actions,
  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .featured-actions .button,
  .cta-buttons .button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-eventi {
    min-height: 64vh;
  }

  .hero-content {
    padding-top: 100px;
  }

  .hero-eventi h1 {
    font-size: 2.3rem;
  }

  .section-header h2,
  .section-heading h2 {
    font-size: 2rem;
  }

  .event-header {
    flex-direction: column;
  }

  .event-date-box {
    width: 72px;
    min-width: 72px;
  }

  .event-content,
  .timeline-item {
    padding: 22px;
  }
}

.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  z-index: 9999;
}

.location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.95rem;
  color: inherit;
}

.location i {
  color: #e5005a;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ==================================================
   LOCALITÀ EVENTI
   ================================================== */

.location {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  margin-bottom: 18px;
  color: #172f55;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
}

.location i {
  color: #d4145a;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Allineamento uniforme nelle card evento */
.event-card .location {
  min-height: 22px;
}

/* Piccolo effetto visivo sull'icona */
.event-card .location i {
  transition: transform 0.2s ease;
}

.event-card:hover .location i {
  transform: scale(1.1);
}
