/* ═══════════════════════════════════════════════════════════════
   FONDAZIONE ARTENNIS – style.css
   Palette brand: Blu #26328A · Verde #6EB531 · Bianco
   Font: Cormorant Garamond (display) + Nunito (body)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --navy:          #26328A;
  --navy-mid:      #1f2870;
  --navy-light:    #3a4aab;
  --green:         #6EB531;
  --green-mid:     #5a9528;
  --green-light:   #87cc45;
  --green-pale:    #eef8e0;
  --cream:         #f5f0e8;
  --cream-mid:     #ece5d8;
  --cream-dark:    #d8cfc0;
  --gold:          #c8a84b;
  --gold-light:    #dbbe6a;
  --white:         #ffffff;
  --text-dark:     #111827;
  --text-mid:      #4b5563;
  --text-light:    #9ca3af;

  --section-py:    7rem;
  --container-w:   1200px;
  --radius-sm:     0.5rem;
  --radius-md:     1rem;
  --radius-lg:     1.5rem;

  --font-display:  'Cormorant Garamond', Georgia, serif;
  --font-body:     'Nunito', system-ui, sans-serif;

  --ease:          cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); color: var(--text-dark); background: var(--white); line-height: 1.7; overflow-x: hidden; }
img   { max-width: 100%; height: auto; display: block; }
a     { text-decoration: none; color: inherit; }
ul    { list-style: none; }
input, button, textarea { font-family: inherit; }

/* ─── Container ─────────────────────────────────────────────── */
.container { max-width: var(--container-w); margin: 0 auto; padding: 0 2rem; }

/* ─── Sezione comune ─────────────────────────────────────────── */
.section { padding: var(--section-py) 0; }

.section-header { text-align: center; max-width: 740px; margin: 0 auto 4rem; }

.section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-pale);
  padding: 0.3rem 1rem;
  border-radius: 2rem;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-intro { color: var(--text-mid); font-size: 1.05rem; line-height: 1.8; }

/* ─── Bottoni ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .28s var(--ease), border-color .28s var(--ease),
              transform .28s var(--ease), box-shadow .28s var(--ease), color .28s var(--ease);
}
.btn-primary { background: var(--green); color: var(--white); border-color: var(--green); }
.btn-primary:hover {
  background: var(--green-mid); border-color: var(--green-mid);
  transform: translateY(-2px); box-shadow: 0 10px 28px rgba(110,181,49,.35);
}
.btn-outline-white { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.btn-outline-white:hover { background: var(--white); color: var(--navy); border-color: var(--white); transform: translateY(-2px); }
.btn-outline-dark { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline-dark:hover { background: var(--navy); color: var(--white); transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 700; }
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,168,75,.35); }
.btn-full { width: 100%; }
.required { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 1.25rem 0;
  transition: background .4s var(--ease), padding .4s var(--ease), box-shadow .4s var(--ease);
}
.navbar.scrolled {
  background: rgba(38, 50, 138, 0.96);
  backdrop-filter: blur(14px);
  padding: 0.75rem 0;
  box-shadow: 0 4px 32px rgba(0,0,0,.28);
}
.nav-inner {
  max-width: var(--container-w); margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo img { height: 46px; width: auto; object-fit: contain; transition: opacity .3s; }
.nav-logo img:hover { opacity: .85; }
.nav-links { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a {
  color: rgba(255,255,255,.88); font-size: .8rem; font-weight: 500;
  letter-spacing: .03em; position: relative; transition: color .2s;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 2px; background: var(--green-light);
  transition: width .3s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover        { color: var(--green-light); }
.nav-links a.active       { color: var(--green-light); }
.nav-links a.active::after{ width: 100%; }
.nav-cta {
  background: var(--green) !important; color: var(--white) !important;
  padding: .48rem 1.25rem !important; border-radius: var(--radius-sm);
  font-weight: 600 !important;
}
.nav-cta::after  { display: none !important; }
.nav-cta:hover   { background: var(--green-mid) !important; transform: translateY(-1px) !important; color: var(--white) !important; }

/* Hamburger */
.nav-hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; z-index: 1001; }
.nav-hamburger span { display: block; width: 26px; height: 2px; background: white; border-radius: 2px; transition: all .3s; }

