/* ==========================================================================
   David Castioni — Comunicazione · Marketing · Tecnologia
   Foglio di stile principale
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------- */
:root {
  --brand: #0345bf;
  --brand-hover: #044cd0;
  --brand-dark: #164483;
  --brand-darker: #0a2a5e;
  --brand-tint: rgba(3, 69, 191, 0.08);

  --ink: #252525;
  --muted: #5c6675;
  --line: #e6eaf2;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;

  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;

  --shadow-xs: 0 1px 2px rgba(16, 32, 64, 0.05);
  --shadow-sm: 0 2px 10px rgba(16, 32, 64, 0.07);
  --shadow: 0 14px 40px rgba(16, 32, 64, 0.11);

  --container: 1160px;
  --header-h: 76px;

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-head: 'Space Grotesk', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
h4 { font-size: 1.02rem; }

p { margin: 0 0 18px; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); text-decoration: underline; }

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

ul, ol { margin: 0 0 18px; padding-left: 1.15em; }
li { margin-bottom: 8px; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

:focus-visible {
  outline: 3px solid var(--brand-hover);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  top: -100px; left: 16px;
  z-index: 200;
  background: var(--brand);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; color: #fff; text-decoration: none; }

/* --- Layout -------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 92px 0; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding: 68px 0; }

.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-lead { font-size: 1.08rem; color: var(--muted); margin: 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0 0 18px;
}
.eyebrow--light {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.lead { font-size: 1.12rem; color: var(--muted); }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  padding: 16px 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
              background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 22px rgba(3, 69, 191, 0.28);
}
.btn-primary:hover { background: var(--brand-hover); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border-color: rgba(3, 69, 191, 0.35);
}
.btn-ghost:hover { background: var(--brand-tint); color: var(--brand); }

.btn-light {
  background: #fff;
  color: var(--brand-dark);
}
.btn-light:hover { background: #eef3ff; color: var(--brand-dark); }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

.btn-sm { padding: 11px 20px; font-size: 0.92rem; }

/* --- Header / nav -------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; color: var(--ink); }

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--shadow-xs);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong {
  font-family: var(--font-head);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand-text small {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--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); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav li { margin: 0; }
.site-nav a {
  display: block;
  padding: 8px 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  border-radius: 999px;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.site-nav a:hover { background: var(--brand-tint); color: var(--brand); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-tint); }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, var(--brand-darker) 0%, var(--brand-dark) 45%, var(--brand) 100%);
  color: #fff;
  padding: 104px 0 88px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("https://coresg-normal.trae.ai/api/ide/v1/text_to_image?prompt=abstract%20deep%20blue%20technology%20background%2C%20geometric%20network%20of%20nodes%20and%20thin%20connecting%20lines%2C%20soft%20glow%2C%20dark%20navy%20and%20electric%20blue%20gradient%2C%20minimal%20professional%20corporate%2C%20no%20text&image_size=landscape_16_9");
  background-size: cover;
  background-position: center;
  opacity: 0.32;
  mix-blend-mode: screen;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(900px 420px at 80% 10%, rgba(4, 76, 208, 0.5), transparent 65%);
}
.hero-inner { position: relative; z-index: 2; max-width: 880px; }
.hero h1 { color: #fff; }
.hero-lead {
  font-size: 1.16rem;
  color: rgba(255, 255, 255, 0.86);
  max-width: 720px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
  list-style: none;
  margin: 58px 0 0;
  padding: 0;
}
.hero-stats li {
  margin: 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.hero-stats strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.35rem;
  color: #fff;
}
.hero-stats span { font-size: 0.9rem; color: rgba(255, 255, 255, 0.78); }

/* --- Page hero (pagine interne) ------------------------------------------ */
.page-hero {
  background: linear-gradient(140deg, var(--brand-darker) 0%, var(--brand-dark) 55%, var(--brand) 100%);
  color: #fff;
  padding: 72px 0 64px;
}
.page-hero h1 { color: #fff; margin-bottom: 14px; }
.page-hero .lead { color: rgba(255, 255, 255, 0.85); max-width: 760px; margin: 0; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.68);
}
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; opacity: 0.6; }
.breadcrumb a { color: rgba(255, 255, 255, 0.85); }
.breadcrumb a:hover { color: #fff; }

/* --- Cards --------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 30px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
              border-color 0.22s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(3, 69, 191, 0.28);
}
.card h3 { margin-bottom: 4px; }
.card p { color: var(--muted); font-size: 0.98rem; margin: 0; }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--brand-tint);
  color: var(--brand);
}
.card-icon svg { width: 24px; height: 24px; }

.card-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  font-size: 0.95rem;
  color: var(--muted);
}
.card-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 7px;
}
.card-list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 11px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.55;
}

.link-arrow {
  margin-top: auto;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.link-arrow::after {
  content: "→";
  transition: transform 0.2s var(--ease);
}
.link-arrow:hover::after { transform: translateX(4px); }

/* --- Split (testo + immagine) ------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.split--reverse .split-media { order: -1; }

.split-media img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.checklist {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
}
.checklist li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 12px;
  color: var(--muted);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--brand-tint);
  border: 1px solid rgba(3, 69, 191, 0.3);
}
.checklist li::after {
  content: "";
  position: absolute;
  left: 6px; top: 12px;
  width: 8px; height: 4px;
  border-left: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}

/* --- Timeline ------------------------------------------------------------ */
.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 6px 0 0 34px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 12px; bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--brand), rgba(3, 69, 191, 0.12));
}
.timeline-item {
  position: relative;
  margin: 0 0 34px;
  padding: 26px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px; top: 32px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
}
.timeline-meta {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 6px;
}
.timeline-item h3 { margin-bottom: 8px; }
.timeline-item p { color: var(--muted); font-size: 0.98rem; margin: 0; }

