:root {
  --navy: #04265a;
  --navy-2: #063f7f;
  --red: #df1b16;
  --red-dark: #b51312;
  --green: #15924c;
  --green-dark: #0f6f38;
  --gold: #f2b22c;
  --cream: #f3f9ff;
  --paper: #ffffff;
  --warm: #e7f4fd;
  --ink: #172033;
  --muted: #56677f;
  --line: #cfddec;
  --shadow: 0 16px 38px rgba(23, 32, 51, .08);
  --radius: 8px;
  --radius-lg: 10px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  background: #f2f5f9;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f2f5f9;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

img,
svg {
  display: block;
}

/* Rispetta l'attributo hidden anche quando un componente imposta display espliciti. */
[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(242, 178, 44, .22);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
}

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

.page-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  overflow: clip;
  background: var(--paper);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 104px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 38px clamp(18px, 3vw, 46px) 12px;
  background: #fff;
  border-bottom: 1px solid rgba(207, 221, 236, .9);
}

.site-header::before {
  content: "Lista civica Diritti e Salute - Fabrizio Meo Sindaco";
  position: absolute;
  inset: 0 0 auto;
  height: 26px;
  display: flex;
  align-items: center;
  padding-inline: clamp(18px, 3vw, 46px);
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.brand {
  min-width: 292px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  text-decoration: none;
}

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

.brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1;
}

.brand span,
.brand small {
  display: block;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
}

.main-nav {
  min-width: 0;
  flex: 1 1 auto;
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.main-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 8px;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius);
  border-bottom: 3px solid transparent;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: #eef8ff;
  border-color: var(--red);
}

.mobile-nav {
  display: none;
  margin-left: auto;
  position: relative;
}

.mobile-nav summary {
  width: 44px;
  height: 44px;
  display: grid;
  place-content: center;
  gap: 5px;
  cursor: pointer;
  list-style: none;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav summary span {
  width: 24px;
  height: 3px;
  display: block;
  border-radius: 99px;
  background: var(--navy);
  font-size: 0;
}

.mobile-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: min(82vw, 320px);
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(23, 32, 51, .16);
}

.mobile-panel a {
  padding: 12px;
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
  border-radius: 6px;
}

.mobile-panel a:hover,
.mobile-panel a[aria-current="page"] {
  background: #eaf6ff;
}

.section,
.hero,
.page-hero {
  padding-inline: clamp(20px, 6vw, 86px);
}

.hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, .86fr);
  gap: clamp(34px, 6vw, 72px);
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-block: clamp(44px, 6vw, 74px);
  background:
    linear-gradient(90deg, rgba(4, 38, 90, .025) 0 1px, transparent 1px) 0 0 / 64px 64px,
    radial-gradient(circle at 92% 22%, rgba(21, 146, 76, .08), transparent 28%),
    linear-gradient(135deg, #f5fbff 0%, #fbfdff 58%, #ffffff 100%);
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: auto -90px -160px auto;
  width: 420px;
  height: 420px;
  border: 30px solid rgba(7, 46, 87, .06);
  border-radius: 50%;
}

.hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: 660px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red-dark);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(44px, 5.5vw, 74px);
}

h2 {
  font-size: clamp(28px, 3vw, 42px);
}

h3 {
  font-size: 21px;
}

.hero-subtitle {
  margin: 12px 0 18px;
  color: var(--navy-2);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 900;
}

.hero-subtitle strong,
.hero-subtitle span {
  display: block;
}

.hero-subtitle span {
  margin-top: 4px;
  font-size: clamp(17px, 1.7vw, 22px);
}

.lead {
  max-width: 680px;
  margin: 0;
  color: #384960;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.actions--center {
  justify-content: center;
}

.actions--hero {
  align-items: center;
}

.button,
.doc-button,
.filter-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.button:hover,
.doc-button:hover,
.filter-button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 10px 24px rgba(223, 27, 22, .16);
}

.button--secondary {
  background: var(--navy-2);
  color: #fff;
}