/* Mobile nav */
.mobile-nav {
  position: fixed; inset: 0; background: var(--navy); z-index: 999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transform: translateX(100%); transition: transform .42s var(--ease); padding: 2rem;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav-close {
  position: absolute; top: 1.5rem; right: 2rem;
  background: none; border: none; color: rgba(255,255,255,.6);
  font-size: 1.5rem; cursor: pointer; transition: color .2s;
}
.mobile-nav-close:hover { color: var(--green-light); }
.mobile-nav ul  { display: flex; flex-direction: column; gap: 2rem; text-align: center; }
.mobile-nav a   { color: var(--white); font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; transition: color .2s; }
.mobile-nav a:hover { color: var(--green-light); }

/* ═══════════════════════════════════════════════════════════════
   HERO (homepage)
   ═══════════════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background: var(--navy);
}

.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #26328A 0%, #1a2070 55%, #2d3faa 100%);
  transform-origin: center;
}

.hero-grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(135,204,69,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(135,204,69,.07) 1px, transparent 1px);
  background-size: 55px 55px;
  pointer-events: none;
}

/* Logo centrale hero — visibile sotto il titolo */
.hero-logo-center {
  margin: 1.25rem auto 1.5rem;
  max-width: clamp(220px, 34vw, 340px);
  opacity: 0;
  transform: translateY(16px);
}
.hero-logo-center img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 48px rgba(0,0,0,.28);
}

.hero-content {
  position: relative; z-index: 2;
  text-align: center; padding: 2rem 1rem; max-width: 860px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: .75rem; font-weight: 700;
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--green-light);
  background: rgba(135,204,69,.12);
  border: 1px solid rgba(135,204,69,.28);
  padding: .35rem 1.1rem; border-radius: 2rem;
  margin-bottom: 1.75rem;
  opacity: 0; transform: translateY(16px);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 11vw, 9rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  margin-bottom: .6rem;
}
.hero-title-inner { display: block; opacity: 0; transform: translateY(60px); }
.hero-title-text { color: var(--green); }

.hero-founders {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.55rem);
  font-style: italic; font-weight: 700;
  color: rgba(255,255,255,.85);
  letter-spacing: .06em;
  margin-bottom: 1.5rem;
  opacity: 0; transform: translateY(20px);
}

.hero-subtitle {
  font-size: clamp(.95rem, 2vw, 1.15rem);
  color: rgba(255,255,255,.72);
  line-height: 1.85;
  margin-bottom: 2.5rem;
  opacity: 0; transform: translateY(20px);
}

.hero-ctas {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  opacity: 0; transform: translateY(20px);
}

/* ═══════════════════════════════════════════════════════════════
   PAGE HEADER (interno pages – non homepage)
   ═══════════════════════════════════════════════════════════════ */
.page-header {
  background: linear-gradient(135deg, #26328A 0%, #1a2070 100%);
  padding: 8.5rem 0 5rem;
  text-align: center;
  position: relative; overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(135,204,69,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(135,204,69,.06) 1px, transparent 1px);
  background-size: 55px 55px;
  pointer-events: none;
}
.page-header-inner { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; padding: 0 2rem; }
.page-header .section-tag { color: var(--green-light); background: rgba(135,204,69,.15); }
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600; color: var(--white);
  line-height: 1.1; margin: .75rem 0 1rem;
}
.page-header p { color: rgba(255,255,255,.65); font-size: 1.05rem; line-height: 1.75; }

.page-header--cinquepermille .section-tag,
.page-header--cinquepermille h1,
.page-header--cinquepermille p {
  font-family: Calibri, 'Segoe UI', Arial, sans-serif;
}
.page-header--cinquepermille .section-tag {
  font-size: clamp(1.03rem, 2.8vw, 1.63rem);
  letter-spacing: 0.1em;
  padding: 0.5rem 1.75rem;
  margin-bottom: 1.35rem;
}
.page-header--cinquepermille h1 { font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════
   MISSIONE
   ═══════════════════════════════════════════════════════════════ */
.missione { background: var(--cream); }

.pillars-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 2rem; margin-bottom: 4rem;
}
.pillar {
  background: var(--white); border-radius: var(--radius-md);
  padding: 2.5rem 2rem; text-align: center;
  border: 1px solid rgba(0,0,0,.05);
  position: relative; overflow: hidden;
  transition: transform .32s var(--ease), box-shadow .32s var(--ease);
}
.pillar::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--green), var(--navy-mid));
  transform: scaleX(0); transition: transform .4s var(--ease);
}
.pillar:hover::after        { transform: scaleX(1); }
.pillar:hover               { transform: translateY(-8px); box-shadow: 0 22px 56px rgba(0,0,0,.1); }
.pillar-icon-wrap {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--green-pale);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
  transition: transform .3s var(--ease-bounce), background .3s;
}
.pillar:hover .pillar-icon-wrap { transform: scale(1.1) rotate(-5deg); background: var(--green); }
.pillar-svg { width: 28px; height: 28px; color: var(--green); transition: color .3s; }
.pillar:hover .pillar-svg { color: var(--white); }
.pillar h3 { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; color: var(--navy); margin-bottom: .7rem; }
.pillar p  { color: var(--text-mid); font-size: .95rem; line-height: 1.7; }

