/* ==========================================================================
   AGAMI Research Center — Design System
   Identità: terra/rame istituzionale (marrone caldo + oro accademico),
   serif Lora + sans Inter. Sobrio, accademico, premium. WCAG 2.1 AA.
   NB: i token storici --navy* contengono ora la palette calda primaria
   (marrone/sienna); i nomi sono mantenuti per evitare churn su classi e
   markup (.btn-navy, .section--navy) — il valore è il marrone istituzionale.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1 · Token
   -------------------------------------------------------------------------- */
:root {
  /* Brand — palette calda terra/rame (marrone istituzionale) */
  --navy: #6F3F1F;               /* primario istituzionale (marrone caldo) */
  --navy-deep: #52301A;          /* gradiente intermedio */
  --navy-darker: #3A2416;        /* espresso: footer / sezioni scure */
  --navy-light: #8A5630;         /* stato hover (più chiaro del primario) */
  --gold: #9C7A3C;               /* oro accademico (caldo, armonizza col marrone) */
  --gold-light: #C2A269;
  --gold-pale: #E8DCC4;
  --gold-soft: rgba(156, 122, 60, .10);
  --gold-text: #7D6230;          /* oro scurito per testo piccolo (AA) */
  --copper: #B87333;             /* rame: accento premium (cornici, dettagli) */
  --copper-soft: rgba(184, 115, 51, .35);

  /* Neutri caldi */
  --ink: #241A12;                /* titoli su chiaro (bruno quasi-nero) */
  --body-color: #3D342B;         /* corpo testo (grigio-bruno caldo) */
  --muted: #5E544A;              /* testo secondario (grigio caldo) */
  --faint: #635849;              /* testo piccolo: >=4.5:1 anche su --mist */
  --paper: #FFFFFF;
  --ivory: #FBF7F0;
  --mist: #F4EEE2;
  --border: #E7DECB;
  --border-soft: #EFE8DA;

  /* Tipografia */
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Geometria */
  --maxw: 1180px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(58, 36, 22, .08);
  --shadow-md: 0 10px 30px rgba(58, 36, 22, .12);
  --shadow-lg: 0 24px 60px rgba(58, 36, 22, .18);

  /* Transizioni */
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--body-color);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 .75rem;
  font-weight: 600;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.1rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
h4 { font-size: 1.12rem; }

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--navy);
  text-decoration-color: rgba(156, 122, 60, .45);
  text-underline-offset: 3px;
  transition: color .25s var(--ease);
}
a:hover { color: var(--gold-text); }

ul, ol { padding-left: 1.3rem; margin: 0 0 1.1rem; }
li { margin-bottom: .35rem; }

blockquote {
  margin: 1.5rem 0;
  padding: 1.1rem 1.5rem;
  border-left: 3px solid var(--gold);
  background: var(--ivory);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08rem;
  color: var(--navy);
}

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