/* --- Steps --------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.steps > li {
  margin: 0;
  padding: 28px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  counter-increment: step;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
}
.step-num::before { content: counter(step); }
.steps h3 { font-size: 1.08rem; }
.steps p { color: var(--muted); font-size: 0.96rem; margin: 0; }

/* --- Projects ------------------------------------------------------------ */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.project {
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project-media {
  height: 168px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-media span {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.94);
}
.project-body { padding: 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.project-body p { color: var(--muted); font-size: 0.98rem; margin: 0; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tags li {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 4px 12px;
  border-radius: 999px;
}

/* --- Blog list ----------------------------------------------------------- */
.posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(276px, 1fr));
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.post {
  margin: 0;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-date {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.post h3 { font-size: 1.08rem; margin: 0; }
.post h3 a { color: var(--ink); }
.post h3 a:hover { color: var(--brand); text-decoration: none; }
.post p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.post[hidden] { display: none; }

.posts--wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* --- Blog: filtri -------------------------------------------------------- */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}
.chip {
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), background 0.18s var(--ease);
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

.blog-empty {
  margin-top: 26px;
  padding: 22px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted);
  text-align: center;
}

/* --- Blog: articolo ------------------------------------------------------ */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
}
.article-meta span { display: inline-flex; align-items: center; gap: 14px; }
.article-meta span + span::before { content: "·"; opacity: 0.5; }

.article-body {
  max-width: 760px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink);
}
.article-body > * + * { margin-top: 1.2em; }
.article-body h2 { margin-top: 1.9em; font-size: 1.55rem; }
.article-body h3 { margin-top: 1.6em; font-size: 1.24rem; }
.article-body h4, .article-body h5, .article-body h6 { margin-top: 1.4em; font-size: 1.08rem; }
.article-body p, .article-body ul, .article-body ol { margin: 0; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body li + li { margin-top: 0.4em; }
.article-body a { text-decoration: underline; }
.article-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.article-body figure { margin: 1.6em 0; }
.article-body blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--brand);
  color: var(--muted);
  font-style: italic;
}
.article-body iframe { max-width: 100%; border: 0; border-radius: var(--radius-sm); }
.article-body table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }

.article-back { margin-top: 46px; }

/* --- Contact ------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact-card {
  margin: 0;
  padding: 28px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.contact-card h3 { font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.contact-card a { font-family: var(--font-head); font-size: 1.08rem; font-weight: 600; }
.contact-card p { font-size: 0.95rem; color: var(--muted); margin: 0; }

.social-list { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0; padding: 0; }
.social-list li { margin: 0; }
.social-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease);
}
.social-list a:hover {
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
  transform: translateY(-2px);
}

/* --- CTA band ------------------------------------------------------------ */
.cta-band {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
  padding: 72px 0;
}
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.cta-inner h2 { color: #fff; margin-bottom: 8px; }
.cta-inner p { color: rgba(255, 255, 255, 0.85); margin: 0; max-width: 620px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  background: var(--brand-darker);
  color: rgba(255, 255, 255, 0.74);
  padding: 64px 0 0;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
}
.site-footer h3 {
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.site-footer a { color: rgba(255, 255, 255, 0.78); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }

.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-brand img { width: 44px; height: 44px; border-radius: 12px; }
.footer-brand strong { color: #fff; font-family: var(--font-head); font-size: 1.05rem; display: block; }
.footer-brand small { font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 22px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.6);
}
.footer-bottom p { margin: 0; }

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* --- Animazioni ---------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .project:hover, .post:hover, .social-list a:hover { transform: none; }
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; gap: 34px; }
  .split--reverse .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

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

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 18px 24px 26px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 1rem; }
  .nav-cta { margin-top: 10px; }
}