.mission-quote {
  max-width: 680px; margin: 0 auto; text-align: center;
  padding: 2.5rem; background: var(--white);
  border-radius: var(--radius-md); border: 1px solid var(--cream-dark);
  position: relative;
}
.mission-quote::before {
  content: '"'; position: absolute; top: -.5rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display); font-size: 5rem; line-height: 1;
  color: var(--green-pale);
}
.mission-quote p { font-family: var(--font-display); font-size: 1.3rem; font-style: italic; color: var(--navy); line-height: 1.6; margin-bottom: .75rem; }
.mission-quote cite { font-size: .82rem; font-style: normal; font-weight: 600; letter-spacing: .1em; color: var(--green); text-transform: uppercase; }

/* ═══════════════════════════════════════════════════════════════
   STORIA – TIMELINE
   ═══════════════════════════════════════════════════════════════ */
.storia { background: var(--white); }
.storia .section-header h2 { color: var(--navy); }

.timeline { position: relative; max-width: 860px; margin: 0 auto; padding: 1rem 0 3rem; }

.timeline-track {
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; background: var(--cream-dark); transform: translateX(-50%); z-index: 0;
}
.timeline-progress {
  position: absolute; left: 50%; top: 0;
  width: 2px; height: 0;
  background: linear-gradient(to bottom, var(--green), var(--green-light));
  transform: translateX(-50%); z-index: 1; border-radius: 2px;
}
.timeline-item {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: start; gap: 0 2rem;
  margin-bottom: 3.5rem; position: relative; z-index: 2;
}
.timeline-item.left  .timeline-card { grid-column: 1; grid-row: 1; text-align: right; }
.timeline-item.left  .timeline-dot  { grid-column: 2; grid-row: 1; }
.timeline-item.right .timeline-dot  { grid-column: 2; grid-row: 1; }
.timeline-item.right .timeline-card { grid-column: 3; grid-row: 1; text-align: left; }

.timeline-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--green);
  box-shadow: 0 0 0 5px rgba(110,181,49,.15);
  margin-top: 1.4rem; align-self: start; justify-self: center;
  transition: transform .32s var(--ease-bounce), background .3s;
  z-index: 3; position: relative;
}
.timeline-item:hover .timeline-dot { transform: scale(1.45); background: var(--green); }

.timeline-card {
  background: var(--cream); border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem; border: 1px solid var(--cream-dark);
  position: relative;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.timeline-card:hover { transform: translateY(-5px); box-shadow: 0 14px 38px rgba(0,0,0,.09); }
.tl-year { display: block; font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: var(--green); line-height: 1; margin-bottom: .3rem; }
.timeline-card h4 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--navy); margin-bottom: .5rem; }
.timeline-card p  { color: var(--text-mid); font-size: .9rem; line-height: 1.68; }
.tl-icon { display: block; font-size: 1.3rem; margin-top: .75rem; opacity: .6; }

/* ═══════════════════════════════════════════════════════════════
   ATTIVITÀ / SERVIZI PREVIEW
   ═══════════════════════════════════════════════════════════════ */
.attivita { background: var(--navy); }
.attivita .section-tag       { color: var(--gold); background: rgba(200,168,75,.15); }
.attivita .section-header h2 { color: var(--white); }

.activities-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; margin-bottom: 3rem;
}
.activity-card {
  border-radius: var(--radius-md); overflow: hidden;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  transition: transform .34s var(--ease), border-color .3s;
}
.activity-card:hover { transform: translateY(-9px); border-color: rgba(110,181,49,.45); }
.activity-img { height: 210px; overflow: hidden; position: relative; }
.activity-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease); }
.activity-card:hover .activity-img img { transform: scale(1.06); }
.activity-img-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(26,32,112,.6) 0%, transparent 55%); }
.activity-body { padding: 1.5rem; }
.activity-tag { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); background: rgba(200,168,75,.15); padding: .2rem .75rem; border-radius: 2rem; margin-bottom: .7rem; }
.activity-body h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--white); line-height: 1.3; margin-bottom: .6rem; }
.activity-body p  { color: rgba(255,255,255,.55); font-size: .9rem; line-height: 1.68; }
.activities-cta   { text-align: center; }

/* ═══════════════════════════════════════════════════════════════
   SERVIZI FULL PAGE
   ═══════════════════════════════════════════════════════════════ */
