/*
Theme Name: Studio Legale Amatucci
Description: Tema per il sito dello Studio Legale Avv. Alessandra Amatucci
Version: 1.0
Text Domain: amatucci
*/

:root {
  --bordeaux: #5e0f1a;
  --bordeaux-dark: #45090f;
  --cream: #faf6ef;
  --sand: #f1ebe0;
  --gold: #b08a4e;
  --laurel: #8a6a3a;
  --ink: #2a2220;
  --muted: #6d625c;
  --line: #e2d9ca;
  --serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --body: "EB Garamond", Georgia, serif;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: var(--body); font-size: 19px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--bordeaux); text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--bordeaux-dark); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.eyebrow { font-family: var(--body); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--bordeaux); font-weight: 600; margin-bottom: 1rem; display: block; }
.rule { width: 56px; height: 2px; background: var(--gold); border: 0; margin: 1.4rem 0; }
.more { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 2px; white-space: nowrap; }
.more::after { content: " →"; }
.btn { display: inline-block; background: var(--bordeaux); color: #fff; padding: .95rem 1.7rem; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; text-decoration: none; transition: background .2s; }
.btn:hover { background: var(--bordeaux-dark); color: #fff; }
.btn--ghost { background: transparent; border: 1px solid rgba(255,255,255,.7); }
.btn--ghost:hover { background: rgba(255,255,255,.12); }

/* Header */
.site-header { background: var(--cream); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--bordeaux); }
.brand svg { width: 84px; height: auto; flex: none; }
.brand__t { display: flex; flex-direction: column; line-height: 1.15; }
.brand__t b { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; letter-spacing: .2em; text-transform: uppercase; }
.brand__t .brand__n { font-family: var(--serif); font-size: 1.2rem; color: var(--bordeaux); font-weight: 500; }
.brand__t .brand__r { font-family: var(--serif); font-size: .95rem; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.brand__r::before, .brand__r::after { content: ""; width: 14px; height: 1px; background: var(--muted); opacity: .7; }
.nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 26px; margin: 0; padding: 0; }
.nav a { text-decoration: none; color: var(--ink); font-size: .95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav .current-menu-item > a { color: var(--bordeaux); border-bottom-color: var(--bordeaux); }
.nav { display: flex; align-items: center; gap: 22px; }
.search { position: relative; }
.search summary { list-style: none; cursor: pointer; color: var(--bordeaux); display: flex; padding: 6px; }
.search summary::-webkit-details-marker { display: none; }
.search form { position: absolute; right: 0; top: 100%; margin-top: 10px; background: #fff; border: 1px solid var(--line); padding: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.08); z-index: 60; }
.search input { border: 1px solid var(--line); padding: 8px 12px; font: inherit; font-size: .95rem; width: 240px; background: var(--cream); }
.nav-toggle, .nav-btn { display: none; }

/* Hero */
.hero { position: relative; overflow: hidden; background:
  radial-gradient(circle at 85% 40%, rgba(176,138,78,.22), transparent 55%),
  linear-gradient(100deg, var(--cream) 40%, #e9dfcc 100%); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; min-height: 480px; gap: 40px; padding-block: 70px; }
.hero__kicker { color: var(--gold); font-size: .85rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; margin-bottom: 1.2rem; }
.hero h1 { text-transform: uppercase; letter-spacing: .02em; margin-bottom: .3em; }
.hero__name { font-family: var(--serif); font-size: 1.7rem; margin: 0; }
.hero__mark { color: var(--bordeaux); opacity: .1; justify-self: center; width: min(380px, 100%); }
.hero__mark svg { width: 100%; height: auto; }

/* Blocchi */
.band { display: grid; grid-template-columns: 1fr 1.3fr; }
.band__a { background: var(--bordeaux); color: #fff; padding: 56px max(20px, calc((100vw - var(--wrap)) / 2)); display: flex; flex-direction: column; justify-content: center; }
.band__a h2 { color: #fff; margin: 0; }
.band__b { padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; gap: 12px; align-items: flex-start; }
.section { padding: 80px 0; }
.section--sand { background: var(--sand); }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section__head h2 { margin: 0; max-width: 620px; }

.areas { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.areas a { padding: 30px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 1.3rem; line-height: 1.25; transition: background .2s, color .2s; display: block; }
.areas a::before { content: ""; display: block; width: 28px; height: 2px; background: var(--gold); margin-bottom: 14px; }
.areas a:hover { background: var(--bordeaux); color: #fff; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.card { background: #fff; border: 1px solid var(--line); padding: 28px 26px 24px; display: flex; flex-direction: column; gap: 10px; }
.card__meta { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.card h3 { font-size: 1.35rem; margin: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--bordeaux); }
.card p { font-size: .95rem; color: var(--muted); margin: 0; flex: 1; }
.card .more { align-self: flex-start; margin-top: 6px; }

.contact-band { background: linear-gradient(120deg, var(--bordeaux-dark), var(--bordeaux)); color: #fff; padding: 70px 0; }
.contact-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.contact-band h2 { color: #fff; margin: 0; max-width: 640px; }

/* Pagine interne */
.page-head { background: linear-gradient(100deg, var(--cream) 30%, #ebe1cf 100%); padding: 70px 0 56px; border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 0; max-width: 820px; }
.page-head p { color: var(--muted); max-width: 680px; margin: 1rem 0 0; }
.content { padding: 56px 0 80px; }
.content .wrap { max-width: 860px; }
.content--wide .wrap { max-width: var(--wrap); }
.content h2 { margin-top: 1.6em; }
.entry img { height: auto; }
.collab { border-left: 3px solid var(--gold); background: var(--sand); padding: 22px 26px; margin: 2rem 0; }
.collab p { margin: 0; }

.area-item { padding: 34px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 110px; }
.area-item:first-child { padding-top: 0; }
.area-item h2 { margin-top: 0; }

.filters { display: flex; gap: 8px 24px; flex-wrap: wrap; align-items: center; margin-bottom: 36px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.filters a { text-decoration: none; color: var(--ink); font-size: .95rem; padding-bottom: 12px; margin-bottom: -15px; border-bottom: 2px solid transparent; }
.filters a.on, .filters a:hover { color: var(--bordeaux); border-bottom-color: var(--bordeaux); }
.filters form { margin-left: auto; display: flex; }
.filters input[type=search] { border: 1px solid var(--line); background: #fff; padding: 8px 12px; font: inherit; font-size: .9rem; width: 230px; }
.pager { margin-top: 48px; display: flex; gap: 8px; flex-wrap: wrap; }
.pager a, .pager span { padding: 8px 14px; border: 1px solid var(--line); text-decoration: none; background: #fff; font-size: .95rem; }
.pager .current { background: var(--bordeaux); color: #fff; border-color: var(--bordeaux); }

.sedi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; margin: 10px 0 40px; }
.sede h3 { margin-bottom: .3em; }
.sede p { margin: 0; }
.mail-list { border-top: 1px solid var(--line); padding-top: 24px; }

/* Footer */
.site-footer { background: var(--bordeaux-dark); color: #e7d9d4; padding: 56px 0 24px; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer .cols { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: var(--gold); font-family: var(--body); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer p { margin: 0 0 .6em; }
.site-footer .fine { border-top: 1px solid rgba(255,255,255,.15); margin-top: 36px; padding-top: 18px; font-size: .82rem; color: #bfa9a3; }

@media (max-width: 960px) {
  .hero .wrap, .band, .site-footer .cols, .sedi { grid-template-columns: 1fr; }
  .hero__mark { display: none; }
  .areas { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
  .nav-btn { display: block; border: 1px solid var(--line); padding: 8px 14px; cursor: pointer; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
  .nav { flex-direction: column; align-items: flex-start; display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--cream); border-bottom: 1px solid var(--line); padding: 10px 20px 20px; }
  .nav ul { flex-direction: column; }
  .nav-toggle:checked ~ .nav { display: block; }
  .band__b { padding: 40px 20px; }
  .filters form { margin-left: 0; width: 100%; }
}
@media (max-width: 520px) {
  body { font-size: 18px; }
  .areas { grid-template-columns: 1fr; }
  .brand svg { width: 54px; }
  .brand__t b { font-size: 1rem; letter-spacing: .14em; }
  .brand__t .brand__n { font-size: 1rem; }
  .brand__t .brand__r { font-size: .8rem; }
}

/* Lo Studio: ritratto */
.portrait { float: left; margin: 6px 36px 20px 0; width: 270px; }
.portrait img { display: block; width: 100%; height: auto; }
.portrait figcaption { font-family: var(--serif); text-align: center; margin-top: 8px; color: var(--muted); }
.content .wrap.entry:has(.portrait) { max-width: 1040px; }
.collab { clear: both; }
@media (max-width: 640px) { .portrait { float: none; margin: 0 auto 24px; } }

/* Foto */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 40px; background: #fff; border: 1px solid var(--line); }
.split__img { min-height: 320px; background: center / cover no-repeat; }
.split__txt { padding: 48px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.split__txt h2 { margin-bottom: 1rem; }
.page-head--img { background: linear-gradient(90deg, var(--cream) 30%, rgba(250,246,239,.78) 55%, rgba(250,246,239,.1) 100%), var(--bg) center right / cover no-repeat; }
.contact-band { background: linear-gradient(110deg, rgba(69,9,15,.94) 35%, rgba(94,15,26,.72)), var(--bg) center / cover no-repeat; }
.contact-band__codici { display: block; box-shadow: 0 8px 28px rgba(0,0,0,.35); max-width: 100%; height: auto; }
@media (max-width: 960px) {
  .hero__img { display: none; }
  .split { grid-template-columns: 1fr; }
  .split__txt { padding: 28px; }
  .split__img { min-height: 220px; }
  .contact-band__codici { display: none; }
  .page-head--img { background: linear-gradient(90deg, var(--cream) 40%, rgba(250,246,239,.85)), var(--bg) center / cover no-repeat; }
}

/* Hero della home (come da mockup) */
.hero { position: relative; overflow: hidden; background: var(--cream); min-height: 540px; display: flex; align-items: center; }
.hero .wrap { display: block; min-height: 0; padding-block: 64px; position: relative; z-index: 2; }
.hero__img { position: absolute; top: 0; right: 0; bottom: 0; width: 62%; margin: 0; background: 70% 40% / cover no-repeat; z-index: 1; }
.hero__img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--cream) 0%, rgba(250,246,239,.92) 12%, rgba(250,246,239,.55) 32%, rgba(250,246,239,0) 62%); }
.hero__txt { max-width: 520px; }
.hero__kicker { color: #9a6b3a; font-size: .85rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; margin-bottom: 1.1rem; }
.hero h1 { text-transform: uppercase; letter-spacing: .03em; line-height: 1.02; margin: 0 0 .35em; font-size: clamp(2.6rem, 5.4vw, 4.3rem); font-weight: 500; }
.hero h1 span { display: block; font-size: .72em; letter-spacing: .04em; }
.hero__name { font-family: var(--serif); font-size: 1.9rem; margin: 0 0 .15em; color: var(--ink); }
.hero__role { font-family: var(--serif); font-size: 1.25rem; line-height: 1.35; color: var(--ink); margin: 0; }
.hero .rule { margin: 1.6rem 0 1.3rem; }
.hero__focus { color: var(--bordeaux); font-size: .88rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; margin: 0 0 1.5rem; }
@media (max-width: 960px) {
  .hero { min-height: 0; }
  .hero__img { width: 100%; opacity: .35; }
  .hero__img::before { background: linear-gradient(90deg, var(--cream) 10%, rgba(250,246,239,.4)); }
}

/* Home: sezioni come da mockup */
.ico { display: inline-flex; flex: none; color: var(--bordeaux); }
.ico svg { width: 100%; height: 100%; display: block; }
.band__a { position: relative; overflow: hidden; }
.band__a > *:not(.watermark) { position: relative; z-index: 1; }
.watermark { position: absolute; width: 330px; color: rgba(255,255,255,.07); --laurel: rgba(255,255,255,.07); pointer-events: none; }
.watermark svg { width: 100%; height: auto; display: block; }
.watermark .logo-letters { display: none; }
.band__a .watermark { right: -50px; top: -30px; }
.watermark--r { right: 33%; top: 50%; transform: translateY(-50%); width: 360px; }
.areas { grid-template-columns: repeat(3, 1fr); }
.areas a { display: flex; align-items: center; gap: 20px; padding: 26px 24px; font-size: 1.2rem; }
.areas a::before { display: none; }
.areas .ico { width: 44px; height: 44px; }
.areas a:hover .ico { color: #fff; }
.value { display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; align-items: center; }
.value p { max-width: 560px; }
.value__list { list-style: none; margin: 0; padding: 0 0 0 48px; border-left: 1px solid #d9cdb8; display: flex; flex-direction: column; }
.value__list li { display: flex; align-items: center; gap: 24px; padding: 20px 0; border-bottom: 1px solid #e3d9c6; font-size: 1.05rem; line-height: 1.35; }
.value__list li:last-child { border-bottom: 0; }
.value__list .ico { width: 44px; height: 44px; }
.value__list--sm { padding-left: 32px; }
.value__list--sm li { font-size: .95rem; gap: 18px; padding: 16px 0; border: 0; }
.value__list--sm .ico { width: 30px; height: 36px; }
.value__list--sm b { color: var(--bordeaux); font-weight: 500; }
.split--full { display: grid; grid-template-columns: 1fr 1fr; border: 0; margin: 0; background: var(--cream); }
.split--full .split__img { min-height: 340px; }
.split--full .split__txt { padding: 56px max(20px, calc((100vw - var(--wrap)) / 2)) 56px 56px; }
.presence { padding: 60px 0; }
.presence__grid { display: grid; grid-template-columns: 1.1fr .8fr 1fr; gap: 0; align-items: center; }
.presence__grid > div:first-child { padding-right: 40px; }
.presence__grid h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.presence__map { border-left: 1px solid var(--line); border-right: 1px solid var(--line); padding: 10px 40px; display: flex; justify-content: center; color: #d9c7ad; }
.presence__map .ico { width: 150px; height: auto; color: inherit; }
.eyebrow--light { color: #e4d2bd; }
.contact-band { position: relative; overflow: hidden; background: linear-gradient(110deg, #3a070d, var(--bordeaux) 70%, #2a0509); }
.contact-band .wrap { position: relative; z-index: 1; }
@media (max-width: 960px) {
  .areas { grid-template-columns: 1fr; }
  .value, .presence__grid, .split--full { grid-template-columns: 1fr; gap: 28px; }
  .value__list { border-left: 0; padding-left: 0; border-top: 1px solid #d9cdb8; }
  .split--full .split__txt { padding: 32px 20px; }
  .presence__map { border: 0; padding: 0; }
  .presence__grid > div:first-child { padding-right: 0; }
}

/* Correzioni su indicazioni del cliente */
.band { grid-template-columns: minmax(380px, .85fr) 1.15fr; }
.band__a { padding: 56px clamp(24px, 5vw, 70px); }
.band__a h2 { max-width: 460px; text-wrap: balance; overflow-wrap: normal; hyphens: none; }
.ico { color: #8e1f2b; }
/* aree di attività: nessun riquadro, solo i separatori sottili del mockup */
.areas { border: 0; }
.areas a { border: 0; border-right: 1px solid #e6d9c8; border-bottom: 1px solid #e6d9c8; background: none; color: var(--ink); padding: 28px 28px; }
.areas a:nth-child(3n) { border-right: 0; }
.areas a:nth-last-child(-n+3) { border-bottom: 0; }
.areas a:hover { background: none; color: var(--bordeaux); }
.areas a:hover .ico { color: var(--bordeaux); }
.areas .ico { width: 46px; height: 46px; }
@media (max-width: 960px) {
  .band { grid-template-columns: 1fr; }
  .areas a, .areas a:nth-child(3n) { border-right: 0; }
  .areas a:nth-last-child(-n+3) { border-bottom: 1px solid #e6d9c8; }
  .areas a:last-child { border-bottom: 0; }
}

/* Banda: il testo segue il bordo del contenitore, come il resto della pagina */
.band__a { padding: 56px 40px 56px max(24px, calc((100vw - var(--wrap)) / 2)); }
.band__b { padding: 56px max(24px, calc((100vw - var(--wrap)) / 2)) 56px 56px; }
@media (max-width: 960px) {
  .band__a { padding: 40px 24px; }
  .band__b { padding: 32px 24px 40px; }
}

/* I successi (home): più altezza, così la statua con la bilancia si vede per intero */
.split--full .split__img { min-height: 540px; background-position: 50% 18%; }
@media (max-width: 960px) { .split--full .split__img { min-height: 320px; } }

/* Logo caricato da backend (immagine) */
.brand__img { width: 84px; height: auto; max-height: 90px; object-fit: contain; flex: none; display: block; }
@media (max-width: 520px) { .brand__img { width: 54px; } }

/* ===== Pagine interne, come da mockup ===== */
.wrap--narrow { max-width: 900px; }
.section--tight { padding: 56px 0 72px; }
.btn--outline { background: transparent; color: var(--bordeaux); border: 1px solid var(--bordeaux); }
.btn--outline:hover { background: var(--bordeaux); color: #fff; }

/* intestazione con foto a destra */
.phero { position: relative; overflow: hidden; background: var(--cream); min-height: 420px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.phero .wrap { position: relative; z-index: 2; padding-block: 64px; }
.phero__txt { max-width: 600px; }
.phero h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); margin: 0 0 .5em; }
.phero p { color: var(--muted); font-size: 1.1rem; max-width: 520px; margin: 0 0 1.2rem; }
.phero__img { position: absolute; top: 0; right: 0; bottom: 0; width: 52%; background: center / cover no-repeat; z-index: 1; }
.phero__img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--cream) 0%, rgba(250,246,239,.88) 14%, rgba(250,246,239,.4) 38%, rgba(250,246,239,0) 70%); }
.phero--plain { min-height: 0; background: linear-gradient(100deg, var(--cream) 30%, #efe6d6 100%); }
.phero--plain .phero__txt { max-width: 760px; }

/* Lo Studio */
.pillars { background: #f6f0e6; border-bottom: 1px solid var(--line); }
.pillars__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.pillars__grid > div { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 40px 20px; text-align: center; font-family: var(--serif); font-size: 1.25rem; line-height: 1.25; border-right: 1px solid #e3d8c5; }
.pillars__grid > div:last-child { border-right: 0; }
.pillars .ico { width: 50px; height: 50px; }
.quote-band { position: relative; overflow: hidden; background: #e9dfcd; padding: 64px 0; }
.quote-band .watermark { color: rgba(138,106,58,.14); --laurel: rgba(138,106,58,.14); }
.quote-band .watermark--q { left: max(0px, calc((100vw - var(--wrap)) / 2 - 90px)); top: 50%; transform: translateY(-50%); width: 300px; }
.quote-band__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: center; }
.quote-band blockquote { margin: 0; padding: 0 48px 0 90px; font-family: var(--serif); font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.15; border-right: 1px solid #cdbf9f; }
.quote-band em { font-style: normal; color: var(--bordeaux); }
.quote-band p { margin: 0; padding-left: 56px; font-size: 1.1rem; max-width: 520px; }
.philo { position: relative; overflow: hidden; background: var(--cream); min-height: 420px; display: flex; align-items: center; }
.philo .wrap { position: relative; z-index: 2; padding-block: 64px; }
.philo__txt { max-width: 560px; }
.philo__img { position: absolute; top: 0; right: 0; bottom: 0; width: 52%; background: 40% 40% / cover no-repeat; z-index: 1; }
.philo__img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--cream) 0%, rgba(250,246,239,.85) 14%, rgba(250,246,239,.3) 40%, rgba(250,246,239,0) 70%); }

/* Professionisti */
.profcard { display: grid; grid-template-columns: 1.5fr 1fr; background: #fff; border: 1px solid var(--line); }
.profcard__main { padding: 44px 48px; }
.profcard__id { display: flex; gap: 24px; align-items: center; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.profcard__id img { width: 96px; height: 128px; object-fit: cover; flex: none; }
.profcard h2 { margin: 0 0 .15em; font-size: 1.9rem; }
.profcard__id p { margin: 0; color: var(--muted); font-family: var(--serif); font-size: 1.2rem; }
.arrowlist { list-style: none; margin: 0; padding: 0; columns: 1; }
.arrowlist li { padding: 7px 0; }
.arrowlist a { text-decoration: none; color: var(--ink); }
.arrowlist a::before { content: "→"; color: var(--bordeaux); margin-right: 14px; }
.arrowlist a:hover { color: var(--bordeaux); }
.profcard__panel { background: linear-gradient(160deg, var(--bordeaux), #3d0710); color: #e6c98f; --laurel: #e6c98f; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 36px; padding: 44px 36px; }
.profcard__panel svg { width: 150px; height: auto; }
.profcard__panel p { margin: 0; align-self: stretch; border-left: 2px solid #e6c98f; padding-left: 14px; font-family: var(--serif); font-size: 1.4rem; line-height: 1.25; color: #f3e3c4; }
.team { display: flex; justify-content: space-between; align-items: center; gap: 40px; padding: 56px 0 0; }
.team h2 { margin-bottom: .4em; }
.team p { max-width: 600px; }
.team .ico { width: 90px; height: 70px; flex: none; }

/* Aree di attività */
.acards { display: grid; grid-template-columns: repeat(2, 1fr); }
.acard { display: flex; align-items: flex-start; gap: 22px; padding: 32px 36px; text-decoration: none; color: var(--ink); border-bottom: 1px solid #e6d9c8; border-right: 1px solid #e6d9c8; transition: background .2s; }
.acard:nth-child(2n) { border-right: 0; }
.acard:nth-last-child(-n+2):nth-child(odd), .acard:last-child { border-bottom: 0; }
.acard:hover { background: #fff; }
.acard .ico { width: 50px; height: 50px; flex: none; }
.acard__t { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.acard__t b { font-family: var(--serif); font-weight: 500; font-size: 1.45rem; line-height: 1.2; }
.acard__t small { font-size: 1rem; color: var(--muted); line-height: 1.5; }
.acard__go { color: var(--bordeaux); font-size: 1.4rem; line-height: 1; }
.contact-band--simple .wrap { justify-content: flex-start; }

/* Successi e Approfondimenti */
.filters { align-items: center; gap: 6px 30px; }
.filters .selects { margin-left: auto; display: flex; gap: 14px; }
.filters select { appearance: none; border: 1px solid var(--line); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%235e0f1a' stroke-width='1.6'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; padding: 11px 40px 11px 16px; font: inherit; font-size: .95rem; min-width: 170px; color: var(--ink); cursor: pointer; }
.filters a.on { font-weight: 600; }
.cards--flat { gap: 0; border-top: 1px solid var(--line); }
.cards--flat .card { background: none; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 34px 32px; }
.cards--flat .card:nth-child(3n) { border-right: 0; }
.card__court { font-family: var(--serif); font-size: 1.5rem; color: var(--bordeaux); line-height: 1.15; }
.card--t h3 { font-size: 1.15rem; font-family: var(--body); font-weight: 400; line-height: 1.45; }
.card__date { font-size: .95rem; color: var(--muted); }
.card--n h3 { font-size: 1.35rem; }
.bigsearch { display: flex; margin: 0 0 28px; border: 1px solid var(--line); background: #fff; max-width: 900px; }
.bigsearch input { flex: 1; border: 0; padding: 16px 20px; font: inherit; background: none; }
.bigsearch input:focus { outline: 2px solid var(--bordeaux); outline-offset: -2px; }
.bigsearch button { border: 0; background: none; color: var(--bordeaux); padding: 0 20px; cursor: pointer; }

/* Contatti */
.contacts { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; align-items: start; }
.contacts .sedi { grid-template-columns: repeat(2, 1fr); gap: 40px; margin: 0 0 36px; }
.contacts .sede { display: flex; gap: 20px; align-items: flex-start; }
.contacts .sede .ico { width: 46px; height: 46px; flex: none; }
.contacts .sede h3 { color: var(--bordeaux); margin-bottom: .25em; }
.mailrow { display: flex; align-items: center; gap: 20px; margin: 0 0 18px; font-size: 1.15rem; }
.mailrow .ico { width: 40px; height: 40px; flex: none; }
.mailrow small { color: var(--muted); }
.cmap { position: relative; max-width: 330px; justify-self: end; width: 100%; color: #e1d3ba; }
.cmap .ico { display: block; color: inherit; }
.cmap__pin { position: absolute; width: 0; height: 0; }
.cmap__pin i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--bordeaux); box-shadow: 0 0 0 3px rgba(94,15,26,.22); }
.cmap__pin b { position: absolute; font-weight: 500; font-size: .9rem; line-height: 1.15; color: var(--ink); white-space: nowrap; }
.cmap__pin b::before { content: ""; position: absolute; top: .55em; width: 22px; height: 1px; background: var(--bordeaux); }
/* Cartina ingrandita sulla costa marchigiana (centrata su San Benedetto del Tronto 42,95N 13,88E).
   Spinetoli (42,87N 13,78E) si trova a circa 12 km a sud-ovest, nell'entroterra */
.cmap { max-width: 360px; }
.cmap__pin--b { left: 45.6%; top: 50%; }                       /* San Benedetto del Tronto: sulla costa */
.cmap__pin--b b { left: 16px; top: -12px; }
.cmap__pin--b b::before, .cmap__pin--a b::before { display: none; }
.cmap__pin--a { left: 42.2%; top: 53.4%; }                      /* Spinetoli: circa 12 km a sud-ovest, nell'entroterra */
.cmap__pin--a b { right: 16px; top: -6px; text-align: right; }
.cmap__pin i { width: 10px; height: 10px; left: -5px; top: -5px; }
.cmap__sea { position: absolute; right: 6%; top: 14%; font-style: italic; font-size: .85rem; line-height: 1.2; color: #a99b86; letter-spacing: .08em; text-align: center; }
@media (max-width: 960px) {
  .phero { min-height: 0; }
  .phero__img, .philo__img { width: 100%; opacity: .28; }
  .phero__img::before, .philo__img::before { background: linear-gradient(90deg, var(--cream) 10%, rgba(250,246,239,.5)); }
  .pillars__grid { grid-template-columns: repeat(2, 1fr); }
  .pillars__grid > div { border-bottom: 1px solid #e3d8c5; }
  .quote-band__grid, .profcard, .contacts { grid-template-columns: 1fr; gap: 28px; }
  .quote-band blockquote { padding: 0 0 24px; border-right: 0; border-bottom: 1px solid #cdbf9f; }
  .quote-band p { padding-left: 0; }
  .acards { grid-template-columns: 1fr; }
  .acard, .acard:nth-child(2n) { border-right: 0; padding: 24px 8px; }
  .acard:nth-last-child(-n+2):nth-child(odd) { border-bottom: 1px solid #e6d9c8; }
  .team { flex-direction: column; align-items: flex-start; }
  .cards--flat .card { border-right: 0; }
  .filters .selects { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .contacts .sedi { grid-template-columns: 1fr; }
  .cmap { justify-self: start; }
}

/* rifiniture */
.acard:last-child { border-right: 0; }
.cmap .ico { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%), linear-gradient(180deg, transparent 0, #000 10%); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0, #000 22%), linear-gradient(180deg, transparent 0, #000 10%); mask-composite: intersect; }

/* banda contatti: libri in alta risoluzione */
.contact-band__codici { width: min(560px, 42vw); height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

/* menu principale: carattere più grande */
.nav a { font-size: 1.1rem; }
.nav ul { gap: 4px 24px; }
@media (max-width: 1180px) { .nav a { font-size: 1.02rem; } .nav ul { gap: 4px 18px; } }

/* Cartina delle Marche con confini e nomi delle regioni */
.contacts { grid-template-columns: 1fr 1.2fr; gap: 40px; }
.cmap { max-width: none; justify-self: stretch; margin: 0; color: inherit; }
.cmap svg { display: block; width: 100%; height: auto; -webkit-mask-image: none; mask-image: none; }
.cmap figcaption { margin-top: 10px; font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.cmap__key { width: 18px; height: 12px; background: rgba(168,91,96,.55); border: 1.5px solid var(--bordeaux); flex: none; }
.cmap__pin, .cmap__sea { display: none; }
@media (max-width: 960px) { .contacts { grid-template-columns: 1fr; } }

/* Anteprime in home: ultimi successi e ultimi approfondimenti */
.section--latest { background: var(--sand); padding: 64px 0 72px; border-bottom: 1px solid var(--line); }
.section--latest-news { background: var(--cream); border-top: 1px solid var(--line); border-bottom: 0; }
.cards--boxed { gap: 28px; }
.cards--boxed .card { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--bordeaux); padding: 30px 30px 26px; box-shadow: 0 6px 22px rgba(42,34,32,.06); }
.cards--boxed .card h3 { font-size: 1.35rem; line-height: 1.3; }
.card__ex { font-size: .98rem; color: var(--muted); margin: 0; flex: 1; }
.section--latest .section__head { margin-bottom: 30px; }
@media (max-width: 960px) { .cards--boxed { grid-template-columns: 1fr; } }

/* Immagini in evidenza nelle schede */
.card, .cards--boxed .card, .cards--flat .card { padding: 0; gap: 0; }
.card__body { padding: 26px 26px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cards--boxed .card__body { padding: 26px 30px 26px; }
.cards--flat .card__body { padding: 26px 32px 30px; }
.card__img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--sand); }
.card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.card:hover .card__img img { transform: scale(1.04); }
.card .more { align-self: flex-start; margin-top: auto; }
.single__img { display: block; width: 100%; height: auto; margin: 0 0 32px; }
/* banda contatti: testo e foto affiancati */
.contact-band__codici { width: min(480px, 36vw); }
@media (min-width: 961px) { .contact-band .wrap { flex-wrap: nowrap; } .contact-band h2 { max-width: 520px; } }

/* Hero: nuova immagine IVSTITIA (scritta nella metà destra): dissolvenza più corta per non velarla */
.hero__img { width: 66%; background-position: 62% 45%; }
.hero__img::before { background: linear-gradient(90deg, var(--cream) 0%, rgba(250,246,239,.9) 8%, rgba(250,246,239,.5) 20%, rgba(250,246,239,0) 40%); }
@media (max-width: 960px) { .hero__img { width: 100%; } }

/* Hero: immagine nitida con velo bianco leggerissimo; la sfumatura a sinistra arriva più a destra (regola le percentuali) */
.hero__img::before { background: linear-gradient(90deg, var(--cream) 0%, rgba(250,246,239,.95) 16%, rgba(250,246,239,.8) 32%, rgba(250,246,239,.56) 48%, rgba(250,246,239,.3) 64%, rgba(250,246,239,.1) 80%, rgba(250,246,239,0) 94%), rgba(255,255,255,.12); }

/* Elenchi Successi e Approfondimenti: schede staccate, con padding e bordi parziali (solo destro e inferiore, come le icone della home) */
.cards--flat { gap: 0; border-top: 0; }
.cards--flat .card { padding: 34px; border: 0; border-right: 1px solid #e6d9c8; border-bottom: 1px solid #e6d9c8; }
.cards--flat .card:nth-child(3n) { border-right: 1px solid #e6d9c8; }
.cards--flat .card__body { padding: 22px 6px 8px; }
@media (max-width: 960px) { .cards--flat { gap: 0; } .cards--flat .card, .cards--flat .card:nth-child(3n) { border-right: 1px solid #e6d9c8; } }

/* Linee delle schede: non si incontrano agli angoli, sfumano prima di arrivare ai bordi */
.cards--flat .card, .cards--flat .card:nth-child(3n) { position: relative; border: 0; }
.cards--flat .card::before, .cards--flat .card::after { content: ""; position: absolute; pointer-events: none; }
.cards--flat .card::after { top: 28px; bottom: 28px; right: 0; width: 1px; background: linear-gradient(180deg, rgba(231,220,203,0), #e7dccb 22%, #e7dccb 78%, rgba(231,220,203,0)); }
.cards--flat .card::before { left: 28px; right: 28px; bottom: 0; height: 1px; background: linear-gradient(90deg, rgba(231,220,203,0), #e7dccb 22%, #e7dccb 78%, rgba(231,220,203,0)); }
@media (max-width: 960px) { .cards--flat .card::after { display: none; } }

/* Separatori sfumati che non si incontrano mai (aree, pilastri, schede servizi): sostituiscono i bordi pieni */
.areas a, .pillars__grid > div, .acard { position: relative; border: 0; }
.areas a::before, .areas a::after, .pillars__grid > div::before, .pillars__grid > div::after, .acard::before, .acard::after { content: ""; position: absolute; pointer-events: none; display: block; width: auto; height: auto; margin: 0; background: none; }
/* linea verticale (a destra) */
.areas a:not(:nth-child(3n))::after, .pillars__grid > div:not(:last-child)::after, .acard:nth-child(odd)::after { top: 26px; bottom: 26px; right: 0; width: 1px; background: linear-gradient(180deg, rgba(231,220,203,0), #e7dccb 22%, #e7dccb 78%, rgba(231,220,203,0)); }
/* linea orizzontale (in basso) */
.areas a:nth-last-child(n+4)::before, .pillars__grid > div::before, .acard:not(:nth-last-child(-n+2))::before { left: 26px; right: 26px; bottom: 0; height: 1px; background: linear-gradient(90deg, rgba(231,220,203,0), #e7dccb 22%, #e7dccb 78%, rgba(231,220,203,0)); }
.pillars__grid > div::before { display: none; }
@media (max-width: 960px) {
  .areas a::after, .acard::after { display: none; }
  .areas a:nth-last-child(-n+3)::before { left: 26px; right: 26px; bottom: 0; height: 1px; background: linear-gradient(90deg, rgba(231,220,203,0), #e7dccb 22%, #e7dccb 78%, rgba(231,220,203,0)); }
  .areas a:last-child::before { display: none; }
  .acard:not(:last-child)::before { left: 26px; right: 26px; bottom: 0; height: 1px; background: linear-gradient(90deg, rgba(231,220,203,0), #e7dccb 22%, #e7dccb 78%, rgba(231,220,203,0)); }
  .acard:last-child::before { display: none; }
  .pillars__grid > div:nth-child(even)::after { display: none; }
  .pillars__grid > div:nth-child(odd)::after { display: block; top: 26px; bottom: 26px; right: 0; width: 1px; background: linear-gradient(180deg, rgba(231,220,203,0), #e7dccb 22%, #e7dccb 78%, rgba(231,220,203,0)); }
  .pillars__grid > div:nth-child(-n+2)::before { display: block; left: 26px; right: 26px; bottom: 0; height: 1px; background: linear-gradient(90deg, rgba(231,220,203,0), #e7dccb 22%, #e7dccb 78%, rgba(231,220,203,0)); }
}
.acard:last-child::after { display: none; }

/* Aree di attività (home): hover visibile su icona e titolo */
.areas a .ico { transition: transform .25s, color .25s; }
.areas a span:not(.ico) { background: linear-gradient(var(--gold), var(--gold)) no-repeat 0 100% / 0 1px; padding-bottom: 3px; transition: background-size .3s, color .25s; }
.areas a:hover .ico, .areas a:focus-visible .ico { color: var(--gold); transform: translateY(-2px) scale(1.07); }
.areas a:hover span:not(.ico), .areas a:focus-visible span:not(.ico) { color: var(--bordeaux); background-size: 100% 1px; }

/* Home: 10 aree su 3 colonne (l'ultima resta sola nella riga): separatori coerenti */
.areas a:nth-child(-n+9)::before { left: 26px; right: 26px; bottom: 0; height: 1px; background: linear-gradient(90deg, rgba(231,220,203,0), #e7dccb 22%, #e7dccb 78%, rgba(231,220,203,0)); }
.areas a:last-child::after { display: none; }
@media (max-width: 960px) { .areas a:last-child::before { display: none; } }

/* Prestazioni: header stabile mentre i font si caricano (evita lo scatto di layout) */
.site-header .wrap { min-height: 91px; box-sizing: border-box; }
@media (min-width: 961px) { .nav ul { flex-wrap: nowrap; } .nav a { white-space: nowrap; } }

/* Blocco "File" negli articoli (PDF allegati): anteprima + pulsante, senza il nome del file */
.entry .wp-block-file { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; margin: 2.2rem 0; }
.entry .wp-block-file__embed { width: 100%; border: 1px solid var(--line); background: #fff; }
.entry .wp-block-file > a:not(.wp-block-file__button) { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* nascosto alla vista, letto dagli screen reader */
.entry .wp-block-file__button { display: inline-block; background: var(--bordeaux); color: #fff; padding: .95rem 1.7rem; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; text-decoration: none; transition: background .2s; }
.entry .wp-block-file__button:hover { background: var(--bordeaux-dark); color: #fff; }
.entry .wp-block-file__embed { display: none; }
