:root {
  --blue-950: #061428;
  --blue-900: #0a1f3d;
  --blue-800: #123057;
  --blue-700: #1a4478;
  --blue-600: #2563a8;
  --blue-500: #3b82c4;
  --blue-100: #e8f1fb;
  --blue-50: #f3f8fd;
  --white: #ffffff;
  --red: #e11d48;
  --red-soft: #ff4d6d;
  --ink: #0f172a;
  --muted: #5b6b82;
  --radius: 18px;
  --shadow: 0 20px 50px rgba(6, 20, 40, .18);
  --font: "Outfit", system-ui, sans-serif;
  --display: "Syne", "Outfit", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(59,130,196,.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(225,29,72,.08), transparent 45%),
    linear-gradient(180deg, #f7fbff 0%, #eef5fc 40%, #f8fbff 100%);
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }

.noise {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 0; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cursor-glow {
  pointer-events: none;
  position: fixed; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,168,.16), transparent 65%);
  transform: translate(-50%, -50%);
  z-index: 0; opacity: 0; transition: opacity .3s;
}
main, .site-header, .site-footer, .chatbot { position: relative; z-index: 1; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; transition: box-shadow .3s, backdrop-filter .3s; }
.site-header.is-scrolled {
  box-shadow: 0 10px 30px rgba(6,20,40,.12);
  backdrop-filter: blur(16px);
}
.topbar {
  background: linear-gradient(90deg, var(--blue-950), var(--blue-800));
  color: #c9dbf2; font-size: .82rem;
}
.topbar-inner { display: flex; gap: 1.2rem; align-items: center; justify-content: flex-end; padding: .45rem 0; flex-wrap: wrap; }
.topbar a:hover { color: #fff; }
.wa-link { color: #7dffa8 !important; font-weight: 600; }
.navbar { background: rgba(255,255,255,.88); border-bottom: 1px solid rgba(18,48,87,.08); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 1rem; }
.brand-logo { height: 48px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: .35rem 1.1rem; list-style: none; margin: 0; padding: 0; }
.nav-menu a { font-weight: 600; font-size: .95rem; color: var(--blue-900); position: relative; padding: .35rem 0; }
.nav-menu a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px;
  background: var(--red); transition: width .25s;
}
.nav-menu a:not(.btn):hover::after, .nav-menu a.is-active::after { width: 100%; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 42px; height: 42px; }
.nav-toggle span { display: block; height: 2px; background: var(--blue-900); margin: 7px 0; transition: .25s; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .9rem 1.4rem; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 700; font-family: inherit; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue-800); color: #fff; box-shadow: 0 12px 28px rgba(18,48,87,.28); }
.btn-primary:hover { background: var(--blue-700); }
.btn-accent { background: var(--red); color: #fff; box-shadow: 0 12px 28px rgba(225,29,72,.28); }
.btn-accent:hover { background: var(--red-soft); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(8px); }
.btn-outline { background: #fff; color: var(--blue-800); border: 1.5px solid var(--blue-100); box-shadow: none; }
.btn-outline:hover { background: var(--blue-50); border-color: var(--blue-500); }
.btn-sm { padding: .55rem 1rem; font-size: .88rem; }

/* Hero */
.hero {
  position: relative; min-height: min(92vh, 820px);
  display: grid; place-items: end start;
  color: #fff; overflow: hidden;
  background:
    linear-gradient(115deg, rgba(6,20,40,.48) 0%, rgba(10,31,61,.24) 50%, rgba(6,20,40,.08) 100%),
    url("../img/brand/home.png") center/cover no-repeat;
}
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(40px); opacity: .10; animation: float 8s ease-in-out infinite;
}
.hero-orb.o1 { width: 280px; height: 280px; background: #2563a8; top: 12%; left: 8%; }
.hero-orb.o2 { width: 220px; height: 220px; background: #e11d48; bottom: 18%; right: 12%; animation-delay: -3s; }
@keyframes float { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-22px);} }
.hero-content { position: relative; z-index: 2; padding: 0 0 5.5rem; width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.hero-kicker {
  display: inline-flex; gap: .5rem; align-items: center;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  padding: .4rem .85rem; border-radius: 999px; font-size: .85rem; margin-bottom: 1rem;
  backdrop-filter: blur(10px); animation: fadeUp .7s ease both;
}
.hero h1 {
  font-family: var(--display); font-size: clamp(2.5rem, 6vw, 4.6rem);
  line-height: .98; margin: 0 0 1rem; max-width: 12ch; letter-spacing: -.03em;
  animation: fadeUp .8s .1s ease both; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.55), 0 8px 30px rgba(0,0,0,.35);
}
.hero h1 span { color: #7ec8ff; }
.hero p {
  max-width: 38ch; font-size: clamp(1.05rem, 2vw, 1.25rem); color: #d7e6f8;
  margin: 0 0 1.6rem; animation: fadeUp .8s .2s ease both;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; animation: fadeUp .8s .3s ease both; }
.hero-ai-badge {
  position: absolute; right: 1rem; bottom: .75rem; z-index: 3;
  width: 110px; height: auto; opacity: .88;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));
  pointer-events: none; user-select: none;
}
@keyframes fadeUp { from { opacity:0; transform: translateY(24px);} to { opacity:1; transform:none;} }

.marquee {
  background: var(--blue-900); color: #fff; overflow: hidden; border-block: 1px solid rgba(255,255,255,.08);
}
.marquee-track {
  display: flex; gap: 2.5rem; width: max-content; padding: .85rem 0;
  animation: marquee 28s linear infinite; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .85rem;
}
.marquee-track span { opacity: .85; }
.marquee-track b { color: #ff8aa0; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Sections */
.section { padding: 2rem 0; }
.section-head { margin-bottom: 2.2rem; max-width: 640px; }
.section-head-wide { max-width: none; width: 100%; }
.team-block {
  width: 100%;
  max-width: none;
  background: linear-gradient(180deg, #fff 0%, #f3f8fd 100%);
  border: 1px solid rgba(18, 48, 87, .08);
  border-radius: 28px;
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: var(--shadow);
}
.team-block .section-head { margin-bottom: 1.6rem; }
.eyebrow {
  color: var(--red); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; margin: 0 0 .55rem;
}
.section-head h2, .page-hero h1 {
  font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.05; margin: 0 0 .7rem; color: var(--blue-900); letter-spacing: -.02em;
}
.section-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }

.page-hero {
  padding: 4.5rem 0 2.5rem;
  background:
    linear-gradient(135deg, rgba(10,31,61,.94), rgba(26,68,120,.88)),
    url("../img/sezioni/formazione-catalogo.jpg") center/cover;
  color: #fff;
}
.page-hero h1 { color: #fff; }
.page-hero p { color: #d5e6f8; max-width: 50ch; }

/* Cards / grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.card-media {
  border-radius: var(--radius); overflow: hidden; background: #fff;
  box-shadow: var(--shadow); border: 1px solid rgba(18,48,87,.06);
  transition: transform .35s, box-shadow .35s; height: 100%;
  display: flex; flex-direction: column;
}
.card-media:hover { transform: translateY(-8px) scale(1.01); box-shadow: 0 28px 60px rgba(6,20,40,.22); }
.card-media .thumb {
  aspect-ratio: 16/10; background: linear-gradient(135deg, var(--blue-800), var(--blue-500));
  position: relative; overflow: hidden;
}
.card-media .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card-media:hover .thumb img { transform: scale(1.08); }
.card-body { padding: 1.2rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.badge {
  display: inline-flex; width: fit-content; padding: .28rem .65rem; border-radius: 999px;
  background: var(--blue-100); color: var(--blue-800); font-size: .75rem; font-weight: 700;
}
.badge.red { background: rgba(225,29,72,.12); color: var(--red); }
.card-body h3 { margin: 0; font-size: 1.15rem; color: var(--blue-900); line-height: 1.25; }
.card-body p { margin: 0; color: var(--muted); font-size: .95rem; flex: 1; }
.meta { font-size: .8rem; color: #7a8aa3; }
.card-link { color: var(--blue-600); font-weight: 700; font-size: .92rem; }

/* Feature tiles */
.feature-row { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; }
.feature-visual {
  position: relative; border-radius: 28px; overflow: hidden; min-height: 380px;
  background: linear-gradient(160deg, var(--blue-900), var(--blue-600));
  box-shadow: var(--shadow);
}
.feature-visual img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.feature-visual .stat-float {
  position: absolute; right: 1rem; bottom: 1rem; background: rgba(255,255,255,.95);
  padding: 1rem 1.15rem; border-radius: 16px; box-shadow: var(--shadow);
  animation: float 5s ease-in-out infinite;
}
.feature-visual .stat-float strong { display: block; font-family: var(--display); font-size: 2rem; color: var(--blue-900); }
.feature-list { display: grid; gap: .9rem; margin-top: 1.4rem; }
.feature-item {
  display: grid; grid-template-columns: 48px 1fr; gap: .9rem; align-items: start;
  padding: 1rem; border-radius: 16px; background: rgba(255,255,255,.7); border: 1px solid rgba(18,48,87,.08);
}
.feature-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500)); color: #fff; font-weight: 800;
}

/* Stats */
.stats {
  background: linear-gradient(120deg, var(--blue-950), var(--blue-700));
  color: #fff; border-radius: 28px; padding: 2.5rem; display: grid;
  grid-template-columns: repeat(4, 1fr); gap: 1rem; box-shadow: var(--shadow);
}
.stat strong {
  display: block; font-family: var(--display); font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1; margin-bottom: .35rem;
}
.stat span { opacity: .8; font-size: .95rem; }

/* CTA band */
.cta-band {
  margin: 2rem 0 0; border-radius: 28px; overflow: hidden;
  background:
    linear-gradient(110deg, rgba(225,29,72,.92), rgba(26,68,120,.92)),
    url("../img/sezioni/garanzia-giovani.jpg") center/cover;
  color: #fff; padding: 2.8rem; display: flex; flex-wrap: wrap; gap: 1.2rem;
  align-items: center; justify-content: space-between;
}
.cta-band h2 { font-family: var(--display); margin: 0 0 .4rem; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.cta-band p { margin: 0; max-width: 42ch; opacity: .92; }

/* Forms */
.form-card {
  background: #fff; border-radius: 24px; padding: 1.6rem; box-shadow: var(--shadow);
  border: 1px solid rgba(18,48,87,.07);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: var(--blue-900); }
input, textarea, select {
  width: 100%; border: 1px solid #c9d7ea; border-radius: 12px; padding: .8rem .95rem;
  font: inherit; background: #f8fbff; transition: border .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(59,130,196,.15);
}
.alert { padding: .9rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-weight: 600; }
.alert.ok { background: #e8faf0; color: #0f7a3c; }
.alert.err { background: #ffe8ec; color: #b0002a; }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.35rem; }
.team-card {
  text-align: center; background:
    linear-gradient(180deg, #fff 0%, #f4f8fd 100%);
  border-radius: 26px; padding: 1.6rem 1.1rem 1.4rem;
  border: 1px solid rgba(18,48,87,.08); box-shadow: 0 16px 40px rgba(6,20,40,.1);
  transition: transform .35s, box-shadow .35s, border-color .35s;
  position: relative; overflow: hidden;
}
.team-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--blue-700), var(--red));
}
.team-card-btn {
  width: 100%; cursor: pointer; font: inherit; color: inherit;
}
.team-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 28px 55px rgba(6,20,40,.18);
  border-color: rgba(37,99,168,.25);
}
.team-photo { position: relative; width: 132px; margin: 0 auto 1rem; }
.team-card img {
  width: 132px; height: 132px; object-fit: cover; border-radius: 50%;
  border: 4px solid #fff; box-shadow: 0 10px 28px rgba(18,48,87,.2);
  display: block;
}
.team-ping {
  position: absolute; right: -4px; bottom: 8px;
  background: var(--red); color: #fff; font-size: .68rem; font-weight: 800;
  padding: .28rem .55rem; border-radius: 999px; letter-spacing: .02em;
  box-shadow: 0 8px 18px rgba(225,29,72,.35);
}
.team-card h3 { margin: 0; color: var(--blue-900); font-family: var(--display); font-size: 1.25rem; }
.team-role { color: var(--red); font-weight: 700; font-size: .92rem; display: block; margin-top: .25rem; }
.team-email {
  display: block; margin-top: .45rem; color: var(--blue-700);
  font-size: .82rem; font-weight: 600; word-break: break-all;
}
.team-hint { display: block; margin-top: .55rem; color: var(--muted); font-size: .8rem; }

.team-modal[hidden] { display: none !important; }
.team-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 1rem; }
.team-modal-backdrop { position: absolute; inset: 0; background: rgba(6,20,40,.55); backdrop-filter: blur(4px); }
.team-modal-panel {
  position: relative; z-index: 1; width: min(380px, 100%);
  background: #fff; border-radius: 24px; padding: 1.6rem 1.3rem 1.4rem;
  text-align: center; box-shadow: var(--shadow); animation: fadeUp .35s ease;
}
.team-modal-x {
  position: absolute; top: .55rem; right: .7rem; border: 0; background: none;
  font-size: 1.6rem; cursor: pointer; color: var(--muted); line-height: 1;
}
.team-modal-img {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto .8rem;
  border: 3px solid var(--blue-100);
}
.team-modal-panel h3 { margin: 0; color: var(--blue-900); font-family: var(--display); }
.team-modal-copy { color: var(--muted); margin: .8rem 0 1.1rem; }
.team-modal-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }

/* WhatsApp composer / contacts */
.wa-composer {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #0a1f3d, #1a4478 55%, #123057);
  color: #fff; border-radius: 28px; padding: 1.6rem; box-shadow: var(--shadow);
}
.wa-composer-glow {
  position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(225,29,72,.35), transparent 65%);
  top: -60px; right: -40px; pointer-events: none;
}
.wa-composer-head { display: flex; gap: .8rem; align-items: center; margin-bottom: 1rem; position: relative; }
.wa-composer-head small { display: block; opacity: .75; }
.wa-dot {
  width: 14px; height: 14px; border-radius: 50%; background: #25d366;
  box-shadow: 0 0 0 6px rgba(37,211,102,.2); flex-shrink: 0;
}
.wa-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; position: relative; }
.wa-chips button {
  border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.1);
  color: #fff; border-radius: 999px; padding: .4rem .75rem; font: inherit;
  font-size: .82rem; font-weight: 700; cursor: pointer;
}
.wa-chips button:hover { background: rgba(255,255,255,.2); }
.wa-composer label { position: relative; display: block; font-size: .82rem; font-weight: 700; margin: .55rem 0 .3rem; }
.wa-composer input, .wa-composer textarea {
  position: relative; width: 100%; border: 0; border-radius: 14px;
  padding: .85rem 1rem; font: inherit; background: rgba(255,255,255,.95); color: var(--ink);
}
.wa-preview {
  position: relative; margin: 1rem 0; padding: .85rem 1rem; border-radius: 14px;
  background: rgba(0,0,0,.22); border: 1px dashed rgba(255,255,255,.25);
}
.wa-preview span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.wa-preview p { margin: .35rem 0 0; white-space: pre-wrap; line-height: 1.45; }
.wa-send { position: relative; width: 100%; margin-top: .4rem; justify-content: center; }
.wa-hero-link {
  display: block; margin: 0 0 1rem; padding: 1rem 1.1rem; border-radius: 18px;
  background: linear-gradient(120deg, #128c7e, #25d366); color: #fff !important;
  box-shadow: 0 12px 28px rgba(18,140,126,.3);
}
.wa-hero-link strong { display: block; font-size: 1.15rem; }
.wa-hero-link span { display: block; font-weight: 700; margin: .15rem 0; }
.wa-hero-link em { font-style: normal; opacity: .9; font-size: .85rem; }
.map-frame {
  border-radius: 14px; overflow: hidden; border: 1px solid #d5e2f1; margin-top: .45rem;
}
.map-frame iframe { width: 100%; height: 180px; border: 0; display: block; }
.map-frame iframe:not([src]), .map-frame iframe[src=""] { display: none; }
.map-consent {
  margin: 0; padding: .9rem 1rem; font-size: .88rem; color: var(--muted);
  background: #f3f8fd; border-radius: 12px;
}
.map-consent a { color: var(--blue-700); font-weight: 700; text-decoration: underline; }

.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 100;
  max-width: 720px; margin-inline: auto;
}
.cookie-banner[hidden] { display: none !important; }
.cookie-banner-inner {
  display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; justify-content: space-between;
  background: rgba(6,20,40,.96); color: #d7e6f8; border-radius: 18px;
  padding: 1rem 1.15rem; box-shadow: 0 18px 40px rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.1);
}
.cookie-banner-inner p { margin: 0; font-size: .88rem; line-height: 1.4; max-width: 46ch; }
.cookie-banner-inner a { color: #9ec0e8; text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: .45rem; flex-wrap: wrap; }
.footer-legal { display: flex; gap: .9rem; flex-wrap: wrap; }
.footer-legal a { color: #9ec0e8; }
.footer-legal a:hover { color: #fff; }
.contacts-side .meta { margin: 0 0 .2rem; color: var(--muted); font-size: .9rem; }

/* Attività */
.attivita-timeline {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.15rem;
}
.attivita-card {
  background: #fff; border-radius: 22px; padding: 1.35rem 1.3rem;
  border: 1px solid rgba(18,48,87,.07); box-shadow: 0 14px 36px rgba(6,20,40,.08);
  position: relative; overflow: hidden;
}
.attivita-card::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--blue-600), var(--red));
}
.attivita-year {
  display: inline-block; font-size: .75rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--red); margin-bottom: .45rem;
}
.attivita-card h3 { margin: 0 0 .45rem; color: var(--blue-900); font-family: var(--display); font-size: 1.2rem; }
.attivita-card p { margin: 0; color: var(--muted); line-height: 1.55; }