.actions--hero {
  gap: 14px;
  margin-top: 30px;
}

.actions--hero .button {
  min-height: 50px;
  padding-inline: 24px;
}

.actions--hero .button--primary {
  padding-inline: 28px;
}

.actions--hero .button--secondary {
  border-color: rgba(4, 38, 90, .2);
  background: rgba(255, 255, 255, .76);
  color: var(--navy);
  box-shadow: 0 8px 22px rgba(4, 38, 90, .07);
}

.button--neutral,
.doc-button {
  border-color: var(--line);
  background: #fff;
  color: var(--navy);
}

.doc-button {
  border-color: rgba(4, 38, 90, .18);
  background: #fff;
  color: var(--navy);
  box-shadow: 0 6px 16px rgba(4, 38, 90, .06);
  font-size: 13.5px;
  font-weight: 800;
  text-transform: none;
}

.doc-button:hover {
  border-color: rgba(4, 38, 90, .32);
  background: #f7fbff;
  box-shadow: 0 10px 20px rgba(4, 38, 90, .08);
}

.doc-button.doc-button--primary {
  border-color: rgba(223, 27, 22, .24);
  background: #fff9f8;
  color: var(--navy);
  box-shadow: 0 6px 16px rgba(223, 27, 22, .06);
}

.doc-button.doc-button--secondary {
  border-color: rgba(4, 38, 90, .2);
  background: #f8fbff;
  color: var(--navy);
  box-shadow: 0 6px 16px rgba(4, 38, 90, .06);
}

.button--quiet {
  border-color: rgba(4, 38, 90, .18);
  background: rgba(255, 255, 255, .72);
  color: var(--navy);
}

.button-icon {
  width: 1em;
  flex: 0 0 auto;
  text-align: center;
  font-size: 1.05em;
  line-height: 1;
}

.doc-button .button-icon {
  color: var(--navy-2);
  font-size: 1em;
}

.doc-button.doc-button--primary .button-icon {
  color: var(--red-dark);
}

/* Segnala i CV non ancora disponibili senza togliere stabilità al layout. */
.doc-button.doc-button--unavailable {
  border-color: #d8e1ec;
  background: #eef3f7;
  color: #6a7788;
  box-shadow: inset 0 2px 8px rgba(23, 32, 51, .14);
  cursor: not-allowed;
}

.doc-button.doc-button--unavailable .button-icon {
  color: #7d8998;
}

.doc-button.doc-button--unavailable:hover {
  transform: none;
}

.button--navy {
  background: var(--navy);
  color: #fff;
}

/* Porta il volto del candidato al centro della hero senza sovraccaricare la foto. */
.hero-portrait {
  position: relative;
  z-index: 2;
  justify-self: center;
  width: min(100%, 540px);
}

.hero-portrait__image {
  width: 100%;
  height: clamp(360px, 34vw, 450px);
  object-fit: cover;
  object-position: 50% 42%;
  border: 1px solid rgba(207, 221, 236, .82);
  border-radius: 12px;
  box-shadow: 0 20px 46px rgba(23, 32, 51, .12);
}

.section {
  padding-block: 64px;
}

.section.section--compact {
  padding-block: 44px 24px;
}

.section--compact + .section {
  padding-top: 24px;
}

.section--candidate-preview {
  padding-top: 46px;
}

.section-head {
  max-width: 820px;
  margin-bottom: 28px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17.5px;
  line-height: 1.65;
}

.values-grid,
.program-grid,
.candidate-grid,
.news-grid,
.document-grid,
.skills-grid {
  display: grid;
  gap: 18px;
}

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

.values-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.values-grid--five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.program-grid--five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.section--program-summary {
  padding-block: 72px 66px;
}

.section--program-summary .section-head {
  margin-bottom: 34px;
}

.section--program-summary .program-grid {
  gap: 22px;
  align-items: stretch;
}

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

.candidate-grid--preview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 4rem;
}

