/* =====================================================================
   ARTE, Associazione Professionale Arti Terapie — site.css
   One stylesheet, tokens in :root. Flat and square (PM brief, 09/10/2026:
   «similar look, cleaner, flat square cards»): no radius, no drop shadows on
   content, 1px lines and colour bands instead.
   Palette from the Divi theme of the old site: teal #0C566B (header colour,
   headings, buttons), light blue #259FC2 (accents only: 3.1:1 on white, never
   text), deep red #860000 (the old link colour: the «Iscriviti» call to action).
   Fonts: Poppins 600 self-hosted for headings (13 KB, OFL — the old site asked
   Google for 18 weights of it), the system sans for text (no download at all).
   Deploy: C:\siti → git → git-ftp (playbook: git-ftp-deploy.md).
   ===================================================================== */

@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/poppins-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/poppins-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink:        #1B2B30;   /* body text */
  --ink-2:      #45585E;   /* secondary text  6.9:1 on white */
  --ink-3:      #56676C;   /* small muted     5.7:1 on white */
  --teal:       #0C566B;   /* brand: headings, buttons, links  8.1:1 white on it */
  --teal-dark:  #083F4F;
  --teal-deep:  #062F3B;   /* dark surfaces: top bar, footer */
  --sky:        #259FC2;   /* accent bars and rules only */
  --red:        #860000;   /* call to action  10:1 white on it */
  --red-dark:   #6A0000;
  --amber:      #ECA401;   /* tiny accents (focus ring) */
  --tint:       #EDF4F6;   /* light teal surface */
  --paper:      #F7F8F6;
  --line:       #D5E0E4;
  --line-dark:  rgba(255,255,255,.16);
  --ok:         #1C7C4A;
  --err:        #B42318;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Poppins", var(--font);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --sticky-h: 120px;       /* overwritten by site.js with the real header height */
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65;
  color: var(--ink); background: #fff;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.scroll-locked { position: fixed; left: 0; right: var(--sbw, 0); width: auto; overflow: hidden; }
