/* ============================================================
   VALMON — Stili globali (tutte le pagine)
   Bootstrap: reset, grid, flex utilities, spacing
   Questo file: token brand + componenti condivisi
   ============================================================ */

:root {
  --navy: #0d1b2e;
  --navy-mid: #142035;
  --blue: #2060b8;
  --blue-light: #3478d4;
  --accent: oklch(65% 0.18 210);
  --gold: oklch(72% 0.14 85);
  --red-light: #c42840;
  --white: #f8f9fb;
  --gray-100: #eef0f4;
  --gray-300: #c5cad6;
  --gray-500: #8892a4;
  --gray-700: #4a5568;
  --text: #1a2336;
  --font-sans: "DM Sans", Helvetica, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --r: 8px;
  --section-pad: clamp(60px, 8vw, 120px);
  /* token dark-section (changelog) */
  --bg: #0d1b2e;
  --card: #142035;
  --muted: rgba(255, 255, 255, 0.45);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 80px);
  height: 88px;
  background: rgba(13, 27, 46, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo {
  position: relative;
  flex-shrink: 0;
  width: min(258px, 60vw);
  container-type: inline-size;
}
.nav-logo img {
  display: block;
  width: 100%;
  height: auto;
}
/* Slogan come testo (non vettoriale) per restare nitido a piccole dimensioni.
   Posizione e dimensioni in proporzione al logo: sotto "ALMON", dalla A alla N. */
.nav-logo-tag {
  position: absolute;
  left: 28.26%;
  right: 0.85%;
  top: 81.5%;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sans);
  margin-top: -0.08em;
  font-size: 11.8px;
  font-size: 4.56cqw;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  pointer-events: none;
}
.nav-logo-tag > span:last-child {
  margin-right: -0.16em;
}
.nav-logo-mark {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  background: #f5f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-logo-mark svg {
  width: 22px;
  height: 22px;
}
.nav-logo-text {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.3px;
}
.nav-logo-sub {
  font-size: 10px;
  font-weight: 400;
  color: var(--gray-300);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: block;
  margin-top: -2px;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: #fff;
}
.nav-cta {
  background: var(--blue-light);
  color: #fff !important;
  font-weight: 500 !important;
  padding: 8px 20px;
  border-radius: 6px;
  transition: background 0.2s !important;
}
.nav-cta:hover {
  background: var(--blue) !important;
}
#navAuth {
  margin-top: -5px;
}

/* ── PAGE HERO (pagine interne) ─────────────────────────── */
.page-hero {
  background: var(--navy);
  padding: 140px clamp(20px, 8vw, 160px) 80px;
  position: relative;
  z-index: 10;
  overflow: hidden;
}
.page-hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 60px 60px;
}
.page-hero-glow {
  position: absolute;
  top: -150px;
  right: -150px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(32, 96, 184, 0.2) 0%,
    transparent 70%
  );
}
.page-hero-content {
  position: relative;
  z-index: 1;
}
.page-hero .section-eyebrow {
  color: #7eb8ff;
  margin-bottom: 16px;
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 400;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.8px;
  margin-bottom: 20px;
}
.page-hero h1 em {
  color: var(--accent);
  font-style: italic;
}
.page-hero h1.h1-stacked em {
  display: block;
}
.page-hero .page-hero-desc {
  font-size: clamp(16px, 1.4vw, 19px);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 300;
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 0;
}
.hero-stats {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.hero-stat-val {
  font-family: var(--font-serif);
  font-size: 36px;
  color: #fff;
  font-weight: 400;
  line-height: 1;
}
.hero-stat-val em {
  color: var(--accent);
  font-style: normal;
}
.hero-stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 4px;
}

