:root {
  --teal: #1c505e;
  --teal-dark: #12383f;
  --cream: #faf6ee;
  --accent: #d9822b;
  --ink: #1e2a2e;
  --muted: #5b6b70;
  --radius: 14px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--teal-dark); }
img { max-width: 100%; height: auto; }
a { color: var(--teal); }

.container { max-width: 1100px; margin: auto; padding: 0 1.25rem; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s, border-color .2s;
}
.site-header.scrolled {
  border-bottom-color: rgba(0, 0, 0, .08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--teal-dark);
  font-family: var(--serif);
  font-size: 1.15rem;
}
.brand img { border-radius: 50%; }

.nav-desktop ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .5rem; }
.nav-desktop a {
  display: block;
  padding: .5rem .8rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] { color: var(--teal); border-bottom-color: var(--accent); }

.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}
.hamburger span {
  display: block;
  height: 3px;
  background: var(--teal-dark);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--cream);
  border-bottom: 1px solid rgba(0, 0, 0, .1);
  box-shadow: 0 8px 16px rgba(0, 0, 0, .08);
}
.mobile-menu ul { list-style: none; margin: 0; padding: .5rem 1.25rem 1rem; }
.mobile-menu a {
  display: block;
  padding: .8rem 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.mobile-menu a[aria-current="page"] { color: var(--accent); }

@media (max-width: 760px) {
  .nav-desktop { display: none; }
  .hamburger { display: flex; }
  .mobile-menu.open { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, transform .2s;
}
.btn:hover { background: #b96a1a; border-color: #b96a1a; }
.btn-outline { background: transparent; color: #fff; border-color: #fff; }
.btn-outline:hover { background: rgba(255, 255, 255, .15); border-color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 520px;
  background-color: var(--teal-dark);
  color: #fff;
  text-align: center;
  padding: 4rem 1.25rem 5rem;
  border-radius: 0 0 50% 50% / 0 0 36px 36px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(18, 56, 63, .3) 0%, rgba(18, 56, 63, .8) 100%);
}
.hero-slides { position: absolute; inset: 0; z-index: -2; }
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.4s ease, transform 8s ease-out;
}
.hero-slide.active { opacity: 1; transform: scale(1); }
.hero img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .85);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}
.hero h1 { color: #fff; font-size: clamp(2rem, 6vw, 3.2rem); margin: 1.2rem 0 .3rem; }
.hero p { font-size: 1.15rem; margin: 0 0 1.8rem; opacity: .92; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding-block: 3.5rem; }
.section-alt { background: #fff; }
.section-title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 1.5rem; }
.lead { font-size: 1.1rem; max-width: 70ch; }

.page-head { padding: 3rem 0 1.5rem; }
.page-head h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0 0 .5rem; }
.page-head p { margin: 0; color: var(--muted); }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }

.event-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .07);
  transition: transform .2s, box-shadow .2s;
}
.event-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.event-card > a { display: block; color: inherit; text-decoration: none; }
.event-card .cover,
.event-card .cover-placeholder { aspect-ratio: 16 / 9; width: 100%; }
.event-card .cover img,
.event-card .cover picture { display: block; width: 100%; height: 100%; }
.event-card .cover img { object-fit: cover; }
.cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
}
.cover-placeholder img { width: 38%; max-width: 110px; height: auto; border-radius: 50%; opacity: .9; }
.date-badge {
  position: absolute;
  top: .8rem;
  left: .8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.date-badge .day { font-size: 1.5rem; font-weight: 700; }
.date-badge .month { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; margin-top: .2rem; }
.event-card .card-body { padding: 1rem 1.2rem 1.3rem; }
.event-card h3 { margin: 0 0 .4rem; font-size: 1.25rem; }
.event-card .meta { margin: 0 0 .5rem; color: var(--muted); font-size: .9rem; }
.event-card .summary { margin: 0; }

.event-card.is-past { box-shadow: none; background: #eceae5; }
.event-card.is-past .cover,
.event-card.is-past .cover-placeholder { filter: grayscale(1); opacity: .65; }
.event-card.is-past h3,
.event-card.is-past .summary { color: var(--muted); }
.event-card.is-past .date-badge { background: #8a9497; }
.events-page { padding-bottom: 4rem; }

.badge-past {
  display: inline-block;
  padding: .2rem .7rem;
  background: #8a9497;
  color: #fff;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
}

.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.pillar { background: var(--cream); border-radius: var(--radius); padding: 1.5rem; }
.pillar svg { width: 40px; height: 40px; color: var(--accent); }
.pillar h3 { margin: .8rem 0 .4rem; }
.pillar p { margin: 0; }

/* Telefono: righe compatte (icona a sinistra, testo a destra) per occupare meno altezza */
@media (max-width: 600px) {
  .pillars { grid-template-columns: 1fr; gap: .75rem; }
  .pillar {
    display: grid;
    grid-template-columns: 48px 1fr;
    column-gap: 1rem;
    align-items: center;
    background: #fff;
    border-left: 4px solid var(--accent);
    box-shadow: 0 4px 14px rgba(18, 56, 63, .08);
    padding: .9rem 1rem;
  }
  .pillar svg {
    box-sizing: border-box;
    grid-row: 1 / span 2;
    width: 48px;
    height: 48px;
    padding: 11px;
    border-radius: 50%;
    background: rgba(217, 130, 43, .14);
  }
  .pillar h3 { margin: 0; font-size: 1.1rem; color: var(--teal-dark); }
  .pillar p { font-size: .92rem; line-height: 1.35; color: var(--muted); }
}

.cta-band { background: var(--teal); color: #fff; text-align: center; padding: 3rem 1.25rem; }
.cta-band h2 { color: #fff; margin: 0 0 1.2rem; }
.cta-band .hero-actions { margin-top: 0; }

/* ---------- Event detail ---------- */
.event-detail { max-width: 760px; margin: auto; padding: 2.5rem 1.25rem 4rem; }
.event-detail .back { display: inline-block; margin-bottom: 1.2rem; text-decoration: none; font-weight: 500; }
.event-detail h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0 0 .6rem; }
.event-detail .meta-list { list-style: none; padding: 0; margin: 1rem 0 1.5rem; color: var(--muted); }
.event-detail .meta-list li { margin: .2rem 0; }
.event-detail .cover { margin: 0 0 1.5rem; border-radius: var(--radius); overflow: hidden; }
.event-detail .cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.event-detail .poster { margin: 2rem 0 0; max-width: 480px; }
.event-detail .poster img { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: 0 2px 12px rgba(0, 0, 0, .12); }

/* ---------- Info ---------- */
.info-page { padding-block: 2.5rem 4rem; overflow-wrap: anywhere; }
.info-page h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.info-page h2 { margin-top: 2.5rem; }
.info-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .5rem 1.5rem;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
  margin: 0;
}
.info-grid dt { font-weight: 600; color: var(--teal-dark); }
.info-grid dd { margin: 0; }
.map-embed {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius);
}
.pillar-list { padding-left: 1.2rem; }

.empty-state {
  grid-column: 1 / -1;
  background: #fff;
  border: 2px dashed rgba(28, 80, 94, .3);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}
.empty-state p { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-dark); color: #fff; margin-top: 0; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--accent); }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: 2rem;
}
.footer-col img { border-radius: 50%; }
.footer-col h2 { color: #fff; font-size: 1.1rem; margin: 0 0 .8rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: .3rem 0; }
.footer-name { font-family: var(--serif); font-size: 1.15rem; margin: .8rem 0 .2rem; }
.footer-tagline { margin: 0; opacity: .8; font-size: .95rem; }
.social { display: flex; gap: .8rem; margin-top: 1rem; }
.social a { display: inline-flex; padding: .5rem; border: 1px solid rgba(255, 255, 255, .4); border-radius: 50%; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .15); padding: 1rem 0; font-size: .85rem; opacity: .85; }

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; gap: .1rem; }
  .info-grid dd { margin-bottom: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
