/* ==========================================================================
   Accademia della Salute — foglio di stile comune
   Proposta 1 "Editoriale caldo": Fraunces (titoli) + DM Sans (testo)
   ========================================================================== */

:root {
  --petrol: #004952;
  --petrol-deep: #00343b;
  --teal: #0a9faa;
  --teal-ink: #0a737c; /* 5:1 on cream and on aqua-soft (was #0b7c86, 4.4:1) */
  --field-line: #7d9396; /* form field borders: 3:1 against the white card */
  --aqua: #c5e2e5;
  --aqua-soft: #eaf4f5;
  --cream: #f7f4ee;
  --ink: #14282b;
  --muted: #55696c;
  --line: #d9e3e4;
  --white: #ffffff;
  --on-dark: #d5e7e9;
  --on-dark-muted: #bfd9dc;
  --amber-bg: #f6e9cf;
  --amber: #c7871a;
  --amber-ink: #7a5212;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1200px;
  --gutter: 24px;
  --radius: 6px;
  --radius-sm: 4px;
  --header-h: 100px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  /* anchors (#elenco, #modulo) land below the sticky header, not under it */
  scroll-padding-top: calc(var(--header-h, 96px) + 16px);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  color: var(--petrol);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  fill: currentColor;
}

.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--petrol);
  color: var(--white);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 16px;
}

/* --------------------------------------------------------------------------
   Tipografia ricorrente
   -------------------------------------------------------------------------- */

.eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--teal-ink);
}

.eyebrow--light {
  color: var(--aqua);
}

.h1 {
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.04;
}

.h2 {
  font-size: clamp(32px, 3.4vw, 48px);
}

.h2--xl {
  font-size: clamp(36px, 3.9vw, 56px);
}

.h3 {
  font-size: clamp(26px, 2.4vw, 32px);
}

.lead {
  font-family: var(--serif);
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.45;
  color: var(--ink);
}

.text {
  font-size: 17px;
  color: var(--muted);
}

.text--sm {
  font-size: 15px;
}

.stack > * + * {
  margin-top: 20px;
}

.stack-sm > * + * {
  margin-top: 12px;
}

.stack-lg > * + * {
  margin-top: 28px;
}

.quote--spaced {
  max-width: 940px;
  margin: 72px 0 0;
}

.narrow-head {
  max-width: 880px;
}

.narrow-head .eyebrow {
  margin-bottom: 20px;
}

.quote {
  padding: 4px 0 4px 32px;
  border-left: 3px solid var(--teal);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.3;
  color: var(--petrol);
}

/* --------------------------------------------------------------------------
   Bottoni e link
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--petrol);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn .icon {
  font-size: 18px;
}

.btn:hover {
  background: var(--petrol-deep);
}

.btn--outline {
  background: transparent;
  border-color: var(--petrol);
  color: var(--petrol);
  padding: 12px 22px;
}

.btn--outline:hover {
  background: var(--petrol);
  color: var(--white);
}

.btn--light {
  background: var(--aqua);
  color: var(--petrol);
}

.btn--light:hover {
  background: var(--white);
}

.btn[disabled],
.btn--disabled {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.btn--block {
  width: 100%;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--petrol);
}

.link-arrow .icon {
  font-size: 18px;
  transition: transform 0.2s;
}

.link-arrow:hover .icon {
  transform: translateX(4px);
}

.link-underline {
  font-size: 15px;
  font-weight: 600;
  color: var(--petrol);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.round-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1.5px solid var(--petrol);
  border-radius: 999px;
  background: transparent;
  color: var(--petrol);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.round-btn .icon {
  font-size: 20px;
}

.round-btn:hover {
  background: var(--petrol);
  color: var(--white);
}

.round-btn--soft {
  border: 0;
  background: rgba(255, 255, 255, 0.8);
}

.round-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* --------------------------------------------------------------------------
   Barra superiore e header
   -------------------------------------------------------------------------- */

.topbar {
  background: var(--petrol);
  color: var(--white);
  font-size: 13px;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 10px;
}