::selection { background: var(--navy); color: #fff; }

/* Accessibilità */
.skip-link {
  /* nascosto con offset verticale: nessun overflow orizzontale (LTR/RTL) */
  position: absolute;
  top: -100px;
  inset-inline-start: 0;
  z-index: 2000;
  background: var(--navy);
  color: #fff;
  padding: .65rem 1.2rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.skip-link:focus { top: 0; color: #fff; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* --------------------------------------------------------------------------
   3 · Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--ivory { background: var(--ivory); }
.section--mist { background: var(--mist); }
.section--navy {
  background: linear-gradient(165deg, var(--navy-deep) 0%, var(--navy) 90%);
  color: rgba(255, 255, 255, .88);
}
.section--navy h2, .section--navy h3 { color: #fff; }
.section--tight { padding: clamp(2.2rem, 5vw, 3.5rem) 0; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 991.98px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 639.98px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Etichette di sezione */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 1rem;
}
.kicker::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--gold);
}
.section--navy .kicker { color: var(--gold-light); }
.section--navy .kicker::before { background: var(--gold-light); }

.section-head { max-width: 720px; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .kicker { justify-content: center; }
.section-head .lead { font-size: 1.08rem; color: var(--muted); }
.section--navy .section-head .lead { color: rgba(255, 255, 255, .75); }

/* --------------------------------------------------------------------------
   4 · Header
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--navy-darker);
  color: rgba(255, 255, 255, .78);
  font-size: .8rem;
  padding: .42rem 0;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.topbar a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.topbar a:hover { color: var(--gold-light); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 1.1rem; }
.topbar .bi { margin-right: .35rem; color: var(--gold-light); }
@media (max-width: 767.98px) {
  .topbar-right .topbar-tag { display: none; }
}
@media (max-width: 575.98px) {
  /* su schermi stretti la topbar va a capo, centrata: mai overflow */
  .topbar .container {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: .15rem;
  }
  .topbar-left, .topbar-right {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Language switcher (topbar) */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  margin-inline: .35rem;
}
.lang-switcher a {
  display: inline-block;
  padding: .1rem .42rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  border-radius: 999px;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.lang-switcher a:hover { color: var(--gold-light); }
.lang-switcher a.active {
  color: #fff;
  border-color: rgba(194, 162, 105, .65);
  background: rgba(194, 162, 105, .18);
}

/* Language switcher nel menu mobile */
.nav-lang-mobile { display: none; }
@media (max-width: 1199.98px) {
  .nav-lang-mobile { display: block; padding: 1rem .35rem 0; border-bottom: 0; }
  .nav-lang-label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold-text);
    margin-bottom: .6rem;
  }
  .nav-lang-list { display: flex; flex-wrap: wrap; gap: .5rem; }
  .nav-lang-list a {
    padding: .45rem .9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--body-color);
    text-decoration: none;
  }
  .nav-lang-list a.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
  }
}
@media (min-width: 1200px) {
  .nav-lang-mobile { display: none !important; }
}

/* Language switcher nel footer */
.footer-lang { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; }
.footer-lang a {
  padding: .25rem .7rem;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
  transition: all .25s var(--ease);
}
.footer-lang a:hover { color: var(--gold-light); border-color: rgba(194, 162, 105, .6); }
.footer-lang a.active {
  background: rgba(194, 162, 105, .2);
  border-color: rgba(194, 162, 105, .65);
  color: #fff;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border-soft);
  transition: box-shadow .3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(58, 36, 22, .10); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-block: .55rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
  color: var(--navy);
  flex-shrink: 0;
}
.brand img {
  height: 62px;
  width: auto;
  transition: height .3s var(--ease);
}
.site-header.is-scrolled .brand img { height: 50px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.18; min-width: 0; }
.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: .14em;
  color: var(--navy);
}
.brand-sub {
  font-size: .6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-text);
  font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 479.98px) {
  .brand-sub { white-space: normal; letter-spacing: .12em; }
}

/* Navigazione principale */
.main-nav { display: flex; align-items: center; }
.nav-list {
  display: flex;
  align-items: center;
  gap: .15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-item { position: relative; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .55rem .5rem;
  font-size: .83rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background .25s var(--ease), color .25s var(--ease);
}
@media (min-width: 1380px) {
  .nav-link { font-size: .86rem; padding-inline: .65rem; }
}
.nav-link .bi-chevron-down { font-size: .6rem; color: var(--faint); transition: transform .25s var(--ease); }
.nav-link:hover, .nav-item.is-open > .nav-link { background: var(--gold-soft); color: var(--navy); }
.nav-link.is-active { color: var(--gold-text); }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: .7rem; right: .7rem; bottom: .15rem;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}
.nav-item.is-open > .nav-link .bi-chevron-down { transform: rotate(180deg); }

