/* MailGestITA — design system condiviso */
:root {
  --navy: #16294d;
  --navy-2: #1f3864;
  --accent: #2e75b6;
  --accent-strong: #1f5c96; /* variante accessibile per testo piccolo (AA) */
  --accent-light: #eaf2fb;
  --bg: #f6f9fc;
  --card: #ffffff;
  --text: #24303d;
  --muted: #5b6b7c;
  --border: #e3e9f0;
  --green: #16714c;
  --green-soft: #1f8a5f; /* solo per sfondi/decorazioni, non per testo */
  --radius: 14px;
  --shadow: 0 10px 30px rgba(22, 41, 77, 0.08);
  --maxw: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Segoe UI Variable", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; margin: 0 0 16px; color: var(--navy); }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 16px; color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-light);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #2564a0; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(46,117,182,0.35); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-on-dark { background: #fff; color: var(--navy); }
.btn-on-dark:hover { background: var(--accent-light); transform: translateY(-1px); }
.btn-ghost-on-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-ghost-on-dark:hover { border-color: #fff; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* Nav */
header.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,249,252,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; max-width: var(--maxw); margin: 0 auto;
}
.logo { font-weight: 800; font-size: 1.25rem; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.logo .dot { color: var(--accent); }
.logo-script {
  font-family: 'Kaushan Script', cursive;
  font-weight: 400;
  font-size: 1.9rem;
  color: #3a3a3a;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.85));
  gap: 0;
}
.logo-script .li { color: #1f9d55; }
.logo-script .lt { color: #a3a3a3; }
.logo-script .la { color: #d1272e; }
.logo-m { height: 2.1rem; width: auto; display: block; margin-right: 1px; }
.logo-img { height: 2.4rem; width: auto; display: block; }
footer.site-footer .logo-script { color: #fdfdfd; filter: none; }
footer.site-footer .logo-script .li { color: #4fd97f; }
footer.site-footer .logo-script .lt { color: #d6d6d6; }
footer.site-footer .logo-script .la { color: #ff6b6b; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.nav-links a:hover { color: var(--accent); }
.nav-cta { display: flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 55%, var(--accent) 130%);
  color: #fff;
  padding: 80px 0 90px;
}
.hero .container { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; }
.hero p.lead { color: rgba(255,255,255,0.85); }
.hero-panel {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: 26px;
}
.hero-panel h2 { color: #fff; margin-bottom: 14px; font-size: 1.25rem; }
.hero-stat { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.15); }
.hero-stat:last-child { border-bottom: none; }
.hero-stat .num { font-weight: 800; font-size: 1.3rem; color: #fff; }
.hero-stat .label { font-size: 0.85rem; color: rgba(255,255,255,0.88); }
.trust-line { margin-top: 22px; font-size: 0.85rem; color: rgba(255,255,255,0.88); }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
}

/* Sections */
section { padding: 76px 0; }
.section-head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.section-head.left { margin: 0 0 44px; text-align: left; }
.bg-alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.bg-navy { background: var(--navy); color: #fff; }
.bg-navy h2, .bg-navy h3 { color: #fff; }
.bg-navy p { color: rgba(255,255,255,0.78); }

/* Grid / cards */
.grid { display: grid; gap: 24px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 620px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.card .icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 16px; font-weight: 800;
}
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; font-size: 0.95rem; }

/* Segment cards */
.segment-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; height: 100%;
}
.segment-card .tag {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent-strong); margin-bottom: 10px;
}
.segment-card p { flex-grow: 1; }
.segment-card .link { font-weight: 700; color: var(--accent-strong); }

/* List with checks */
ul.check-list { list-style: none; margin: 0 0 20px; padding: 0; }
ul.check-list li {
  padding-left: 30px; position: relative; margin-bottom: 12px; color: var(--text);
}
ul.check-list li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--green); font-weight: 800;
  background: #e6f4ec; width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 0.75rem;
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 28px 22px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); }
.step .step-num {
  width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 14px;
}

/* Table */
table.compare { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.compare th, table.compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
table.compare th { background: var(--navy); color: #fff; font-weight: 700; }
table.compare tr:last-child td { border-bottom: none; }
table.compare td.yes { color: var(--green); font-weight: 700; }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--navy), var(--accent-strong));
  color: #fff; border-radius: 20px; padding: 56px 40px; text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.85); max-width: 560px; margin-left: auto; margin-right: auto; }

/* Footer */
footer.site-footer { background: var(--navy); color: rgba(255,255,255,0.8); padding: 52px 0 28px; margin-top: 40px; }
footer.site-footer .grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
footer.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
footer.site-footer a { color: rgba(255,255,255,0.72); font-size: 0.92rem; display: block; margin-bottom: 10px; }
footer.site-footer a:hover { color: #fff; }
footer.site-footer .logo { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15); margin-top: 36px; padding-top: 20px;
  font-size: 0.82rem; color: rgba(255,255,255,0.55);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
@media (max-width: 760px) { footer.site-footer .grid { grid-template-columns: 1fr 1fr; } }

/* Breadcrumb / page hero (segment pages) */
.page-hero {
  background: var(--accent-light);
  border-bottom: 1px solid var(--border);
  padding: 54px 0;
}
.page-hero .eyebrow { background: #fff; }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.badge {
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px; font-size: 0.82rem; font-weight: 600; color: var(--navy);
}

/* Immagine editoriale sotto l'hero */
.content-image-section { padding: 0 0 56px; }
.content-image-section img {
  width: 100%; height: 320px; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow); display: block;
}
@media (max-width: 620px) { .content-image-section img { height: 200px; } }

/* Badge Microsoft 365 (testuale, colori ufficiali) */
.ms365-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.92rem; color: var(--navy);
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px 7px 8px;
}
.ms365-badge .ms365-tiles {
  display: grid; grid-template-columns: repeat(2, 8px); grid-template-rows: repeat(2, 8px); gap: 2px;
}
.ms365-badge .ms365-tiles span:nth-child(1) { background: #f25022; }
.ms365-badge .ms365-tiles span:nth-child(2) { background: #7fba00; }
.ms365-badge .ms365-tiles span:nth-child(3) { background: #00a4ef; }
.ms365-badge .ms365-tiles span:nth-child(4) { background: #ffb900; }

/* Form */
.contact-form { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.form-row { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-weight: 700; font-size: 0.88rem; color: var(--navy); }
.form-row input, .form-row select, .form-row textarea {
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 0.95rem;
}
.form-row textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 0.8rem; color: var(--muted); margin-top: 10px; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq-item h3 { margin-bottom: 8px; font-size: 1.05rem; }
.faq-item p { margin-bottom: 0; }

/* Risorse: badge categoria e card articolo */
.cat-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.cat-articolo { background: var(--accent-light); color: var(--accent-strong); }
.cat-avviso { background: #fdecea; color: #a01b14; }
.cat-caso { background: #e6f4ec; color: var(--green); }
.cat-curiosita { background: #fdf1e3; color: #8a5407; }

.pill-nav { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pill-nav a {
  font-size: 0.85rem; font-weight: 700; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff; color: var(--navy);
}
.pill-nav a:hover { border-color: var(--accent); color: var(--accent); }

.article-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; height: 100%;
}
.article-card .meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 4px; }
.article-card p { flex-grow: 1; }
.article-card .link { font-weight: 700; color: var(--accent); }

.article-body h2 { margin-top: 34px; }
.article-body p { font-size: 1.02rem; }
.article-meta-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 0.88rem; color: var(--muted); margin-bottom: 4px;
}
.callout {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 24px 0;
}
.callout.warning { background: #fdecea; border-left-color: #b3261e; }
.callout.success { background: #e6f4ec; border-left-color: var(--green); }
.callout p:last-child { margin-bottom: 0; }

/* Utilities */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.section-narrow { max-width: 780px; margin: 0 auto; }

/* Badge Libraesva (testuale, nessun logo proprietario riprodotto) */
.libraesva-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.92rem; color: var(--navy);
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px 7px 8px;
}
.libraesva-badge .libraesva-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--green-soft); color: #fff; font-weight: 800; font-size: 0.68rem;
  display: flex; align-items: center; justify-content: center;
}
.solution-brand { margin-bottom: 12px; display: block; }

/* Badge MailGestITA (per coerenza visiva accanto agli altri badge, niente immagine raster su sfondi arbitrari) */
.mailgestita-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.92rem; color: var(--navy);
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px 7px 8px;
}
.mailgestita-badge .mailgestita-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 0.7rem;
  display: flex; align-items: center; justify-content: center;
}


/* Skip link per navigazione da tastiera */
.skip-link {
  position: absolute; top: 0; left: 0; z-index: 999;
  width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
  white-space: nowrap;
  background: var(--navy); color: #fff; padding: 12px 20px;
  border-radius: 0 0 10px 0; font-weight: 700;
}
.skip-link:focus { width: auto; height: auto; clip-path: none; overflow: visible; }
main { display: block; }

/* Banner illustrato self-hosted (sostituisce la foto in hotlink) */
.content-image-section .banner-img {
  width: 100%; height: 320px; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow); display: block;
}
@media (max-width: 620px) { .content-image-section .banner-img { height: 200px; } }

/* Gerarchia heading corretta senza cambiare la resa visiva */
.card h2, .segment-card h2 { font-size: 1.25rem; margin-bottom: 10px; }
.card h2 { font-size: 1.3rem; margin-bottom: 16px; }
footer.site-footer h3 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; font-weight: 800; }

/* Tabelle comparative: scorrimento orizzontale su schermi stretti */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 20px; }
.table-scroll table.compare { min-width: 560px; margin-bottom: 0; }

/* Il footer ha fondo navy ma i <p> ereditavano il colore globale --muted:
   contrasto 1.5:1, illeggibile. Segnalato da Lighthouse sul claim del footer. */
footer.site-footer p { color: rgba(255,255,255,0.80); }