body.scroll-locked .site-header { position: fixed; top: 0; left: 0; right: var(--sbw, 0); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
[id] { scroll-margin-top: calc(var(--sticky-h) + 16px); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.22; letter-spacing: -.01em; margin: 0 0 .6em; color: var(--teal); }
h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 2rem); }
h3 { font-size: 1.22rem; }
h4 { font-size: 1.06rem; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--teal-deep); color: #fff; padding: .7rem 1rem; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* eyebrow: a short light-blue bar + small caps label */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 .8rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal);
}
.eyebrow::before { content: ""; width: 26px; height: 3px; background: var(--sky); flex: none; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.eyebrow--light { color: #fff; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.3rem; border: 2px solid transparent; border-radius: 0;
  font: 600 .98rem/1.2 var(--font-head); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  background: var(--teal); color: #fff; transition: background .18s, color .18s, border-color .18s;
  white-space: nowrap;
}
.btn:hover { background: var(--teal-dark); color: #fff; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn--primary { background: var(--teal); }
.btn--accent { background: var(--red); }
.btn--accent:hover { background: var(--red-dark); }
.btn--dark { background: var(--teal-deep); }
.btn--light { background: #fff; color: var(--teal-deep); }
.btn--light:hover { background: var(--tint); color: var(--teal-deep); }
.btn--ghost { background: transparent; color: var(--teal); border-color: currentColor; }
.btn--ghost:hover { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--ghost-light:hover { background: #fff; color: var(--teal-deep); border-color: #fff; }
.btn--lg { padding: 1rem 1.6rem; font-size: 1.04rem; }
.btn[hidden] { display: none; }
.cta { margin: 1.6rem 0; display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }

/* ---------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 6px 18px rgba(6,47,59,.08); }

.topbar { background: var(--teal-deep); color: rgba(255,255,255,.88); font-size: .85rem; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 38px; }
.topbar p { margin: 0; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar__links { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem 1.2rem; }
.topbar__links a { display: inline-flex; align-items: center; gap: .4rem; }
.topbar__links svg { width: 14px; height: 14px; }
.topbar .social { display: none; }
@media (min-width: 700px) { .topbar .social { display: flex; } }
@media (max-width: 479.98px) { .topbar__links a:first-child { display: none; } }

.social { display: flex; gap: .4rem; margin: 0; }
.social a { width: 32px; height: 32px; display: grid; place-items: center; color: inherit; }
.social svg { width: 17px; height: 17px; }
.topbar .social a { width: 28px; height: 28px; }
.topbar .social svg { width: 15px; height: 15px; }

.site-header__inner { display: flex; align-items: center; gap: 1.2rem; min-height: 84px; }
.brand { display: block; flex: none; padding-block: 8px; }
.brand__img { width: 128px; height: auto; }
@media (min-width: 700px) { .brand__img { width: 150px; } }

/* The MIMIT line from the old header (Law 4/2013), a quiet strip under the bar. */
.mimit { background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--ink-2); }
.mimit p { margin: 0; padding-block: .4rem; line-height: 1.4; }
.mimit a { color: var(--teal); }

/* nav toggle (real <button>) */
.nav-toggle {
  margin-left: auto; width: 48px; height: 48px; display: inline-grid; place-items: center;
  background: var(--teal); border: 0; border-radius: 0; cursor: pointer; color: #fff;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: currentColor; position: relative; transition: transform .2s, background .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.nav__list, .nav__sub { list-style: none; margin: 0; padding: 0; }
.nav__link { text-decoration: none; color: var(--ink); font-family: var(--font-head); font-weight: 600; white-space: nowrap; }
.nav__sub a { text-decoration: none; }

/* --- mobile drawer (default) --- */
@media (max-width: 1139.98px) {
  .nav {
    position: fixed; inset: var(--sticky-h) 0 0 0; z-index: 49; display: none;
    background: var(--teal-deep); overflow-y: auto; overscroll-behavior: contain; padding: .5rem 0 2rem;
  }
  .nav.is-open { display: block; }
  .nav__item { border-bottom: 1px solid var(--line-dark); display: flex; flex-wrap: wrap; align-items: stretch; }
  .nav__link { flex: 1; display: flex; align-items: center; min-height: 54px; padding: .4rem var(--gutter); color: #fff; font-size: 1.05rem; }
  .nav__link svg { display: none; }
  .nav__item.is-active > .nav__link { box-shadow: inset 4px 0 0 var(--sky); }
  .nav__sub-toggle {
    width: 60px; flex: none; background: transparent; border: 0; border-left: 1px solid var(--line-dark);
    color: #fff; cursor: pointer; display: grid; place-items: center;
  }
  .nav__sub-toggle svg { width: 14px; transition: transform .2s; }
  .nav__sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .nav__sub { display: none; width: 100%; background: rgba(0,0,0,.2); padding: .3rem 0 .6rem; }
  .nav__item.is-expanded > .nav__sub { display: block; }
  .nav__sub a { display: block; padding: .65rem calc(var(--gutter) + 1rem); color: rgba(255,255,255,.9); }
  .nav__sub a[aria-current="page"] { color: #fff; font-weight: 700; text-decoration: underline; }
  .nav__sub-overview { display: none; }
}

/* --- desktop: inline list + dropdowns from the same markup --- */
@media (min-width: 1140px) {
  .nav-toggle, .nav__sub-toggle { display: none; }
  .nav { margin-left: auto; }
  .nav__list { display: flex; align-items: stretch; }
  .nav__item { position: relative; display: flex; }
  .nav__link { display: inline-flex; align-items: center; gap: .3rem; padding: 0 .62rem; min-height: 84px; font-size: .9rem; position: relative; }
  .nav__link::after { content: ""; position: absolute; left: .62rem; right: .62rem; bottom: 22px; height: 3px; background: var(--sky); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
  .nav__item:hover > .nav__link::after, .nav__item.is-active > .nav__link::after, .nav__link:focus-visible::after { transform: scaleX(1); }
  .nav__item.is-active > .nav__link { color: var(--teal); }
  .nav__link svg { width: 10px; transition: transform .2s; }
  .nav__sub {
    position: absolute; top: 100%; left: 0; min-width: 280px; background: #fff; padding: .4rem 0;
    border: 1px solid var(--line); border-top: 3px solid var(--teal); display: none;
  }
  .nav__sub a { display: block; padding: .55rem 1.1rem; color: var(--ink); font-size: .93rem; }
  .nav__sub a:hover, .nav__sub a[aria-current="page"] { background: var(--tint); color: var(--teal); }
  .nav__item--has-sub:focus-within > .nav__sub { display: block; }
  @media (hover: hover) {
    .nav__item--has-sub:hover > .nav__sub { display: block; }
    .nav__item--has-sub:hover > .nav__link svg { transform: rotate(180deg); }
  }
  .nav__item:last-child .nav__sub, .nav__item:nth-last-child(2) .nav__sub { left: auto; right: 0; }
  .nav__sub-overview { border-bottom: 1px solid var(--line); margin-bottom: .3rem; padding-bottom: .3rem; }
  .nav__sub-overview a { font-weight: 700; color: var(--teal); }
}
@media (min-width: 1140px) and (max-width: 1259.98px) { .nav__link { padding: 0 .45rem; font-size: .85rem; } .nav__link::after { left: .45rem; right: .45rem; } .brand__img { width: 130px; } }

/* ---------------------------------------------------------------- home */
.home-hero {
  color: #fff; position: relative; overflow: hidden;
  background: var(--teal);   /* fallback */
  background: linear-gradient(115deg, var(--teal-deep) 0%, var(--teal) 52%, color-mix(in srgb, var(--teal) 78%, var(--sky)) 100%);
}
.home-hero .container { position: relative; z-index: 1; }
/* abstract decoration at the edges (flat, square: no curves, no shadows) */
.home-hero__art { position: absolute; color: var(--sky); pointer-events: none; height: auto; }
.home-hero__art--left { width: clamp(150px, 20vw, 260px); left: max(-40px, calc(50% - 760px)); bottom: -36px; }
.home-hero__art--right { width: clamp(170px, 23vw, 300px); right: max(-50px, calc(50% - 780px)); top: -10px; }
@media (max-width: 699.98px) { .home-hero__art { opacity: .55; } .home-hero__art--left { left: -125px; } .home-hero__art--right { right: -120px; } }
.home-hero::before { content: ""; position: absolute; inset: auto 0 0 0; height: 6px; background: var(--sky); }
.home-hero .container { padding-block: clamp(2.6rem, 6vw, 4.6rem); }
.home-hero__quote { margin: 0 auto; max-width: 900px; text-align: center; }
.home-hero__quote p { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.25rem, 1rem + 1.4vw, 2rem); line-height: 1.35; margin: 0; }

.split { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 900px) { .split--intro { grid-template-columns: minmax(0, 1fr) 300px; gap: 4rem; } }
.intro-aside { display: grid; justify-items: center; gap: 1.6rem; padding: 2rem 1.5rem; border: 1px solid var(--line); border-top: 4px solid var(--teal); }
.intro-aside__logo { width: 220px; }

/* ---------------------------------------------------------------- sections */
.section { padding-block: clamp(2.6rem, 6vw, 4.5rem); }
.section--tint { background: var(--tint); }
.section--flush { padding-top: 0; }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 1.5rem; margin-bottom: 1.8rem; }
.section__head h2 { margin: 0; }
.section__more { font-family: var(--font-head); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.section__more svg { width: 18px; height: 18px; transition: transform .2s; }
.section__more:hover svg { transform: translateX(3px); }

/* ---------------------------------------------------------------- cards (flat, square) */
/* Collapsed 1px borders (each card overlaps its neighbour by 1px): an odd card count
   leaves white space, not a grey block. */
.cards { display: grid; gap: 0; padding: 0 1px 1px 0; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { display: flex; flex-direction: column; gap: .5rem; padding: 1.5rem 1.4rem; background: #fff; text-decoration: none; color: var(--ink); position: relative; transition: background .18s; border: 1px solid var(--line); margin: 0 -1px -1px 0; }
.card::before { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 100%; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.card:hover { background: var(--paper); color: var(--ink); }
.card:hover::before, .card:focus-visible::before { transform: scaleX(1); }
.card h3 { margin: 0; font-size: 1.12rem; }
.card p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.card__more { margin-top: auto; padding-top: .5rem; font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--teal); display: inline-flex; align-items: center; gap: .35rem; }
.card__more svg { width: 16px; height: 16px; }

/* posts */
.posts { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .posts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .posts { grid-template-columns: repeat(3, 1fr); } .posts--4 { grid-template-columns: repeat(4, 1fr); } }
.post-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); transition: border-color .18s; }
.post-card:hover { border-color: var(--teal); color: var(--ink); }
.post-card__img { overflow: hidden; background: var(--tint); aspect-ratio: 16 / 10; }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card__img--empty { display: grid; place-items: center; background: var(--teal); color: rgba(255,255,255,.5); font: 600 1.6rem var(--font-head); letter-spacing: .1em; }
.post-card:hover .post-card__img img { transform: scale(1.04); }
.post-card__body { padding: 1rem 1.15rem 1.25rem; border-top: 4px solid var(--teal); }
.post-card__meta { font-size: .8rem; color: var(--ink-3); margin: 0 0 .35rem; }
.post-card__title { font-size: 1.04rem; margin: 0; line-height: 1.35; color: var(--teal); }
.post-card:hover .post-card__title { color: var(--red); }

.tabs { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 2rem; border-bottom: 2px solid var(--teal); }
.tabs a { padding: .65rem 1.1rem; text-decoration: none; color: var(--ink); font-family: var(--font-head); font-weight: 600; font-size: .92rem; }
.tabs a[aria-current="page"] { background: var(--teal); color: #fff; }
.tabs a:hover { background: var(--tint); color: var(--teal); }
.tabs a[aria-current="page"]:hover { background: var(--teal); color: #fff; }
.pager { display: flex; justify-content: center; gap: .4rem; margin-top: 2.6rem; flex-wrap: wrap; }
.pager a, .pager span { min-width: 44px; height: 44px; display: grid; place-items: center; padding: 0 .6rem; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; }
.pager span[aria-current] { background: var(--teal); color: #fff; border-color: var(--teal); }
.pager a:hover { border-color: var(--teal); color: var(--teal); }

.note-box { margin: 2rem 0 0; padding: 1rem 1.2rem; background: var(--tint); border-left: 4px solid var(--teal); }
.note-box p:last-child { margin-bottom: 0; }
.note-box--wide { padding: 1.4rem 1.5rem; }
.note-box__icon svg { width: 28px; height: 28px; color: var(--teal); }

/* ---------------------------------------------------------------- page header */
.page-hero { position: relative; background: var(--teal-deep); color: #fff; overflow: hidden; }
.page-hero__media { position: absolute; inset: 0; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.page-hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,47,59,.82) 0%, rgba(6,47,59,.6) 55%, rgba(6,47,59,.2) 100%); }
@media (max-width: 760px) { .page-hero__media::after { background: rgba(6,47,59,.72); } }
.page-hero__inner { position: relative; padding-block: clamp(2.6rem, 6vw, 4.5rem); max-width: 860px; }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero__sub { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); color: rgba(255,255,255,.92); margin: 0; }
.page-hero__tag { margin: .8rem 0 0; color: rgba(255,255,255,.85); }

.page-intro { padding-top: clamp(2.2rem, 5vw, 3.4rem); }
.page-intro__inner { max-width: 860px; padding-bottom: clamp(1.4rem, 3vw, 2rem); border-bottom: 1px solid var(--line); position: relative; }
.page-intro__inner::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 64px; height: 3px; background: var(--sky); }
.page-intro h1 { margin-bottom: .3em; }
.page-intro__sub { font-size: clamp(1.05rem, 1rem + .4vw, 1.22rem); color: var(--ink-2); margin: 0; }
.page-intro__tag { color: var(--ink-3); margin: .5rem 0 0; }
.page-intro + .page-body, .page-intro + .section { padding-top: clamp(1.8rem, 4vw, 2.6rem); }

/* ---------------------------------------------------------------- page body */
.page-body { padding-block: clamp(2.4rem, 5vw, 4rem); }
.page-grid { display: grid; gap: 2.5rem; }
@media (min-width: 1000px) { .page-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 4rem; } }
.page-grid.page-grid--narrow { max-width: 860px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .page-grid--contact { grid-template-columns: minmax(0, 1fr) 360px; } }

.prose { font-size: 1.04rem; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.7em; }
.prose h4 { margin-top: 1.4em; }
:is(h2, h3, h4).hx-3 { font-size: 1.22rem; margin-top: 1.7em; }
:is(h2, h3, h4).hx-4 { font-size: 1.06rem; margin-top: 1.4em; }
:is(h2, h3, h4, h5).hx-5, :is(h2, h3, h4, h5).hx-6 { font-size: .9em; letter-spacing: 0; line-height: inherit; margin: 1.5em 0 .6em; }
.prose > [class^="hx-"]:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose li::marker { color: var(--teal); }
.prose strong { font-weight: 700; }
.prose blockquote { margin: 1.8rem 0; padding: 1.1rem 1.4rem; border-left: 4px solid var(--teal); background: var(--tint); font-style: italic; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose .figure { margin: 2rem 0; }
.prose .figure img { width: auto; max-width: 100%; max-height: 640px; }
.prose > .figure:first-child { margin-top: 0; }
.prose > .figure:first-child img { max-height: none; }
/* two photos on one row, a hairline seam between them */
.figure-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 2rem 0; }
.prose .figure-pair .figure { margin: 0; }
.prose .figure-pair img { width: 100%; height: 100%; max-height: none; object-fit: cover; }

/* «sections» pages: intro, then the body's <h2> sections two per row (templates/sections.php) */
.sections__intro { max-width: 860px; }
.sections__lead { font-family: var(--font-head); font-weight: 600; color: var(--teal); font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); line-height: 1.4; }
.sections__grid { display: grid; gap: 1.5rem; margin-top: clamp(2.2rem, 5vw, 3.4rem); }
@media (min-width: 900px) { .sections__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; } .sections__item--full { grid-column: 1 / -1; } }
.sections__item { background: var(--tint); border-top: 4px solid var(--teal); padding: clamp(1.3rem, 3vw, 2.2rem); }
.sections__item--full { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--sky); }
.sections__item .prose > h2:first-child { margin-top: 0; }
.sections__item h3 { margin-top: .2em; color: var(--ink-2); }
.prose table { border-collapse: collapse; width: 100%; margin: 1.5rem 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .6rem .8rem; text-align: left; vertical-align: top; }
.prose th { background: var(--tint); }
.prose a { word-break: break-word; }
.prose .ta-center { text-align: center; } .prose .ta-right { text-align: right; }
.prose--legal { font-size: 1rem; }
.prose--legal h2 { font-size: 1.3rem; }
.prose--legal h3 { font-size: 1.1rem; }
.prose--lead { max-width: 860px; margin-bottom: 2rem; color: var(--ink-2); }

/* accordions (WP toggle/accordion → <details>) */
.prose details { border: 1px solid var(--line); border-top: 3px solid var(--teal); margin: 0 0 1rem; background: #fff; }
.prose details > summary { list-style: none; cursor: pointer; padding: 1rem 3rem 1rem 1.2rem; font-family: var(--font-head); font-weight: 600; color: var(--teal); position: relative; }
.prose details > summary::-webkit-details-marker { display: none; }
.prose details > summary::after { content: ""; position: absolute; right: 1.2rem; top: 50%; width: 11px; height: 11px; margin-top: -8px; border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(45deg); transition: transform .2s; }
.prose details[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.prose details > :not(summary) { padding-inline: 1.2rem; }
.prose details > :last-child { padding-bottom: 1rem; }

/* document rows (statute, minutes, brochures: the old «Scarica» buttons) */
.prose .doc { margin: 0; }
.prose .doc + .doc .doc__link { border-top: 0; }
.doc__link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem 1rem; padding: .85rem 1rem .85rem 2.8rem; border: 1px solid var(--line); text-decoration: none; color: var(--ink); position: relative; transition: background .15s; }
.doc__link::before { content: ""; position: absolute; left: 1rem; top: 50%; width: 18px; height: 22px; margin-top: -11px; border: 2px solid var(--teal); border-top-right-radius: 0; background: linear-gradient(225deg, var(--teal) 0 5px, transparent 5px); }
.doc__link:hover { background: var(--tint); color: var(--ink); }
.doc__title { font-weight: 600; }
.doc__meta { font-size: .82rem; color: var(--ink-3); white-space: nowrap; }
.prose .doc:last-of-type + :not(.doc) { margin-top: 1.6rem; }
.prose .linkrow { margin: 0; }
.prose .linkrow a { display: block; padding: .8rem 1rem; border: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.prose .linkrow + .linkrow a { border-top: 0; }
.prose .linkrow a:hover { background: var(--tint); }

/* self-hosted video (the webinar) */
.video-file { margin: 1.8rem 0; background: #000; }
.video-file video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }

/* sidebar: the section's pages */
.aside { align-self: start; border: 1px solid var(--line); border-top: 4px solid var(--teal); padding: 1.2rem 1.3rem; }
.aside__title { font-family: var(--font-head); font-weight: 600; margin: 0 0 .6rem; }
.aside__title a { text-decoration: none; }
.aside__list { list-style: none; margin: 0; padding: 0; }
.aside__list li + li { border-top: 1px solid var(--line); }
/* Links: a tint and an arrow that slides in on hover/focus (PM, 14/10/2026). The row bleeds a
   little into the box's padding so the tint is not cramped against the text. */
.aside__list a {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  padding: .55rem .55rem; margin: 0 -.55rem; text-decoration: none; color: var(--ink); font-size: .95rem;
  transition: background-color .15s, color .15s, padding-left .15s;
}
.aside__list a::after {
  content: "→"; content: "→" / ""; flex: none; color: var(--teal); font-weight: 700;   /* decorative: no alt text */
  opacity: 0; transform: translateX(-6px); transition: opacity .15s, transform .15s;
}
.aside__list a:hover, .aside__list a:focus-visible { background: var(--tint); color: var(--teal); padding-left: .8rem; }
.aside__list a:hover::after, .aside__list a:focus-visible::after { opacity: 1; transform: none; }
.aside__list a[aria-current="page"] { color: var(--teal); font-weight: 700; box-shadow: inset 3px 0 0 var(--teal); padding-left: .8rem; }
.aside__list a[aria-current="page"]::after { content: "•"; content: "•" / ""; opacity: 1; transform: none; }

/* posts */
.post-grid { display: grid; gap: 2rem; }
@media (min-width: 900px) { .post-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 3.5rem; align-items: start; } .post-grid--nocover { grid-template-columns: minmax(0, 860px); } }
.post-cover { margin: 0; }
.post-cover img { width: 100%; border: 1px solid var(--line); }
@media (max-width: 899.98px) { .post-cover { order: -1; } }

.post-nav { display: grid; gap: 1rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
@media (min-width: 700px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav a { display: block; padding: 1rem 1.2rem; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
.post-nav a:hover { border-color: var(--teal); }
.post-nav small { display: block; color: var(--ink-3); font-weight: 600; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .3rem; }
.post-nav__next { text-align: right; }

/* contact card */
.contact-card { display: grid; gap: 1rem; align-content: start; padding: 1.4rem; border: 1px solid var(--line); border-top: 4px solid var(--teal); }
.contact-card__title { font-size: 1.15rem; margin: 0 0 .2rem; }
.contact-card__row { display: grid; grid-template-columns: 24px 1fr; gap: .7rem; align-items: start; font-size: .95rem; }
.contact-card__row svg { width: 20px; height: 20px; color: var(--teal); margin-top: .15rem; }
.contact-card__label { display: block; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.contact-card__row a { font-weight: 600; text-decoration: none; word-break: break-word; }

/* ---------------------------------------------------------------- form */
.form-block { margin-top: 2rem; padding: clamp(1.3rem, 3vw, 2rem); background: var(--tint); border-top: 4px solid var(--teal); }
.prose + .form-block { margin-top: 2.4rem; }
.form-block h2 { font-size: 1.35rem; }
.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: .35rem; align-content: start; }   /* a hint in the next column must not stretch this one */
.field__label { font-weight: 700; font-size: .92rem; }
.field__hint { color: var(--ink-3); font-size: .85rem; }
.req { color: var(--red); }
.field input[type="text"], .field input[type="email"], .field input[type="file"], .field textarea {
  width: 100%; font: inherit; padding: .7rem .8rem; border: 1px solid #A9BCC2; border-radius: 0; background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: 3px solid var(--amber); outline-offset: 0; border-color: var(--teal); }
.field textarea { resize: vertical; min-height: 140px; }
.field--check { grid-template-columns: auto 1fr; align-items: start; gap: .6rem; font-size: .93rem; }
.field--check input { width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--teal); }
.field--captcha__row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.field--captcha__row input { max-width: 7rem; }
.field--captcha__row small { color: var(--ink-3); }
.form .btn { justify-self: start; }
.alert { padding: 1rem 1.2rem; margin-bottom: 1.2rem; border-left: 4px solid; background: #fff; }
.alert--ok { border-color: var(--ok); }
.alert--err { border-color: var(--err); }
.alert ul { margin: .4rem 0 0; padding-left: 1.2rem; }
/* honeypot */
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--teal-deep); color: rgba(255,255,255,.85); font-size: .93rem; margin-top: clamp(2rem, 5vw, 4rem); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer__grid { display: grid; gap: 2.4rem; padding-block: clamp(2.6rem, 5vw, 4rem) 2rem; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.1fr 1fr 1fr; } }
.footer__logo { width: 96px; margin-bottom: 1rem; background: #fff; padding: 8px; }
.footer__name { font-family: var(--font-head); font-weight: 600; color: #fff; margin-bottom: .6rem; }
.footer__brand p { margin-bottom: .6rem; }
.footer__brand .social { margin-top: .8rem; margin-left: -6px; }
.footer__title { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin: 0 0 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--sky); display: inline-block; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer__emails { margin: 0; display: grid; gap: .6rem; }
.footer__emails dt { font-size: .78rem; color: rgba(255,255,255,.7); }
.footer__emails dd { margin: 0; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 2rem; padding-block: 1.2rem 1.6rem; border-top: 1px solid var(--line-dark); font-size: .84rem; color: rgba(255,255,255,.7); }
.footer__bottom p { margin: 0; }

/* ---------------------------------------------------------------- dialogs (privacy sheet) */
.sheet { border: 0; padding: 0; width: min(760px, 100vw - 24px); max-height: 88svh; background: #fff; color: var(--ink); }
.sheet::backdrop { background: rgba(6,47,59,.6); }
.sheet__box { display: flex; flex-direction: column; max-height: 88svh; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); }
.sheet__title { margin: 0; font-size: 1.2rem; }
.sheet__close { width: 40px; height: 40px; border: 0; background: var(--tint); cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.sheet__close svg { width: 16px; }
.sheet__body { overflow-y: auto; padding: 1.2rem 1.3rem; }
.sheet__foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1.3rem; border-top: 1px solid var(--line); font-size: .9rem; }
@media (max-width: 699.98px) { .sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; } }

/* 404 */
.error-page { text-align: center; padding-block: clamp(3.5rem, 9vw, 7rem); }
.error-page__code { font: 600 clamp(4rem, 12vw, 7rem)/1 var(--font-head); color: var(--teal); margin-bottom: .5rem; }
.error-page__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }

/* ---------------------------------------------------------------- consent-gated YouTube */
.embed { position: relative; margin: 1.8rem 0; background: var(--teal-deep); color: rgba(255,255,255,.9); aspect-ratio: 16 / 9; overflow: hidden; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed__consent { position: absolute; inset: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .35rem; padding: 1.2rem; background: var(--teal-deep); }
.embed__icon { width: 52px; height: 52px; color: #fff; border: 2px solid rgba(255,255,255,.7); padding: 8px; flex: none; margin-bottom: .3rem; }
.embed__title { font-weight: 700; color: #fff; font-size: 1.05rem; margin: 0; }
.embed__lead { font-size: .9rem; max-width: 44ch; margin: 0; }
.embed__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: .5rem 0 .2rem; }
.embed__actions .btn { padding: .6rem 1rem; font-size: .86rem; }
.embed__small { font-size: .76rem; line-height: 1.45; color: rgba(255,255,255,.75); max-width: 52ch; margin: 0; }
.embed__small a { color: #fff; }

.consent-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 3px solid var(--teal); box-shadow: 0 -8px 30px rgba(6,47,59,.15); }
.consent-bar[hidden] { display: none; }
.consent-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .9rem 2rem; padding-block: 1rem; }
.consent-bar__text { margin: 0; font-size: .92rem; color: var(--ink-2); max-width: 70ch; }
.consent-bar__text strong { color: var(--ink); }
.consent-bar__actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.consent-bar__actions .btn { min-width: 150px; }
@media (max-width: 599.98px) { .consent-bar__actions { width: 100%; } .consent-bar__actions .btn { flex: 1; min-width: 0; } }
body { padding-bottom: var(--consent-h, 0px); }

.consent-control { border: 1px solid var(--line); border-left: 4px solid var(--teal); padding: 1.2rem 1.4rem; margin: 1.5rem 0; background: var(--tint); }
.consent-control p { margin: 0 0 .8rem; }
.consent-control__actions { display: flex; gap: .6rem; flex-wrap: wrap; }

.section[id] { scroll-margin-top: calc(var(--sticky-h) - 1px); }

/* =====================================================================
   MEMBERS' AREA (phase 2)
   ===================================================================== */
/* min-height = a text input's (browsers ignore line-height on select) */
.field select { width: 100%; font: inherit; padding: .7rem .8rem; min-height: calc(1lh + 1.4rem + 2px); border: 1px solid #A9BCC2; border-radius: 0; background: #fff; color: var(--ink); }
.field select:focus { outline: 3px solid var(--amber); outline-offset: 0; border-color: var(--teal); }
.field input[type="password"], .field input[type="date"], .field input[type="tel"], .field input[type="search"], .field input[type="url"] {
  width: 100%; font: inherit; padding: .7rem .8rem; border: 1px solid #A9BCC2; border-radius: 0; background: #fff; color: var(--ink);
}
.form__group { border: 0; padding: 0; margin: 0 0 .4rem; display: grid; gap: 1.1rem; }
.form__group legend { font-family: var(--font-head); font-weight: 600; color: var(--teal); font-size: 1.05rem; padding: 0; margin-bottom: .8rem; border-bottom: 2px solid var(--line); width: 100%; padding-bottom: .3rem; }
@media (min-width: 760px) { .form__row--3 { grid-template-columns: 2fr 2fr 1fr; } }
.form-block--account { max-width: 560px; }
.form-block--plain { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--teal); margin-top: 0; }
.form-block__links { margin: 1.2rem 0 0; font-size: .92rem; }
.account-grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 900px) { .account-grid { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 3.5rem; } }
.account-side { font-size: .98rem; color: var(--ink-2); }
/* Members' area side column: the menu, then (reserved home) the association's contacts. */
.account-nav .aside__title { padding-bottom: .55rem; margin-bottom: .5rem; border-bottom: 2px solid var(--teal); }
.page-aside { align-self: start; display: grid; gap: 1.2rem; }
.aside--extra { font-size: .92rem; border-top-color: var(--sky); }
.aside--extra h2, .aside--extra h3, .aside--extra h4 { font-size: 1rem; margin: 1.1rem 0 .4rem; }
.aside--extra > :first-child { margin-top: 0; }
.aside--extra p { margin: 0 0 .55rem; }
.aside--extra a { overflow-wrap: anywhere; }
/* Paid / not paid (Il mio profilo) */
.status { font-weight: 700; }
.status::before { content: ""; display: inline-block; width: .6em; height: .6em; margin-right: .4em; vertical-align: .05em; background: currentColor; }
.status--ok { color: var(--ok); }
.status--no { color: var(--err); }
.h-small { font-size: 1.15rem; margin: 2rem 0 .8rem; }

/* profile card + facts */
.profile-card { display: grid; grid-template-columns: 120px 1fr; gap: 1.4rem; align-items: start; margin-bottom: 1.6rem; }
@media (min-width: 640px) { .profile-card { grid-template-columns: 160px 1fr; } }
.profile-card__photo { aspect-ratio: 1; overflow: hidden; background: var(--tint); border: 1px solid var(--line); }
.profile-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-card__photo--empty { display: grid; place-items: center; background: var(--teal); color: rgba(255,255,255,.85); font: 600 2.2rem var(--font-head); }
.profile-card__name { margin: 0 0 .2rem; }
.profile-card__tipo { color: var(--ink-2); margin: 0 0 .6rem; }
.facts { display: grid; gap: .1rem; margin: 0 0 1.4rem; }
.facts > div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding-top: .15rem; }
.facts dd { margin: 0; word-break: break-word; }
.facts--muted { margin-top: 1.4rem; }
@media (max-width: 480px) { .facts > div { grid-template-columns: 1fr; gap: .1rem; } }

/* tables */
.table-simple { border-collapse: collapse; width: 100%; font-size: .95rem; margin-bottom: 1rem; }
.table-simple th, .table-simple td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); }
.table-simple th { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); border-bottom: 2px solid var(--teal); }
.table-simple td:last-child, .table-simple th:last-child { text-align: right; }
.table-simple--regions { max-width: 640px; }

/* registry */
.filters { display: grid; gap: 1rem; padding: 1.2rem; background: var(--tint); border-top: 4px solid var(--teal); margin-bottom: 1.4rem; align-items: end; }
@media (min-width: 760px) { .filters { grid-template-columns: 2fr 1.4fr 1.4fr 1.4fr auto; } }
.filters .field__label { font-size: .85rem; }
.filters__actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.results-count { color: var(--ink-2); margin: 0 0 1rem; }
.members-grid { display: grid; gap: 0; padding: 0 1px 1px 0; }
@media (min-width: 640px) { .members-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .members-grid { grid-template-columns: repeat(3, 1fr); } }
.member-card { display: grid; grid-template-columns: 72px 1fr; gap: 1rem; align-items: center; padding: 1rem; background: #fff; border: 1px solid var(--line); margin: 0 -1px -1px 0; text-decoration: none; color: var(--ink); position: relative; }
.member-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--teal); transform: scaleY(0); transform-origin: top; transition: transform .2s; }
.member-card:hover { background: var(--paper); color: var(--ink); }
.member-card:hover::before, .member-card:focus-visible::before { transform: scaleY(1); }
.member-card__photo { width: 72px; height: 72px; overflow: hidden; background: var(--tint); }
.member-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.member-card__photo--empty { display: grid; place-items: center; background: var(--teal); color: rgba(255,255,255,.85); font: 600 1.2rem var(--font-head); }
.member-card__body { display: grid; gap: .1rem; min-width: 0; }
.member-card__name { font-family: var(--font-head); font-weight: 600; color: var(--teal); line-height: 1.3; }
.member-card__tipo { font-size: .88rem; color: var(--ink); }
.member-card__place { font-size: .85rem; color: var(--ink-3); }

/* delegation */
.deleg-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 2rem; margin-bottom: 1.6rem; }
.deleg-head p { margin: 0; }
.deleg-head__stat strong { font: 600 1.6rem var(--font-head); color: var(--teal); margin-right: .3rem; }
.deleg-head__regions { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { display: inline-block; padding: .25rem .6rem; border: 1px solid var(--line); text-decoration: none; font-size: .88rem; color: var(--ink); background: #fff; }
.tag:hover { border-color: var(--teal); color: var(--teal); }

/* Italy map */
.italy-map { display: grid; gap: 2rem; align-items: start; margin: 0 0 2rem; }
@media (min-width: 860px) { .italy-map { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 3rem; } }
.italy-map__svg { width: 100%; height: auto; display: block; }
.italy-map__region { fill-opacity: .55; stroke: #fff; stroke-width: 6; transition: fill-opacity .15s; }
.italy-map__region.is-empty { fill-opacity: .18; }
.italy-map a:hover .italy-map__region, .italy-map a:focus .italy-map__region { fill-opacity: .95; }
.italy-map a:focus { outline: none; }
.italy-map a:focus-visible .italy-map__region { stroke: var(--amber); stroke-width: 24; }
.italy-map__total { font-size: 1.05rem; }
.italy-map__total strong { font: 600 1.8rem var(--font-head); color: var(--teal); }
.legend { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.legend li { display: flex; align-items: center; gap: .6rem; }
.legend__swatch { width: 18px; height: 18px; flex: none; opacity: .75; }
.legend__n { margin-left: auto; font-weight: 700; color: var(--ink-2); }