.news-grid,
.document-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.card,
.candidate-card,
.news-card,
.document-card,
.timeline-item {
  background: #fff;
  border: 1px solid rgba(207, 221, 236, .78);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(23, 32, 51, .055);
}

.card,
.news-card,
.document-card,
.timeline-item {
  padding: 24px;
}

.card p,
.news-card p,
.document-card p,
.timeline-item p,
.candidate-card p,
.legal-content p,
.legal-content li {
  color: var(--muted);
  line-height: 1.65;
}

/* Evita che i titoli lunghi delle aree programma escano dalle card. */
.program-grid .card {
  min-width: 0;
}

.program-grid .card h2 {
  font-size: clamp(30px, 2.35vw, 38px);
  overflow-wrap: break-word;
}

.program-grid .card h3 {
  font-size: 19px;
  overflow-wrap: break-word;
}

.section--program-summary .card {
  position: relative;
  min-height: 244px;
  display: grid;
  align-content: start;
  padding: 28px 22px 26px;
  overflow: hidden;
  border-color: rgba(195, 215, 235, .78);
  box-shadow: 0 16px 40px rgba(23, 32, 51, .055);
}

.section--program-summary .card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--red), rgba(223, 27, 22, .08));
  opacity: .66;
}

.section--program-summary .card h3 {
  margin-top: 0;
  font-size: 20px;
  line-height: 1.12;
}

.section--program-summary .card p {
  margin: 16px 0 0;
  color: #607088;
  font-size: 15.5px;
}

.card-mark,
.priority-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f1f8ff;
  border: 1px solid #dbeaf6;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

/* Tiene allineati badge numerico e icona nelle card delle priorità. */
.priority-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.priority-card-head .card-mark {
  margin-bottom: 0;
}

.priority-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fff5f4;
  border: 1px solid rgba(223, 27, 22, .14);
  color: var(--red);
  font-size: 0;
  line-height: 1;
}

.priority-icon::before {
  font-size: 16px;
  line-height: 1;
}

.card > .priority-icon {
  margin-bottom: 14px;
}

.profile-layout .card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title-icon {
  width: 1em;
  flex: 0 0 auto;
  color: var(--red);
  font-size: .74em;
  line-height: 1;
  text-align: center;
}

.candidate-card {
  display: grid;
  gap: 14px;
  padding: 0;
  align-content: start;
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(23, 32, 51, .06);
}

.candidate-photo,
.profile-photo {
  display: block;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(4, 38, 90, .1), rgba(21, 146, 76, .12)),
    #eef8ff;
  border: 1px solid var(--line);
}

.candidate-photo-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.candidate-photo > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(4, 38, 90, .52);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 900;
}

.candidate-photo {
  aspect-ratio: 4 / 3;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(207, 221, 236, .74);
  border-radius: 0;
}

.candidate-photo--image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.profile-photo {
  min-height: 360px;
  border-radius: var(--radius-lg);
}

.profile-photo--placeholder {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 28px;
  text-align: center;
}

.profile-photo__badge {
  width: clamp(120px, 16vw, 164px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--navy), var(--navy-2));
  color: #fff;
  box-shadow: 0 18px 36px rgba(4, 38, 90, .18);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 7vw, 64px);
  font-weight: 900;
  letter-spacing: 0;
}

.profile-photo__caption {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-photo__caption-icon {
  width: 1em;
  color: var(--red);
  font-size: .95em;
  line-height: 1;
  text-align: center;
}

.profile-photo--image {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  object-position: 50% 42%;
}

.candidate-card h3 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18.5px;
  line-height: 1.22;
}

.candidate-main {
  display: grid;
  gap: 6px;
}

.candidate-main,
.candidate-card .tag-list,
.candidate-card .candidate-actions {
  margin-inline: 18px;
}

.candidate-main {
  margin-top: 4px;
}

.candidate-main p {
  margin: 0;
}

.candidate-role {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(21, 146, 76, .08);
  border: 1px solid rgba(21, 146, 76, .16);
  color: #136f3f;
  font-size: 12.5px;
  font-weight: 800;
}