@media (max-width: 820px) {
  .section { padding: 68px 0; }
  .hero { padding: 76px 0 64px; }
  .hero-stats { margin-top: 44px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { padding: 0 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
  .timeline { padding-left: 26px; }
  .timeline-item::before { left: -26px; }
  .brand-text small { display: none; }
}

/* --- Corsi & Competenze -------------------------------------------------- */
.cc-page > .cc-section { padding: 58px 0; }
.cc-page > .cc-section + .cc-section { border-top: 1px solid var(--line); }

.cc-page .sppb-row-container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.cc-page .sppb-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 34px;
}
.cc-page .sppb-col-md-12 { grid-column: span 12; }
.cc-page .sppb-col-md-9 { grid-column: span 9; }
.cc-page .sppb-col-md-8 { grid-column: span 8; }
.cc-page .sppb-col-md-7 { grid-column: span 7; }
.cc-page .sppb-col-md-5 { grid-column: span 5; }
.cc-page .sppb-col-md-4 { grid-column: span 4; }
.cc-page .sppb-col-md-3 { grid-column: span 3; }

.cc-page .cc-section-title { max-width: 780px; margin: 0 auto 44px; text-align: center; }
.cc-page .cc-section-title h2 { margin-bottom: 12px; }
.cc-page .sppb-title-subheading { font-size: 1.05rem; color: var(--muted); margin: 0; }

.cc-page .cc-title { margin-bottom: 12px; }
.cc-page h4.cc-title {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.cc-page .cc-block-inner h5,
.cc-page .cc-acc-body h5 {
  font-family: var(--font-head);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  margin: 26px 0 8px;
}
.cc-page .cc-block-inner > h5:first-child,
.cc-page .cc-acc-body > h5:first-child { margin-top: 0; }
.cc-page .cc-block-inner li > span:has(+ ul),
.cc-page .cc-acc-body li > span:has(+ ul) { font-weight: 600; color: var(--ink); }
.cc-page .cc-block-inner ul,
.cc-page .cc-acc-body ul { margin-bottom: 14px; }
.cc-page .cc-block-inner li > ul,
.cc-page .cc-acc-body li > ul { margin-top: 8px; }
.cc-page .cc-acc-body > * + *,
.cc-page .cc-block-inner > * + * { margin-top: 12px; }

.cc-page .cc-media { text-align: center; }
.cc-page .cc-img { width: 100%; height: auto; border-radius: var(--radius); }
.cc-page .sppb-addon-single-image-container { display: block; }

.cc-page .cc-accordion { margin-top: 28px; }
.cc-page .cc-acc {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.cc-page .cc-acc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 22px;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.cc-page .cc-acc-head::-webkit-details-marker { display: none; }
.cc-page .cc-acc-head:hover { background: var(--brand-tint); color: var(--brand); }
.cc-page .cc-acc-icon {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}
.cc-page .cc-acc[open] > .cc-acc-head { color: var(--brand); }
.cc-page .cc-acc[open] .cc-acc-icon { transform: rotate(-135deg); }
.cc-page .cc-acc-body { padding: 20px 22px 24px; border-top: 1px solid var(--line); }
.cc-page .cc-acc-body p,
.cc-page .cc-acc-body li { font-size: 0.97rem; }

@media (max-width: 860px) {
  .cc-page > .cc-section { padding: 44px 0; }
  .cc-page .sppb-row { grid-template-columns: 1fr; gap: 26px; }
  .cc-page [class*="sppb-col-md-"] { grid-column: auto; }
  .cc-page .cc-acc-head { padding: 15px 18px; font-size: 0.96rem; }
  .cc-page .cc-acc-body { padding: 16px 18px 20px; }
  .cc-page .cc-media .cc-img { max-width: 340px; margin: 0 auto; }
}

/* --- Brand Protection / Presenza globale --------------------------------- */
.text-brand-gradient {
  background: linear-gradient(100deg, #10346e 0%, #2f7bff 55%, #6aa8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.page-hero .text-brand-gradient,
.world-map-section .text-brand-gradient {
  background: linear-gradient(100deg, #cfe0ff 0%, #7dd3fc 55%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Fascia scura con mappa interattiva */
.world-map-section {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 72% 8%, #17458f 0%, rgba(23, 69, 143, 0) 55%),
    linear-gradient(160deg, var(--brand-darker) 0%, #061a3e 100%);
}
.world-map-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.55;
  pointer-events: none;
}
.world-map-section > .container { position: relative; z-index: 1; }
.world-map-section h2,
.world-map-section h3,
.world-map-section h4 { color: #fff; }
.world-map-section .eyebrow { color: #d7e6ff; background: rgba(255, 255, 255, 0.12); }
.world-map-section .section-lead { color: rgba(255, 255, 255, 0.78); }

/* Mappa SVG */
.world-map-svg { display: block; width: 100%; height: auto; }
.map-land {
  fill: rgba(255, 255, 255, 0.05);
  stroke: rgba(125, 211, 252, 0.28);
  stroke-width: 1;
}
.map-land-active {
  fill: rgba(47, 123, 255, 0.2);
  stroke: rgba(125, 211, 252, 0.55);
}
.map-pin .pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: mapPulse 2.8s ease-out infinite;
}
@keyframes mapPulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  70% { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Striscia numerica */
.map-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 30px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  overflow: hidden;
}
.map-stat-box { padding: 26px 16px; text-align: center; background: rgba(6, 26, 62, 0.6); }
.map-stat-num {
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 2.6vw, 2.25rem);
  font-weight: 700;
  line-height: 1.05;
  color: #fff;
}
.map-stat-num span { color: #7dd3fc; }
.map-stat-label {
  margin-top: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}

/* Griglia macro-aree */
.map-regions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 30px;
}
.map-cta { display: flex; justify-content: center; margin-top: 34px; }

.region-card {
  padding: 26px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.world-map-section .region-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}
.region-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.region-head span { font-size: 1.45rem; line-height: 1; }
.region-card h3, .region-card h4 { margin: 0; font-size: 1.05rem; }
.region-card p { margin: 0 0 16px; font-size: 0.88rem; line-height: 1.6; color: var(--muted); }
.world-map-section .region-card p { color: rgba(255, 255, 255, 0.7); }
.region-tags { display: flex; flex-wrap: wrap; gap: 7px; }

/* Pillole TLD */
.tld-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 500;
}
.tld-pill--accent {
  background: var(--brand-tint);
  border-color: rgba(3, 69, 191, 0.28);
  color: var(--brand);
  font-weight: 600;
}
.world-map-section .tld-pill {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.82);
}
.world-map-section .tld-pill--accent {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.45);
  color: #9ddcff;
}

/* --- Pagina Brand Protection -------------------------------------------- */
.bp-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.bp-chip {
  display: inline-block;
  margin-bottom: 20px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.bp-hero-text { color: rgba(255, 255, 255, 0.78); font-size: 0.98rem; line-height: 1.75; margin: 16px 0 0; }
.bp-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

.bp-panel {
  padding: 36px 30px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  text-align: center;
  backdrop-filter: blur(8px);
}
.bp-panel-shield { font-size: 3rem; line-height: 1; margin-bottom: 14px; }
.bp-panel h2, .bp-panel h3 { color: #fff; font-size: 1.4rem; margin-bottom: 10px; }
.bp-panel p { color: rgba(255, 255, 255, 0.82); font-size: 0.94rem; line-height: 1.7; margin: 0; }
.bp-panel-stats {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}
.bp-panel-stat b {
  display: block;
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}
.bp-panel-stat b.is-accent { color: #9ddcff; }
.bp-panel-stat span {
  display: block;
  margin-top: 4px;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
}

.card-emoji { font-size: 1.9rem; line-height: 1; }

.bp-block + .bp-block { margin-top: 56px; }
.bp-sub { font-size: 1.3rem; margin-bottom: 8px; }
.bp-sub-lead { max-width: 720px; margin: 0 0 26px; color: var(--muted); }
.bp-more { margin-top: 40px; text-align: center; }
.bp-regions { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }

@media (max-width: 980px) {
  .bp-hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .map-stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .map-stats-strip { grid-template-columns: 1fr; }
  .map-regions-grid { grid-template-columns: 1fr; }
}

/* --- Carousel Loghi --- */
.logos-section {
  padding: 54px 0;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.logos-section::before,
.logos-section::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.logos-section::before {
  left: 0;
  background: linear-gradient(to right, #fff, transparent);
}
.logos-section::after {
  right: 0;
  background: linear-gradient(to left, #fff, transparent);
}

.logos-slider {
  display: flex;
  gap: 80px;
  align-items: center;
  width: max-content;
  animation: logoScroll 80s linear infinite;
}
.logos-slider:hover {
  animation-play-state: paused;
}
.logo-item {
  flex: 0 0 auto;
  height: 48px;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-item img {
  height: 100%;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.55;
  transition: opacity 0.3s var(--ease), filter 0.3s var(--ease), transform 0.3s var(--ease);
}
.logo-item img:hover {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.05);
}

@keyframes logoScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 820px) {
  .logos-section { padding: 40px 0; }
  .logos-slider { gap: 50px; animation-duration: 40s; }
  .logo-item { height: 38px; }
  .logos-section::before, .logos-section::after { width: 60px; }
}