/* ── BOTTONI ────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-light);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 8px;
  transition:
    background 0.2s,
    transform 0.15s;
}
.btn-primary:hover {
  background: var(--blue);
  transform: translateY(-1px);
  color: #fff;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  padding: 14px 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition:
    border-color 0.2s,
    color 0.2s;
}
.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--blue-light);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 8px;
  border: 1px solid rgba(52, 120, 212, 0.35);
  transition:
    border-color 0.2s,
    background 0.2s;
}
.btn-outline:hover {
  border-color: var(--blue-light);
  background: rgba(52, 120, 212, 0.07);
  color: var(--blue-light);
}
.btn-submit {
  background: var(--blue-light);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}
.btn-submit:hover {
  background: var(--blue);
}

/* ── ETICHETTE SEZIONE ──────────────────────────────────── */
.section-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.5vw, 52px);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.5px;
}
.section-title em {
  font-style: italic;
  color: var(--blue);
}
.section-desc {
  font-size: 17px;
  color: var(--gray-700);
  line-height: 1.7;
  max-width: 560px;
  font-weight: 300;
}
.link-all {
  font-size: 14px;
  color: var(--blue-light);
  text-decoration: none;
  font-weight: 500;
}
.link-all:hover {
  text-decoration: underline;
}

/* Compensazione gutter Bootstrap nelle sezioni */
section > .row {
  --bs-gutter-x: 1.5rem;
}

/* ── FILTRI PAGINA ──────────────────────────────────────── */
.filter-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
}

/* ── CARDS PROGETTO ─────────────────────────────────────── */
a.project-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.project-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gray-100);
  background: #fff;
  cursor: pointer;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.project-card:hover {
  box-shadow: 0 8px 40px rgba(13, 27, 46, 0.1);
  transform: translateY(-3px);
}
.project-card-img {
  height: 200px;
  background: var(--gray-100);
  position: relative;
  overflow: hidden;
}
/* Stato operativo del progetto (card in home e pagina Progetti) */
.proj-status {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(13, 27, 46, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 12px;
  border-radius: 100px;
}
.proj-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ddc84;
}
.proj-status.is-concluso::before {
  background: #ef4444;
}
.project-card-img-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 32px;
  color: rgba(255, 255, 255, 0.15);
  font-style: italic;
  letter-spacing: -1px;
}
.project-card-img-inner.alt1 {
  background: linear-gradient(135deg, #1a3a5c, #2d6ca8);
}
.project-card-img-inner.alt2 {
  background: linear-gradient(135deg, #112840, #1e5a94);
}
.project-card-img-inner.alt3 {
  background: linear-gradient(135deg, #0d2d1a, #1a6640);
}
.project-card-img-inner.alt4 {
  background: linear-gradient(135deg, #2d1a0d, #7a3a10);
}
.project-card-img-inner.alt5 {
  background: linear-gradient(135deg, #1a0d2d, #4a1a7a);
}
.project-card-body {
  padding: 24px;
}
.project-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--blue-light);
  background: rgba(52, 120, 212, 0.08);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}
.project-logo {
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
}
.project-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.project-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 8px;
  line-height: normal;
}
.project-text {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.65;
  font-weight: 300;
}
.project-meta {
  display: table;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
}
.project-meta-item {
  display: table-row; /* oppure block */
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--gray-500);
}
.project-meta-item svg {
  width: 13px;
  height: 13px;
  color: var(--gray-500);
}
.project-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}
.project-tech {
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 100px;
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-100);
}

/* ── CARDS CLIENTE ──────────────────────────────────────── */
.client-logo {
  background: #fff;
  border-radius: 10px;
  padding: 20px 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--gray-100);
  text-align: center;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.client-logo:hover {
  box-shadow: 0 4px 20px rgba(13, 27, 46, 0.08);
  transform: translateY(-2px);
}
.client-logo img {
  max-height: 80px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}