.tag-icon {
  color: currentColor;
  font-size: .9em;
  line-height: 1;
}

.tag span {
  line-height: 1.15;
}

.candidate-actions,
.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-layout .document-actions {
  gap: 12px;
}

.profile-layout .document-actions .doc-button,
.profile-layout .document-actions .button--neutral {
  min-height: 52px;
  padding-inline: 22px;
}

.profile-layout .document-actions .button--neutral {
  border-color: rgba(86, 103, 127, .28);
  background: #fff;
  color: #40516a;
  box-shadow: none;
  font-weight: 800;
}

.profile-layout .document-actions .button--neutral:hover {
  border-color: rgba(4, 38, 90, .28);
  background: #f6f9fc;
}

.candidate-card .candidate-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.candidate-card .candidate-actions > * {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding-inline: 10px;
  text-align: center;
}

.candidate-card .candidate-actions .button--neutral {
  grid-column: 1 / -1;
  border-color: #a9c5e2;
  background: linear-gradient(180deg, #f5f9ff, #e9f3fc);
  color: var(--navy);
  box-shadow: 0 8px 18px rgba(4, 38, 90, .08);
}

.candidate-card .candidate-actions .button--neutral:hover {
  border-color: #87aed6;
  background: #e3f0fb;
}

.candidate-card--home {
  min-height: 100%;
  gap: 14px;
  padding: 0;
  overflow: hidden;
  border-color: rgba(199, 216, 234, .82);
  box-shadow: 0 16px 38px rgba(23, 32, 51, .065);
}

.candidate-card--home .candidate-actions {
  margin-top: auto;
}

.candidate-card--home .candidate-photo {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(207, 221, 236, .74);
  border-radius: 0;
}

.candidate-card--home .candidate-photo--image {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.candidate-card--home .candidate-main,
.candidate-card--home .tag-list,
.candidate-card--home .candidate-actions {
  margin-inline: 18px;
}

.candidate-card--home .candidate-main {
  gap: 8px;
  margin-top: 4px;
}

.candidate-card--home .candidate-main p {
  font-size: 15px;
}

.candidate-card--home .candidate-role {
  color: #1f754a;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.candidate-card--home .candidate-actions {
  margin-bottom: 18px;
}

.candidate-card--home .button--neutral {
  width: 100%;
  border-color: rgba(4, 38, 90, .16);
  background: #f8fbfe;
  color: var(--navy);
  text-transform: none;
  box-shadow: none;
}

.highlight-band,
.transparent-band {
  margin: 0 clamp(20px, 6vw, 86px);
  padding: clamp(28px, 4.4vw, 46px);
  background:
    radial-gradient(circle at 86% 8%, rgba(255, 255, 255, .13), transparent 26%),
    linear-gradient(135deg, #05285d, #0c4772);
  color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 22px 48px rgba(4, 38, 90, .16);
}

.highlight-band--steps {
  display: grid;
  grid-template-columns: minmax(250px, .5fr) minmax(0, 1fr);
  gap: clamp(26px, 5vw, 54px);
  align-items: center;
}

.step-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.step-list article {
  min-height: 158px;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .085);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.step-list h3 {
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 19px;
  line-height: 1.22;
}

.step-list p {
  margin: 0;
  color: rgba(255, 255, 255, .84);
  font-size: 14.5px;
  line-height: 1.55;
}

.highlight-band--steps > div:first-child p {
  max-width: 390px;
  margin-top: 14px;
  color: rgba(255, 255, 255, .86);
  line-height: 1.7;
}

.highlight-band h2,
.transparent-band h2,
.highlight-band p,
.transparent-band p {
  color: #fff;
}

.transparent-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  background:
    radial-gradient(circle at 88% 12%, rgba(0, 154, 221, .18), transparent 28%),
    linear-gradient(135deg, #05285d, #0a4077);
}

/* Tiene distinti i due blocchi blu senza cambiare la gerarchia della home. */
.highlight-band + .transparent-band {
  margin-top: 14px;
}

.transparent-band--home {
  margin-top: 0;
  margin-bottom: 58px;
}

.transparent-band--home p {
  max-width: 720px;
  line-height: 1.65;
}

.transparent-band--home .button {
  box-shadow: none;
}

.transparent-band--program .document-actions {
  justify-content: flex-end;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(50px, 5vw, 68px);
  background:
    linear-gradient(90deg, rgba(4, 38, 90, .03) 0 1px, transparent 1px) 0 0 / 64px 64px,
    radial-gradient(circle at 92% 20%, rgba(21, 146, 76, .08), transparent 28%),
    linear-gradient(135deg, #f5fbff 0%, #fbfdff 58%, #ffffff 100%);
}

.page-hero h1,
.page-hero .lead,
.page-hero .actions {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  max-width: 940px;
}

.page-hero .lead {
  max-width: 760px;
}

.in-page-nav {
  position: sticky;
  top: 104px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px clamp(20px, 6vw, 86px);
  background: rgba(255, 255, 255, .92);
  border-block: 1px solid rgba(207, 221, 236, .9);
  backdrop-filter: blur(14px);
}

.in-page-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(207, 221, 236, .84);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .72);
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.priority-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 4rem;
}

.priority-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 28px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(195, 215, 235, .78);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(23, 32, 51, .055);
}

.priority-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--red), rgba(223, 27, 22, .08));
  opacity: .66;
}