.topbar__event {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar__event .icon {
  font-size: 15px;
  color: var(--aqua);
}

.topbar__event a {
  font-weight: 600;
  color: var(--aqua);
}

.social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.social a {
  display: inline-flex;
  font-size: 15px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  transition: box-shadow 0.2s;
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(0, 52, 59, 0.06);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.brand__name {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--petrol);
}

.brand__sub {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  transition: color 0.2s;
}

.nav__link:hover,
.nav__link[aria-current="page"] {
  color: var(--petrol);
}

.nav__link[aria-current="page"] {
  font-weight: 600;
}

.nav__link.is-section {
  color: var(--petrol);
}

/* Submenu: drop-down on desktop (hover, or the arrow button for keyboard and touch), nested list in the mobile menu */
.nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__sub-toggle {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.nav__sub-toggle:hover {
  background: var(--aqua-soft);
}

.nav__sub-toggle .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.nav__sub-toggle[aria-expanded="true"] .icon {
  transform: rotate(180deg);
}

.nav__sub {
  position: absolute;
  top: calc(100% + 14px);
  left: -20px;
  z-index: 30;
  min-width: 240px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 16px 32px rgba(0, 52, 59, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}

/* keeps the hover alive while the pointer crosses the gap above the drop-down */
.nav__sub::before {
  content: "";
  position: absolute;
  inset: -16px 0 auto;
  height: 16px;
}

.nav__item--parent:hover .nav__sub,
.nav__sub-toggle[aria-expanded="true"] + .nav__sub {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.nav__sub-link {
  display: block;
  padding: 10px 20px;
  font-size: 15px;
  color: var(--ink);
}

.nav__sub-link:hover,
.nav__sub-link[aria-current="page"] {
  background: var(--aqua-soft);
  color: var(--petrol);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--petrol);
  border-radius: 999px;
  background: transparent;
  color: var(--petrol);
  cursor: pointer;
}

.nav-toggle .icon {
  font-size: 22px;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-open .nav-toggle .icon-open {
  display: none;
}

.nav-open .nav-toggle .icon-close {
  display: block;
}

/* --------------------------------------------------------------------------
   Sezioni
   -------------------------------------------------------------------------- */

.section {
  padding-block: 120px;
}

.section--flush-top {
  padding-top: 0;
}

.section--white {
  background: var(--white);
}

.section--soft {
  background: var(--aqua-soft);
}

.section--petrol {
  background: var(--petrol);
  color: var(--white);
}

.section--petrol h2,
.section--petrol h3 {
  color: var(--white);
}

.section--petrol .text {
  color: var(--on-dark-muted);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 56px;
}

.section-head__title {
  max-width: 700px;
}

.section-head__title .eyebrow {
  margin-bottom: 16px;
}

.section-head__intro {
  margin-top: 20px;
}

.section-head__aside {
  max-width: 460px;
}

.section-head__controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Homepage — slideshow
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  height: clamp(620px, 48.6vw, 820px);
  overflow: hidden;
  background: var(--cream);
}

.hero__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(247, 244, 238, 0.95) 0%, rgba(247, 244, 238, 0.86) 45%, rgba(247, 244, 238, 0) 75%);
}

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

.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero__content {
  position: relative;
  max-width: 560px;
}

.hero__content > * + * {
  margin-top: 28px;
}

.hero__title {
  font-family: var(--serif);
  font-size: clamp(42px, 4.5vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  color: var(--petrol);
}

.hero__text {
  font-size: 20px;
  color: var(--ink);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.hero__controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 48px;
  z-index: 2;
}

.hero__controls .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero__dots {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero__count {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--petrol);
}

.hero__count--total {
  color: var(--muted);
}

.hero__dot {
  position: relative;
  width: 32px;
  height: 24px; /* touch target; the visible bar is ::before */
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: width 0.3s;
}

.hero__dot::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 2px;
  background: rgba(0, 73, 82, 0.25);
  transition: background-color 0.3s;
}

.hero__dot.is-active {
  width: 64px;
}

.hero__dot.is-active::before {
  background: var(--petrol);
}

[data-slide-toggle] .icon-play,
[data-slideshow].is-paused [data-slide-toggle] .icon-pause {
  display: none;
}

[data-slideshow].is-paused [data-slide-toggle] .icon-play {
  display: inline-block;
}

.hero__arrows {
  display: flex;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Homepage — L'Accademia e numeri
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 470px 1fr;
  gap: 96px;
}

.split__aside .eyebrow {
  margin-bottom: 20px;
}

.split__body {
  padding-top: 8px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 72px;
  border-top: 1px solid var(--line);
}

.fact {
  padding-top: 32px;
}

.fact__number {
  display: block;
  font-family: var(--serif);
  font-size: 56px;
  line-height: 1.2;
  color: var(--teal-ink);
}

.fact__text {
  max-width: 260px;
  margin-top: 8px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Ambiti
   -------------------------------------------------------------------------- */

.areas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.area__img {
  width: 100%;
  height: 360px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.area__num {
  display: block;
  margin-top: 18px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--teal-ink);
}

.area__title {
  margin-top: 18px;
  font-size: 26px;
  line-height: 1.15;
  color: var(--ink);
}

.area__text {
  margin-top: 18px;
  font-size: 15px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Fascia eventi (homepage e pagine interne)
   -------------------------------------------------------------------------- */

.events-band {
  display: grid;
  grid-template-columns: max(620px, 45vw) 1fr;
  min-height: 760px;
  background: var(--petrol);
  color: var(--white);
}

.events-band__img {
  width: 100%;
  height: 0; /* riempie il blocco senza allungarlo */
  min-height: 100%;
  object-fit: cover;
}

.events-band__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
  padding: 96px max(var(--gutter), calc((100vw - var(--container)) / 2)) 96px 80px;
}

.events-band__body h2 {
  color: var(--white);
}

.events-band__body .text {
  color: var(--on-dark);
}

.next-event {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  transition: background-color 0.2s;
}

.next-event:hover {
  background: rgba(255, 255, 255, 0.12);
}

.next-event__kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--aqua);
}

.next-event__kicker,
.next-event__title,
.next-event__meta {
  display: block;
}

.next-event__title {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--white);
}

.next-event__meta {
  margin-top: 8px;
  font-size: 14px;
  color: var(--on-dark-muted);
}

.past-event {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--on-dark);
}

.past-event .icon {
  font-size: 16px;
  color: var(--aqua);
}

.date-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--petrol);
}

.date-block__day {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
}