.servizi-page { background: var(--cream); }
.servizi-full-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem;
}
.servizio-card {
  background: var(--white); border-radius: var(--radius-md);
  padding: 2.5rem 2rem; border: 1px solid rgba(0,0,0,.06);
  position: relative; overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.servizio-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--green), var(--navy));
  transform: scaleX(0); transition: transform .4s var(--ease); transform-origin: left;
}
.servizio-card:hover::before { transform: scaleX(1); }
.servizio-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(38,50,138,.12);
  border-color: rgba(38,50,138,.1);
}
.servizio-icon {
  width: 68px; height: 68px; border-radius: var(--radius-sm);
  background: var(--green-pale);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem;
  transition: background .3s;
}
.servizio-card:hover .servizio-icon { background: var(--green); }
.servizio-icon svg { width: 32px; height: 32px; color: var(--green); transition: color .3s; }
.servizio-card:hover .servizio-icon svg { color: var(--white); }
.servizio-card h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--navy); margin-bottom: .75rem; }
.servizio-card p  { color: var(--text-mid); font-size: .9rem; line-height: 1.7; }

/* ═══════════════════════════════════════════════════════════════
   EVENTI PREVIEW (homepage) + EVENTI PAGE
   ═══════════════════════════════════════════════════════════════ */
.eventi-preview  { background: var(--white); }
.eventi-page     { background: var(--cream); }
.eventi-page .section-header h2,
.eventi-preview .section-header h2 { color: var(--navy); }

.events-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 1.75rem;
}
.event-card {
  background: var(--white); border-radius: var(--radius-md);
  border: 1px solid rgba(0,0,0,.07); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .32s var(--ease), box-shadow .32s;
}
.event-card:hover { transform: translateY(-6px); box-shadow: 0 16px 42px rgba(38,50,138,.12); }
.event-card--past { opacity: .88; }
.event-card--past:hover { transform: none; box-shadow: none; }
.event-card--past .event-date-badge { opacity: .75; }

.events-sections { display: flex; flex-direction: column; gap: 3rem; }
.events-section-block--past { padding-top: .5rem; border-top: 1px solid rgba(38,50,138,.1); }
.events-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 600; color: var(--navy);
  margin-bottom: 1.5rem;
}
.events-section-block--past .events-section-title { color: var(--text-mid); }

.btn-event--past {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .6rem 1.4rem; font-size: .82rem; font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--cream-dark); color: var(--text-light);
  border: 1px solid rgba(0,0,0,.08);
  cursor: not-allowed; user-select: none;
}

.event-header {
  background: var(--navy);
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; gap: 1.25rem;
}
.event-date-badge {
  text-align: center;
  background: rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  padding: .5rem .85rem;
  flex-shrink: 0;
  min-width: 58px;
}
.event-date-badge .day {
  font-family: var(--font-display); font-size: 2rem;
  font-weight: 700; line-height: 1; color: var(--green-light);
}
.event-date-badge .month {
  font-size: .62rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.65);
  margin-top: .1rem;
}
.event-header-info {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 3.25rem;
  padding: .15rem 0;
}
.event-title-header {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 600;
  color: var(--green-light);
  line-height: 1.35;
  width: 100%;
}
.event-body { padding: 1.25rem 1.5rem; flex: 1; }
.event-card-img {
  margin: -1.25rem -1.5rem 1rem;
  overflow: hidden;
  max-height: 160px;
}
.event-card-img img {
  width: 100%; height: 100%;
  max-height: 160px;
  object-fit: cover;
  display: block;
}
.event-meta {
  display: flex; flex-direction: column; gap: .3rem;
  font-size: .8rem; color: var(--text-light); margin-bottom: .85rem;
}
.event-meta span { display: flex; align-items: center; gap: .4rem; }
.event-desc { font-size: .9rem; color: var(--text-mid); line-height: 1.65; }
.event-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(0,0,0,.06);
  display: flex; justify-content: flex-end;
}
.btn-event { padding: .6rem 1.4rem; font-size: .82rem; }

.event-empty, .event-error {
  grid-column: 1 / -1; text-align: center;
  padding: 4rem; color: var(--text-mid);
}
.event-loading {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1rem; padding: 4rem 0; color: var(--text-mid);
}