.priority-details {
  display: grid;
  gap: 12px;
  margin: 0;
}

.priority-details div {
  display: grid;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(237, 243, 249, .94);
}

.priority-details strong {
  color: var(--red-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.priority-details p {
  margin: 0;
  color: var(--muted);
}

.info-panel {
  padding: clamp(22px, 4vw, 34px);
  background: #eef8ff;
  border: 1px solid #cfe8f8;
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(23, 32, 51, .045);
}

.info-panel p {
  max-width: 860px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.status-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.status-card {
  padding: 22px;
  background: #fff;
  border: 1px solid rgba(207, 221, 236, .78);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(23, 32, 51, .045);
}

.status-card strong {
  display: block;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 40px;
  line-height: 1;
}

.status-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.page-hero--program {
  background:
    radial-gradient(circle at 82% 16%, rgba(223, 27, 22, .12), transparent 24%),
    radial-gradient(circle at 92% 82%, rgba(21, 146, 76, .15), transparent 24%),
    linear-gradient(135deg, #f8fcff, #e7f4fd 58%, #ffffff);
}

.page-hero--candidate {
  padding-block: clamp(24px, 3vw, 36px);
}

.page-hero--candidate h1 {
  font-size: clamp(38px, 4.5vw, 60px);
}

.breadcrumbs {
  margin: 0 0 16px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 34px;
  align-items: start;
}

.section--why {
  padding-block: 70px 56px;
}

.section--why .content-grid {
  grid-template-columns: minmax(0, .95fr) minmax(300px, .62fr);
  gap: clamp(28px, 5vw, 58px);
  align-items: center;
}

.section--why .lead {
  max-width: 720px;
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.7;
}

.section--why .card {
  padding: 30px;
  border-color: rgba(207, 221, 236, .86);
  box-shadow: 0 18px 42px rgba(23, 32, 51, .06);
}

.section--why .card h3 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
}

.section--why .card p {
  margin: 12px 0 0;
}

.section--why .card .actions {
  margin-top: 24px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.profile-layout--candidate {
  grid-template-columns: minmax(280px, 360px) minmax(0, 760px);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
  padding-block: clamp(28px, 3vw, 42px) 58px;
}

.profile-layout--candidate .profile-photo {
  min-height: 0;
  aspect-ratio: 4 / 5;
  box-shadow: 0 18px 42px rgba(23, 32, 51, .08);
}

.profile-layout--candidate .profile-photo--image {
  height: auto;
  min-height: 0;
  aspect-ratio: 4 / 5;
}

.candidate-detail-main {
  display: grid;
  align-content: start;
  padding-top: 4px;
}

.candidate-detail-main h2 {
  font-size: clamp(36px, 4vw, 56px);
}

.candidate-profile-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 620px;
  margin: 18px 0 20px;
}

.profile-layout--candidate .card {
  min-height: 136px;
  padding: clamp(22px, 2.5vw, 28px);
}

.profile-layout--candidate .document-actions {
  margin-top: 4px;
}

.profile-layout--candidate .notice {
  max-width: 760px;
  margin-top: 18px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item strong {
  display: block;
  color: var(--navy);
}

.notice {
  padding: 14px 16px;
  background: #eef8ff;
  border: 1px solid #cfe8f8;
  border-radius: var(--radius);
  color: var(--navy);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
  background: #f8fbfe;
  border: 1px solid rgba(207, 221, 236, .78);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(23, 32, 51, .045);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--navy);
  font-weight: 900;
}

.filter-panel input {
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid rgba(207, 221, 236, .9);
  border-radius: var(--radius);
  background: #fff;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: end;
  justify-content: flex-end;
}

.filter-button {
  min-height: 44px;
  background: #fff;
  border-color: rgba(207, 221, 236, .86);
  color: var(--navy);
}

.filter-button.is-active {
  background: var(--green);
  color: #fff;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(207, 221, 236, .8);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 16px 40px rgba(23, 32, 51, .055);
}

.transparency-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.transparency-table th,
.transparency-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.transparency-table th:nth-child(3),
.transparency-table td:nth-child(3),
.transparency-table th:nth-child(4),
.transparency-table td:nth-child(4) {
  text-align: center;
}

.transparency-table th:nth-child(5),
.transparency-table td:nth-child(5) {
  text-align: right;
}

.transparency-table td:nth-child(5) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table-name {
  display: inline-block;
  margin-bottom: 6px;
}

.doc-status {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.transparency-table th {
  color: var(--navy);
  font-size: 13px;
  text-transform: uppercase;
}

.transparency-table tr:last-child td {
  border-bottom: 0;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) minmax(280px, 1fr) minmax(220px, .8fr);
  gap: 36px;
  padding: 42px clamp(20px, 6vw, 86px);
  background: var(--navy);
  color: #fff;
}

.site-footer a {
  color: #fff;
}

.footer-legal {
  display: grid;
  gap: 6px;
  font-size: 13.5px;
  line-height: 1.55;
}

.footer-links {
  display: grid;
  gap: 9px;
  font-size: 13.5px;
  line-height: 1.55;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.social-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.social-icon:hover,
.social-icon:focus-visible {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .45);
  transform: translateY(-1px);
}

.social-icon--placeholder {
  opacity: .46;
  cursor: default;
}

.social-icon--placeholder:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .22);
  transform: none;
}

.legal-content {
  max-width: 900px;
}

.legal-content h2 {
  margin-top: 34px;
  font-size: 28px;
}

.legal-content ul {
  padding-left: 20px;
}

.program-official {
  max-width: 980px;
}

.program-official h2 {
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--navy);
}