.date-block__month {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.date-block--dark {
  padding: 12px 18px;
  background: var(--petrol);
  color: var(--white);
}

.date-block--dark .date-block__day {
  font-size: 36px;
}

.date-block--dark .date-block__month {
  color: var(--aqua);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--amber-bg);
  color: var(--amber-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
}

.badge--done {
  background: var(--white);
  color: var(--petrol);
}

.badge--done::before {
  display: none;
}

.badge .icon {
  font-size: 14px;
  color: var(--teal-ink);
}

/* --------------------------------------------------------------------------
   News: carosello e card
   -------------------------------------------------------------------------- */

.carousel__track {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: max(var(--gutter), calc((100vw - var(--container)) / 2));
  padding-left: max(var(--gutter), calc((100vw - var(--container)) / 2));
  padding-right: var(--gutter);
  scrollbar-width: none;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__track > * {
  flex: 0 0 400px;
  scroll-snap-align: start;
}

.news-card {
  display: block;
}

.news-card__img {
  width: 100%;
  height: 260px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  transition: opacity 0.2s;
}

.news-card:hover .news-card__img {
  opacity: 0.9;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

.news-meta__cat {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-ink);
}

.news-meta__sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line);
}

.news-card__title {
  margin-top: 16px;
  font-size: 24px;
  line-height: 1.25;
  color: var(--ink);
}

.news-card:hover .news-card__title {
  color: var(--petrol);
}

.news-card__note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Collegamenti rapidi
   -------------------------------------------------------------------------- */

.quick-links {
  margin-top: 28px;
  border-bottom: 1px solid var(--line);
}

.quick-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 28px;
  border-top: 1px solid var(--line);
}

.quick-link__text {
  display: flex;
  align-items: center;
  gap: 48px;
}

.quick-link__title {
  width: 340px;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--petrol);
}

.quick-link__desc {
  color: var(--muted);
}

.quick-link .icon {
  font-size: 28px;
  color: var(--teal-ink);
  transition: transform 0.2s;
}

.quick-link:hover .icon {
  transform: translate(4px, -4px);
}

/* --------------------------------------------------------------------------
   Contatti in homepage, mappa
   -------------------------------------------------------------------------- */

.contact-band {
  display: grid;
  grid-template-columns: 520px 1fr;
  align-items: center;
  gap: 80px;
}

.contact-list {
  display: grid;
  gap: 14px;
  padding-block: 8px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-list .icon {
  font-size: 18px;
  color: var(--teal-ink);
}

.map {
  position: relative;
  height: 440px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--aqua) url("../images/mappa.webp") center / cover no-repeat;
}

.map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map__pin {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--petrol);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 18px rgba(0, 52, 64, 0.2);
}

.map__pin .icon {
  font-size: 16px;
}

.map__consent {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  color: var(--muted);
}

.map__consent .btn {
  padding: 10px 18px;
  font-size: 14px;
}

.map__directions {
  position: absolute;
  top: 24px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--white);
  color: var(--petrol);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 52, 64, 0.12);
}

.map.is-loaded .map__pin,
.map.is-loaded .map__consent {
  display: none;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding: 80px 0 40px;
  background: var(--petrol-deep);
  color: var(--white);
  font-size: 15px;
}

.site-footer__top {
  display: grid;
  grid-template-columns: 360px repeat(3, auto);
  justify-content: space-between;
  gap: 48px;
}

.site-footer__logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
}

.site-footer__claim {
  max-width: 360px;
  margin-top: 20px;
  color: #b5cdd0;
}

.site-footer h2 {
  margin-bottom: 14px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--aqua);
}

.site-footer li + li {
  margin-top: 14px;
}

.site-footer a:hover {
  color: var(--aqua);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 13px;
  color: #8fb0b4;
}

/* --------------------------------------------------------------------------
   Pagine interne — testata
   -------------------------------------------------------------------------- */

.page-head {
  padding: 56px 0 72px;
  border-top: 1px solid var(--line);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
}

.breadcrumb [aria-current="page"] {
  font-weight: 600;
  color: var(--petrol);
}

.breadcrumb a:hover {
  color: var(--petrol);
}

.page-head__title {
  max-width: 1000px;
  margin-top: 32px;
}

.page-head .eyebrow {
  margin-top: 32px;
}

.page-head .eyebrow + .page-head__title {
  margin-top: 24px;
}

.page-head__intro {
  max-width: 760px;
  margin-top: 24px;
}

.page-head__intro p {
  font-size: 19px;
  color: var(--muted);
}

.page-head__intro p + p {
  margin-top: 16px;
}

.page-image img {
  width: 100%;
  height: 520px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   Chi siamo
   -------------------------------------------------------------------------- */

.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 72px;
  border-top: 1px solid var(--line);
}

.timeline__item {
  position: relative;
  padding-top: 24px;
}

.timeline__item::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 0;
  width: 13px;
  height: 13px;
  border: 2px solid var(--teal-ink);
  border-radius: 50%;
  background: var(--cream);
}

.timeline__item.is-current::before {
  background: var(--teal-ink);
}

.timeline__year {
  display: block;
  font-family: var(--serif);
  font-size: 56px;
  line-height: 1.2;
  color: var(--teal-ink);
}

.timeline__text {
  max-width: 280px;
  margin-top: 12px;
  color: var(--muted);
}