/* Modal iscrizione evento */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(26,32,112,.65);
  backdrop-filter: blur(4px); z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 2.5rem; max-width: 520px; width: 100%;
  position: relative;
  transform: scale(.96); transition: transform .3s var(--ease-bounce);
}
.modal-overlay.open .modal-box { transform: scale(1); }
.modal-close {
  position: absolute; top: 1.25rem; right: 1.25rem;
  background: none; border: none; font-size: 1.4rem;
  color: var(--text-light); cursor: pointer; transition: color .2s; line-height: 1;
}
.modal-close:hover { color: var(--navy); }
.modal-title {
  font-family: var(--font-display); font-size: 1.8rem;
  font-weight: 600; color: var(--navy); margin-bottom: .25rem;
}
.modal-event-name { font-size: .9rem; color: var(--green); font-weight: 600; margin-bottom: 1.5rem; }
.modal-form { display: flex; flex-direction: column; gap: 1rem; }
.modal-form-group { display: flex; flex-direction: column; gap: .35rem; }
.modal-form-group label { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-mid); }
.modal-form-group input,
.modal-form-group textarea {
  background: var(--cream); border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm); padding: .75rem 1rem;
  color: var(--text-dark); font-size: .9rem; outline: none;
  transition: border-color .22s, background .22s;
}
.modal-form-group input:focus,
.modal-form-group textarea:focus { border-color: var(--navy); background: var(--white); }
.modal-form-group textarea { resize: vertical; min-height: 90px; }
.modal-note { font-size: .78rem; color: var(--text-light); margin-top: .25rem; }