.client-logo-name {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--gray-500);
  line-height: 1.3;
}
.client-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--gray-100);
  padding: 28px;
  height: 100%;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.client-card:hover {
  box-shadow: 0 6px 30px rgba(13, 27, 46, 0.09);
  transform: translateY(-2px);
}
.client-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.client-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 4px;
}
.client-card-settore {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--blue-light);
}
.client-card-desc {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.65;
  font-weight: 300;
  margin-bottom: 14px;
}
.client-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
}
.client-card-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--gray-500);
}
.client-card-meta-item svg {
  width: 12px;
  height: 12px;
}

/* ── SEZIONE CONTATTI ───────────────────────────────────── */
#contatti {
  padding: var(--section-pad) clamp(20px, 8vw, 160px);
  background: var(--navy);
}
.contatti-left .section-title {
  color: #fff;
  margin-bottom: 16px;
}
.contatti-left .section-desc {
  color: rgba(255, 255, 255, 0.45);
}
.contact-info {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.contact-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.contact-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 2px;
}
.contact-val {
  font-size: 15px;
  color: #fff;
}
.contact-val a,
.contact-val a:visited {
  color: #fff;
  text-decoration: none;
}
.contact-val a:hover {
  text-decoration: underline;
}

/* ── FORM ───────────────────────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-privacy-note {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.45);
  margin: -4px 0 0;
}
.form-privacy-note a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
}
.form-privacy-note a:hover {
  color: #ffffff;
}
label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.5px;
}
input,
textarea,
select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.25);
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue-light);
  box-shadow: none;
}
select option {
  background: var(--navy);
  color: #fff;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
.form-alert {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 4px;
}
.form-alert.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}
.form-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* ── FOOTER ─────────────────────────────────────────────── */
footer {
  background: #070f1a;
  padding: 32px clamp(20px, 8vw, 160px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.footer-copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a,
.footer-links a:visited {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}
.footer-links a:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* ── PAGINE LEGALI ──────────────────────────────────────── */
.page-hero--compact {
  padding-top: 120px;
  padding-bottom: 52px;
}
.page-hero--compact h1 {
  font-size: clamp(32px, 4vw, 56px);
  margin-bottom: 8px;
}

/* ── PAGINE LEGALI ──────────────────────────────────────── */

/* Layout due colonne */
.legal-page-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  margin: 0 auto;
  padding: 60px clamp(20px, 8vw, 160px) var(--section-pad);
  align-items: start;
}
.legal-page-wrap--empty {
  grid-template-columns: 1fr;
  max-width: 700px;
}

/* TOC sidebar */
.legal-sidebar {
  position: sticky;
  top: 180px;
  padding-right: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--white);
}
.legal-sidebar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 4px;
}
.legal-toc {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.legal-toc-item {
  display: block;
  font-size: 12.5px;
  color: var(--gray-500);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 5px;
  border-left: 2px solid transparent;
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
}
.legal-toc-item:hover {
  color: var(--navy);
  background: var(--gray-100);
}
.legal-toc-item.active {
  color: var(--blue-light);
  border-left-color: var(--blue-light);
}

/* Corpo */
.legal-main {
  min-width: 0;
  border-left: 1px solid var(--gray-100);
  padding-left: clamp(28px, 4vw, 56px);
}

/* ogni blocco numerato è un <section> nel DB */
.legal-body > section {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  padding: clamp(20px, 3vw, 32px) clamp(20px, 3vw, 36px);
  margin-bottom: 20px;
  transition: box-shadow 0.2s;
}
.legal-body > section:hover {
  box-shadow: 0 4px 24px rgba(13, 27, 46, 0.06);
}
.legal-body > section:last-child {
  margin-bottom: 0;
}

.legal-body h2 {
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.7vw, 21px);
  font-weight: 400;
  color: var(--navy);
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.legal-body h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  min-width: 4px;
  height: 16px;
  background: var(--blue-light);
  border-radius: 2px;
  flex-shrink: 0;
  position: relative;
  top: 1px;
}
.legal-body h3 {
  font-family: var(--font-serif);
  font-size: clamp(14px, 1.5vw, 17px);
  font-weight: 600;
  color: var(--navy);
  margin: 18px 0 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.legal-body h3::before {
  content: "";
  display: inline-block;
  width: 5px;
  min-width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue-light);
  flex-shrink: 0;
  position: relative;
  top: -1px;
  opacity: 0.6;
}
.legal-body p {
  color: var(--gray-700);
  font-size: 14.5px;
  line-height: 1.85;
  margin: 0 0 10px;
}
.legal-body p:last-child {
  margin-bottom: 0;
}
.legal-body ul {
  margin: 6px 0 12px;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.legal-body li {
  color: var(--gray-700);
  font-size: 14.5px;
  line-height: 1.7;
  padding-left: 20px;
  position: relative;
}
.legal-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-light);
  opacity: 0.5;
}
.legal-body strong {
  color: var(--navy);
  font-weight: 600;
}
.legal-body a {
  color: var(--blue-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(52, 120, 212, 0.3);
  transition: text-decoration-color 0.2s;
}
.legal-body a:hover {
  text-decoration-color: var(--blue-light);
}

/* Back to top */
.legal-back-wrap {
  margin-top: 40px;
  display: flex;
  justify-content: flex-end;
}
.legal-back-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-500);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--gray-100);
  border-radius: 20px;
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s;
}
.legal-back-top:hover {
  color: var(--navy);
  border-color: var(--gray-300);
  background: var(--gray-100);
}