.mv-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 64px;
}

.mv-card {
  padding: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.mv-card > * + * {
  margin-top: 20px;
}

.mv-card__lead {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.45;
  color: #e3f0f1;
}

.mv-card p:not(.mv-card__lead) {
  color: var(--on-dark-muted);
}

.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--aqua);
  color: var(--petrol);
}

.icon-circle .icon {
  font-size: 24px;
}

.icon-circle--soft {
  background: var(--aqua-soft);
  color: var(--teal-ink);
}

.mv-closing {
  max-width: 820px;
  margin-top: 64px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  line-height: 1.4;
  color: var(--aqua);
}

.values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.value {
  padding: 36px 32px 0;
}

.value:first-child {
  padding-left: 0;
}

.value + .value {
  border-left: 1px solid var(--line);
}

.value__num {
  display: block;
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1.2;
  color: var(--teal-ink);
}

.value__title {
  margin-top: 16px;
  font-size: 26px;
  color: var(--ink);
}

.value p {
  margin-top: 16px;
  font-size: 15px;
  color: var(--muted);
}

.cta-split {
  display: grid;
  grid-template-columns: max(620px, 45vw) 1fr;
  min-height: 520px;
  background: var(--aqua-soft);
}

.cta-split__img {
  width: 100%;
  height: 0; /* riempie il blocco senza allungarlo */
  min-height: 100%;
  object-fit: cover;
}

.cta-split__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  padding: 64px max(var(--gutter), calc((100vw - var(--container)) / 2)) 64px 80px;
}

/* --------------------------------------------------------------------------
   Professionisti
   -------------------------------------------------------------------------- */

.people {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.person {
  display: flex;
  gap: 32px;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--white);
}

.person--outlined {
  border: 1px solid var(--line);
}

.portrait {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 200px;
  height: 250px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--aqua), var(--aqua-soft));
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 500;
  color: var(--petrol);
}

.portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.portrait__tag {
  position: absolute;
  bottom: 14px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transform: translateX(-50%);
}

.person__name {
  font-size: 28px;
  color: var(--ink);
}

.person__role {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--teal-ink);
}

.person__bio {
  margin-top: 16px;
}

.person__bio p {
  font-size: 15px;
  color: var(--muted);
}

.person__bio p + p {
  margin-top: 12px;
}

.talk {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--aqua-soft);
}

.talk__kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--teal-ink);
}

.talk__title {
  margin-top: 6px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--petrol);
}

.speakers {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 32px;
}

.card-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px;
  border: 1.5px solid var(--aqua);
  border-radius: var(--radius);
  text-align: center;
}

.card-empty h3 {
  font-size: 24px;
}

.card-empty p {
  font-size: 15px;
  color: var(--muted);
}

.split-head {
  display: grid;
  grid-template-columns: 470px 1fr;
  gap: 96px;
  margin-bottom: 48px;
}

.split-head__title {
  margin-top: 16px;
}

/* --------------------------------------------------------------------------
   Eventi
   -------------------------------------------------------------------------- */

.tabs {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}

.tab__count {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--line);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.tab:hover,
.tab[aria-current="true"] {
  color: var(--petrol);
}

.tab[aria-current="true"] {
  border-bottom-color: var(--petrol);
}

.tab[aria-current="true"] .tab__count {
  background: var(--petrol);
  color: var(--white);
}

.event-feature {
  display: grid;
  grid-template-columns: 600px 1fr;
  min-height: 480px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
}

.event-feature__img {
  width: 100%;
  height: 0; /* riempie il blocco senza allungarlo */
  min-height: 100%;
  object-fit: cover;
}

.event-feature__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: 48px 56px;
}

.event-feature__top {
  display: flex;
  align-items: center;
  gap: 20px;
}

.event-feature__title {
  font-size: clamp(30px, 2.8vw, 40px);
  color: var(--ink);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: 15px;
}

.meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.meta-row .icon {
  font-size: 18px;
  color: var(--teal-ink);
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: var(--muted);
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.pillar {
  padding: 36px 40px 0;
}

.pillar:first-child {
  padding-left: 0;
}

.pillar + .pillar {
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.pillar .icon {
  font-size: 28px;
  color: var(--aqua);
}

.pillar h3 {
  margin-top: 16px;
  font-size: 32px;
}

.pillar p {
  margin-top: 16px;
  color: var(--on-dark-muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.chip:hover {
  border-color: var(--petrol);
}

.chip.is-active,
.chip[aria-pressed="true"] {
  border-color: var(--petrol);
  background: var(--petrol);
  color: var(--white);
}

.chip--info {
  background: var(--white);
  font-weight: 500;
  cursor: default;
}

.chip--info:hover {
  border-color: var(--line);
}

.chip .icon {
  font-size: 16px;
  color: var(--teal-ink);
}

.archive {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.event-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
}

.event-card__media {
  position: relative;
}

.event-card__media img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.event-card__media .badge {
  position: absolute;
  top: 20px;
  left: 20px;
}

.event-card__media--empty {
  display: grid;
  place-items: center;
  height: 300px;
  background: var(--aqua-soft);
  color: var(--teal-ink);
}

.event-card__media--empty > .icon {
  width: 48px;
  height: 48px;
}

.event-card__body {
  padding: 32px;
}

.event-card__body > * + * {
  margin-top: 14px;
}

.event-card__title {
  font-size: 32px;
  color: var(--ink);
}

.event-card__claim {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--petrol);
}

.empty-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
}

.empty-slot .icon {
  font-size: 28px;
}

.empty-slot strong {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.empty-slot p {
  max-width: 300px;
  font-size: 14px;
}

.event-feature__title a:hover {
  color: var(--petrol);
}

/* Dettaglio evento */

.event-head .badge {
  margin-left: 4px;
}

.event-head__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.event-head__kicker .eyebrow {
  white-space: nowrap;
}

.event-head .chips {
  margin-top: 24px;
}

.event-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 80px;
  align-items: start;
}

.event-layout__main > * + * {
  margin-top: 56px;
}

.notice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  background: var(--aqua-soft);
  font-size: 15px;
  color: var(--petrol);
}

.notice .icon {
  font-size: 20px;
  color: var(--teal-ink);
}

.notice--spaced {
  margin-top: 20px;
}

.program {
  margin-top: 20px;
}

.program li {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
}

.program__text {
  flex: 1;
  min-width: 0;
}

.skeleton {
  display: block;
  width: 64px;
  max-width: 100%;
  height: 12px;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--line);
}

