/*
Theme Name: Sarel Malan
Description: Tema su misura per sarelmalan.it — aree Salerno / Italia, tre temi, progetti.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: sarelmalan
*/

:root {
	--navy-deep: #091830;
	--navy: #0E2240;
	--navy-light: #24406B;
	--navy-line: #4A6290;
	--brass: #B8913A;
	--brass-text: #8A6A22;
	--mist: #E7ECF3;
	--paper: #F4F5F7;
	--line: #D9DEE6;
	--line-strong: #C9D1DD;
	--ink: #14213A;
	--muted: #4A5568;
	--on-navy: #C9D1DD;
	--serif: 'Source Serif 4', Georgia, serif;
	--sans: 'IBM Plex Sans', system-ui, sans-serif;
	--wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
a:hover { color: var(--navy-light); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--navy); line-height: 1.15; margin: 0; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; background: #fff; padding: 12px 16px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 40px; }
@media (max-width: 700px) { .wrap { padding: 0 16px; } }

/* Etichette e bottoni ----------------------------------------------------- */
.eyebrow { font-family: var(--sans); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--brass-text); }
.on-navy .eyebrow, .eyebrow--brass { color: var(--brass); }
.btn { display: inline-block; padding: 14px 24px; font-family: var(--sans); font-size: 15px; font-weight: 500; line-height: 1.3; text-decoration: none; border: 1.5px solid var(--navy); background: transparent; color: var(--navy); cursor: pointer; text-align: center; }
.btn:hover { background: var(--navy); color: #fff; }
.btn--solid { background: var(--navy); color: #fff; }
.btn--solid:hover { background: var(--navy-light); border-color: var(--navy-light); color: #fff; }
.btn--brass { background: var(--brass); border-color: var(--brass); color: var(--navy-deep); font-weight: 600; }
.btn--brass:hover { background: #cfa548; border-color: #cfa548; color: var(--navy-deep); }
.btn--light { border-color: #fff; color: #fff; }
.btn--light:hover { background: #fff; color: var(--navy); }
.btn--white { background: #fff; border-color: #fff; color: var(--navy); font-weight: 600; }
.btn--white:hover { background: var(--mist); border-color: var(--mist); color: var(--navy); }
.tag { display: inline-block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; padding: 6px 10px; line-height: 1.2; text-decoration: none; }
.tag--salerno { color: var(--navy); background: var(--mist); }
.tag--italia { color: var(--navy-deep); background: var(--brass); }
.more { font-weight: 500; font-size: 15px; }

/* Header ------------------------------------------------------------------ */
.topbar { background: var(--navy-deep); color: var(--on-navy); font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.topbar a { color: var(--on-navy); text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar .social { display: flex; gap: 18px; flex-wrap: wrap; }
@media (max-width: 700px) { .topbar { display: none; } }

.site-header { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark { width: 44px; height: 44px; flex-shrink: 0; background: var(--navy); border: 1.5px solid var(--brass); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 20px; font-weight: 600; color: #fff; }
.brand__name { font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--navy); }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; align-items: center; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; padding-bottom: 4px; border-bottom: 2px solid transparent; }
.nav .current-menu-item > a, .nav .current-menu-ancestor > a, .nav .current_page_parent > a { border-bottom-color: var(--brass); }
.nav li { position: relative; }
.nav .menu-item-has-children > a::after { content: ' ▾'; font-size: 12px; }
.nav .sub-menu { display: none; position: absolute; top: 100%; left: -16px; min-width: 240px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--navy); padding: 8px 0; flex-direction: column; gap: 0; align-items: stretch; box-shadow: 0 8px 24px rgba(9, 24, 48, .08); }
.nav .sub-menu a { display: block; padding: 10px 16px; border: 0; }
.nav .sub-menu a:hover { background: var(--paper); }
.nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { display: flex; }
.nav .menu-cta > a { background: var(--navy); color: #fff; padding: 10px 18px; border: 0; }
.nav .menu-cta > a:hover { background: var(--navy-light); color: #fff; }
.nav-toggle { display: none; width: 44px; height: 44px; background: none; border: 1px solid var(--line-strong); align-items: center; justify-content: center; cursor: pointer; }

@media (max-width: 1000px) {
	.site-header .wrap { padding-top: 12px; padding-bottom: 12px; }
	.brand__mark { width: 36px; height: 36px; font-size: 16px; }
	.brand__name { font-size: 20px; }
	.nav-toggle { display: flex; }
	.nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 20px; }
	.nav.is-open { display: block; }
	.nav ul { flex-direction: column; align-items: stretch; gap: 0; }
	.nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
	.nav .sub-menu { display: flex; position: static; border: 0; box-shadow: none; padding: 0 0 0 16px; min-width: 0; }
	.nav .menu-item-has-children > a::after { content: ''; }
	.nav .menu-cta > a { margin-top: 16px; text-align: center; }
}

/* Sezioni ----------------------------------------------------------------- */
.section { padding: 96px 0; }
.section--tight { padding-top: 0; }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.section__head > div:first-child { display: flex; flex-direction: column; gap: 10px; }
.section__head h2 { font-size: 40px; }
.on-navy { background: var(--navy); color: #fff; }
.on-navy h1, .on-navy h2, .on-navy h3 { color: #fff; }
.on-deep { background: var(--navy-deep); color: #fff; }
.on-deep h2 { color: #fff; }
.on-white { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (max-width: 700px) {
	.section { padding: 48px 0; }
	.section__head { margin-bottom: 24px; }
	.section__head h2 { font-size: 28px; }
}

/* Hero */
.hero .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: center; padding-top: 88px; padding-bottom: 88px; }
.hero__text { display: flex; flex-direction: column; gap: 26px; }
.hero h1 { font-size: 58px; line-height: 1.08; }
.hero p { margin: 0; font-size: 18px; color: var(--on-navy); max-width: 520px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__photo { height: 480px; background: var(--navy-light); border-bottom: 4px solid var(--brass); overflow: hidden; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
	.hero .wrap { grid-template-columns: 1fr; gap: 0; padding: 0; }
	.hero__photo { order: -1; height: 320px; }
	.hero__text { padding: 32px 16px 40px; gap: 18px; }
	.hero h1 { font-size: 34px; line-height: 1.12; }
	.hero p { font-size: 16px; }
	.hero__actions .btn { flex: 1 1 100%; }
}

/* Temi */
.temi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tema { background: #fff; border-top: 3px solid var(--navy); padding: 32px; display: flex; flex-direction: column; gap: 16px; text-decoration: none; color: var(--ink); }
.tema:hover { color: var(--ink); box-shadow: 0 8px 28px rgba(9, 24, 48, .08); }
.tema h3 { font-size: 26px; }
.tema p { margin: 0; color: var(--muted); font-size: 16px; }
.tema .more { margin-top: auto; color: var(--navy); }
@media (max-width: 900px) {
	.temi { grid-template-columns: 1fr; gap: 16px; }
	.tema { flex-direction: row; align-items: center; border-top: 0; border-left: 3px solid var(--navy); padding: 20px; gap: 14px; }
	.tema h3 { font-size: 20px; flex-grow: 1; }
	.tema p, .tema .more { display: none; }
	.tema svg { width: 30px; height: 30px; flex-shrink: 0; }
}

/* Aree Salerno / Italia */
.aree { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.area { padding: 40px; display: flex; flex-direction: column; gap: 22px; }
.area--salerno { background: #fff; border: 1px solid var(--line); }
.area--italia { background: var(--navy-light); color: #fff; }
.area--italia h3, .area--italia a { color: #fff; }
.area__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.area h3 { font-size: 32px; }
.area p { margin: 0; color: var(--muted); font-size: 16px; }
.area--italia p { color: var(--line); }
.area .btn { align-self: flex-start; }
.area--italia .btn { border-color: #fff; }
.area--italia .btn:hover { background: #fff; color: var(--navy); }
@media (max-width: 900px) { .aree { grid-template-columns: 1fr; } .area { padding: 24px; } .area h3 { font-size: 24px; } }

.lista { list-style: none; margin: 0; padding: 0; }
.lista li { border-top: 1px solid var(--line); }
.lista li:last-child { border-bottom: 1px solid var(--line); }
.lista a { display: flex; flex-direction: column; gap: 4px; padding: 16px 0; text-decoration: none; }
.lista .meta { font-size: 13px; color: var(--muted); }
.lista .titolo { font-size: 17px; font-weight: 500; }
.area--italia .lista li { border-color: var(--navy-line); }
.area--italia .lista .meta { color: var(--on-navy); }
.vuoto { color: var(--muted); font-size: 15px; font-style: italic; }
.area--italia .vuoto { color: var(--on-navy); }

/* Video */
.video .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: center; padding-top: 88px; padding-bottom: 88px; }
.video__text { display: flex; flex-direction: column; gap: 20px; }
.video__text h2 { font-size: 40px; }
.video__text p { margin: 0; color: var(--on-navy); }
.video__actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.video__actions a:not(.btn) { color: #fff; }
.embed { position: relative; aspect-ratio: 16 / 9; background: var(--navy-light); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 900px) { .video .wrap { grid-template-columns: 1fr; gap: 24px; padding-top: 48px; padding-bottom: 48px; } .video__text h2 { font-size: 28px; } }

/* Card articoli */
.filtri { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.filtri a { border: 1px solid var(--line-strong); padding: 9px 16px; text-decoration: none; background: #fff; }
.filtri a.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--ink); }
.card__img { aspect-ratio: 16 / 10; background: var(--line); overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card__img img { transform: scale(1.03); }
.card__tags { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.card__tags .a { color: var(--navy); }
.card__tags .t { color: var(--brass-text); }
.card h3 { font-size: 23px; line-height: 1.3; }
.card p { margin: 0; font-size: 15px; color: var(--muted); }
.card time { font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; gap: 32px; } .card h3 { font-size: 21px; } }

/* Progetti */
.progetti { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.progetto { padding: 36px; display: flex; flex-direction: column; gap: 18px; }
.progetto h3 { font-size: 30px; }
.progetto p { margin: 0; font-size: 15px; color: var(--muted); }
.progetto--ri { background: var(--navy); color: #fff; border-top: 4px solid var(--brass); }
.progetto--ri h3, .progetto--ri a { color: #fff; }
.progetto--ri p { color: var(--on-navy); }
.progetto--spes { background: var(--paper); border-top: 4px solid var(--navy); }
.progetto--rivista { background: var(--paper); border: 1px dashed #8A96A8; }
.progetto--rivista h3 { font-style: italic; }
.progetto .btn, .progetto .more { margin-top: auto; align-self: flex-start; }
.sub-box { border: 1px solid var(--navy-line); padding: 14px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; }
.sub-box span span { color: var(--on-navy); }
@media (max-width: 900px) { .progetti { grid-template-columns: 1fr; gap: 16px; } .progetto { padding: 24px; } .progetto h3 { font-size: 24px; } }

/* Moduli */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { font-size: 13px; font-weight: 500; }
.form .field { display: flex; flex-direction: column; gap: 6px; }
.form input[type=text], .form input[type=email], .form textarea { width: 100%; padding: 12px; border: 1px solid var(--line-strong); font-family: inherit; font-size: 15px; background: #fff; color: var(--ink); }
.form textarea { resize: vertical; min-height: 110px; }
.form .inline { display: flex; gap: 8px; }
.form .inline input { flex-grow: 1; min-width: 0; }
.form .privacy { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; font-weight: 400; line-height: 1.45; }
.form .privacy input { margin-top: 3px; }
.form .hp { position: absolute; left: -9999px; }
.form-box { background: var(--navy); color: #fff; padding: 28px; border-top: 4px solid var(--brass); }
.form-box h2, .form-box h3 { color: #fff; font-size: 24px; }
.form-box p { margin: 0; font-size: 14px; color: var(--on-navy); }
.form-box input[type=text], .form-box input[type=email], .form-box textarea { border: 0; }
.form-box .privacy a { color: #fff; }
.esito { padding: 12px 14px; font-size: 14px; font-weight: 500; }
.esito--ok { background: #E3F1E7; color: #1D5A32; }
.esito--errore { background: #F8E4E1; color: #8A2A1C; }

/* Footer */
.site-footer { background: var(--navy-deep); color: var(--on-navy); }
.site-footer .wrap { padding-top: 64px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 40px; }
.footer-cols { display: grid; grid-template-columns: 2fr repeat(3, minmax(0, 1fr)); gap: 32px; font-size: 14px; }
.footer-cols h2 { font-size: 24px; color: #fff; margin-bottom: 12px; }
.footer-cols h3 { font-family: var(--sans); font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 8px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; line-height: 2; }
.footer-cols a { color: var(--on-navy); text-decoration: none; }
.footer-cols a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--navy-light); padding-top: 20px; font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-bottom a { color: var(--on-navy); }
@media (max-width: 900px) { .footer-cols { grid-template-columns: 1fr 1fr; } .footer-cols > div:first-child { grid-column: 1 / -1; } }

/* Pagine interne ---------------------------------------------------------- */
.page-hero .wrap { padding-top: 64px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 18px; }
.page-hero h1 { font-size: 52px; }
.page-hero p { margin: 0; font-size: 18px; color: var(--on-navy); max-width: 680px; }
.breadcrumb { font-size: 13px; color: var(--on-navy); }
.breadcrumb a { color: var(--on-navy); }
.page-hero .facts { display: flex; gap: 32px; flex-wrap: wrap; padding-top: 12px; font-size: 15px; color: #fff; font-weight: 600; }
@media (max-width: 700px) { .page-hero .wrap { padding-top: 40px; padding-bottom: 40px; } .page-hero h1 { font-size: 34px; } .page-hero p { font-size: 16px; } }

.layout { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-top: 56px; padding-bottom: 96px; }
.layout__main { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.layout__side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 700px) { .layout { padding-top: 32px; padding-bottom: 48px; } .layout__main { flex-basis: 100%; } }

.box { background: #fff; border: 1px solid var(--line); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.box h3 { font-size: 20px; }
.box .links a { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; }

.atti { background: #fff; border: 1px solid var(--line); }
.atto { display: flex; gap: 22px; align-items: flex-start; padding: 22px 26px; border-bottom: 1px solid var(--line); text-decoration: none; }
.atto:last-child { border-bottom: 0; }
.atto:hover { background: var(--paper); }
.atto__data { width: 64px; flex-shrink: 0; text-align: center; border-right: 1px solid var(--line); padding-right: 18px; }
.atto__data b { display: block; font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--navy); line-height: 1.1; }
.atto__data span { font-size: 12px; text-transform: uppercase; color: var(--muted); }
.atto__body { display: flex; flex-direction: column; gap: 6px; }
.atto__tipo { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.atto__tipo em { font-style: normal; color: var(--brass-text); }
.atto__titolo { font-size: 19px; font-weight: 500; color: var(--navy); line-height: 1.35; }
.atto__nota { font-size: 14px; color: var(--muted); }
@media (max-width: 700px) { .atto { padding: 18px 16px; gap: 14px; } .atto__data { width: 48px; padding-right: 12px; } .atto__data b { font-size: 22px; } .atto__titolo { font-size: 17px; } }

.pagination { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.pagination .page-numbers { min-width: 44px; padding: 10px 14px; border: 1px solid var(--line-strong); background: #fff; text-decoration: none; text-align: center; }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Contenuto editoriale */
.entry { background: #fff; }
.entry .wrap { max-width: 800px; padding-top: 64px; padding-bottom: 96px; }
.entry__meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; font-size: 14px; color: var(--muted); }
.entry__title { font-size: 46px; margin-bottom: 24px; }
.entry__cover { margin: 0 0 40px; }
.prose { font-size: 18px; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 30px; margin-top: 1.6em; }
.prose h3 { font-size: 24px; margin-top: 1.4em; }
.prose blockquote { margin-left: 0; padding-left: 24px; border-left: 3px solid var(--brass); font-family: var(--serif); font-size: 22px; color: var(--navy); }
.prose img, .prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.prose a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose .wp-block-button__link { background: var(--navy); color: #fff; border-radius: 0; text-decoration: none; }
.prose .alignwide { max-width: 1000px; margin-left: auto; margin-right: auto; }
.atto-scheda { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 40px; font-size: 15px; }
.atto-scheda div { background: var(--paper); padding: 14px 16px; }
.atto-scheda span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
@media (max-width: 700px) { .entry .wrap { padding-top: 32px; padding-bottom: 48px; } .entry__title { font-size: 32px; } .prose { font-size: 17px; } .atto-scheda { grid-template-columns: 1fr; } }
.entry__share { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 14px; }

/* Banner pagina Facebook (aree Salerno / Italia) -------------------------- */
.fb-banner { position: relative; z-index: 2; overflow: hidden; margin-top: -44px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 32px; align-items: center; padding: 36px 44px; text-decoration: none; border-top: 3px solid var(--brass); box-shadow: 0 14px 40px rgba(9, 24, 48, .12); transition: box-shadow .25s, transform .25s; }
.fb-banner:hover { transform: translateY(-2px); box-shadow: 0 20px 48px rgba(9, 24, 48, .18); }
.fb-banner::after { content: 'SM'; position: absolute; right: -18px; bottom: -78px; font-family: var(--serif); font-weight: 700; font-size: 240px; line-height: 1; letter-spacing: -.04em; pointer-events: none; }
.fb-banner > * { position: relative; z-index: 1; }
.fb-banner__icon { width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--brass); }
.fb-banner__text { display: flex; flex-direction: column; gap: 6px; }
.fb-banner__eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.fb-banner__title { font-family: var(--serif); font-size: 32px; font-weight: 600; line-height: 1.15; }
.fb-banner__desc { font-size: 16px; line-height: 1.55; max-width: 560px; }
.fb-banner__handle { margin-top: 4px; font-size: 13px; letter-spacing: .04em; font-weight: 500; }
.fb-banner__cta { display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; font-size: 15px; font-weight: 600; white-space: nowrap; transition: background .2s, color .2s; }
.fb-banner__cta span { display: inline-block; transition: transform .2s; }
.fb-banner:hover .fb-banner__cta span { transform: translate(2px, -2px); }

.fb-banner--salerno { background: #fff; color: var(--ink); }
.fb-banner--salerno::after { color: var(--navy); opacity: .045; }
.fb-banner--salerno .fb-banner__icon { background: var(--navy); color: #fff; }
.fb-banner--salerno .fb-banner__eyebrow, .fb-banner--salerno .fb-banner__handle { color: var(--brass-text); }
.fb-banner--salerno .fb-banner__title { color: var(--navy); }
.fb-banner--salerno .fb-banner__desc { color: var(--muted); }
.fb-banner--salerno .fb-banner__cta { background: var(--navy); color: #fff; }
.fb-banner--salerno:hover .fb-banner__cta { background: var(--navy-light); }

.fb-banner--italia { background: var(--navy-light); color: #fff; }
.fb-banner--italia::after { color: #fff; opacity: .06; }
.fb-banner--italia .fb-banner__icon { background: var(--navy-deep); color: #fff; }
.fb-banner--italia .fb-banner__eyebrow, .fb-banner--italia .fb-banner__handle { color: var(--brass); }
.fb-banner--italia .fb-banner__desc { color: var(--line); }
.fb-banner--italia .fb-banner__cta { background: var(--brass); color: var(--navy-deep); }
.fb-banner--italia:hover .fb-banner__cta { background: #cfa548; }

.fb-banner + .layout, .wrap:has(> .fb-banner) + .layout { padding-top: 48px; }

@media (max-width: 800px) {
	.fb-banner { grid-template-columns: auto minmax(0, 1fr); gap: 18px 16px; padding: 24px 20px; margin-top: -28px; }
	.fb-banner::after { font-size: 160px; bottom: -52px; }
	.fb-banner__icon { width: 52px; height: 52px; align-self: start; }
	.fb-banner__icon svg { width: 24px; height: 24px; }
	.fb-banner__title { font-size: 24px; }
	.fb-banner__desc { font-size: 15px; }
	.fb-banner__cta { grid-column: 1 / -1; justify-content: center; }
}
.page-hero:has(+ .wrap > .fb-banner) .wrap { padding-bottom: 100px; }
@media (max-width: 800px) { .page-hero:has(+ .wrap > .fb-banner) .wrap { padding-bottom: 64px; } }
/* Il banner è un link: i suoi colori non devono cambiare con la regola generale a:hover. */
.fb-banner--salerno, .fb-banner--salerno:hover { color: var(--ink); }
.fb-banner--italia, .fb-banner--italia:hover { color: #fff; }
.fb-banner--italia .fb-banner__title { color: #fff; }

/* Foto verticali (ritratti): ritaglio sulla parte alta, dove di solito ci sono i volti. */
.card__img img { object-position: 50% 22%; }
.entry__cover img { width: 100%; max-height: 520px; object-fit: cover; object-position: 50% 22%; }

/* Video in evidenza (home) ------------------------------------------------- */
.video .wrap { display: block; padding-top: 96px; padding-bottom: 96px; }
.video .section__head h2 { color: #fff; }
.video__all { color: #fff; font-weight: 500; font-size: 15px; }
.video__all:hover { color: var(--brass); }
.video__main { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
.video__main .embed { box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.video__text { display: flex; flex-direction: column; gap: 14px; }
.video__text time { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--brass); }
.video__text h3 { color: #fff; font-size: 32px; line-height: 1.2; }
.video__text p { margin: 0; color: var(--on-navy); font-size: 16px; line-height: 1.65; }
.video__more-link { color: #fff; font-weight: 500; font-size: 15px; margin-top: 6px; }
.video__more-link:hover { color: var(--brass); }
.video__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--navy-light); }
.video .fb-banner--yt { margin-top: 56px; }
@media (max-width: 900px) {
	.video .wrap { padding-top: 48px; padding-bottom: 48px; }
	.video__main { grid-template-columns: 1fr; gap: 24px; }
	.video__text h3 { font-size: 24px; }
	.video__list { grid-template-columns: 1fr; gap: 20px; margin-top: 32px; padding-top: 28px; }
	.video .fb-banner--yt { margin-top: 36px; }
}

/* Card video (home e pagina Video) */
.vcard { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); }
.vcard__img { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy-light); }
.vcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.vcard:hover .vcard__img img { transform: scale(1.04); }
.vcard__play { position: absolute; left: 14px; bottom: 14px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--brass); color: var(--navy-deep); transition: background .2s; }
.vcard:hover .vcard__play { background: #fff; }
.vcard time { font-size: 13px; color: var(--muted); }
.vcard__title { font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.3; color: var(--navy); }
.video .vcard time { color: var(--on-navy); }
.video .vcard__title { color: #fff; }
.video .vcard:hover .vcard__title { color: var(--brass); }
.vgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 28px; }
@media (max-width: 900px) { .vgrid { grid-template-columns: 1fr; gap: 32px; } }

/* Banner YouTube: stessa famiglia dei banner Facebook */
.fb-banner--yt, .fb-banner--yt:hover { background: var(--navy-light); color: #fff; }
.fb-banner--yt::after { color: #fff; opacity: .06; }
.fb-banner--yt .fb-banner__icon { background: var(--navy-deep); color: #fff; }
.fb-banner--yt .fb-banner__title { color: #fff; }
.fb-banner--yt .fb-banner__eyebrow, .fb-banner--yt .fb-banner__handle { color: var(--brass); }
.fb-banner--yt .fb-banner__desc { color: var(--line); }
.fb-banner--yt .fb-banner__cta { background: var(--brass); color: var(--navy-deep); }
.fb-banner--yt:hover .fb-banner__cta { background: #cfa548; }

/* .wrap e .section sullo stesso elemento: il padding verticale di .section non deve azzerare quello laterale di .wrap. */
.wrap.section { padding-left: 40px; padding-right: 40px; }
@media (max-width: 700px) { .wrap.section { padding-left: 16px; padding-right: 16px; } }

/* Miniatura nelle righe di elenco (area Salerno, archivi atti) */
.atto__body { flex: 1 1 auto; min-width: 0; }
.atto__img { flex-shrink: 0; width: 168px; aspect-ratio: 16 / 10; overflow: hidden; background: var(--line); align-self: center; }
.atto__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transition: transform .3s; }
.atto:hover .atto__img img { transform: scale(1.04); }
@media (max-width: 700px) { .atto__img { width: 88px; align-self: flex-start; } }

/* Paragrafo d'apertura ("In sintesi") negli atti */
.prose .is-style-lead { font-family: var(--serif); font-size: 22px; line-height: 1.55; color: var(--navy); }

/* Etichette Salerno / Italia nei riquadri della home: più grandi */
.area__top .tag { font-size: 16px; letter-spacing: .14em; padding: 10px 18px; }
@media (max-width: 700px) { .area__top .tag { font-size: 14px; padding: 8px 14px; } }

/* Ritratto in home: taglio dall'alto (volto e busto), fondo bianco della foto come "stampa" nella testata. */
.hero__photo { background: #fff; }
.hero__photo img { object-position: 50% 12%; }

/* Foto affiancata al testo nelle pagine (es. Chi sono) */
.prose .alignright { float: right; width: min(40%, 320px); margin: 6px 0 24px 36px; }
.prose .alignleft { float: left; width: min(40%, 320px); margin: 6px 36px 24px 0; }
.prose .alignright img, .prose .alignleft img { width: 100%; height: auto; display: block; }
.prose h2 { clear: none; }
.prose::after { content: ""; display: block; clear: both; }
@media (max-width: 700px) {
	.prose .alignright, .prose .alignleft { float: none; width: 100%; max-width: 360px; margin: 0 auto 24px; }
}

/* Ritratto home in verticale 4:5: la foto è già inquadrata, non si taglia niente. */
.hero__photo { height: auto; aspect-ratio: 4 / 5; width: min(100%, 440px); justify-self: end; background: #fff; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
@media (max-width: 900px) {
	.hero__photo { width: 100%; justify-self: stretch; aspect-ratio: auto; height: 420px; }
	.hero__photo img { object-position: 50% 0; }
}

/* Ritratto scontornato in home: la figura poggia sul bordo della testata, con un bagliore caldo dietro. */
.hero { border-bottom: 3px solid var(--brass); }
.hero__photo {
	aspect-ratio: 4 / 5; width: min(100%, 460px); height: auto; justify-self: end; align-self: end;
	margin-bottom: -88px; /* annulla il padding inferiore: la figura tocca il filo ottone */
	border-bottom: 0; overflow: visible;
	background: radial-gradient(ellipse 72% 58% at 50% 40%, rgba(255, 238, 205, .26) 0%, rgba(184, 145, 58, .16) 36%, rgba(14, 34, 64, 0) 72%);
}
.hero__photo img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 18px 36px rgba(0, 0, 0, .35)); }
@media (max-width: 900px) {
	.hero__photo { width: 100%; height: 400px; aspect-ratio: auto; margin-bottom: 0; justify-self: stretch; align-self: stretch; }
}
/* Ritocco: l'ombra non esce dalla testata, bagliore più morbido e caldo. */
.hero { overflow: hidden; }
.hero__photo { background: radial-gradient(closest-side at 50% 42%, rgba(255, 236, 200, .30) 0%, rgba(214, 178, 98, .18) 34%, rgba(184, 145, 58, .07) 62%, rgba(14, 34, 64, 0) 100%); }
.hero__photo img { filter: drop-shadow(0 10px 28px rgba(0, 0, 0, .28)); }

/* Pagina di un tema: testo programmatico prima degli articoli */
.tema-programma .wrap { padding-bottom: 56px; }
.tema-programma .prose > p:first-child { font-family: var(--serif); font-size: 21px; line-height: 1.55; color: var(--navy); }

/* Elenchi nei testi: pallini ottone, voci ben spaziate */
.prose ul { padding-left: 1.3em; }
.prose ul li { margin-bottom: .55em; padding-left: .2em; }
.prose ul li::marker { color: var(--brass); }
.prose li strong { color: var(--navy); }

/* Testata delle pagine con foto di sfondo (immagine in evidenza della pagina) e velo navy */
.page-hero.has-bg {
	background:
		linear-gradient(90deg, rgba(9, 24, 48, .94) 0%, rgba(14, 34, 64, .86) 45%, rgba(14, 34, 64, .62) 100%),
		var(--hero-bg) center 44% / cover no-repeat,
		var(--navy);
}
@media (max-width: 700px) {
	.page-hero.has-bg { background: linear-gradient(rgba(9, 24, 48, .88), rgba(14, 34, 64, .88)), var(--hero-bg) center / cover no-repeat, var(--navy); }
}

/* Home su telefono: la figura non "galleggia". Sfuma in basso nel blu e il testo le sale sopra. */
@media (max-width: 900px) {
	.hero__photo { height: 470px; margin-bottom: -110px; position: relative; z-index: 0; overflow: hidden; }
	.hero__photo img {
		object-fit: cover; object-position: 50% 0;
		-webkit-mask-image: linear-gradient(to bottom, #000 58%, rgba(0, 0, 0, 0) 96%);
		mask-image: linear-gradient(to bottom, #000 58%, rgba(0, 0, 0, 0) 96%);
		filter: none;
	}
	.hero__text { position: relative; z-index: 1; }
}

/* Testata con ritratto scontornato (es. Chi sono): figura a destra sul filo ottone, bagliore come in home */
.page-hero__text { display: flex; flex-direction: column; gap: 18px; }
.page-hero.has-ritratto { overflow: hidden; border-bottom: 3px solid var(--brass); }
.page-hero.has-ritratto .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); column-gap: 56px; align-items: center; padding-bottom: 0; }
.page-hero.has-ritratto .page-hero__text { padding-bottom: 64px; }
.page-hero__ritratto {
	align-self: end; aspect-ratio: 4 / 5; padding-top: 24px;
	background: radial-gradient(closest-side at 50% 42%, rgba(255, 236, 200, .30) 0%, rgba(214, 178, 98, .18) 34%, rgba(184, 145, 58, .07) 62%, rgba(14, 34, 64, 0) 100%);
}
.page-hero__ritratto img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 10px 28px rgba(0, 0, 0, .28)); }
@media (max-width: 900px) {
	.page-hero.has-ritratto .wrap { grid-template-columns: 1fr; padding-top: 0; }
	.page-hero__ritratto { order: -1; height: 400px; aspect-ratio: auto; margin: 0 -16px -100px; overflow: hidden; position: relative; z-index: 0; }
	.page-hero__ritratto img { object-fit: cover; object-position: 50% 0; filter: none;
		-webkit-mask-image: linear-gradient(to bottom, #000 58%, rgba(0, 0, 0, 0) 96%); mask-image: linear-gradient(to bottom, #000 58%, rgba(0, 0, 0, 0) 96%); }
	.page-hero.has-ritratto .page-hero__text { position: relative; z-index: 1; padding-bottom: 40px; }
}

/* Ritratti a mezzo busto (home e Chi sono): riquadri quadrati, figura poggiata sul filo ottone */
.hero__photo, .page-hero__ritratto { aspect-ratio: 1 / 1; }
@media (max-width: 900px) {
	.hero__photo, .page-hero__ritratto { aspect-ratio: auto; height: 380px; }
	.hero__photo img, .page-hero__ritratto img { object-fit: contain; object-position: 50% 100%; }
	.hero__photo { margin-bottom: -70px; }
	.page-hero__ritratto { margin-bottom: -70px; }
}

/* Home: figura intera (nuova foto). Riquadro alto quanto la foto; su telefono sfuma nel blu. */
.hero__photo { aspect-ratio: 1152 / 1638; width: min(100%, 420px); }
@media (max-width: 900px) {
	.hero__photo { aspect-ratio: auto; width: 100%; height: 470px; margin-bottom: -110px; }
	.hero__photo img { object-fit: cover; object-position: 50% 0; }
}

/* Modulo di adesione Rinascita Forense */
.rf-box { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--brass); padding: 32px; margin-top: 8px; font-family: var(--sans); font-size: 16px; }
.rf-box .field input[type=text], .rf-box .field input[type=email], .rf-box .field input[type=tel] { padding: 13px 14px; font-size: 16px; }
.rf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rf-box fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.rf-box legend { font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 8px; color: var(--ink); }
.rf-qualifica { flex-direction: row !important; flex-wrap: wrap; gap: 12px !important; }
.rf-qualifica legend { width: 100%; }
.rf-radio { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-strong); padding: 12px 16px; font-size: 15px; font-weight: 500; cursor: pointer; }
.rf-radio:has(input:checked) { border-color: var(--navy); background: var(--mist); }
.rf-dichiarazioni { border-top: 1px solid var(--line) !important; padding-top: 18px !important; margin-top: 4px !important; }
.rf-dichiarazioni .privacy { font-size: 14px; }
.rf-manca { color: var(--muted); font-style: italic; }
.rf-invia { align-self: flex-start; padding: 15px 28px; font-size: 16px; }
.rf-avvertenza { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 4px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.rf-box .esito ul { margin: 6px 0 0; padding-left: 20px; }
@media (max-width: 700px) { .rf-box { padding: 20px; } .rf-grid { grid-template-columns: 1fr; } .rf-invia { align-self: stretch; } }

/* Banner Instagram (aree Italia e Salerno), sotto quello di Facebook */
.fb-banner--ig, .fb-banner--ig:hover { background: var(--navy-deep); color: #fff; margin-top: 16px; }
.fb-banner--ig::after { color: #fff; opacity: .05; }
.fb-banner--ig .fb-banner__icon { background: var(--navy); color: #fff; }
.fb-banner--ig .fb-banner__title { color: #fff; }
.fb-banner--ig .fb-banner__eyebrow, .fb-banner--ig .fb-banner__handle { color: var(--brass); }
.fb-banner--ig .fb-banner__desc { color: var(--line); }
.fb-banner--ig .fb-banner__cta { background: var(--brass); color: var(--navy-deep); }
.fb-banner--ig:hover .fb-banner__cta { background: #cfa548; }
@media (max-width: 800px) { .fb-banner--ig { margin-top: 12px; } }

/* Rimando in fondo a un testo (es. Seconde possibilità → SPES APS) */
.prose .rimando a { display: inline-block; margin-top: 8px; padding: 13px 22px; background: var(--navy); color: #fff; text-decoration: none; font-family: var(--sans); font-size: 15px; font-weight: 500; }
.prose .rimando a:hover { background: var(--navy-light); color: #fff; }

/* Foto scontornate senza aloni: niente bagliore dietro e niente ombra intorno alla figura. */
.hero__photo, .page-hero__ritratto { background: none; }
.hero__photo img, .page-hero__ritratto img { filter: none; }

/* Home su telefono: figura meno zoomata (si vede più busto), sfumatura in basso sul riquadro. */
@media (max-width: 900px) {
	.hero__photo {
		-webkit-mask-image: linear-gradient(to bottom, #000 62%, rgba(0, 0, 0, 0) 97%);
		mask-image: linear-gradient(to bottom, #000 62%, rgba(0, 0, 0, 0) 97%);
	}
	.hero__photo img {
		display: block; width: 78%; max-width: 420px; height: auto; margin: 0 auto;
		object-fit: contain; -webkit-mask-image: none; mask-image: none;
	}
}

/* Menu su telefono: Proposte e Progetti chiusi, si aprono al tocco (freccia che gira). */
@media (max-width: 1000px) {
	.nav .menu-item-has-children:not(.is-open) > .sub-menu { display: none !important; }
	.nav .menu-item-has-children > a { display: flex; justify-content: space-between; align-items: center; }
	.nav .menu-item-has-children > a::after { content: '▾'; font-size: 16px; color: var(--brass); transition: transform .2s; }
	.nav .menu-item-has-children.is-open > a::after { transform: rotate(180deg); }
	.nav .menu-item-has-children.is-open > .sub-menu { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
	.nav .sub-menu a { border-bottom: 0; padding: 11px 0 11px 8px; }
}

/* Pulsante social fluttuante: solo su telefono (dove la barra social in alto è nascosta). */
.social-fab { display: none; }
@media (max-width: 700px) {
	.social-fab { display: block; position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 90; }
	.social-fab__btn {
		position: relative; width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--brass);
		background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
		box-shadow: 0 8px 24px rgba(9, 24, 48, .35); transition: transform .3s, background .3s;
	}
	.social-fab__btn svg { position: absolute; transition: opacity .25s, transform .35s; }
	.social-fab__x { opacity: 0; transform: rotate(-90deg); }
	.social-fab.is-open .social-fab__btn { background: var(--brass); transform: rotate(0); }
	.social-fab.is-open .social-fab__share { opacity: 0; transform: rotate(90deg) scale(.6); }
	.social-fab.is-open .social-fab__x { opacity: 1; transform: rotate(0); }
	.social-fab__lista { list-style: none; margin: 0; padding: 0; position: absolute; right: 4px; bottom: 68px; display: flex; flex-direction: column-reverse; gap: 10px; pointer-events: none; }
	.social-fab.is-open .social-fab__lista { pointer-events: auto; }
	.social-fab__lista li {
		opacity: 0; transform: translateY(16px) scale(.6);
		transition: opacity .22s ease, transform .3s cubic-bezier(.3, 1.5, .5, 1);
		transition-delay: calc((4 - var(--i)) * 25ms);
	}
	.social-fab.is-open .social-fab__lista li { opacity: 1; transform: none; transition-delay: calc(var(--i) * 55ms); }
	.social-fab__lista a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; text-decoration: none; }
	.social-fab__nome { background: #fff; color: var(--navy); font-family: var(--sans); font-size: 13px; font-weight: 500; padding: 6px 10px; white-space: nowrap; box-shadow: 0 4px 14px rgba(9, 24, 48, .18); }
	.social-fab__icona { width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--navy); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(9, 24, 48, .25); }
	.social-fab__lista a:active .social-fab__icona { background: var(--navy); color: #fff; }
}
@media (prefers-reduced-motion: reduce) {
	.social-fab__lista li, .social-fab__btn, .social-fab__btn svg { transition: none !important; }
}
@media (max-width: 700px) {
	.social-fab__lista a[href^="https://wa.me"] .social-fab__icona { background: #25D366; color: #fff; }
}

/* Video a richiesta (nessun contenuto YouTube finché non si preme play) */
.embed__play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; display: block; }
.embed__play img { width: 100%; height: 100%; object-fit: cover; opacity: .88; transition: opacity .2s; }
.embed__play:hover img, .embed__play:focus-visible img { opacity: 1; }
.embed__icona { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); transition: transform .2s; }
.embed__play:hover .embed__icona { transform: translate(-50%, -50%) scale(1.08); }
.embed__nota { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 6px 12px; background: rgba(9, 24, 48, .78); color: #C9D1DD; font: 12px/1.4 var(--sans); }
.embed__nota a { color: #fff; }