.program-official h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.program-official h3 {
  margin: 24px 0 8px;
  color: var(--navy-2);
  font-size: 21px;
  line-height: 1.25;
}

.program-official h4 {
  margin: 20px 0 8px;
  color: var(--red-dark);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.program-official p,
.program-official li {
  font-size: 17px;
}

.program-official p {
  hyphens: auto;
  text-align: justify;
  text-justify: inter-word;
}

.program-official .program-signature {
  text-align: left;
}

.root-redirect {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--cream);
  text-align: center;
}

@media (max-width: 1120px) {
  .values-grid,
  .program-grid,
  .candidate-grid,
  .news-grid,
  .document-grid,
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .values-grid--five,
  .priority-grid,
  .status-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1360px) {
  .site-header {
    gap: 10px;
    padding-inline: 16px;
  }

  .brand {
    min-width: 220px;
    gap: 10px;
  }

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

  .brand strong {
    font-size: 22px;
  }

  .main-nav {
    gap: 2px;
    font-size: 11.5px;
  }

  .main-nav a {
    padding-inline: 4px;
  }
}

@media (max-width: 1180px) {
  /* Passa al menu compatto prima che la voce più lunga possa essere tagliata dall'header. */
  .main-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
  }
}

@media (max-width: 1080px) and (min-width: 981px) {
  .site-header {
    gap: 12px;
    padding-inline: 28px;
  }

  .brand {
    min-width: 260px;
  }

  .main-nav {
    gap: 4px;
    font-size: 12.5px;
  }

  .main-nav a {
    padding-inline: 7px;
  }
}