.program li:nth-child(1) .skeleton--title { width: 320px; }
.program li:nth-child(1) .skeleton--sub { width: 180px; }
.program li:nth-child(2) .skeleton--title { width: 260px; }
.program li:nth-child(2) .skeleton--sub { width: 140px; }
.program li:nth-child(3) .skeleton--title { width: 380px; }
.program li:nth-child(3) .skeleton--sub { width: 200px; }
.program li:nth-child(4) .skeleton--title { width: 220px; }
.program li:nth-child(4) .skeleton--sub { width: 120px; }

.skeleton--title {
  height: 14px;
  background: #dce6e7;
}

.skeleton--sub {
  height: 10px;
  margin-top: 8px;
  background: #e9efef;
}

.speaker-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.speaker-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.speaker-slot .icon-circle {
  width: 88px;
  height: 88px;
}

.speaker-slot .icon-circle .icon {
  font-size: 32px;
}

.register-card {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.register-card__date {
  display: flex;
  align-items: center;
  gap: 16px;
}

.register-card__date strong {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.register-card__date span {
  font-size: 14px;
  color: var(--muted);
}

.register-card dl {
  margin: 20px 0;
}

.register-card dl div {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 2px 12px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}

.register-card dt {
  grid-column: 2;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.register-card dd {
  grid-column: 2;
  margin: 0;
  font-size: 15px;
}

.register-card dl .icon {
  grid-row: 1 / span 2;
  font-size: 18px;
  color: var(--teal-ink);
}

.register-card__note {
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
  color: var(--muted);
}

.register-card__tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.register-card__tools a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--petrol);
}

.share-mini {
  display: flex;
  gap: 12px;
  color: var(--muted);
}

.share-mini a {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  min-height: 32px; /* touch target: the icons are 14 px */
}

.share-mini a:hover {
  color: var(--petrol);
}

.event-aside > * + * {
  margin-top: 24px;
}

.event-aside .map {
  height: 280px;
}

.archive-row {
  display: grid;
  grid-template-columns: 320px 1fr auto;
  align-items: center;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.archive-row img {
  width: 320px;
  height: 200px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.archive-row .stack-sm > span {
  display: block;
}

.archive-row__title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
}

.archive-row:hover .archive-row__title {
  color: var(--petrol);
}

.archive-row .icon {
  font-size: 28px;
  color: var(--teal-ink);
}

/* --------------------------------------------------------------------------
   News
   -------------------------------------------------------------------------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 24px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 300px;
  padding: 12px 18px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  background: var(--white);
}

.search .icon {
  font-size: 16px;
  color: var(--muted);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}

/* the outline of the input is off: the whole pill shows the focus */
.search:focus-within {
  outline: 2px solid var(--teal-ink);
  outline-offset: 2px;
}

.news-feature {
  display: grid;
  grid-template-columns: 720px 1fr;
  min-height: 440px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
}

.news-feature__img {
  width: 100%;
  height: 0; /* riempie il blocco senza allungarlo */
  min-height: 100%;
  object-fit: cover;
}

.news-feature__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
  padding: 48px;
}

.news-feature__body .news-meta {
  margin-top: 0;
}

.news-feature__title {
  font-size: clamp(30px, 2.8vw, 40px);
  color: var(--ink);
}

.tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--aqua-soft);
  font-size: 12px;
  font-weight: 600;
  color: var(--petrol);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 32px;
  margin-top: 48px;
}

.news-grid--flush {
  margin-top: 0;
}

.news-grid [hidden] {
  display: none;
}

.news-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 56px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  font-size: 18px;
  color: var(--muted);
}

.news-empty p {
  margin: 0;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 64px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 600;
}

.pagination [aria-current="page"] {
  border-color: var(--petrol);
  background: var(--petrol);
  color: var(--white);
}

.pagination a:hover {
  border-color: var(--petrol);
}

.pagination .icon {
  font-size: 16px;
  color: var(--petrol);
}

/* Articolo */

