/* Stili comuni a tutte le pagine: variabili, reset, header, menu, footer */

/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --brand:        #3a5da8;
  --brand-dark:   #2c4a8a;
  --brand-light:  #e8edf7;
  --text:         #1c1c1c;
  --muted:        #6b7280;
  --border:       #dde3ef;
  --white:        #ffffff;
  --gap:          clamp(4rem, 8vw, 7rem);
  --container:    min(1100px, 92vw);
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Oxygen', sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--white);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ─── Animations ────────────────────────────────────────────── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── Header ────────────────────────────────────────────────── */
header {
  width: 100%;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  animation: fadeInDown 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.header-inner {
  width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0rem;
  height: 100px;
}
.header-logo {
  height: clamp(54px, 8vw, 80px);
  width: auto;
  max-width: 65vw;
  object-fit: contain;
  display: block;
  flex-shrink: 1;
}

/* ─── Nav ───────────────────────────────────────────────────── */
.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
  list-style: none;
}
.nav-menu a {
  font-family: 'Oxygen', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-menu a:hover { color: var(--brand); }

/* ─── Hamburger ─────────────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0px;
  margin-left: auto;
  margin-right: 10px;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1100px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 100px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: center;
    gap: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    max-height: 0;
    overflow: hidden;
    display: flex;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), padding 0.3s ease;
    padding: 0;
  }
  .nav-menu.open {
    max-height: 500px;
    padding: 0.5rem 0;
  }
  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }
  .nav-menu li:last-child { border-bottom: none; }
  .nav-menu a {
    display: block;
    text-align: center;
    padding: 1rem 1.5rem;
    font-size: 0.85rem;
  }
  .nav-menu a:hover { background: var(--brand-light); color: var(--brand); }
}
.brand-bar {
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-light) 100%);
  animation: fadeIn 1.4s ease both;
}

/* ─── Container ─────────────────────────────────────────────── */
.container { width: var(--container); margin-inline: auto; }

/* ─── Shared atoms ──────────────────────────────────────────── */
.section-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.75rem;
  padding-top: 0;
}
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--brand);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.divider {
  width: 44px;
  height: 3px;
  background: var(--brand);
  border-radius: 2px;
  margin-bottom: 1.75rem;
}

/* ─── Footer ────────────────────────────────────────────────── */
footer {
  background: var(--brand);
  color: var(--white);
  padding: clamp(1.75rem, 4vw, 2.5rem) 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.footer-logo img {
  height: 36px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}
.footer-info { text-align: right; }
.footer-name {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-legal { font-size: 0.72rem; opacity: 0.7; margin-top: 0.25rem; line-height: 1.6; }
.footer-legal a { color: inherit; }

@media (max-width: 720px) {
  .footer-inner { flex-direction: column; align-items: center; gap: 1.25rem; }
  .footer-info { text-align: center; }
}

/* ─── Pagine interne ────────────────────────────────────────── */
.pagina {
  padding: var(--gap) 0;
  background: var(--white);
  animation: fadeInUp 1s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.pagina.alt { background: var(--brand-light); }
.pagina-col { width: 100%; }
.pagina-col p,
.pagina-col li {
  font-size: clamp(0.9rem, 1.3vw, 0.98rem);
  color: #444;
  line-height: 1.85;
}
.pagina-col p { margin-bottom: 1rem; }
.pagina-col h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand);
  margin: 2.25rem 0 0.5rem;
}
.pagina-col a { color: var(--brand); font-weight: 700; text-decoration: none; }
.pagina-col a:hover { text-decoration: underline; }
.pagina-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0 1.5rem;
}
.pagina-list li {
  padding-left: 1.1rem;
  position: relative;
}
.pagina-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: 700;
}
.pagina-firma {
  margin-top: 2rem;
  font-weight: 700;
}
.pagina-firma span { display: block; font-weight: 400; font-size: 0.85rem; color: var(--muted); }

/* ─ Box download documento ─ */
.documento {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.documento:hover {
  box-shadow: 0 4px 20px rgba(58, 93, 168, 0.12);
  border-color: var(--brand);
}
.documento-nome { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.documento-info { font-size: 0.8rem; color: var(--muted); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--brand);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border-radius: 6px;
  transition: background 0.2s;
}
.btn:hover { background: var(--brand-dark); }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