.dropdown {
  position: absolute;
  top: calc(100% + .4rem);
  left: 0;
  min-width: 250px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-top: 3px solid var(--gold);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  padding: .55rem;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
  z-index: 1001;
  /* Salvaguardia: anche con etichette tradotte molto lunghe un dropdown non
     puo' superare il viewport, cosi' il riallineamento non sfora il bordo
     opposto. (-2rem > tipica scrollbar verticale, quindi non causa overflow.) */
  max-width: calc(100vw - 2rem);
}
.nav-item.is-open > .dropdown,
.nav-item:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown li { margin: 0; }
.dropdown a {
  display: block;
  padding: .5rem .75rem;
  font-size: .86rem;
  color: var(--body-color);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.dropdown a:hover { background: var(--ivory); color: var(--navy); }

/* Ancoraggio verso il bordo interno (inline-end) del dropdown. La classe e'
   semantica e indipendente da ordine/conteggio delle voci: e' impostata come
   baseline statica in header.html (flag align_end nei dati di navigazione) e
   puo' essere aggiunta/rimossa a runtime da agami.js in base alla geometria
   reale. Sostituisce il vecchio selettore fragile :nth-last-child(-n+4).
   Niente nth-child, niente overflow-x globale. */
.nav-item--align-end > .dropdown {
  left: auto;
  right: 0;
}

/* Toggle mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 11px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s 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); }

@media (max-width: 1199.98px) {
  .nav-toggle { display: flex; }
  /* backdrop-filter creerebbe un containing block per il pannello fixed */
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #fff;
  }
  .main-nav {
    position: fixed;
    inset: 0;
    top: var(--header-h, 76px);
    background: #fff;
    overflow-y: auto;
    padding: 1rem 1.25rem 3rem;
    display: none;
    z-index: 999;
  }
  .main-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-item { border-bottom: 1px solid var(--border-soft); }
  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: .95rem .35rem;
    font-size: 1rem;
  }
  .nav-link.is-active::after { display: none; }
  .dropdown {
    position: static;
    min-width: 0;
    border: 0;
    box-shadow: none;
    padding: 0 0 .6rem .85rem;
    transform: none;
    transition: none;
    display: none;
    opacity: 1;
    visibility: visible;
  }
  .nav-item.is-open > .dropdown { display: block; }
  .dropdown a { font-size: .95rem; padding: .55rem .5rem; }
}

/* --------------------------------------------------------------------------
   5 · Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background:
    linear-gradient(168deg, rgba(58, 36, 22, .94) 0%, rgba(82, 48, 26, .88) 55%, rgba(111, 63, 31, .80) 100%),
    var(--navy-deep) center / cover no-repeat;
  color: #fff;
  overflow: hidden;
}
.hero--image { background-blend-mode: normal; }
.hero::after {                 /* filo dorato alla base */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold-light) 50%, var(--gold) 70%, transparent);
  opacity: .85;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: clamp(4rem, 9vw, 7.5rem) 0;
  max-width: 880px;
}
.hero .kicker { color: var(--gold-light); }
.hero .kicker::before { background: var(--gold-light); }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  color: var(--gold-pale);
  margin-bottom: 1.4rem;
}
.hero-text {
  font-size: 1.02rem;
  color: rgba(255, 255, 255, .82);
  max-width: 640px;
  margin-bottom: 2rem;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .65rem;
  margin: 0 0 2.1rem;
  padding: 0;
  list-style: none;
}
.hero-tags li {
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255, 255, 255, .85);
  border: 1px solid rgba(194, 162, 105, .5);
  border-radius: 999px;
  padding: .32rem .85rem;
  background: rgba(255, 255, 255, .04);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Hero interno di pagina */