@media (max-width: 980px) {
  .main-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .hero,
  .content-grid,
  .profile-layout,
  .transparent-band,
  .highlight-band--steps,
  .site-footer {
    grid-template-columns: minmax(0, 1fr);
  }

  /* La sezione "Perché" ha una griglia più specifica: su mobile deve collassare davvero a una colonna. */
  .section--why .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-portrait {
    max-width: 560px;
  }

  .profile-layout--candidate {
    padding-block: 32px 50px;
  }

  .profile-layout--candidate .profile-photo {
    width: min(100%, 420px);
  }

  .candidate-detail-main {
    padding-top: 0;
  }

  .highlight-band--steps,
  .transparent-band {
    align-items: start;
  }
}

@media (max-width: 900px) {
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .filter-buttons {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: 100%;
    margin: 0;
    border-radius: 0;
  }

  .site-header {
    min-height: 94px;
    padding-top: 34px;
  }

  .site-header::before {
    height: 24px;
    font-size: 10px;
  }

  .brand {
    min-width: 0;
  }

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

  .brand strong {
    font-size: 21px;
  }

  .brand span,
  .brand small {
    font-size: 9px;
  }

  .hero {
    min-height: 0;
    padding-block: 30px 36px;
    gap: 22px;
  }

  .hero-copy,
  .actions--hero,
  .hero-portrait {
    width: calc(100vw - 36px);
    max-width: calc(100vw - 36px);
  }

  .hero-copy,
  .hero .eyebrow,
  .hero-subtitle,
  .hero .lead,
  .actions--hero,
  .hero-portrait {
    max-width: calc(100vw - 36px);
  }

  .hero .eyebrow {
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .hero h1 {
    max-width: 12ch;
  }

  .page-hero h1 {
    max-width: 12ch;
    overflow-wrap: anywhere;
  }

  .page-hero--candidate {
    padding-block: 30px 34px;
  }

  .page-hero--candidate h1 {
    max-width: none;
    font-size: clamp(34px, 10vw, 46px);
  }

  h1 {
    font-size: clamp(30px, 8vw, 34px);
    line-height: 1.08;
  }

  .hero-subtitle {
    margin-bottom: 12px;
    font-size: 19px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .lead {
    font-size: 16px;
    overflow-wrap: anywhere;
  }

  .actions {
    margin-top: 20px;
  }

  .actions--hero .button {
    min-width: 0;
    padding-inline: 18px;
  }

  .values-grid,
  .program-grid,
  .candidate-grid,
  .news-grid,
  .document-grid,
  .skills-grid,
  .filter-panel,
  .priority-grid,
  .status-dashboard,
  .step-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .actions,
  .candidate-actions,
  .document-actions,
  .filter-buttons {
    display: grid;
  }

  .filter-buttons {
    justify-content: stretch;
    width: 100%;
  }

  .button,
  .doc-button,
  .filter-button {
    width: 100%;
  }

  .site-header {
    gap: 10px;
    padding-inline: 14px;
  }

  .mobile-panel {
    right: 0;
  }

  .hero-portrait__image {
    height: 250px;
  }

  .section,
  .hero,
  .page-hero {
    padding-inline: 18px;
  }

  .section {
    padding-block: 42px;
  }

  .section--program-summary {
    padding-block: 48px;
  }

  .section--program-summary .card {
    min-height: auto;
    padding: 24px 22px;
  }

  .profile-layout--candidate .profile-photo {
    width: 100%;
  }

  .candidate-detail-main h2 {
    font-size: 32px;
  }

  .candidate-profile-grid {
    margin: 18px 0 20px;
  }

  .profile-layout--candidate .card {
    min-height: 0;
  }

  .highlight-band,
  .transparent-band {
    margin-inline: 18px;
    padding: 28px 22px;
    border-radius: var(--radius);
  }

  .highlight-band--steps {
    gap: 22px;
  }

  .step-list article {
    min-height: 0;
  }

  .in-page-nav {
    top: 94px;
    padding-inline: 18px;
  }

  .candidate-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .candidate-card .candidate-photo {
    grid-row: auto;
  }

  .candidate-card .candidate-actions,
  .candidate-card .tag-list {
    grid-column: auto;
  }

  .section--candidate-preview .candidate-card--home {
    grid-template-columns: minmax(0, 1fr);
  }

  .section--candidate-preview .candidate-card--home .candidate-photo {
    grid-row: auto;
  }

  .section--candidate-preview .candidate-card--home .candidate-actions,
  .section--candidate-preview .candidate-card--home .tag-list {
    grid-column: auto;
  }

  .table-wrap {
    overflow-x: visible;
    border: 0;
    background: transparent;
  }

  .transparency-table,
  .transparency-table thead,
  .transparency-table tbody,
  .transparency-table tr,
  .transparency-table th,
  .transparency-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .transparency-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 14px;
  }

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

  .transparency-table tr {
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 24px rgba(23, 32, 51, .07);
  }

  .transparency-table th,
  .transparency-table td {
    padding: 10px 0;
    border-bottom: 1px solid #edf3f9;
    text-align: left;
  }

  .transparency-table th:nth-child(3),
  .transparency-table td:nth-child(3),
  .transparency-table th:nth-child(4),
  .transparency-table td:nth-child(4),
  .transparency-table th:nth-child(5),
  .transparency-table td:nth-child(5) {
    text-align: left;
  }

  .transparency-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: var(--navy);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .transparency-table td:last-child {
    border-bottom: 0;
  }
}

/* Coordina la composizione progressiva degli elementi quando il JS abilita il reveal. */
.composition-ready .compose-item {
  --compose-x: 0px;
  --compose-y: 22px;
  --compose-rotate: 0deg;
  --compose-scale: .985;
  opacity: 0;
  filter: blur(5px);
  transform: translate3d(var(--compose-x), var(--compose-y), 0) rotate(var(--compose-rotate)) scale(var(--compose-scale));
  transform-origin: center;
  transition:
    opacity 200ms cubic-bezier(.2, .68, .2, 1),
    filter 500ms ease,
    transform 720ms cubic-bezier(.16, 1, .3, 1);
  transition-delay: var(--compose-delay, 0ms);
  will-change: opacity, filter, transform;
}

.composition-ready .compose-item.is-composed {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  will-change: auto;
}

/* Differenzia l'ingresso degli oggetti principali per evitare un effetto a blocco unico. */
.composition-ready .compose-from-top {
  --compose-y: -14px;
  --compose-scale: 1;
}

.composition-ready .compose-from-left {
  --compose-x: -28px;
  --compose-y: 8px;
  --compose-scale: .99;
}

.composition-ready .compose-from-right {
  --compose-x: 32px;
  --compose-y: 10px;
  --compose-scale: .985;
}

.composition-ready .compose-card {
  --compose-y: 30px;
  --compose-scale: .965;
}

.composition-ready .compose-band {
  --compose-y: 20px;
  --compose-scale: .99;
}

@media (prefers-reduced-motion: reduce) {
  .composition-ready .compose-item,
  .composition-ready .compose-item.is-composed {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }
}

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