/* Chatbot */
.chatbot { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 80; }
.chatbot-toggle {
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, var(--blue-700), var(--red));
  box-shadow: 0 14px 35px rgba(18,48,87,.35); position: relative;
  display: grid; place-items: center;
}
.chat-pulse {
  position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid rgba(225,29,72,.45); animation: pulse 2s infinite;
}
@keyframes pulse { 0%{ transform:scale(.9); opacity:1;} 100%{ transform:scale(1.25); opacity:0;} }
.chatbot-panel {
  position: absolute; right: 0; bottom: 74px; width: min(360px, calc(100vw - 1.5rem));
  background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid rgba(18,48,87,.1); display: flex; flex-direction: column; max-height: 480px;
}
.chatbot-panel[hidden] { display: none !important; }
.chatbot-head {
  background: linear-gradient(120deg, var(--blue-900), var(--blue-700)); color: #fff;
  padding: .9rem 1rem; display: flex; justify-content: space-between; align-items: start;
}
.chatbot-head small { display: block; opacity: .8; }
.chatbot-head button { background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; line-height: 1; }
.chatbot-messages { padding: 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: .65rem; min-height: 240px; background: #f5f9fd; }
.msg { max-width: 88%; padding: .7rem .85rem; border-radius: 14px; font-size: .92rem; line-height: 1.4; }
.msg.bot { background: #fff; border: 1px solid #dce8f5; align-self: flex-start; }
.msg.user { background: var(--blue-800); color: #fff; align-self: flex-end; }
.chatbot-form { display: flex; gap: .4rem; padding: .7rem; border-top: 1px solid #e4eef8; }
.chatbot-form input { border-radius: 999px; }
.chatbot-form button {
  border: 0; border-radius: 999px; background: var(--red); color: #fff; font-weight: 700;
  padding: 0 1rem; cursor: pointer;
}

/* Reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Admin */
.admin-body { background: #eef3f9; font-family: var(--font); margin: 0; }
.admin-wrap { width: min(1100px, calc(100% - 2rem)); margin: 2rem auto; }
.admin-card { background: #fff; border-radius: 18px; padding: 1.4rem; box-shadow: 0 10px 30px rgba(0,0,0,.06); }
.admin-nav { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
.admin-nav a,
.admin-nav button { padding: .55rem .9rem; border-radius: 999px; background: #fff; font-weight: 700; color: var(--blue-900); border: 1px solid #d5e2f1; font: inherit; cursor: pointer; text-decoration: none; }
.admin-nav a.active, .admin-nav a:hover,
.admin-nav button:hover { background: var(--blue-800); color: #fff; }
.admin-img-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .35rem; }
.admin-img-preview { flex: 0 0 auto; }
.admin-img-preview img { width: 110px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid #d5e2f1; display: block; }
.admin-img-file { flex: 1 1 220px; min-width: 0; }
.admin-hint { display: block; margin-top: .35rem; color: var(--muted); font-size: .82rem; }
.admin-flags { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: stretch; }
.admin-flag {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .85rem 1rem; border: 1px solid #d5e2f1; border-radius: 12px; background: #f7fafd;
  cursor: pointer; margin: 0;
}
.admin-flag input {
  width: 1.15rem; height: 1.15rem; margin-top: .15rem; flex: 0 0 auto; accent-color: var(--blue-800);
}
.admin-flag span { display: grid; gap: .2rem; }
.admin-flag strong { font-size: 1.02rem; color: var(--blue-900); line-height: 1.2; }
.admin-flag small { color: var(--muted); font-size: .82rem; line-height: 1.35; font-weight: 500; }
.table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.table th, .table td { text-align: left; padding: .7rem; border-bottom: 1px solid #e6eef8; font-size: .92rem; vertical-align: top; }
.table-corsi th:nth-child(1), .table-corsi td.col-date { width: 7.5rem; white-space: nowrap; }
.table-corsi th:nth-child(2), .table-corsi td.col-title { width: auto; }
.table-corsi th:nth-child(3), .table-corsi td.col-cat { width: 10.5rem; white-space: nowrap; }
.table-corsi th:nth-child(4), .table-corsi td.col-state { width: 8.5rem; white-space: nowrap; }
.table-corsi th:nth-child(5), .table-corsi td.col-actions { width: 11rem; white-space: nowrap; }
.table-corsi td.col-title { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .admin-flags { grid-template-columns: 1fr; }
  .table-corsi th:nth-child(3), .table-corsi td.col-cat,
  .table-corsi th:nth-child(4), .table-corsi td.col-state { white-space: normal; }
}

.actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.actions a, .actions button {
  border: 0; background: var(--blue-100); color: var(--blue-800); padding: .35rem .65rem;
  border-radius: 8px; font-weight: 700; cursor: pointer; font: inherit;
}
.actions .danger { background: #ffe4ea; color: #b0002a; }

/* Footer */
.site-footer { margin-top: 4rem; background: var(--blue-950); color: #c7d7eb; position: relative; }
.footer-wave {
  height: 48px; background: linear-gradient(180deg, transparent, var(--blue-950));
  margin-top: -48px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 1.5rem; padding: 1rem 0 2.5rem; }
.footer-logo { height: 42px; width: auto; margin-bottom: .8rem; filter: brightness(1.05); }
.footer-tag, .footer-meta { font-size: .9rem; line-height: 1.5; opacity: .85; }
.footer-social { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .9rem; }
.footer-social a { font-weight: 700; font-size: .88rem; color: #9ec0e8; }
.footer-social a:hover { color: #fff; }
.site-footer h4 { color: #fff; margin: 0 0 .8rem; font-size: 1rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .92rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 1rem 0; font-size: .85rem; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.filter-bar a {
  padding: .45rem .9rem; border-radius: 999px; background: #fff; border: 1px solid #d5e2f1;
  font-weight: 700; font-size: .88rem; color: var(--blue-800);
}
.filter-bar a.active { background: var(--blue-800); color: #fff; border-color: var(--blue-800); }

.prose { max-width: 760px; line-height: 1.7; color: #334155; }
.prose h2, .prose h3 { color: var(--blue-900); font-family: var(--display); }
.content-layout { display: grid; grid-template-columns: 1.5fr .9fr; gap: 1.5rem; align-items: start; }
.side-card { background: #fff; border-radius: 18px; padding: 1.2rem; box-shadow: var(--shadow); position: sticky; top: 100px; }

@media (max-width: 960px) {
  .grid-3, .stats, .team-grid, .footer-grid, .feature-row, .content-layout, .attivita-timeline { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hide-sm { display: none; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute; left: 0; right: 0; top: 100%; background: #fff;
    flex-direction: column; align-items: stretch; padding: 1rem; gap: .4rem;
    border-bottom: 1px solid #dce8f5; display: none;
  }
  .nav-menu.open { display: flex; }
  .grid-3, .grid-2, .stats, .team-grid, .footer-grid, .feature-row, .form-grid, .content-layout, .attivita-timeline {
    grid-template-columns: 1fr;
  }
  .hero { min-height: 78vh; place-items: center start; }
  .hero-content { padding-bottom: 3.5rem; }
}