.page-hero {
  background:
    linear-gradient(165deg, var(--navy-darker) 0%, var(--navy) 100%);
  color: #fff;
  position: relative;
}
.page-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 35%, var(--gold-light) 50%, var(--gold) 65%, transparent);
  opacity: .8;
}
.page-hero-inner { padding: clamp(2.6rem, 6vw, 4.2rem) 0; max-width: 860px; }
.page-hero h1 { color: #fff; margin-bottom: .4rem; }
.page-hero .kicker { color: var(--gold-light); margin-bottom: .8rem; }
.page-hero .kicker::before { background: var(--gold-light); }
.page-hero-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--gold-pale);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  font-size: .78rem;
  color: rgba(255, 255, 255, .6);
}
.breadcrumb a { color: rgba(255, 255, 255, .75); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-light); }
.breadcrumb li + li::before { content: "›"; margin-right: .45rem; color: rgba(255, 255, 255, .4); }

/* --------------------------------------------------------------------------
   6 · Bottoni
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .78rem 1.65rem;
  font-family: var(--sans);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn .bi { transition: transform .3s var(--ease); font-size: .9em; }
.btn:hover .bi-arrow-right { transform: translateX(4px); }
.btn:active { transform: translateY(0) scale(.99); }

.btn-gold {
  /* oro scurito: contrasto AA del testo bianco (>=4.5:1 su tutto il gradiente) */
  background: linear-gradient(135deg, #7D6230 0%, #8A6D36 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(125, 98, 48, .3);
}
.btn-gold:hover {
  color: #fff;
  background: linear-gradient(135deg, #6E5629 0%, #7D6230 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(125, 98, 48, .4);
}

.btn-navy {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 8px 22px rgba(111, 63, 31, .24);
}
.btn-navy:hover { background: var(--navy-light); color: #fff; transform: translateY(-2px); }

.btn-outline {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-outline:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }

.btn-outline-light {
  border-color: rgba(255, 255, 255, .55);
  color: #fff;
  background: rgba(255, 255, 255, .04);
}
.btn-outline-light:hover { background: #fff; color: var(--navy); transform: translateY(-2px); }

.btn-sm { padding: .5rem 1.1rem; font-size: .8rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 600;
  font-size: .88rem;
  color: var(--gold-text);
  text-decoration: none;
}
.link-arrow .bi { transition: transform .3s var(--ease); }
.link-arrow:hover .bi { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   7 · Card e componenti
   -------------------------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  position: relative;
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(156, 122, 60, .45);
}
.card--static:hover { transform: none; box-shadow: none; border-color: var(--border); }

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  color: var(--gold-text);
  font-size: 1.35rem;
  margin-bottom: 1.1rem;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.card:hover .card-icon { background: var(--gold); color: #fff; }

.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--navy); }
.card .meta {
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold-text);
  margin-bottom: .5rem;
}
.card p { font-size: .93rem; color: var(--muted); }

/* Card pilastro (home) con linea dorata */
.pillar-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.pillar-card:hover::before { transform: scaleX(1); }

/* Card persona */
.person-card {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.person-card:hover { box-shadow: var(--shadow-sm); border-color: rgba(156, 122, 60, .4); }
.person-card .person-photo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: .8rem;
  border: 2px solid var(--gold-pale);
}
.person-card .person-initials {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--gold-pale);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: .8rem;
}
.person-card .person-name { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.person-card .person-role { font-size: .82rem; color: var(--gold-text); font-weight: 600; }
.person-card .person-country { font-size: .8rem; color: var(--faint); }
.person-card .person-bio { font-size: .88rem; color: var(--muted); margin-top: .5rem; }

/* Card pubblicazione */
.pub-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.pub-card .pub-series {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold-text);
  margin-bottom: .55rem;
}
.pub-card h3 { font-size: 1.12rem; }
.pub-card .pub-subtitle { font-family: var(--serif); font-style: italic; font-size: .92rem; color: var(--muted); }
.pub-card .pub-meta { font-size: .8rem; color: var(--faint); margin: .4rem 0 .7rem; }
.pub-card .pub-actions { margin-top: auto; padding-top: .9rem; }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: .28rem .75rem;
}
.badge-prep { background: var(--gold-soft); color: var(--gold-text); border: 1px solid rgba(156, 122, 60, .3); }
.badge-open { background: rgba(34, 102, 59, .1); color: #22663B; border: 1px solid rgba(34, 102, 59, .3); }

/* Avvisi */
.notice {
  display: flex;
  gap: .9rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  background: var(--ivory);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .92rem;
  color: var(--body-color);
}
.notice .bi { color: var(--gold-text); font-size: 1.1rem; flex-shrink: 0; margin-top: .1rem; }

/* Statistiche */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.1rem;
}
.stat {
  text-align: center;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(194, 162, 105, .25);
  border-radius: var(--radius);
  padding: 1.4rem 1rem;
  position: relative;
  overflow: hidden;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.stat:hover { border-color: rgba(194, 162, 105, .6); background: rgba(255, 255, 255, .08); }
.stat-value {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.1;
  display: block;
  margin-bottom: .3rem;
}
.stat-label { font-size: .8rem; color: rgba(255, 255, 255, .75); letter-spacing: .04em; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--gold-pale), var(--gold));
}
.timeline li { position: relative; padding: 0 0 1.6rem 2.1rem; margin: 0; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--gold);
}
.timeline .tl-year {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  display: block;
}
.timeline .tl-text { font-size: .95rem; color: var(--muted); }