.article-head {
  padding: 48px 0 56px;
  border-top: 1px solid var(--line);
}

.article-head__inner {
  max-width: 860px;
  margin: 48px auto 0;
  text-align: center;
}

.article-head__inner .news-meta {
  justify-content: center;
  margin-top: 0;
}

.article-head__title {
  margin-top: 24px;
  font-size: clamp(38px, 4.5vw, 64px);
  line-height: 1.05;
}

.article-head__lead {
  max-width: 720px;
  margin: 24px auto 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.5;
  color: var(--muted);
}

.author {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  font-size: 14px;
  font-weight: 600;
}

.author img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.article-cover img {
  width: 100%;
  height: 560px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.prose {
  max-width: 720px;
  margin-inline: auto;
  padding: 72px 0 88px;
}

.prose > * + * {
  margin-top: 28px;
}

.prose p,
.prose li {
  font-size: 18px;
  line-height: 1.7;
}

.prose h2 {
  font-size: 32px;
  color: var(--ink);
}

.prose ul li {
  position: relative;
  padding-left: 22px;
}

.prose ul li + li {
  margin-top: 14px;
}

.prose ul li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.prose blockquote {
  margin-inline: 0;
}

.prose .notice {
  font-size: 14px;
}

.prose__block-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.gallery img {
  width: 100%;
  height: 170px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.attachment {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.attachment__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--aqua-soft);
  color: var(--teal-ink);
  font-size: 20px;
}

.attachment__name {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.attachment__size {
  font-size: 13px;
  color: var(--muted);
}

.attachment__dl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--petrol);
}

.article-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.share {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.share a,
.share button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--petrol);
  cursor: pointer;
}

.share a:hover,
.share button:hover {
  border-color: var(--petrol);
}

.share .icon {
  font-size: 16px;
}

.share button.is-copied {
  border-color: var(--teal);
  background: var(--aqua-soft);
}

/* --------------------------------------------------------------------------
   Contatti
   -------------------------------------------------------------------------- */

.contact-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 64px;
  align-items: start;
}

.contact-items li {
  display: flex;
  gap: 18px;
  padding-block: 28px;
  border-top: 1px solid var(--line);
}

.contact-items li:last-child {
  border-bottom: 1px solid var(--line);
}

.contact-items .icon-circle {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.contact-items .icon-circle .icon {
  font-size: 20px;
}

.contact-items .eyebrow {
  font-size: 12px;
}

.contact-items p {
  margin-top: 6px;
  font-size: 17px;
}

.contact-claim {
  margin-top: 40px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  line-height: 1.35;
  color: var(--petrol);
}

.form-card {
  padding: 48px;
  border-radius: var(--radius);
  background: var(--white);
}

.form-card > p {
  margin-top: 16px;
}

.form {
  display: grid;
  gap: 24px;
  margin-top: 32px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-sm);
  background: var(--cream);
  font-size: 15px;
  transition: border-color 0.2s, background-color 0.2s;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--teal);
  background-color: var(--white);
}

.field.has-error input,
.field.has-error textarea {
  border-color: #b4472f;
}

.field__error {
  display: none;
  margin-top: 6px;
  font-size: 13px;
  color: #b4472f;
}

.field.has-error .field__error {
  display: block;
}

.honeypot {
  position: absolute;
  left: -9999px;
}

.check {
  display: flex;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.check input {
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--petrol);
}

.check a {
  color: var(--petrol);
  text-decoration: underline;
}

.check.has-error {
  color: #b4472f;
}

.check-field .check.has-error + .field__error {
  display: block;
}

/* the focused field stays recognisable even when it has an error */
.field.has-error input:focus,
.field.has-error textarea:focus {
  border-color: var(--petrol);
  box-shadow: 0 0 0 3px rgba(0, 73, 82, 0.18);
}

.form__errors p {
  margin: 0;
  font-weight: 600;
}