/* Responsive */
@media (max-width: 860px) {
  .legal-page-wrap {
    grid-template-columns: 1fr;
  }
  .legal-sidebar {
    display: none;
  }
  .legal-main {
    border-left: none;
    padding-left: 0;
  }
}

/* ── NAV AUTH ───────────────────────────────────────────── */
.nav-auth {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 20px;
}

.nav-accedi-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  padding: 7px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
  white-space: nowrap;
}
.nav-accedi-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}
.nav-accedi-btn.open {
  background: rgba(52, 120, 212, 0.18);
  border-color: rgba(126, 184, 255, 0.4);
  color: #7eb8ff;
}

.login-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 280px;
  background: rgba(13, 24, 42, 0.98);
  border: 1px solid rgba(52, 120, 212, 0.3);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  z-index: 200;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}
.login-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.login-dropdown-inner {
  padding: 22px 22px 20px;
}

.login-dropdown-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(126, 184, 255, 0.7);
  margin: 0 0 18px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}
.login-field label {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}
.login-field input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13.5px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.2s;
}
.login-field input:focus {
  border-color: rgba(52, 120, 212, 0.6);
}

.login-error {
  font-size: 12px;
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: 7px;
  padding: 7px 11px;
  margin-bottom: 10px;
}

.login-submit {
  width: 100%;
  background: var(--blue-light);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 6px;
}
.login-submit:hover {
  opacity: 0.88;
}
.login-submit:disabled {
  opacity: 0.55;
  cursor: default;
}

.nav-user-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

.nav-admin-btn {
  display: inline-flex;
  align-items: center;
  background: rgba(52, 120, 212, 0.18);
  border: 1px solid rgba(126, 184, 255, 0.3);
  color: #7eb8ff;
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
}
.nav-admin-btn:hover {
  background: rgba(52, 120, 212, 0.3);
  color: #7eb8ff;
}