/* Liste eleganti */
.check-list { list-style: none; padding: 0; margin: 0 0 1.1rem; }
.check-list li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: .55rem;
}
.check-list li::before {
  content: "\F26B";              /* bi-check2 */
  font-family: "bootstrap-icons";
  position: absolute;
  left: 0;
  top: .05rem;
  color: var(--gold);
  font-weight: 700;
}

.dot-list { list-style: none; padding: 0; margin: 0 0 1.1rem; }
.dot-list li { position: relative; padding-left: 1.4rem; margin-bottom: .5rem; }
.dot-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

/* Banda CTA */
.cta-band {
  background:
    radial-gradient(1100px 360px at 85% -40%, rgba(156, 122, 60, .35), transparent 60%),
    linear-gradient(160deg, var(--navy-darker) 0%, var(--navy) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(2.2rem, 5vw, 3.4rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { color: #fff; margin-bottom: .4rem; }
.cta-band p { color: rgba(255, 255, 255, .78); margin: 0; max-width: 540px; }
.cta-band .cta-actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   8 · Form
   -------------------------------------------------------------------------- */
.form-label { font-weight: 600; font-size: .88rem; color: var(--ink); margin-bottom: .3rem; display: block; }
.form-text { font-size: .78rem; color: var(--faint); margin-top: .25rem; }

.form-control, .form-select {
  width: 100%;
  padding: .68rem .9rem;
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(156, 122, 60, .18);
}
.form-control::placeholder { color: #6E7484; }
textarea.form-control { resize: vertical; min-height: 120px; }

.form-check { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: .65rem; }
.form-check-input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: .22rem;
  flex-shrink: 0;
  accent-color: var(--gold);
  cursor: pointer;
}
.form-check label { font-size: .88rem; color: var(--body-color); cursor: pointer; }

.field { margin-bottom: 1.15rem; }
.field .errorlist {
  list-style: none;
  margin: .3rem 0 0;
  padding: 0;
  font-size: .8rem;
  color: #9B2226;
  font-weight: 500;
}
.field.has-error .form-control, .field.has-error .form-select { border-color: #9B2226; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 1.4rem; }
@media (max-width: 639.98px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .field--full { grid-column: 1 / -1; }

fieldset.form-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem 1.1rem;
  margin: 0 0 1.6rem;
  background: #fff;
  /* i fieldset hanno min-inline-size:min-content di default e possono
     traboccare dal contenitore su viewport stretti */
  min-inline-size: 0;
}
fieldset.form-section legend {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.06rem;
  color: var(--navy);
  padding: 0 .6rem;
}

/* Gruppi di checkbox multipli (rendering nativo Django CheckboxSelectMultiple) */
.field div[role="group"] > div {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: .35rem 1rem;
  margin-top: .35rem;
}
.field div[role="group"] > div > div { min-width: 0; }
.field div[role="group"] label {
  display: inline-flex;
  align-items: flex-start;
  gap: .55rem;
  font-size: .9rem;
  font-weight: 400;
  color: var(--body-color);
  cursor: pointer;
  line-height: 1.45;
}
.field div[role="group"] label .form-check-input,
.field div[role="group"] label input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: .18rem;
  flex-shrink: 0;
  accent-color: var(--gold);
}

/* Honeypot: invisibile agli umani, presente nel DOM per i bot.
   Offset verticale: nessun overflow orizzontale in LTR né in RTL. */
.hp-field {
  position: absolute !important;
  top: -100px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Messaggi flash */
.messages { list-style: none; margin: 0 0 1.4rem; padding: 0; }
.messages li {
  padding: .9rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-weight: 500;
  margin-bottom: .6rem;
  border: 1px solid;
}
.messages li.success { background: #F0F7F1; color: #1F5B33; border-color: #BFDCC8; }
.messages li.error { background: #FBF0F0; color: #8C1D21; border-color: #E8C5C6; }
.messages li.info { background: var(--ivory); color: var(--navy); border-color: var(--border); }

/* --------------------------------------------------------------------------
   9 · Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: linear-gradient(180deg, var(--navy-darker) 0%, #241509 100%);
  color: rgba(255, 255, 255, .72);
  font-size: .88rem;
  margin-top: 0;
}
.footer-main {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr 1.1fr;
  gap: 2.4rem;
  padding: clamp(2.6rem, 6vw, 4rem) 0 2.2rem;
}
@media (max-width: 991.98px) { .footer-main { grid-template-columns: 1fr 1fr; } }
@media (max-width: 639.98px) { .footer-main { grid-template-columns: 1fr; gap: 1.8rem; } }

.footer-brand { display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; }
.footer-brand img { height: 64px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-sub { color: var(--gold-light); }
.footer-tagline { font-family: var(--serif); font-style: italic; color: var(--gold-pale); font-size: .95rem; }
.footer-note { font-size: .8rem; color: rgba(255, 255, 255, .5); margin-top: .9rem; }

.footer-title {
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1rem;
}
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .45rem; }
.footer-links a {
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
  transition: color .25s var(--ease), padding-left .25s var(--ease);
}
.footer-links a:hover { color: var(--gold-light); padding-left: .25rem; }

.footer-contact li { display: flex; gap: .6rem; margin-bottom: .55rem; }
.footer-contact .bi { color: var(--gold-light); margin-top: .15rem; }
.footer-contact a { color: rgba(255, 255, 255, .72); text-decoration: none; word-break: break-word; }
.footer-contact a:hover { color: var(--gold-light); }

.footer-social { display: flex; gap: .6rem; margin-top: 1rem; }
.footer-social a {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  color: rgba(255, 255, 255, .8);
  text-decoration: none;
  transition: all .3s var(--ease);
}
.footer-social a:hover { background: var(--gold); border-color: var(--gold); color: #fff; transform: translateY(-2px); }

.footer-newsletter .form-control {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
}
.footer-newsletter .form-control::placeholder { color: rgba(255, 255, 255, .45); }
.footer-newsletter .form-check label { color: rgba(255, 255, 255, .6); font-size: .76rem; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 1.2rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  font-size: .78rem;
  color: rgba(255, 255, 255, .5);
}
.footer-bottom a { color: rgba(255, 255, 255, .65); text-decoration: none; }
.footer-bottom a:hover { color: var(--gold-light); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 1.1rem; }

/* --------------------------------------------------------------------------
   10 · Pagine specifiche
   -------------------------------------------------------------------------- */
/* Prosa istituzionale */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.4rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8rem; }
.prose .lead { font-size: 1.1rem; color: var(--muted); }

.two-col { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.8rem, 4vw, 3.5rem); align-items: start; }
/* I figli di un grid hanno min-width:auto: la traccia non puo' scendere sotto
   il min-content del contenuto e su mobile sfora il contenitore. min-width:0
   permette alla colonna di restringersi correttamente (fix overflow timeline). */
.two-col > * { min-width: 0; }
@media (max-width: 899.98px) { .two-col { grid-template-columns: 1fr; } }

/* Figure */
.figure-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}
.figure-frame img { width: 100%; object-fit: cover; }
.figure-frame--accent::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(156, 122, 60, .35);
  border-radius: var(--radius);
  pointer-events: none;
}
.figure-caption { font-size: .76rem; color: var(--faint); margin-top: .5rem; }

/* Ritratto della fondatrice — cornice rame premium + ombra morbida */
.founder-portrait { box-shadow: var(--shadow-lg); }
.founder-portrait img { aspect-ratio: 1 / 1; display: block; }
.founder-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(184, 115, 51, .50);   /* rame sobrio */
  border-radius: var(--radius);
  pointer-events: none;
}

/* Tabella sobria */
.table-wrap { overflow-x: auto; }
table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.table th {
  background: var(--ivory);
  font-weight: 600;
  color: var(--navy);
  text-align: left;
  padding: .8rem 1rem;
  border-bottom: 2px solid var(--border);
}
.table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }

/* Filtri collane */
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter-chip {
  font-size: .8rem;
  font-weight: 600;
  padding: .42rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--body-color);
  text-decoration: none;
  transition: all .25s var(--ease);
}
.filter-chip:hover { border-color: var(--gold); color: var(--gold-text); }
.filter-chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Eventi */
.event-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 1.4rem;
  align-items: start;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border-soft);
}
@media (max-width: 639.98px) { .event-row { grid-template-columns: 1fr; gap: .5rem; } }
.event-date {
  text-align: center;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .6rem .4rem;
  min-width: 96px;
}
.event-date .d { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--navy); line-height: 1.1; display: block; }
.event-date .my { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-text); font-weight: 600; }
.event-title { font-size: 1.1rem; margin-bottom: .25rem; }
.event-place { font-size: .84rem; color: var(--faint); }
.event-summary { font-size: .9rem; color: var(--muted); margin-top: .3rem; }