.form__errors ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form__spam {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.form__spam .icon {
  font-size: 16px;
  color: var(--teal-ink);
}

.form__success {
  display: none;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  background: var(--aqua-soft);
  color: var(--petrol);
  font-weight: 500;
}

.form.is-sent .form__success {
  display: block;
}

.contact-map {
  height: 460px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    gap: 12px;
  }

  .nav__list {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    /* with the phone sideways the menu is taller than the screen: it scrolls on its own */
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px var(--gutter) 24px;
    background: var(--cream);
    box-shadow: 0 16px 32px rgba(0, 52, 59, 0.12);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }

  .nav-open .nav__list {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .nav__item {
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
  }

  .nav__link {
    display: block;
    flex: 1;
    padding: 16px 0;
    font-family: var(--serif);
    font-size: 22px;
  }

  .nav__sub-toggle {
    width: 44px;
    height: 44px;
  }

  .nav__sub-toggle .icon {
    width: 18px;
    height: 18px;
  }

  .nav__sub {
    position: static;
    display: none;
    flex-basis: 100%;
    min-width: 0;
    padding: 0 0 14px 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav__sub::before {
    content: none;
  }

  .nav__sub-toggle[aria-expanded="true"] + .nav__sub {
    display: block;
  }

  .nav__sub-link {
    padding: 10px 0;
    font-size: 17px;
  }

  .nav__sub-link:hover,
  .nav__sub-link[aria-current="page"] {
    background: transparent;
  }

  body.nav-open {
    overflow: hidden;
  }

  .split,
  .split-head {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* tablets in portrait (761-1180 px): the speaker cards next to the 420 px column were squeezed */
  .speakers {
    grid-template-columns: 1fr;
  }

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

  .events-band,
  .cta-split {
    grid-template-columns: 1fr;
  }

  .events-band__img,
  .cta-split__img {
    height: 380px;
    min-height: 0;
  }

  .events-band__body,
  .cta-split__body {
    padding: 72px var(--gutter);
  }

  .contact-band,
  .contact-layout,
  .event-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .register-card {
    position: static;
  }

  .site-footer__top {
    grid-template-columns: 1fr 1fr;
  }

  .people {
    grid-template-columns: 1fr;
  }

  .event-feature,
  .news-feature {
    grid-template-columns: 1fr;
  }

  .event-feature__img,
  .news-feature__img {
    height: 320px;
    min-height: 0;
  }

  .values {
    grid-template-columns: repeat(2, 1fr);
    border-top: 0;
  }

  .value,
  .value:first-child {
    padding: 32px 24px 32px 0;
    border-top: 1px solid var(--line);
  }

  .value + .value {
    border-left: 0;
  }

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

/* three dark columns are too narrow below ~960 px (iPad mini in portrait) */
@media (max-width: 960px) {
  .pillars {
    grid-template-columns: 1fr;
  }

  .pillar,
  .pillar:first-child {
    padding: 32px 0 0;
  }

  .pillar + .pillar {
    border-left: 0;
  }
}

@media (max-width: 760px) {
  /* stacked timeline: each item has its own line and room above the dot */
  .timeline {
    row-gap: 40px;
    border-top: 0;
  }

  .timeline__item {
    border-top: 1px solid var(--line);
  }

  /* iPhone zooms the page into any field under 16 px */
  .field input,
  .field select,
  .field textarea,
  .search input {
    font-size: 16px;
  }

  /* date and text side by side did not fit 360 px phones */
  .next-event {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
  }

  :root {
    --gutter: 16px;
    --header-h: 80px;
  }

  .section {
    padding-block: 72px;
  }

  .topbar__inner {
    font-size: 12px;
  }

  .topbar__event {
    min-width: 0;
  }

  .topbar__event span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar__event a {
    white-space: nowrap;
  }

  .topbar .social {
    display: none;
  }

  .hero__dots {
    gap: 10px;
  }

  .hero__dot {
    width: 20px;
  }

  .hero__dot.is-active {
    width: 40px;
  }

  .site-header__inner {
    padding-block: 12px;
  }

  .brand img {
    width: 52px;
    height: 52px;
  }

  .brand__name {
    font-size: 18px;
  }

  .nav .btn--outline {
    display: none;
  }

  .hero {
    height: 620px;
  }

  .hero__slide {
    align-items: flex-start;
    padding-top: 56px;
  }

  .hero__slide::before {
    background: linear-gradient(180deg, rgba(247, 244, 238, 0.95) 0%, rgba(247, 244, 238, 0.85) 50%, rgba(247, 244, 238, 0.2) 100%);
  }

  .hero__text {
    font-size: 18px;
  }

  .hero__controls {
    bottom: 24px;
  }

  /* on phones the slides move with a swipe or the dots: only the pause button stays */
  .hero__arrows [data-slide-prev],
  .hero__arrows [data-slide-next] {
    display: none;
  }

  .hero__arrows .round-btn {
    width: 44px;
    height: 44px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 40px;
  }

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

  .areas,
  .archive,
  .news-grid,
  .speakers,
  .mv-cards,
  .pillars,
  .values,
  .form__row,
  .speaker-slots {
    grid-template-columns: 1fr;
  }

  /* photos stay two per row on phones: one per row made long galleries endless */
  .gallery,
  .gallery--cols-2,
  .gallery--cols-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .area__img {
    height: 260px;
  }

  .carousel__track > * {
    flex-basis: 82%;
  }

  .pillar,
  .pillar:first-child {
    padding: 32px 0 0;
  }

  .pillar + .pillar {
    border-left: 0;
  }

  .quick-link__text {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .quick-link__title {
    width: auto;
    font-size: 28px;
  }

  .map {
    height: 320px;
  }

  .site-footer__top {
    grid-template-columns: 1fr;
  }

  .page-image img,
  .article-cover img {
    height: 300px;
  }

  .person {
    flex-direction: column;
    padding: 24px;
  }

  .portrait {
    flex-basis: auto;
    height: 220px;
  }

  .mv-card,
  .form-card {
    padding: 28px;
  }

  .event-feature__body,
  .news-feature__body {
    padding: 28px;
  }

  .event-feature__top {
    flex-wrap: wrap;
  }

  .archive-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .archive-row img {
    width: 100%;
  }

  .archive-row > .icon {
    display: none;
  }

  .search {
    width: 100%;
  }

  .tabs {
    gap: 24px;
  }

  .tab {
    font-size: 18px;
  }

  .program li {
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   CMS: elements filled from the admin (rich text, states, variants)
   ========================================================================== */

.rich > * + * {
  margin-top: 16px;
}

.rich ul,
.rich ol {
  padding-left: 1.2em;
  list-style: disc;
}

.rich ol {
  list-style: decimal;
}

.rich a,
.prose a:not(.btn),
.person__bio a {
  color: var(--petrol);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lead.rich > * + * {
  margin-top: 12px;
}

.page-head__intro > * + * {
  margin-top: 16px;
}

.page-head__intro p,
.page-head__intro li {
  font-size: 19px;
  color: var(--muted);
}

.page-head__actions {
  margin-top: 32px;
}

.prose--flush {
  padding: 0;
  margin-inline: 0; /* aligned with the page title above (Privacy, Cookie) */
}

.prose--flush > .eyebrow + .h2 {
  margin-top: 16px;
}

.badge--open {
  background: var(--aqua-soft);
  color: var(--petrol);
}

.badge--open::before {
  background: var(--teal);
}

.events-list__item + .events-list__item {
  margin-top: 32px;
}

.empty-slot--inline {
  display: block;
  padding: 32px;
  font-size: 16px;
}

.event-card__media {
  display: block;
}

.event-card__title a:hover,
.news-meta a.news-meta__cat:hover {
  color: var(--petrol);
}

.gallery a {
  display: block;
}

.gallery--spaced {
  margin-top: 20px;
}

.page-image--h380 img {
  height: 380px;
}

.page-image--h640 img {
  height: 640px;
}

.contact-band--single {
  grid-template-columns: minmax(0, 720px);
}

.form__errors {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: #fbe9e5;
  color: #8a2f1d;
  font-size: 14px;
}

.form.is-sent .form__errors {
  display: none;
}

.register-card__date .date-block__day {
  font-size: 32px;
  color: var(--white);
}

.register-card__date .date-block__month {
  font-size: 11px;
  color: var(--aqua);
}

.prose blockquote,
.rich blockquote {
  margin: 40px 0; /* breathing room around the quote, as in the prototype */
  padding: 4px 0 4px 32px;
  border-left: 3px solid var(--teal);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.35;
  color: var(--petrol);
}

.prose blockquote p,
.rich blockquote p {
  font-size: inherit;
  line-height: inherit;
}

.prose h3,
.rich h3 {
  font-size: 24px;
  color: var(--ink);
}

/* Shortcut to the visual editor, shown only to logged-in admins */
.admin-edit {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #1e3a8a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
}

.admin-edit:hover {
  background: #1d4ed8;
}

/* --------------------------------------------------------------------------
   Banner dei cookie e "Preferenze cookie" nel footer
   -------------------------------------------------------------------------- */

.cookie-banner {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  width: min(500px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 24px 24px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 16px 40px rgba(20, 40, 43, 0.18);
}

.cookie-banner[hidden],
.cookie-banner [hidden] {
  display: none !important; /* .btn sets display, which would beat the hidden attribute */
}

.cookie-banner__title {
  margin: 0 32px 8px 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.cookie-banner__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.cookie-banner__text a {
  color: var(--teal-ink);
  text-decoration: underline;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

/* Accept and refuse weigh the same (no nudging towards "Accetta") */
.cookie-banner__actions .btn {
  flex: 1 1 110px;
  padding: 13px 14px;
}

.cookie-banner__prefs {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.cookie-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}

.cookie-option input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--petrol);
}

.cookie-option input:disabled {
  cursor: default;
}

.cookie-option strong {
  display: block;
  color: var(--ink);
}

.cookie-banner__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.cookie-banner__close:hover {
  background: var(--aqua-soft);
}

.cookie-banner__close .icon {
  width: 18px;
  height: 18px;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 760px) {
  .cookie-banner {
    right: 16px;
    bottom: 16px;
    padding: 20px 18px 16px;
  }
}

/* --------------------------------------------------------------------------
   Blocchi galleria, video, documenti e pulsante
   -------------------------------------------------------------------------- */

.block-head {
  max-width: 760px;
  margin-bottom: 40px;
}

.block-head .h2 {
  margin-top: 12px;
}

.section--compact {
  padding-block: 56px;
}

.gallery--cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.gallery--cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.gallery--cols-2 img,
.gallery--cols-3 img,
.gallery--cols-4 img {
  height: auto;
  aspect-ratio: 4 / 3;
}

.video-block,
.files-block {
  max-width: 960px;
}

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--petrol);
}

.video__poster,
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.video__consent {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(0deg, rgba(0, 52, 59, 0.55), rgba(0, 52, 59, 0.25));
  color: var(--white);
  font-size: 14px;
  text-align: center;
}

.video__consent span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 52, 59, 0.82);
}

.video__play {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  color: var(--petrol);
  cursor: pointer;
  transition: transform 0.2s;
}

.video__play:hover {
  transform: scale(1.06);
}

.video__play .icon {
  width: 30px;
  height: 30px;
  margin-left: 4px;
}

.video.is-loaded .video__consent,
.video.is-loaded .video__poster {
  display: none;
}

.video__caption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

.button-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.button-block--center {
  align-items: center;
  text-align: center;
}

@media (max-width: 760px) {
  .gallery--cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .section--compact {
    padding-block: 40px;
  }

  .video__play {
    width: 64px;
    height: 64px;
  }
}

/* "Vai al contenuto" moves the focus to <main>: no outline around the whole page */
#contenuto:focus {
  outline: 0;
}

.calendar-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}

.calendar-links a + a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
}