.nav-logout-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-sans);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 100px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    color 0.2s;
  white-space: nowrap;
}
.nav-logout-btn:hover {
  border-color: rgba(248, 113, 113, 0.4);
  color: #f87171;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
.nav-toggle {
  display: none;
}
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
  }
  .nav-toggle span {
    display: block;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition:
      transform 0.2s ease,
      opacity 0.2s ease;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px clamp(20px, 5vw, 80px) 20px;
    background: var(--navy);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
    max-height: calc(100vh - 88px);
    overflow-y: auto;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links > li > a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .nav-links > li > a.nav-cta {
    margin-top: 16px;
    padding: 12px 20px;
    text-align: center;
    border-bottom: none;
  }
  #navAuth {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
  .login-dropdown {
    position: static;
    width: 100%;
    display: none;
    transform: none;
    box-shadow: none;
  }
  .login-dropdown.open {
    display: block;
  }
  .nav-auth {
    margin-left: 0;
  }
}
@media (max-width: 600px) {
  footer {
    flex-direction: column;
    text-align: center;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
}

/* ══════════════════════════════════════════════════════════
   CHANGELOG — tema chiaro (coerente con Progetti / Clienti)
   ══════════════════════════════════════════════════════════ */

/* Barra filtri — stessa struttura di filters-bar in progetti */
.changelog-filters-section {
  background: #fff;
  border-bottom: 1px solid var(--gray-100);
  padding: 0 clamp(20px, 8vw, 160px);
}
.changelog-filters {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 0;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-group label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500);
}
.filter-group select,
.filter-group input[type="text"] {
  padding: 9px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-sans);
  min-width: 180px;
  outline: none;
  transition: border-color 0.2s;
}
.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--blue-light);
}
.btn-filter {
  padding: 9px 20px;
  background: var(--blue-light);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-filter:hover {
  background: var(--blue);
}
.btn-filter-reset {
  padding: 9px 16px;
  color: var(--gray-500);
  font-size: 13px;
  text-decoration: none;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.btn-filter-reset:hover {
  color: var(--text);
  border-color: var(--gray-500);
}

/* Sezione principale timeline */
.changelog-section {
  background: var(--white);
  padding: 60px clamp(20px, 8vw, 160px) var(--section-pad);
}

.changelog-timeline {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.changelog-year-block {
  display: flex;
  gap: 24px;
}

.changelog-year-label {
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 400;
  color: rgba(13, 27, 46, 0.98);
  min-width: 70px;
  text-align: right;
  line-height: 1;
  padding-top: 6px;
  user-select: none;
}

.changelog-entries {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid var(--gray-100);
  padding-left: 32px;
  position: relative;
}

.changelog-entry {
  position: relative;
  padding-bottom: 32px;
}
.changelog-entry-dot {
  position: absolute;
  left: -40px;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue-light);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 3px rgba(52, 120, 212, 0.2);
}

.changelog-entry-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 16px;
  padding: 28px 32px;
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
}
.changelog-entry-card:hover {
  border-color: var(--gray-300);
  box-shadow: 0 4px 24px rgba(13, 27, 46, 0.07);
}

.changelog-entry-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.changelog-app-badge {
  background: rgba(52, 120, 212, 0.08);
  color: var(--blue-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(52, 120, 212, 0.2);
  text-decoration: none;
  transition: background 0.2s;
}
.changelog-app-badge:hover {
  background: rgba(52, 120, 212, 0.14);
}
.changelog-version {
  font-family: monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  background: var(--gray-100);
  padding: 2px 9px;
  border-radius: 6px;
}
.changelog-date {
  font-size: 13px;
  color: var(--gray-500);
}
.changelog-author {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--gray-500);
}
.changelog-api-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 4px;
}

.changelog-entry-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 12px;
  line-height: 1.3;
}

.changelog-tipo-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Badge colori — versione su sfondo chiaro */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}
.badge-blue {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.badge-green {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
  border: 1px solid rgba(22, 163, 74, 0.25);
}
.badge-red {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
}
.badge-yellow {
  background: rgba(202, 138, 4, 0.1);
  color: #b45309;
  border: 1px solid rgba(202, 138, 4, 0.25);
}
.badge-purple {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.25);
}
.badge-gray {
  background: var(--gray-100);
  color: var(--gray-500);
  border: 1px solid var(--gray-300);
}

