/* Proteos – replica della struttura di siciliaforma.com (tema Divi) con brand Proteos */
:root {
  --brand: #0cb3e7;        /* azzurro logo */
  --brand-dark: #0a7dbe;   /* blu logo */
  --navy: #0b4f82;         /* blocchi scuri (era #3c4090) */
  --btn: #0a7dbe;          /* pulsanti (era #0C71C3) */
  --red: #e02b20;
  --text: #666;
  --heading: #333;
  --light: #e6f2f7;        /* sezioni chiare (era #e6edf2) */
  --gray: #f3f3f3;
  --header-h: 80px;
  --font-body: "Open Sans", Arial, sans-serif;
  --font-head: "Roboto", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7em;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--heading);
  font-weight: 500;
  line-height: 1.2em;
  margin: 0 0 .5em;
  padding: 0;
}
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 80%; max-width: 1080px; margin: 0 auto; }
.container.narrow { max-width: 1080px; }
.center { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .1);
  transition: box-shadow .3s;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
  transition: height .4s ease-in-out;
}
.site-header.shrunk .header-inner { height: 54px; }
.logo { display: block; height: 100%; display: flex; align-items: center; }
.logo img { width: auto; height: 54%; max-height: 44px; }
.site-header.shrunk .logo img { max-height: 32px; }
.main-nav { display: flex; align-items: center; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.main-nav > ul > li { position: relative; padding-right: 22px; }
.main-nav > ul > li > a {
  display: block; padding: 28px 0;
  font-size: 14px; font-weight: 600; letter-spacing: 0;
  color: rgba(0, 0, 0, .6); text-decoration: none;
  transition: color .3s, opacity .3s;
}
.site-header.shrunk .main-nav > ul > li > a { padding: 16px 0; }
.main-nav > ul > li > a:hover { opacity: .7; }
.main-nav > ul > li.current > a { color: var(--brand); }
.main-nav li.has-sub > a::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; vertical-align: 2px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
}
.sub-menu {
  position: absolute; top: 100%; left: 0; z-index: 10;
  display: block !important; flex-direction: column;
  min-width: 240px; padding: 20px 0; background: #fff;
  border-top: 3px solid var(--brand);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.main-nav li.has-sub:hover > .sub-menu,
.main-nav li.has-sub:focus-within > .sub-menu,
.main-nav li.has-sub.open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.sub-menu li { width: 100%; }
.sub-menu a {
  display: block; padding: 6px 20px; font-size: 14px; font-weight: 600;
  color: rgba(0, 0, 0, .6); text-decoration: none; transition: background .2s, color .2s;
}
.sub-menu a:hover { background: rgba(0, 0, 0, .03); opacity: .7; }
.search-toggle, .menu-toggle {
  background: none; border: 0; padding: 0; cursor: pointer; color: rgba(0, 0, 0, .6);
}
.search-toggle { display: inline-flex; align-items: center; margin-left: 4px; }
.search-toggle:hover { color: var(--brand); }
.menu-toggle { display: none; width: 30px; height: 24px; flex-direction: column; justify-content: space-between; }
.menu-toggle span { display: block; height: 3px; background: var(--brand); border-radius: 2px; transition: transform .3s, opacity .3s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(10.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-10.5px) rotate(-45deg); }
.search-bar { background: #fff; border-top: 1px solid rgba(0, 0, 0, .08); padding: 12px 0; }
.search-bar .container { display: flex; align-items: center; gap: 12px; }
.search-bar input { flex: 1; border: 0; font: inherit; font-size: 18px; padding: 8px 0; outline: none; color: #333; }
.search-close { background: none; border: 0; font-size: 28px; line-height: 1; color: rgba(0, 0, 0, .5); cursor: pointer; }

main { padding-top: var(--header-h); }

/* ---------- Sezioni base ---------- */
.section { padding: 54px 0; }
.section-white { background: #fff; }
.section-light { background: var(--light); }
.section-navy { background: var(--navy); }

/* ---------- Hero home ---------- */
.hero {
  position: relative;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero-home {
  min-height: 560px; display: flex; align-items: center; justify-content: center; padding: 60px 0;
}
.hero-logo { width: 42%; max-width: 560px; text-align: center; }
.hero-logo img { width: 100%; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25)); }
.hero-tagline {
  display: block; margin-top: 12px; color: #fff;
  font-family: var(--font-head); font-weight: 300; font-size: 22px; letter-spacing: .28em; text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}

/* Intro navy */
.intro { padding: 70px 0; text-align: center; }
.intro h2 { font-size: 40px; font-weight: 500; color: #fff; line-height: 1.2em; margin-bottom: 30px; }
.intro p { color: rgba(255, 255, 255, .7); line-height: 1.8em; font-size: 14px; max-width: 1080px; margin: 0 auto; }

/* Cards offerta */
.offerta { padding: 60px 0 80px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5.5%; align-items: start; }
.card {
  background: #fff; position: relative; padding-bottom: 20px;
  box-shadow: 0 2px 18px rgba(0, 0, 0, .06);
}
.card > img { width: 100%; aspect-ratio: 800 / 541; object-fit: cover; }
.card-body { padding: 24px 20px 10px; }
.card-body h4 { font-family: var(--font-body); font-size: 22px; font-weight: 700; color: #333; margin-bottom: 14px; }
.card-body p { line-height: 1.8em; }
.card .btn-square { margin: 18px 20px 0; }

/* Buttons */
.btn {
  display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: 16px;
  line-height: 1.7em; text-decoration: none; cursor: pointer; border: 0;
  transition: all .3s ease;
}
.btn:hover { text-decoration: none; }
.btn-square { background: var(--btn); color: #fff; padding: 15px 30px; border-radius: 0; }
.btn-square:hover { background: var(--navy); padding-right: 40px; }
.btn-pill {
  color: var(--navy); background: #fff; border: 2px solid #e5e5e5; border-radius: 100px;
  font-family: "Lato", Helvetica, Arial, sans-serif; font-weight: 700; font-size: 14px; padding: 10px 26px;
}
.btn-pill:hover { border-color: var(--brand); color: var(--brand); }
.btn-form {
  background: #fff; color: var(--navy); border-radius: 100px;
  font-family: "Lato", Helvetica, Arial, sans-serif; font-weight: 900; font-size: 16px; padding: .3em 1em; line-height: 2em;
}
.btn-form:hover { background: var(--brand); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .8); margin-top: 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1.1fr 1.4fr; gap: 50px;
  padding: 70px 0 56px;
}
.footer-logo { width: 190px; margin-bottom: 22px; }
.footer-about p { font-size: 14px; line-height: 1.75em; margin: 0 0 14px; }
.footer-accr { font-size: 12px; color: rgba(255, 255, 255, .5); line-height: 1.6em; }
.site-footer h4 {
  font-family: var(--font-body); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; margin: 0 0 18px; padding-bottom: 12px; position: relative;
}
.site-footer h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 2px; background: var(--brand); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 0 0 10px; }
.footer-links a { color: rgba(255, 255, 255, .8); font-size: 14px; transition: color .2s, padding-left .2s; }
.footer-links a:hover { color: #fff; text-decoration: none; padding-left: 4px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; font-size: 14px; line-height: 1.6em; }
.contact-list svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--brand); }
.contact-list a { color: rgba(255, 255, 255, .8); word-break: break-all; }
.contact-list a:hover { color: #fff; }
.contact-list small { display: block; font-size: 12px; color: rgba(255, 255, 255, .5); }
.btn-footer { margin-top: 8px; padding: 12px 26px; font-size: 14px; background: var(--brand); }
.btn-footer:hover { background: #fff; color: var(--navy); padding-right: 26px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 18px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-bottom p { margin: 0; font-size: 12px; color: rgba(255, 255, 255, .55); }
.footer-legal { display: flex; gap: 18px; }
.footer-legal a, .link-btn { color: rgba(255, 255, 255, .55); font: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.footer-legal a:hover, .link-btn:hover { color: #fff; text-decoration: none; }

/* ---------- Pagine interne: hero con titolo ---------- */
.hero-page { padding: 45px 0 0; }
.hero-split { display: grid; grid-template-columns: 1fr 1fr; gap: 5.5%; align-items: center; }
.hero-title h1 {
  font-family: var(--font-head); font-weight: 500; font-size: 80px; color: #fff; line-height: 1.15em;
  text-shadow: 0 .1em .1em rgba(0, 0, 0, .4); margin: 0;
}
.hero-side img { width: 100%; max-width: 420px; margin-left: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .3)); }
.hero-chi .hero-split { padding-top: 60px; }
.hero-chi .hero-card {
  position: relative; z-index: 5; background: #fff; margin-top: 30px; margin-bottom: -60px;
  padding: 40px; box-shadow: 0 60px 60px rgba(14, 15, 43, .1);
}
.hero-card p { color: var(--navy); font-weight: 600; font-size: 16px; line-height: 1.8em; }
.hero-chi { padding-bottom: 60px; }
.split .split-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: center; }
.split { padding: 0; }
.split-media { position: relative; }
.split-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.split .container { width: 100%; max-width: none; }
.split-text { padding: 60px 10vw 60px 5vw; }
.split-rev .split-text { padding: 60px 5vw 60px 10vw; }
.split-text h2 { font-size: 40px; font-weight: 500; color: #333; margin-bottom: 20px; }
.split-text p { line-height: 1.8em; }
.section-white.split:first-of-type { padding-top: 60px; }

/* pagine semplici / blog */
.plain-page { padding: 40px 0 60px; min-height: 160px; }
.page-title { font-size: 26px; font-weight: 400; color: #333; }
.blog-page { padding: 40px 0 70px; background: #fff; position: relative; }
.blog-page::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 60px; background: var(--light); }
.blog-title { position: relative; font-family: var(--font-head); font-weight: 500; font-size: 60px; color: var(--navy); margin: 40px 0 30px; }
.blog-sheet { background: #fff; box-shadow: 0 2px 18px rgba(0, 0, 0, .08); padding: 40px; }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 40px; }
.post { border: 1px solid #ddd; padding: 20px; }
.post h2 { font-family: var(--font-body); font-size: 15px; font-weight: 700; text-transform: uppercase; line-height: 1.3em; margin-bottom: 8px; }
.post h2 a { color: var(--navy); }
.post-meta { font-size: 12px; color: #999; margin-bottom: 10px; }
.post p { font-size: 13px; line-height: 1.7em; }
.post .more { display: inline-block; margin-top: 6px; font-weight: 700; font-size: 12px; text-transform: uppercase; color: var(--brand); }
.pagination { margin: 30px 0 0; font-size: 13px; }
.no-results { font-size: 26px; font-weight: 500; color: #333; }

/* ---------- Avvisi ---------- */
.avviso-hero {
  background: linear-gradient(90deg, var(--navy) 0%, var(--brand-dark) 60%, var(--brand) 100%);
  color: #fff; padding: 90px 0 70px;
}
.avviso-hero h1 { font-family: var(--font-head); font-weight: 300; font-size: 80px; color: #fff; line-height: 1.15em; margin-bottom: 24px; }
.avviso-hero h1 strong { font-weight: 700; }
.avviso-hero .avviso-sub { font-size: 20px; font-weight: 600; margin-bottom: 14px; }
.avviso-hero p { color: #fff; line-height: 1.8em; font-size: 14px; }
.avviso-body { padding: 50px 0 60px; }
.text-brand { color: var(--brand-dark); font-weight: 400; line-height: 1.9em; }
.h-red { text-align: center; color: var(--red); font-family: var(--font-body); font-weight: 700; font-size: 30px; margin: 40px 0 30px; }
.flyers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.flyer {
  border: 1px solid #ddd; background: #fff; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}
.flyer-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #eee; }
.flyer-top img { width: 34%; max-width: 110px; }
.flyer-eu { font-size: 9px; color: #999; text-transform: uppercase; letter-spacing: .05em; text-align: right; line-height: 1.3; }
.flyer-body {
  position: relative; flex: 1; padding: 22px 18px 18px;
  background: linear-gradient(160deg, var(--navy) 0%, var(--brand-dark) 55%, var(--brand) 100%); color: #fff;
}
.flyer-free { font-size: 13px; opacity: .9; }
.flyer-avviso {
  position: absolute; top: 14px; right: 14px; text-align: center; background: #fff; color: var(--navy);
  font-size: 10px; line-height: 1.2; padding: 6px 10px; border-radius: 3px;
}
.flyer-avviso b { font-size: 13px; }
.flyer-body h3 { color: #fff; font-family: var(--font-body); font-weight: 800; font-size: 20px; line-height: 1.25em; margin: 8px 60px 40px 0; }
.flyer-open {
  display: inline-block; background: var(--red); color: #fff; font-weight: 700; font-size: 11px; line-height: 1.2;
  padding: 6px 12px; border-radius: 2px; text-transform: uppercase;
}
.flyer-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: #fff; font-size: 12px; color: #333; border-top: 1px solid #eee; }
.flyer-foot b { font-size: 16px; color: var(--navy); }
.avviso-q { padding: 50px 0; }
.h-q { font-family: var(--font-body); font-weight: 800; font-size: 20px; color: #333; margin-bottom: 20px; }
.avviso-q p { color: #333; line-height: 1.8em; }
.avviso-end { padding: 50px 0 80px; }
.indennita-box {
  background: var(--navy); color: #fff; text-align: center; padding: 50px 40px; margin: 0 0 30px;
  box-shadow: 0 2px 18px rgba(0, 0, 0, .25);
}
.indennita-box h2 { font-family: var(--font-body); font-weight: 800; font-size: 34px; color: #fff; margin-bottom: 14px; }
.indennita-box p { color: #fff; line-height: 1.8em; }
.indennita-box b { font-size: 22px; }
.h-small-brand { text-align: center; color: var(--navy); font-family: var(--font-body); font-weight: 700; font-size: 14px; margin: 30px 0 10px; }
.avviso-end > .container > p { color: #333; line-height: 1.8em; }

/* form box (Divi contact form scuro) */
.form-box {
  background: var(--navy); padding: 60px 4%; margin-top: 30px;
  box-shadow: 0 2px 18px rgba(0, 0, 0, .3);
}
.form-box-split { display: grid; grid-template-columns: 1fr 1.6fr; gap: 5.5%; align-items: start; }
.form-info { background: var(--navy); color: #fff; padding: 22px 40px; box-shadow: 0 100px 100px -60px rgba(0, 0, 0, .3); }
.form-info h2 { font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 40px; color: #fff; line-height: 1.5em; margin-bottom: 10px; }
.form-info h4 { font-family: "Lato", Helvetica, Arial, sans-serif; font-weight: 700; font-size: 16px; color: rgba(255, 255, 255, .4); line-height: 1.5em; margin: 12px 0 4px; }
.form-info p { color: #fff; margin: 0; }
.form-info a { color: #fff; }
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 3%; }
.contact-form .input {
  display: block; width: 100%; margin: 0 0 3%; padding: 16px;
  font: inherit; font-size: 16px; line-height: 1.5em; color: #fff;
  background: rgba(0, 0, 0, .1); border: 0; border-radius: 0; outline: none;
}
.contact-form .input::placeholder { color: #fff; opacity: 1; }
.contact-form .input:focus { background: rgba(0, 0, 0, .18); }
.contact-form textarea.input { min-height: 150px; resize: vertical; }
.form-bottom { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 4px; }
.captcha { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: 14px; }
.captcha .input { width: 50px; margin: 0; padding: 8px; text-align: center; }
.form-status { color: #fff; font-weight: 600; margin: 16px 0 0; min-height: 1em; }
.form-status.error { color: #ffd2cf; }
.contact-form .input.invalid { box-shadow: inset 0 0 0 2px var(--red); }

/* ---------- Contatti ---------- */
.hero-contatti {
  background-color: var(--brand-dark); background-blend-mode: multiply; background-size: cover;
  padding: 57px 0;
}
.hero-contatti .hero-title h1 { margin-bottom: 30px; }
.hero-logo-small { width: 60%; max-width: 260px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .3)); }
.map-box {
  position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 440px; overflow: hidden;
  background: #cde9d4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M0 60h120M60 0v120M20 0v120M0 20h120M100 0v120M0 100h120' stroke='%23fff' stroke-width='3' opacity='.6'/%3E%3Ccircle cx='60' cy='60' r='9' fill='%23b8dcf5'/%3E%3C/svg%3E");
}
.map-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-consent {
  background: rgba(0, 0, 0, .6); color: #fff; border: 0; padding: 18px 24px; font: inherit; font-size: 13px;
  max-width: 320px; cursor: pointer; line-height: 1.5;
}
.map-consent:hover { background: rgba(0, 0, 0, .75); }
.contact-section { padding: 50px 0 48px; }
.contact-section .form-box { margin-top: 0; padding: 80px 4%; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10000;
  background: #fff; box-shadow: 0 -4px 24px rgba(0, 0, 0, .12); padding: 16px 0;
}
.cookie-banner[hidden], .cookie-badge[hidden] { display: none; }
.cookie-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cookie-inner p { margin: 0; font-size: 13px; line-height: 1.6; color: #333; }
.cookie-buttons { display: flex; gap: 10px; flex: none; }
.cookie-buttons button {
  border: 1px solid #d8dee3; background: #fff; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
  color: #333; padding: 10px 20px; border-radius: 4px; transition: background .2s, color .2s;
}
.cookie-buttons button:hover { background: #f3f3f3; }
.cookie-buttons .cookie-accept { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.cookie-buttons .cookie-accept:hover { background: var(--navy); }
.cookie-badge {
  position: fixed; right: 20px; bottom: 20px; z-index: 9999;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; color: var(--navy); box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .container { width: 90%; }
  .menu-toggle { display: flex; }
  .search-toggle { margin-right: 20px; }
  .main-nav > ul {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: #fff; padding: 12px 5%; box-shadow: 0 2px 5px rgba(0, 0, 0, .1); border-top: 3px solid var(--brand);
  }
  .main-nav.open > ul { display: flex; }
  .main-nav > ul > li { padding-right: 0; }
  .main-nav > ul > li > a { padding: 10px 0; }
  .site-header.shrunk .main-nav > ul > li > a { padding: 10px 0; }
  .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 6px 16px; min-width: 0; }
  .hero-logo { width: 70%; }
  .hero-tagline { font-size: 16px; }
  .intro h2, .split-text h2 { font-size: 30px; }
  .cards { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; padding: 50px 0 40px; }
  .hero-split { grid-template-columns: 1fr; gap: 20px; }
  .hero-title h1, .avviso-hero h1 { font-size: 40px; }
  .hero-side img { margin: 0; max-width: 260px; }
  .hero-chi .hero-card { padding: 30px; }
  .split .split-inner { grid-template-columns: 1fr; }
  .split-text, .split-rev .split-text { padding: 40px 5%; }
  .split-rev .split-text { order: 2; }
  .posts, .flyers { grid-template-columns: 1fr 1fr; }
  .blog-title { font-size: 40px; }
  .form-box-split { grid-template-columns: 1fr; }
  .form-box, .contact-section .form-box { padding: 40px 24px; }
  .form-info { padding: 20px; }
  .cookie-inner { flex-direction: column; align-items: stretch; }
  .cookie-buttons { justify-content: flex-end; }
}
@media (max-width: 767px) {
  :root { --header-h: 64px; }
  .hero-home { min-height: 380px; }
  .intro h2, .split-text h2 { font-size: 24px; }
  .hero-title h1, .avviso-hero h1 { font-size: 30px; }
  .h-red { font-size: 22px; }
  .indennita-box h2 { font-size: 24px; }
  .posts, .flyers { grid-template-columns: 1fr; }
  .blog-sheet { padding: 20px; }
  .contact-form .form-row { grid-template-columns: 1fr; }
  .form-bottom { flex-direction: column; align-items: flex-end; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- Pagine legali / form privacy ---------- */
.legal-page { padding: 50px 0 80px; }
.legal-page .page-title { font-size: 40px; font-weight: 500; color: var(--navy); margin-bottom: 6px; }
.legal-updated { font-size: 12px; color: #999; margin-bottom: 30px; }
.legal-page h2 { font-family: var(--font-body); font-size: 20px; font-weight: 700; color: #333; margin: 32px 0 10px; }
.legal-page p, .legal-page li { font-size: 15px; line-height: 1.8em; color: #444; }
.legal-page ul { padding-left: 20px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0 20px; }
.legal-table th, .legal-table td { border: 1px solid #e3e3e3; padding: 10px 12px; text-align: left; vertical-align: top; }
.legal-table th { background: var(--light); color: var(--navy); }
.form-privacy { color: #fff; font-size: 13px; margin: 6px 0 14px; }
.form-privacy a { color: #fff; text-decoration: underline; }
.form-privacy input { margin-right: 6px; accent-color: var(--brand); }
.form-privacy.invalid { color: #ffd2cf; }

/* ---------- Locandine Avviso 1/2026 ---------- */
.posters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.poster { margin: 0; background: #fff; border: 1px solid #e3e3e3; box-shadow: 0 2px 12px rgba(0, 0, 0, .06); transition: transform .25s, box-shadow .25s; }
.poster:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0, 0, 0, .12); }
.poster img { width: 100%; height: auto; display: block; }
.poster figcaption { padding: 14px 16px 16px; font-size: 13px; line-height: 1.5; color: #555; border-top: 1px solid #eee; }
.poster figcaption strong { display: block; color: var(--navy); font-size: 15px; margin-bottom: 4px; }
.poster figcaption span { display: block; }
@media (max-width: 980px) { .posters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .posters { grid-template-columns: 1fr; } }

/* ---------- Mappa sedi ---------- */
.map-box.map-loaded { background: #e8e8e8; }
.map-pin { background: none; border: 0; }
.map-pin span {
  display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); background: var(--brand-dark); color: #fff; font-weight: 800; font-size: 15px;
  border: 3px solid #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .35);
}
.map-pin span { position: relative; top: 4px; }
.map-box .leaflet-popup-content { font-family: var(--font-body); font-size: 13px; line-height: 1.5; }
.map-box .leaflet-popup-content a { color: var(--brand-dark); font-weight: 600; }
.map-legend { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.map-legend li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; color: #fff; font-size: 13px; line-height: 1.5; }
.map-legend strong { color: #fff; }
.pin { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--navy); font-weight: 800; font-size: 13px; margin-top: 2px; }
@media (max-width: 600px) { .map-legend { grid-template-columns: 1fr; } }

/* ---------- Contenuti dinamici (CMS) ---------- */
.cms-loading, .cms-empty, .cms-error { text-align: center; color: #888; padding: 30px 0; }
.stato { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.st-plan { background: #eceff3; color: #4c5a68; }
.st-start { background: #fff2cc; color: #8a5a00; }
.st-open { background: #d7f5e3; color: #0f6b3a; }
.st-run { background: #dcefff; color: #0a5290; }
.st-closing { background: #ffe3d3; color: #9a3a0b; }
.st-done { background: #f1e3f7; color: #6b2d82; }
.avviso-stato { margin: -10px 0 18px; }
.avviso-stato .stato { font-size: 12px; padding: 6px 14px; }
.avviso-allegato { text-align: center; margin: 30px 0 0; }
.poster figcaption .stato { margin-bottom: 8px; }
.poster-desc { color: #666; margin-top: 6px; }
.corsi-page { padding: 50px 0 80px; }
.corsi-title { font-size: 40px; font-weight: 500; color: var(--navy); margin-bottom: 8px; }
.corsi-intro { max-width: 720px; margin-bottom: 30px; font-size: 15px; }
.poster-link > a { position: relative; display: block; }
.poster-link > a .stato { position: absolute; top: 12px; left: 12px; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.poster-placeholder { aspect-ratio: 800 / 1131; display: flex; align-items: center; justify-content: center; padding: 30px; text-align: center; font-weight: 700; color: #fff; background: linear-gradient(160deg, var(--navy), var(--brand)); }
.poster figcaption strong a { color: var(--navy); }
.poster-avviso { color: var(--brand-dark); font-weight: 600; }
.poster-more { display: inline-block; margin-top: 10px; font-weight: 700; color: var(--brand-dark); }
.bando-detail h2 { font-family: var(--font-body); font-size: 26px; font-weight: 700; color: var(--navy); margin-bottom: 16px; }
.bando-detail p { font-size: 15px; line-height: 1.8em; color: #444; }

/* =====================================================================
   Animazioni e rifiniture (fx.js) — stessa grafica, più movimento
   ===================================================================== */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-soft: cubic-bezier(.2, .7, .2, 1); --gutter: max(10vw, calc((100vw - 1080px) / 2)); }
main { overflow-x: clip; }
::selection { background: var(--brand); color: #fff; }

/* comparsa allo scroll: il contenuto si nasconde solo con JS attivo (<html class="fx">) */
.fx [data-reveal] {
  opacity: 0;
  /* la comparsa è scaglionata (--i), hover e tilt no */
  transition-property: opacity, translate, scale, clip-path, transform, box-shadow, background-color, border-color;
  transition-duration: .9s, 1s, 1s, 1.2s, .7s, .45s, .35s, .35s;
  transition-timing-function: var(--ease-soft), var(--ease-out), var(--ease-out), var(--ease-out), var(--ease-out), ease, ease, ease;
  transition-delay: calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), 0s, 0s, 0s, 0s;
}
.fx [data-reveal].tilting { transition-duration: .9s, 1s, 1s, 1.2s, .12s, .45s, .35s, .35s; transition-timing-function: var(--ease-soft), var(--ease-out), var(--ease-out), var(--ease-out), linear, ease, ease, ease; }
.fx [data-reveal="up"] { translate: 0 36px; }
.fx [data-reveal="left"] { translate: -44px 0; }
.fx [data-reveal="right"] { translate: 44px 0; }
.fx [data-reveal="zoom"] { translate: 0 24px; scale: .95; }
.fx [data-reveal="clip"] { opacity: 1; clip-path: inset(0 100% 0 0); }
.fx .split-rev [data-reveal="clip"] { clip-path: inset(0 0 0 100%); }
.fx [data-reveal].is-in { opacity: 1; translate: none; scale: none; clip-path: inset(0 0 0 0); }

/* titoli: le parole salgono una alla volta */
.fx .split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.fx .split .wi { display: inline-block; translate: 0 110%; transition: translate 1s var(--ease-out) calc(var(--wi) * 55ms); }
.fx .split.is-in .wi { translate: none; }

/* barra di avanzamento e torna su */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 10001; pointer-events: none; }
.scroll-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-dark)); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.to-top {
  position: fixed; right: 20px; bottom: 76px; z-index: 9998; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
  background: #fff; color: var(--brand-dark); cursor: pointer; box-shadow: 0 6px 20px rgba(11, 79, 130, .22);
  opacity: 0; visibility: hidden; translate: 0 16px; transition: opacity .4s, translate .4s var(--ease-out), visibility .4s, background .3s, color .3s;
}
.to-top.show { opacity: 1; visibility: visible; translate: none; }
.to-top:hover { background: var(--brand-dark); color: #fff; }
.to-top svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.to-top .ring-bg { stroke: rgba(10, 125, 190, .15); }
.to-top .ring { stroke: var(--brand); stroke-dasharray: 132; stroke-dashoffset: calc(132 - 132 * var(--p, 0)); transform: rotate(-90deg); transform-origin: 50% 50%; }

/* header: sottolineatura animata e si nasconde scendendo */
.site-header { transition: transform .45s var(--ease-out), box-shadow .3s; }
.site-header.hide { transform: translateY(-100%); }
.site-header.shrunk { box-shadow: 0 6px 24px rgba(11, 79, 130, .1); }
@media (min-width: 981px) {
  .main-nav > ul > li > a { position: relative; }
  .main-nav > ul > li > a::before {
    content: ""; position: absolute; left: 0; right: 0; bottom: 20px; height: 2px; border-radius: 2px; background: var(--brand);
    transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease-out), bottom .4s;
  }
  .main-nav > ul > li.has-sub > a::before { right: 14px; }
  .site-header.shrunk .main-nav > ul > li > a::before { bottom: 9px; }
  .main-nav > ul > li > a:hover::before, .main-nav > ul > li.current > a::before { transform: scaleX(1); transform-origin: left; }
  .main-nav > ul > li > a:hover { opacity: 1; color: var(--brand-dark); }
  .sub-menu { border-radius: 0 0 10px 10px; }
  .sub-menu a { transition: background .2s, color .2s, padding-left .3s var(--ease-out); }
  .sub-menu a:hover { padding-left: 26px; opacity: 1; color: var(--brand-dark); }
}

/* ---------- Hero: foto con zoom lento, luce che segue il mouse, onda ---------- */
.hero { overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: -14% 0; z-index: -3; translate: 0 var(--py, 0px); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 26s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.16) translate(-1.5%, -1%); } }
.hero-shade { position: absolute; inset: 0; z-index: -2; }
.hero-shade::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(38% 46% at var(--hx, 50%) var(--hy, 42%), rgba(12, 179, 231, .38), transparent 70%);
  mix-blend-mode: screen;
}
.hero-home .hero-shade { background: linear-gradient(180deg, rgba(0, 0, 0, .3) 0%, rgba(10, 125, 190, .75) 70%, #0a7dbe 99%); }
.hero-chi .hero-shade { background: linear-gradient(180deg, rgba(0, 0, 0, .3) 0%, rgba(10, 125, 190, .85) 99%); }
.hero-contatti .hero-media { background: var(--brand-dark); }
.hero-contatti .hero-media img { mix-blend-mode: multiply; }
.hero > .container { position: relative; z-index: 2; }

.hero-home { min-height: clamp(560px, 88vh, 820px); padding: 60px 0 110px; }
.hero-home .hero-logo { position: relative; z-index: 2; width: auto; max-width: 92vw; translate: var(--dx, 0) var(--dy, 0); transition: translate .6s var(--ease-out); }
.hero-home .hero-logo .hero-logo-img { width: clamp(240px, 42vw, 560px); margin: 0 auto; animation: logoIn 1.6s var(--ease-out) .1s both; }
@keyframes logoIn {
  from { opacity: 0; transform: translateY(14px) scale(.9); }
  to { opacity: 1; transform: none; }
}
.hero-home .hero-tagline { animation: taglineIn 1.6s var(--ease-out) .55s both; }
@keyframes taglineIn { from { opacity: 0; letter-spacing: .7em; } to { opacity: 1; letter-spacing: .28em; } }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 38px; animation: fadeUp 1.1s var(--ease-out) 1s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.btn-glow, .btn-ghost {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px; border-radius: 100px;
  padding: 15px 32px; font-size: 16px; transition: translate .35s var(--ease-out), background .3s, color .3s, box-shadow .3s, border-color .3s;
}
.btn-glow { background: #fff; color: var(--navy); animation: glow 2.8s ease-in-out 2.2s infinite; }
.btn-glow:hover { color: var(--brand-dark); }
.btn-glow .arr { display: inline-block; transition: transform .35s var(--ease-out); }
.btn-glow:hover .arr { transform: translateX(5px); }
@keyframes glow { 0%, 100% { box-shadow: 0 10px 30px rgba(0, 0, 0, .25), 0 0 0 0 rgba(255, 255, 255, .45); } 50% { box-shadow: 0 10px 30px rgba(0, 0, 0, .25), 0 0 0 12px rgba(255, 255, 255, 0); } }
.btn-ghost { color: #fff; border: 2px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .06); }
.btn-ghost:hover { background: #fff; color: var(--navy); border-color: #fff; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 84px; z-index: 2; width: 26px; height: 42px; margin-left: -13px;
  border: 2px solid rgba(255, 255, 255, .75); border-radius: 14px; animation: fadeUp 1s var(--ease-out) 1.6s both;
}
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cue 1.9s var(--ease-soft) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }

.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 74px; z-index: 1; pointer-events: none; overflow: hidden; }
.hero-wave svg { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; fill: var(--navy); animation: wave 20s linear infinite; }
.hero-wave svg:first-child { height: 88%; fill: var(--brand); opacity: .45; animation-duration: 13s; animation-direction: reverse; }
@keyframes wave { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* hero pagine interne */
.hero-page .hero-title h1 { text-shadow: 0 .1em .3em rgba(0, 0, 0, .35); }
.hero-chi .hero-card { border-radius: 14px; }
.hero-side > img, .hero-logo-small { animation: floaty 9s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Intro con contatori ---------- */
.intro { position: relative; overflow: hidden; isolation: isolate; padding: 70px 0 110px; }
.intro::before, .intro::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.intro::before { width: 520px; height: 520px; left: -160px; top: -200px; background: radial-gradient(circle, rgba(12, 179, 231, .28), transparent 65%); animation: drift 18s ease-in-out infinite; }
.intro::after { width: 420px; height: 420px; right: -120px; bottom: -180px; background: radial-gradient(circle, rgba(10, 125, 190, .5), transparent 65%); animation: drift 22s ease-in-out infinite reverse; }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(60px, 40px); } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 980px; margin: 50px auto 0; }
.stat {
  padding: 28px 16px 24px; border-radius: 16px; text-align: center;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  transition: background .35s, border-color .35s, transform .45s var(--ease-out), opacity .9s var(--ease-soft), translate 1s var(--ease-out);
  transition-delay: 0s, 0s, 0s, calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms);
}
.stat:hover { background: rgba(255, 255, 255, .11); border-color: rgba(12, 179, 231, .6); transform: translateY(-6px); }
.stat-num { display: block; font-family: var(--font-head); font-weight: 700; font-size: 52px; line-height: 1; color: #fff; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 12px; color: rgba(255, 255, 255, .72); font-size: 13px; line-height: 1.45; }

/* ---------- Nastro scorrevole ---------- */
.ribbon {
  position: relative; z-index: 3; width: 104%; margin: -30px 0 -30px -2%; padding: 15px 0; overflow: hidden; rotate: -1.6deg;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand)); box-shadow: 0 12px 34px rgba(11, 79, 130, .28);
}
.ribbon-track { display: flex; width: max-content; animation: ribbon 42s linear infinite; }
.ribbon:hover .ribbon-track { animation-play-state: paused; }
.ribbon span {
  display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; white-space: nowrap;
  color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 18px; letter-spacing: .06em; text-transform: uppercase;
}
.ribbon span::after { content: "\2726"; font-size: 14px; color: rgba(255, 255, 255, .65); }
@keyframes ribbon { to { transform: translateX(-50%); } }
.offerta { padding-top: 90px; }

/* ---------- Card offerta: tilt 3D, zoom foto, riflesso ---------- */
.card {
  border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .7s var(--ease-out), box-shadow .45s, opacity .9s var(--ease-soft), translate 1s var(--ease-out);
  transition-delay: 0s, 0s, calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms);
}
.card.tilting { transition: transform .12s linear, box-shadow .45s, opacity .9s, translate 1s; }
.card:hover { box-shadow: 0 26px 54px rgba(11, 79, 130, .2); }
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .45), transparent 45%);
}
.card.tilting::after { opacity: 1; }
.card-media { overflow: hidden; position: relative; }
.card-media img { width: 100%; aspect-ratio: 800 / 541; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.card:hover .card-media img { transform: scale(1.08); }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(11, 79, 130, .35)); opacity: 0; transition: opacity .5s; }
.card:hover .card-media::after { opacity: 1; }
.card-body { position: relative; flex: 1; }
.card-num { position: absolute; top: 14px; right: 18px; font-family: var(--font-head); font-weight: 700; font-size: 44px; line-height: 1; color: rgba(10, 125, 190, .12); transition: color .4s, transform .6s var(--ease-out); }
.card:hover .card-num { color: rgba(12, 179, 231, .35); transform: translateY(-4px); }
.card-body h4 { padding-right: 56px; }
.card .btn-square { align-self: flex-start; }

/* pulsanti: riflesso che attraversa */
.btn-square { position: relative; overflow: hidden; border-radius: 4px; }
.btn-square::after, .btn-glow::after {
  content: ""; position: absolute; top: 0; left: -130%; width: 60%; height: 100%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .4), transparent); transform: skewX(-20deg);
  transition: left .8s var(--ease-out);
}
.btn-glow::after { background: linear-gradient(100deg, transparent, rgba(12, 179, 231, .25), transparent); }
.btn-square:hover::after, .btn-glow:hover::after { left: 150%; }

/* ---------- Corsi in evidenza (carosello) ---------- */
.home-corsi { padding: 80px 0 70px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--brand-dark); }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--brand); }
.section-title { font-size: 40px; font-weight: 500; color: #333; margin: 0; }
.rail-nav { display: flex; gap: 10px; flex: none; }
.rail-btn {
  width: 50px; height: 50px; border-radius: 50%; border: 2px solid #d6e5ee; background: #fff; color: var(--navy);
  font-size: 18px; cursor: pointer; transition: background .3s, border-color .3s, color .3s, transform .3s var(--ease-out);
}
.rail-btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; transform: scale(1.06); }
.rail {
  display: flex; gap: 26px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 12px var(--gutter) 34px; scroll-padding-inline: var(--gutter); scrollbar-width: none; cursor: grab;
}
.rail::-webkit-scrollbar { display: none; }
.rail:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.rail.dragging { cursor: grabbing; scroll-snap-type: none; }
.rail.dragging * { pointer-events: none; }
.rail .cms-loading { width: 100%; }
.rail-item { flex: 0 0 clamp(220px, 23vw, 270px); scroll-snap-align: start; }
.rail-item .poster-avviso { font-size: 12px; }
.home-corsi-more { margin-top: 6px; }

/* ---------- Locandine ---------- */
.poster {
  position: relative; border-radius: 12px; overflow: hidden;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .7s var(--ease-out), box-shadow .45s, opacity .9s var(--ease-soft), translate 1s var(--ease-out);
  transition-delay: 0s, 0s, calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms);
}
.poster.tilting { transition: transform .12s linear, box-shadow .45s, opacity .9s, translate 1s; }
.poster:hover { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px); box-shadow: 0 24px 48px rgba(11, 79, 130, .2); }
.poster-img { position: relative; display: block; overflow: hidden; }
.poster-img img { transition: transform 1.2s var(--ease-out); }
.poster:hover .poster-img img { transform: scale(1.05); }
.poster-img::after {
  content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-18deg); transition: left 1s var(--ease-out);
}
.poster:hover .poster-img::after { left: 140%; }
.poster-placeholder { background: linear-gradient(160deg, var(--navy), var(--brand-dark), var(--brand), var(--navy)); background-size: 260% 260%; animation: gradShift 10s ease infinite; }
.poster-placeholder span { font-family: var(--font-head); font-size: 22px; line-height: 1.25; text-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
@keyframes gradShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.poster-more { transition: letter-spacing .3s, color .3s; }
.poster-more:hover { text-decoration: none; color: var(--navy); letter-spacing: .01em; }

/* stati "vivi": puntino che pulsa */
.stato.st-open::before, .stato.st-start::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; vertical-align: 1px;
  background: currentColor; animation: pulseDot 1.9s ease-out infinite;
}
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 currentColor; } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }

/* ---------- Pagina avviso ---------- */
.avviso-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(115deg, var(--navy), var(--brand-dark), var(--brand), var(--brand-dark), var(--navy));
  background-size: 300% 300%; animation: gradShift 18s ease infinite;
}
.avviso-hero .container { position: relative; z-index: 1; }
.avviso-orb { position: absolute; z-index: 0; border-radius: 50%; pointer-events: none; }
.avviso-orb.o1 { width: 460px; height: 460px; right: -140px; top: -170px; background: radial-gradient(circle, rgba(255, 255, 255, .24), transparent 65%); animation: drift 14s ease-in-out infinite; }
.avviso-orb.o2 { width: 320px; height: 320px; left: -110px; bottom: -170px; border: 2px solid rgba(255, 255, 255, .2); animation: drift 19s ease-in-out infinite reverse; }
.avviso-stato .stato { box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.h-red { position: relative; padding-bottom: 16px; }
.h-red::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 64px; height: 3px; margin-left: -32px; border-radius: 3px; background: linear-gradient(90deg, var(--red), #ff8a5c); }
.indennita-box { position: relative; overflow: hidden; isolation: isolate; border-radius: 16px; }
.indennita-box::before {
  content: ""; position: absolute; z-index: -2; inset: -60%;
  background: conic-gradient(from 0deg, transparent 0 62%, rgba(12, 179, 231, .9) 76%, transparent 90%); animation: spin 7s linear infinite;
}
.indennita-box::after { content: ""; position: absolute; z-index: -1; inset: 3px; border-radius: 13px; background: linear-gradient(135deg, var(--navy), #0b5f9a); }
@keyframes spin { to { transform: rotate(360deg); } }
.avviso-q .container { border-left: 3px solid var(--brand); padding-left: 28px; }

/* ---------- Form ---------- */
.form-box { border-radius: 16px; position: relative; overflow: hidden; isolation: isolate; }
.form-box::before {
  content: ""; position: absolute; z-index: -1; width: 480px; height: 480px; right: -180px; top: -220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(12, 179, 231, .3), transparent 65%); animation: drift 16s ease-in-out infinite; pointer-events: none;
}
.form-info { border-radius: 14px; }
.contact-form .input { border-radius: 8px; transition: background .3s, box-shadow .3s; }
.contact-form .input:focus { background: rgba(0, 0, 0, .2); box-shadow: 0 0 0 2px rgba(12, 179, 231, .85); }
.btn-form { transition: background .3s, color .3s, transform .3s var(--ease-out); }
.btn-form:hover { transform: translateY(-2px); }

/* ---------- Pagine elenco, bandi, split ---------- */
.blog-page::before { background: linear-gradient(90deg, var(--light), #d6ecf6, var(--light)); background-size: 200% 100%; animation: gradShift 12s ease infinite; }
.blog-sheet { border-radius: 14px; }
.post { border-radius: 10px; transition: border-color .3s, box-shadow .4s, transform .45s var(--ease-out), opacity .9s var(--ease-soft), translate 1s var(--ease-out); transition-delay: 0s, 0s, 0s, calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms); }
.post:hover { border-color: var(--brand); box-shadow: 0 16px 36px rgba(11, 79, 130, .12); transform: translateY(-5px); }
.split-media { overflow: hidden; }
.split-media img { scale: 1.14; translate: 0 var(--py, 0px); }
.map-box { border-radius: 12px; }

/* ---------- Footer ---------- */
.site-footer { position: relative; }
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-dark), var(--brand)); background-size: 200% 100%; animation: gradShift 6s linear infinite;
}
.contact-list li svg { transition: transform .4s var(--ease-out); }
.contact-list li:hover svg { transform: scale(1.2) rotate(-8deg); }

/* ---------- Responsive delle parti nuove ---------- */
@media (max-width: 980px) {
  :root { --gutter: 5vw; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .stat-num { font-size: 40px; }
  .section-title { font-size: 30px; }
  .hero-home .hero-logo .hero-logo-img { width: clamp(220px, 70vw, 420px); }
}
@media (max-width: 767px) {
  .hero-home { min-height: 520px; padding-bottom: 100px; }
  .hero-cta { gap: 10px; margin-top: 28px; }
  .btn-glow, .btn-ghost { padding: 12px 24px; font-size: 15px; }
  .scroll-cue { display: none; }
  .hero-wave { height: 46px; }
  .intro { padding: 56px 0 90px; }
  .stat { padding: 20px 10px 18px; }
  .stat-num { font-size: 34px; }
  .ribbon span { font-size: 14px; gap: 20px; padding-right: 20px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .rail-nav { display: none; }
  .section-title { font-size: 26px; }
  .to-top { bottom: 72px; right: 14px; width: 44px; height: 44px; }
}

/* ---------- Riduci movimento: tutto fermo e visibile ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .fx [data-reveal], .fx .split .wi { opacity: 1 !important; translate: none !important; scale: none !important; clip-path: none !important; }
  .hero-media img, .ribbon-track, .hero-wave svg { animation: none !important; }
}

/* ---------- Bandi: filtro per avviso e avviso di riferimento ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; }
.chip {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--navy); cursor: pointer;
  padding: 8px 16px; border-radius: 100px; border: 1px solid #cfe0ea; background: #fff;
  transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease-out);
}
.chip:hover { border-color: var(--brand); transform: translateY(-2px); }
.chip.active { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.post[hidden] { display: none; }
.post-avviso { display: inline-block; margin-bottom: 10px; padding: 3px 10px; border-radius: 100px; background: var(--light); color: var(--brand-dark); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.posts-avviso { grid-template-columns: repeat(2, 1fr); margin-bottom: 10px; }
@media (max-width: 767px) { .posts-avviso { grid-template-columns: 1fr; } }

/* ---------- Telefoni e tablet: niente filtri né fusioni sui loghi animati ----------
   Su alcuni telefoni (Safari iOS, GPU Android) un'immagine trasparente con filter o mix-blend-mode
   dentro un livello animato perde la trasparenza e diventa un rettangolo bianco. */
@media (hover: none), (pointer: coarse) {
  .hero-logo img, .hero-side img, .hero-logo-small { filter: none; }
  .hero-shade::after { display: none; }
  .hero-contatti .hero-media img { mix-blend-mode: normal; }
  .hero-contatti .hero-media::after { content: ""; position: absolute; inset: 0; background: rgba(10, 125, 190, .72); }
}

/* ---------- Loghi istituzionali nella pagina avviso ---------- */
.avviso-loghi {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 22px 44px;
  margin: -84px auto 44px; padding: 22px 34px; position: relative; z-index: 2;
  background: #fff; border-radius: 16px; box-shadow: 0 18px 44px rgba(11, 79, 130, .14);
}
.avviso-loghi img { height: 54px; width: auto; max-width: 100%; object-fit: contain; }
.avviso-body { padding-top: 0; }
.avviso-body .container > .text-brand:first-child { padding-top: 50px; }
.avviso-hero.has-loghi { padding-bottom: 110px; }
@media (max-width: 767px) {
  .avviso-loghi { gap: 16px 26px; padding: 16px 18px; margin-top: -60px; }
  .avviso-loghi img { height: 40px; }
  .avviso-hero.has-loghi { padding-bottom: 86px; }
}

/* ---------- Modulo: corso di interesse, trappola anti-bot, esito ---------- */
.contact-form select.input { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; }
.contact-form select.input option { color: #333; }
.contact-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status.ok { background: rgba(255, 255, 255, .12); border-radius: 8px; padding: 12px 16px; }
.form-status a { color: #fff; text-decoration: underline; }
.btn-form[disabled] { opacity: .7; cursor: wait; }