/* Profili RCMI pubblici */
.rcmi-result {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.rcmi-result:hover { border-color: rgba(156, 122, 60, .45); box-shadow: var(--shadow-sm); }
.rcmi-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.rcmi-chips span {
  font-size: .72rem;
  font-weight: 600;
  background: var(--ivory);
  border: 1px solid var(--border);
  color: var(--body-color);
  padding: .22rem .65rem;
  border-radius: 999px;
}

/* Stato vuoto */
.empty-state {
  text-align: center;
  border: 1px dashed rgba(156, 122, 60, .4);
  background: var(--ivory);
  border-radius: var(--radius);
  padding: clamp(2.2rem, 5vw, 3.4rem) 1.5rem;
  max-width: 620px;
  margin-inline: auto;
}
.empty-state .bi { font-size: 2rem; color: var(--gold); margin-bottom: .8rem; display: inline-block; }
.empty-state h3 { color: var(--navy); }
.empty-state p { color: var(--muted); font-size: .94rem; }

/* Pagine errore */
.error-page { text-align: center; padding: clamp(4rem, 10vw, 7rem) 0; }
.error-code {
  font-family: var(--serif);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.error-code span { color: var(--gold); }

/* Reveal on scroll (leggero, rispetta reduced-motion).
   Attivo solo con JS (html.js): senza JS il contenuto resta visibile. */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
html.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Rete delle Competenze — accenti verde/rosso del Documento Unico (A6).
   Identità del sito: navy/oro; il verde #1A6B3C e il rosso #C0392B sono
   usati come accenti nelle sezioni della Rete.
   -------------------------------------------------------------------------- */
:root {
  --rete-green: #1A6B3C;
  --rete-green-dark: #14552F;
  --rete-red: #C0392B;
  --rete-soft: rgba(26, 107, 60, .08);
}

.btn-rete {
  background: linear-gradient(135deg, var(--rete-green-dark) 0%, var(--rete-green) 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(26, 107, 60, .3);
}
.btn-rete:hover {
  color: #fff;
  background: linear-gradient(135deg, #0F4124 0%, var(--rete-green-dark) 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(26, 107, 60, .4);
}

.btn-outline-navy {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-outline-navy:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }

.rete-accent { color: var(--rete-green); }
.card-icon--rete { background: var(--rete-soft); color: var(--rete-green); }
.card:hover .card-icon--rete { background: var(--rete-green); color: #fff; }

/* Card cliccabile (settori, notizie) */
.card--link { display: block; color: inherit; text-decoration: none; }
.card--link h3 { color: var(--ink); }
.card-more {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 600;
  font-size: .85rem;
  color: var(--gold-text);
  margin-top: .6rem;
}
.card--link:hover .card-more .bi { transform: translateX(4px); }
.card-more .bi { transition: transform .3s var(--ease); }

.card-media {
  margin: -1.8rem -1.6rem 1.1rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ivory);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Schede settore (9 settori B4) */
.sector-card { border-top: 4px solid var(--sector-color, var(--rete-green)); }
.sector-card .card-icon { background: color-mix(in srgb, var(--sector-color, var(--rete-green)) 12%, #fff); }
.sector-card:hover .card-icon { background: var(--sector-color, var(--rete-green)); color: #fff; }
.sector-badge {
  position: absolute;
  inset-block-start: .9rem;
  inset-inline-end: 1rem;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--sector-color, var(--rete-green));
  opacity: .35;
}
.sector-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--sector-color, var(--rete-green));
  border-radius: 999px;
  padding: .45rem 1.1rem;
}

/* Elenchi di tag (esempi di profili, tipologie) */
.tag-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tag {
  font-size: .8rem;
  font-weight: 600;
  padding: .42rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--body-color);
  text-decoration: none;
}
a.tag:hover { border-color: var(--rete-green); color: var(--rete-green); }
.tag--active { background: var(--rete-green); border-color: var(--rete-green); color: #fff; }
.filter-pills { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Paginazione notizie */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.2rem;
  flex-wrap: wrap;
}
.pagination .meta { font-size: .82rem; color: var(--faint); }

/* --------------------------------------------------------------------------
   Cookie banner granulare (A5/B9)
   -------------------------------------------------------------------------- */
/* l'attributo hidden deve vincere anche su classi con display esplicito
   (es. .btn è inline-flex): senza questa regola i pulsanti del banner
   «nascosti» resterebbero visibili */
[hidden] { display: none !important; }

.cookie-banner {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 1200;
  background: #fff;
  border-top: 3px solid var(--gold);
  box-shadow: 0 -12px 40px rgba(15, 27, 51, .18);
  padding: 1.1rem 1.2rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
}
.cookie-banner-inner { max-width: 880px; margin-inline: auto; }
.cookie-banner-title { font-size: 1.05rem; margin-bottom: .35rem; }
.cookie-banner p { font-size: .88rem; color: var(--muted); margin-bottom: .8rem; }
.cookie-banner-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.cookie-preferences {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: .9rem;
  background: var(--ivory);
}
.cookie-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem .9rem;
}
.cookie-pref-row + .cookie-pref-row { border-top: 1px solid var(--border-soft); }
.cookie-pref-row .form-text { font-size: .78rem; }
.cookie-pref-state {
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--rete-green);
  white-space: nowrap;
}
@media (max-width: 639.98px) {
  .cookie-banner { max-height: 85vh; overflow-y: auto; }
  .cookie-banner-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* Utilità */
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; } .mt-5 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