/* GDPR checkbox nel modal (sfondo chiaro) */
.gdpr-label--modal .gdpr-box { border-color: var(--cream-dark); }
.gdpr-label--modal .gdpr-text { color: var(--text-mid); }
.gdpr-label--modal .gdpr-text a { color: var(--navy); }
.modal-feedback { font-size: .85rem; border-radius: .4rem; }
.modal-feedback.success { color: var(--green-mid); padding: .5rem 0; }
.modal-feedback.error   { color: #e05a5a; padding: .5rem 0; }

/* ═══════════════════════════════════════════════════════════════
   NEWS / ARTICOLI
   ═══════════════════════════════════════════════════════════════ */
.news     { background: var(--cream); }
.articoli-page { background: var(--white); }
.articoli-page .section-header { margin-bottom: 3rem; }

/* ─── Articolo singolo ───────────────────────────────────────── */
.page-header--article { padding-bottom: 4rem; }
.article-back-link {
  display: inline-block; margin-bottom: 1.25rem;
  color: rgba(255,255,255,.55); font-size: .88rem;
  transition: color .2s;
}
.article-back-link:hover { color: var(--green-light); }
.article-header-date {
  color: rgba(255,255,255,.5) !important;
  font-size: .92rem !important; margin-top: .5rem;
}
.article-single-section { background: var(--white); padding-top: 3rem; }
.article-single-container { max-width: 780px; }
.article-loading {
  text-align: center; padding: 3rem 0; color: var(--text-mid);
}
.article-error {
  text-align: center; padding: 3rem 0; color: var(--text-mid);
}
.article-featured-img {
  margin-bottom: 2.5rem; border-radius: var(--radius-md);
  overflow: hidden; box-shadow: 0 8px 32px rgba(38,50,138,.1);
}
.article-featured-img img {
  width: 100%; height: auto; display: block;
  max-height: 420px; object-fit: cover;
}
.article-content {
  color: var(--text-mid); font-size: 1.02rem; line-height: 1.85;
}
.article-content > *:first-child { margin-top: 0; }
.article-content > *:last-child  { margin-bottom: 0; }
.article-content p  { margin-bottom: 1.25rem; }
.article-content h2,
.article-content h3,
.article-content h4 {
  font-family: var(--font-display); color: var(--navy);
  font-weight: 600; line-height: 1.3; margin: 2rem 0 1rem;
}
.article-content h2 { font-size: 1.75rem; }
.article-content h3 { font-size: 1.4rem; }
.article-content h4 { font-size: 1.15rem; }
.article-content a  { color: var(--navy); text-decoration: underline; transition: color .2s; }
.article-content a:hover { color: var(--green); }
.article-content ul,
.article-content ol { margin: 0 0 1.25rem 1.25rem; }
.article-content li { margin-bottom: .4rem; }
.article-content img {
  max-width: 100%; height: auto; border-radius: var(--radius-sm);
  margin: 1.5rem 0;
}
.article-content blockquote {
  border-left: 3px solid var(--green);
  margin: 1.5rem 0; padding: .5rem 0 .5rem 1.25rem;
  color: var(--text-dark); font-style: italic;
}
.article-content figure { margin: 1.5rem 0; }
.article-content figcaption {
  font-size: .85rem; color: var(--text-light); margin-top: .5rem; text-align: center;
}

.news-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1.5rem; min-height: 240px;
}
.news-loading {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; color: var(--text-mid); padding: 4rem 0;
}
.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--cream-dark); border-top-color: var(--green);
  border-radius: 50%; animation: spin .85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.news-card {
  background: var(--white); border-radius: var(--radius-md);
  overflow: hidden; border: 1px solid rgba(0,0,0,.06);
  display: flex; flex-direction: column;
  transition: transform .32s var(--ease), box-shadow .32s;
}
.news-card:hover { transform: translateY(-7px); box-shadow: 0 18px 48px rgba(0,0,0,.11); }
.news-card-img { height: 190px; overflow: hidden; background: var(--cream-mid); flex-shrink: 0; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.news-card:hover .news-card-img img { transform: scale(1.05); }
.news-card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; font-size: 3rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
}
.news-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.news-card-date { font-size: .74rem; color: var(--text-light); letter-spacing: .06em; margin-bottom: .5rem; }
.news-card-title { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; color: var(--navy); line-height: 1.35; margin-bottom: .6rem; }
.news-card-excerpt { font-size: .875rem; color: var(--text-mid); line-height: 1.65; flex: 1; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-link { font-size: .84rem; font-weight: 700; color: var(--green); display: inline-flex; align-items: center; gap: .3rem; letter-spacing: .02em; transition: gap .22s; }
.news-card-link:hover { gap: .6rem; }
.news-card-link::after { content: '→'; }
.news-error { grid-column: 1 / -1; text-align: center; padding: 3.5rem; color: var(--text-mid); }
.news-actions { margin-top: 3rem; text-align: center; }

/* Load more */
.load-more-wrap { text-align: center; margin-top: 2.5rem; }
#loadMoreBtn:disabled { opacity: .5; cursor: default; }

/* ═══════════════════════════════════════════════════════════════
   FAQ
   ═══════════════════════════════════════════════════════════════ */
.faq-page { background: var(--white); }
.faq-list  { max-width: 820px; margin: 0 auto; }
.faq-item  { border-bottom: 1px solid rgba(0,0,0,.08); }
.faq-question {
  width: 100%; text-align: left; background: none; border: none;
  padding: 1.5rem 0; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 600;
  color: var(--navy); transition: color .2s;
}
.faq-question:hover { color: var(--green); }
.faq-icon {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s, background .3s, border-color .3s, color .3s;
  font-style: normal; font-size: 1.1rem; font-family: monospace;
}
.faq-item.open .faq-question       { color: var(--green); }
.faq-item.open .faq-icon { background: var(--green); border-color: var(--green); color: var(--white); transform: rotate(45deg); }
.faq-answer {
  overflow: hidden; max-height: 0;
  transition: max-height .42s ease, padding-bottom .3s;
}
.faq-answer-inner { padding-bottom: 1.5rem; color: var(--text-mid); font-size: .95rem; line-height: 1.78; }
.faq-item.open .faq-answer { max-height: 400px; }

/* ═══════════════════════════════════════════════════════════════
   NEWSLETTER
   ═══════════════════════════════════════════════════════════════ */
.newsletter {
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-mid) 100%);
  position: relative; overflow: hidden;
}
.newsletter::before {
  content: ''; position: absolute; top: -40%; right: -5%;
  width: 550px; height: 550px; border-radius: 50%;
  background: radial-gradient(circle, rgba(110,181,49,.18) 0%, transparent 70%);
  pointer-events: none;
}
.newsletter::after {
  content: ''; position: absolute; bottom: -30%; left: -8%;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,168,75,.1) 0%, transparent 70%);
  pointer-events: none;
}
.newsletter-box {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg); padding: 3.5rem; backdrop-filter: blur(8px);
}
.newsletter-text .section-tag { color: var(--gold); background: rgba(200,168,75,.15); }
.newsletter-text h2 { font-family: var(--font-display); font-size: clamp(1.8rem,3vw,2.5rem); font-weight: 600; color: var(--white); margin: .75rem 0; line-height: 1.2; }
.newsletter-text p  { color: rgba(255,255,255,.65); font-size: .95rem; line-height: 1.75; margin-bottom: 1.25rem; }
.newsletter-perks { display: flex; flex-direction: column; gap: .5rem; }
.newsletter-perks li { color: rgba(255,255,255,.7); font-size: .9rem; }
.newsletter-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { color: rgba(255,255,255,.75); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.form-group input {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-sm); padding: .78rem 1rem;
  color: var(--white); font-size: .9rem; outline: none;
  transition: border-color .22s, background .22s;
}
.form-group input::placeholder { color: rgba(255,255,255,.28); }
.form-group input:focus { border-color: var(--green-light); background: rgba(255,255,255,.13); }
.gdpr-label { display: flex; align-items: flex-start; gap: .75rem; cursor: pointer; }
.gdpr-label input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.gdpr-box {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 4px;
  border: 2px solid rgba(255,255,255,.28); background: transparent; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  transition: background .22s, border-color .22s; position: relative;
}
.gdpr-label input:checked + .gdpr-box { background: var(--green); border-color: var(--green); }
.gdpr-label input:checked + .gdpr-box::after {
  content: ''; position: absolute; width: 5px; height: 9px;
  border: 2px solid white; border-top: none; border-left: none;
  transform: rotate(44deg) translate(0,-1px);
}
.gdpr-text { color: rgba(255,255,255,.6); font-size: .82rem; line-height: 1.5; }
.gdpr-text a { color: var(--gold); text-decoration: underline; }
.form-privacy-notice {
  font-size: .82rem;
  line-height: 1.55;
  color: rgba(255,255,255,.6);
  margin: 0 0 .85rem;
}
.form-privacy-notice a { color: var(--gold); text-decoration: underline; }
.form-feedback { font-size: .85rem; border-radius: .4rem; min-height: 0; transition: all .3s; }
.form-feedback.success { color: #7dd3a8; padding: .5rem 0; }
.form-feedback.error   { color: #fc8181; padding: .5rem 0; }
#nlSubmit { position: relative; }
.btn-label   { transition: opacity .2s; }
.btn-loading { display: none; position: absolute; left: 50%; transform: translateX(-50%); }
.form-note { font-size: .76rem; color: rgba(255,255,255,.35); margin-top: -.25rem; }

/* ═══════════════════════════════════════════════════════════════
   CONTATTI
   ═══════════════════════════════════════════════════════════════ */
.contatti { background: var(--white); }
.contatti-grid { display: grid; grid-template-columns: 1.45fr 1fr 1fr 1fr; gap: 2rem; }
.contatto-card {
  text-align: center; padding: 2rem 1rem; border-radius: var(--radius-md);
  border: 1px solid rgba(0,0,0,.05);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.contatto-card--sedi { padding: 2rem 1.5rem; }
.contatto-sedi-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: .75rem;
}
.contatto-sede-link {
  color: var(--text-mid); font-size: .9rem; line-height: 1.65;
  transition: color .2s; display: inline-block;
}
.contatto-sede-link:hover { color: var(--green); }
.contatto-sede-city {
  margin: .85rem 0 0; font-size: .85rem; color: var(--text-light);
}
.contatto-card:hover { transform: translateY(-5px); box-shadow: 0 12px 32px rgba(0,0,0,.08); }
.contatto-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--green-pale);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .9rem;
  transition: background .3s, transform .3s var(--ease-bounce);
}
.contatto-card:hover .contatto-icon { background: var(--green); transform: scale(1.08); }
.contatto-icon svg { width: 24px; height: 24px; color: var(--green); transition: color .3s; }
.contatto-card:hover .contatto-icon svg { color: var(--white); }
.contatto-card h4 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--navy); margin-bottom: .5rem; }
.contatto-card p, .contatto-card > a, .contatto-sede-link { color: var(--text-mid); font-size: .9rem; line-height: 1.7; transition: color .2s; }
.contatto-card > a:hover, .contatto-sede-link:hover { color: var(--green); }
.social-links { display: flex; flex-direction: column; gap: .5rem; align-items: center; }
.social-link { display: flex; align-items: center; gap: .5rem; color: var(--text-mid); font-size: .9rem; transition: color .2s; }
.social-link:hover { color: var(--green); }
.social-link svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════
   PAGINA 5×1000
   ═══════════════════════════════════════════════════════════════ */