/* Corpo changelog */
.changelog-body {
  font-size: 14px;
  line-height: 1.75;
  color: var(--gray-700);
}
.changelog-body h4,
.changelog-body h5 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  margin: 18px 0 8px;
}
.changelog-body ul {
  padding-left: 20px;
  margin: 8px 0;
}
.changelog-body li {
  margin-bottom: 6px;
}
.changelog-body strong {
  color: var(--navy);
}

/* Details tecnici */
.changelog-details {
  margin-top: 20px;
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  overflow: hidden;
}
.changelog-details summary {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-500);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  transition:
    color 0.2s,
    background 0.2s;
  user-select: none;
}
.changelog-details summary:hover {
  color: var(--navy);
  background: var(--gray-100);
}
.changelog-details[open] summary {
  border-bottom: 1px solid var(--gray-100);
}
.changelog-details > *:not(summary) {
  padding: 16px 18px;
}
.changelog-body-tech {
  margin-top: 0;
}

.changelog-moduli {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 18px 0;
}
.moduli-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
}

/* Note */
.changelog-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 14px 18px;
  background: rgba(202, 138, 4, 0.06);
  border: 1px solid rgba(202, 138, 4, 0.2);
  border-radius: 10px;
  font-size: 13px;
  color: #92400e;
}
.changelog-note svg {
  flex-shrink: 0;
  margin-top: 2px;
}
.changelog-note ul {
  margin: 4px 0 0;
  padding-left: 16px;
}
.changelog-note li {
  margin-bottom: 4px;
}

/* Footer entry */
.changelog-entry-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
  flex-wrap: wrap;
  gap: 12px;
}
.changelog-footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.changelog-link-app {
  font-size: 13px;
  color: var(--blue-light);
  text-decoration: none;
  transition: color 0.2s;
}
.changelog-link-app:hover {
  color: var(--blue);
}
.changelog-copy-link {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--gray-300);
  color: var(--gray-500);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition:
    color 0.2s,
    border-color 0.2s;
}
.changelog-copy-link:hover {
  color: var(--navy);
  border-color: var(--gray-500);
}

/* Empty state */
.changelog-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 20px;
  color: var(--gray-500);
  gap: 12px;
}
.changelog-empty h3 {
  color: var(--navy);
  margin: 0;
  font-size: 18px;
}
.changelog-empty p {
  margin: 0;
  font-size: 14px;
}

/* API info box — sezione CTA in fondo, scura come in progetti */
.changelog-api-info {
  background: var(--white);
  padding: 0 clamp(20px, 8vw, 160px) var(--section-pad);
}
.api-info-box {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 36px 40px;
  background: var(--navy);
  border-radius: 16px;
  flex-wrap: wrap;
}
.api-info-icon {
  width: 56px;
  height: 56px;
  background: rgba(52, 120, 212, 0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7eb8ff;
  flex-shrink: 0;
}
.api-info-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.api-info-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}
.api-info-box > div {
  flex: 1;
  min-width: 200px;
}

@media (max-width: 768px) {
  .changelog-year-block {
    flex-direction: column;
    gap: 8px;
  }
  .changelog-year-label {
    text-align: left;
    font-size: 24px;
  }
  .changelog-entries {
    padding-left: 20px;
  }
  .changelog-entry-dot {
    left: -27px;
  }
  .changelog-entry-card {
    padding: 20px;
  }
  .changelog-filters {
    gap: 12px;
  }
  .filter-group select,
  .filter-group input {
    min-width: 140px;
  }
  .api-info-box {
    flex-direction: column;
    text-align: center;
  }
  .api-info-box .btn-secondary {
    width: 100%;
    text-align: center;
  }
}

/* Changelog link nelle card progetto */
.proj-changelog-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  transition:
    color 0.2s,
    border-color 0.2s;
  white-space: nowrap;
}
.proj-changelog-link:hover {
  color: var(--accent);
  border-color: rgba(200, 40, 55, 0.4);
}