.cinquepermille-page { background: var(--cream); }
.cinquepermille-grid {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 3.5rem 4rem;
  align-items: start;
}
.cinquepermille-image img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(38,50,138,.12);
}
.cinquepermille-intro {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-mid);
  margin-bottom: 2rem;
}
.cinquepermille-cf {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-md);
  padding: 1.75rem 2rem;
  margin-bottom: 2.25rem;
  font-family: Calibri, 'Segoe UI', Arial, sans-serif;
  text-align: left;
}
.cinquepermille-cf-label {
  display: block;
  font-size: clamp(1.03rem, 2.8vw, 1.63rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 0.35rem;
}
.cinquepermille-cf-value {
  display: block;
  font-family: Calibri, 'Segoe UI', Arial, sans-serif;
  font-size: clamp(1.45rem, 3.2vw, 1.85rem);
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
.cinquepermille-cf-hint {
  font-size: .92rem;
  color: var(--text-mid);
  line-height: 1.65;
  margin: 0;
  text-align: left;
}
.cinquepermille-contatti h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 1.25rem;
}
.cinquepermille-contatti-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.cinquepermille-contatti-list li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: .5rem 1rem;
  font-size: .95rem;
  line-height: 1.65;
  color: var(--text-mid);
}
.cinquepermille-contatti-list strong {
  color: var(--navy);
  font-weight: 600;
}
.cinquepermille-contatti-list a {
  color: var(--navy-light);
  transition: color .2s;
}
.cinquepermille-contatti-list a:hover { color: var(--green-mid); }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.footer { background: var(--navy); padding: 4rem 0 2.5rem; }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.15fr 0.6fr 0.65fr minmax(200px, 280px);
  gap: 2.75rem 2rem;
  align-items: start;
}
.footer-col { display: flex; flex-direction: column; }
.footer-col-title {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 600;
  color: var(--green-light);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand { align-items: flex-start; text-align: left; }
.footer-logo { height: 52px; width: auto; object-fit: contain; margin-bottom: .85rem; align-self: flex-start; display: block; }
.footer-brand p { font-size: .84rem; color: rgba(255,255,255,.5); line-height: 1.65; }
.footer-5x1000 .footer-col-title { font-size: 1.05rem; }
.footer-sito { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; text-align: left; }
.footer-sito a { color: rgba(255,255,255,.55); font-size: .9rem; transition: color .2s; }
.footer-sito a:hover { color: var(--green-light); }
.footer-legal { text-align: left; }
.footer-legal p { font-size: .78rem; color: rgba(255,255,255,.42); line-height: 1.85; }
.footer-legal a { color: rgba(255,255,255,.55); text-decoration: underline; transition: color .2s; }
.footer-legal a:hover { color: var(--green-light); }
.footer-social { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; text-align: left; }
.footer-social a { color: rgba(255,255,255,.55); font-size: .9rem; transition: color .2s; }
.footer-social a:hover { color: var(--green-light); }
.footer-5x1000 { justify-self: end; width: 100%; }
.footer-5x1000-badge { display: block; line-height: 0; cursor: pointer; text-decoration: none; }
.footer-5x1000 img {
  width: 100%; max-width: 400px; height: auto; display: block;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 28px rgba(0,0,0,.3);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.footer-5x1000-badge:hover img {
  transform: scale(1.02);
  box-shadow: 0 10px 36px rgba(0,0,0,.38);
}

/* ═══════════════════════════════════════════════════════════════
   STATI INIZIALI ANIMAZIONI (pre-GSAP)
   ═══════════════════════════════════════════════════════════════ */
[data-anim="fade-up"]        { opacity: 0; transform: translateY(40px); }
[data-anim="timeline-left"]  { opacity: 0; transform: translateX(-50px); }
[data-anim="timeline-right"] { opacity: 0; transform: translateX(50px); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .pillars-grid, .activities-grid, .news-grid,
  .events-grid, .servizi-full-grid { grid-template-columns: repeat(2,1fr); }
  .contatti-grid    { grid-template-columns: repeat(2,1fr); }
  .newsletter-box   { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-inner     { grid-template-columns: 1fr 1fr; }
  .cinquepermille-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .cinquepermille-image { max-width: 420px; margin: 0 auto; }
  .footer-legal     { grid-column: 1 / -1; }
  .footer-5x1000    { grid-column: 1 / -1; justify-self: center; }
  .footer-5x1000 img { max-width: 360px; }
}

@media (max-width: 768px) {
  :root { --section-py: 4.5rem; }
  .nav-links     { display: none; }
  .nav-hamburger { display: flex; }
  .hero-logo-center { max-width: clamp(200px, 70vw, 280px); }
  .nav-links { gap: .85rem; }
  .hero-title    { font-size: clamp(3.5rem, 18vw, 6rem); }

  .pillars-grid, .activities-grid, .news-grid,
  .events-grid, .servizi-full-grid, .contatti-grid { grid-template-columns: 1fr; }

  .timeline-item {
    display: flex; flex-direction: column;
    padding-left: 2.5rem; margin-bottom: 2.5rem;
  }
  .timeline-item.left,
  .timeline-item.right { display: flex; flex-direction: column; padding-left: 2.5rem; }
  .timeline-track, .timeline-progress { left: .6rem; transform: none; }
  .timeline-dot   { position: absolute; left: 0; margin-top: 1.4rem; }
  .timeline-item  { position: relative; }
  .timeline-card  { text-align: left !important; }

  .form-row       { grid-template-columns: 1fr; }
  .newsletter-box { padding: 2rem 1.5rem; }
  .footer-inner   { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-legal   { grid-column: auto; text-align: left; }
  .footer-social  { align-items: flex-start; text-align: left; }
  .footer-5x1000  { justify-self: center; }
  .footer-5x1000 img { max-width: min(100%, 380px); }
  .hero-ctas      { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  .cinquepermille-contatti-list li { grid-template-columns: 1fr; }
}

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--green); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--green-mid); }
