/*
Theme Name:        Cervigni
Theme URI:         https://paolocervigni.com
Author:            Paolo Cervigni
Description:       Tema editoriale e luminoso per le guide e le cartine escursionistiche di Paolo Cervigni. Le copertine dei libri sono le protagoniste; layout pronto per un negozio (vendita disattivata).
Version:           1.0.0
Requires at least: 6.4
Tested up to:      6.8
Requires PHP:      8.0
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       cervigni
Tags:              blog, one-column, custom-colors, editor-style, featured-images, translation-ready
*/

/* ==========================================================================
   1. Font self-hosted (SIL OFL): Inter e Fraunces, sottoinsiemi latin e latin-ext
   ========================================================================== */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/inter-latin-wght-normal.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: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/inter-latin-ext-wght-normal.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;
}
@font-face {
	font-family: "Fraunces";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/fraunces-latin-wght-normal.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: "Fraunces";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/fraunces-latin-ext-wght-normal.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;
}
@font-face {
	font-family: "Fraunces";
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/fraunces-latin-wght-italic.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;
}

/* ==========================================================================
   2. Variabili e base
   ========================================================================== */
:root {
	--bg: #faf8f4;
	--surface: #ffffff;
	--ink: #1f2421;
	--muted: #5a625c;
	--accent: #2f5d50;
	--accent-dark: #234a3f;
	--accent-deep: #1a392f;
	--accent-tint: rgba(47, 93, 80, 0.09);
	--ochre: #c98b3a;
	--ochre-soft: #f7ead3;
	--ochre-ink: #6b430c;
	--sand: #f2eee5;
	--line: #e6e1d6;
	--focus: #2f5d50;
	--radius: 12px;
	--shadow-sm: 0 1px 2px rgba(31, 36, 33, 0.06), 0 4px 14px -6px rgba(31, 36, 33, 0.12);
	--shadow-md: 0 2px 4px rgba(31, 36, 33, 0.06), 0 14px 32px -12px rgba(31, 36, 33, 0.22);
	--font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-head: "Fraunces", Georgia, "Times New Roman", serif;
	--wrap: 1200px;
	--header-h: 64px;
	--gutter: 20px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--accent);
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--accent-dark);
}

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

h1,
h2,
h3,
h4 {
	font-family: var(--font-head);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.01em;
	margin: 0 0 0.5em;
	text-wrap: balance;
}

p {
	margin: 0 0 1.1em;
}

ul[role="list"] {
	list-style: none;
	margin: 0;
	padding: 0;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal;
}

.skip-link {
	position: absolute;
	left: 12px;
	top: -60px;
	z-index: 100;
	background: var(--accent);
	color: #fff;
	padding: 10px 16px;
	border-radius: 8px;
	text-decoration: none;
	transition: top 0.15s;
}

.skip-link:focus {
	top: 12px;
	color: #fff;
}

.wrap {
	width: 100%;
	max-width: calc(var(--wrap) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.wrap--narrow {
	max-width: calc(720px + var(--gutter) * 2);
}

.wrap--narrow > .prose {
	max-width: none;
}

@media (min-width: 700px) {
	:root {
		--gutter: 32px;
	}
}

/* ==========================================================================
   3. Testata e menu
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(250, 248, 244, 0.92);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.site-header.is-scrolled {
	background: var(--bg);
	border-bottom-color: var(--line);
	box-shadow: 0 6px 24px -16px rgba(31, 36, 33, 0.35);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: var(--header-h);
	transition: min-height 0.2s;
}

.wordmark {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: var(--ink);
	line-height: 1.1;
}

.wordmark__name {
	font-family: var(--font-head);
	font-weight: 600;
	font-size: 1.45rem;
	letter-spacing: -0.015em;
}

.wordmark__tag {
	font-size: 0.68rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
	margin-top: 3px;
	transition: opacity 0.2s, max-height 0.2s, margin-top 0.2s, visibility 0s;
	max-height: 1.5em;
	overflow: hidden;
}

.site-header.is-scrolled .wordmark__tag {
	opacity: 0;
	max-height: 0;
	margin-top: 0;
	visibility: hidden;
	transition: opacity 0.2s, max-height 0.2s, margin-top 0.2s, visibility 0s linear 0.2s;
}

.site-header__tools {
	display: flex;
	align-items: center;
	gap: 8px;
}

.header__cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: var(--ink);
}

.header__cart-count {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 9px;
	background: var(--ochre);
	color: var(--ink);
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 50%;
	color: var(--ink);
	cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle__bars {
	position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
	content: "";
	position: absolute;
	left: 0;
}

.nav-toggle__bars::before {
	top: -6px;
}

.nav-toggle__bars::after {
	top: 6px;
}

.nav-open .nav-toggle__bars {
	background: transparent;
}

.nav-open .nav-toggle__bars::before {
	top: 0;
	transform: rotate(45deg);
}

.nav-open .nav-toggle__bars::after {
	top: 0;
	transform: rotate(-45deg);
}

/* Menu: pannello a tutta pagina su mobile */
.nav {
	position: fixed;
	inset: var(--header-h) 0 0 0;
	z-index: 40;
	background: var(--bg);
	padding: 24px var(--gutter) 40px;
	overflow-y: auto;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.nav-open .nav {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.nav-open {
	overflow: hidden;
}

.nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav__list a {
	display: block;
	padding: 14px 0;
	border-bottom: 1px solid var(--line);
	font-family: var(--font-head);
	font-size: 1.6rem;
	font-weight: 600;
	color: var(--ink);
	text-decoration: none;
}

.nav__list .current-menu-item > a,
.nav__list a[aria-current="page"] {
	color: var(--accent);
}

@media (min-width: 900px) {
	:root {
		--header-h: 84px;
	}

	.site-header.is-scrolled {
		--header-h: 62px;
	}

	.nav-toggle {
		display: none;
	}

	.nav {
		position: static;
		inset: auto;
		padding: 0;
		background: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		overflow: visible;
		margin-left: auto;
	}

	.nav__list {
		display: flex;
		gap: 4px;
	}

	.nav__list a {
		padding: 8px 14px;
		border: 0;
		border-radius: 999px;
		font-family: var(--font-body);
		font-size: 0.95rem;
		font-weight: 500;
	}

	.nav__list a:hover {
		background: var(--sand);
		color: var(--ink);
	}

	.nav__list .current-menu-item > a,
	.nav__list a[aria-current="page"] {
		background: var(--accent);
		color: #fff;
	}
}

/* ==========================================================================
   4. Bottoni, etichette, elementi comuni
   ========================================================================== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding: 0.8rem 1.5rem;
	border: 2px solid transparent;
	border-radius: 999px;
	font-family: var(--font-body);
	font-size: 0.98rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.btn:focus-visible,
.chip:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 2px;
}

.btn:active {
	transform: translateY(0);
	box-shadow: none;
}

.btn--primary {
	background: var(--accent);
	color: #fff;
}

.btn--primary:hover {
	background: var(--accent-deep);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px -6px rgba(26, 57, 47, 0.55);
}

.btn--outline {
	border-color: var(--accent);
	color: var(--accent);
	background: transparent;
}

.btn--outline:hover {
	background: var(--accent-tint);
	border-color: var(--accent-deep);
	color: var(--accent-deep);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px -6px rgba(26, 57, 47, 0.35);
}

.btn--light {
	background: #fff;
	color: var(--accent-dark);
}

.btn--light:hover {
	background: var(--sand);
	color: var(--accent-deep);
	transform: translateY(-1px);
	box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.35);
}

.btn--ghost-light {
	border-color: rgba(255, 255, 255, 0.75);
	color: #fff;
}

.btn--ghost-light:hover {
	background: rgba(255, 255, 255, 0.18);
	border-color: #fff;
	color: #fff;
	transform: translateY(-1px);
}

.btn--block {
	display: flex;
	width: 100%;
}

.text-link {
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.text-link:hover {
	text-decoration: underline;
}

.eyebrow {
	margin: 0 0 0.6em;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
}

.eyebrow--accent {
	color: var(--accent);
}

.section {
	padding-block: 56px;
}

.section--flush {
	padding-top: 32px;
}

.spotlight + .book-catalog.section {
	padding-top: 36px;
}

.section--tint {
	background: var(--sand);
}

.section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	margin-bottom: 28px;
}

.section__title {
	font-size: clamp(1.6rem, 4vw, 2.3rem);
	margin: 0;
}

@media (min-width: 900px) {
	.section {
		padding-block: 64px;
	}
}

.page-hero {
	padding-block: 44px 28px;
	background: linear-gradient(180deg, var(--sand), var(--bg));
}

.page-hero--compact {
	padding-block: 36px 8px;
}

.page-hero--center {
	text-align: center;
	padding-block: 72px;
}

.page-hero__title {
	font-size: clamp(2.1rem, 6vw, 3.6rem);
	margin-bottom: 0.3em;
}

.page-hero__lead {
	max-width: 56ch;
	font-size: 1.15rem;
	color: var(--muted);
}

.page-hero--center .page-hero__lead {
	margin-inline: auto;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	margin-top: 24px;
}

/* ==========================================================================
   5. Home: ultima uscita e chi sono
   ========================================================================== */
.spotlight {
	padding-block: 16px 36px;
	border-bottom: 1px solid var(--line);
}

.spotlight__site {
	margin: 0 0 22px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(31, 36, 33, 0.12);
}

.spotlight__site-name {
	margin: 0;
	font-family: var(--font-body);
	line-height: 1.4;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
}

.spotlight__grid {
	display: grid;
	gap: 28px;
	align-items: center;
}

.spotlight__text {
	min-width: 0;
}

.spotlight__title {
	font-size: clamp(1.8rem, 3.6vw, 2.6rem);
	margin-bottom: 0.2em;
}

.spotlight__title a {
	color: var(--ink);
	text-decoration: none;
}

.spotlight__title a:hover {
	color: var(--accent);
}

.spotlight__sub {
	color: var(--muted);
	font-size: 1.1rem;
	margin-bottom: 0.6em;
}

.spotlight__blurb {
	max-width: 60ch;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: #3c433e;
}

.spotlight__buy {
	margin: 20px 0 16px;
}

.spotlight__buy .purchase {
	margin: 0;
	padding: 16px 20px;
}

.spotlight__buy .purchase__note--small,
.spotlight__buy .purchase__status:not(.purchase__status--out) {
	display: none;
}

.spotlight__text > p:last-child {
	margin-bottom: 0;
}

@media (min-width: 800px) {
	.spotlight__grid {
		grid-template-columns: 340px minmax(0, 1fr);
		gap: 80px;
	}

	.spotlight__buy .purchase {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
		align-items: center;
		gap: 12px 32px;
		max-width: 640px;
		padding: 18px 24px;
	}

	.spotlight__buy .purchase__price {
		margin: 0;
		font-size: 2.2rem;
	}

	.spotlight__buy .purchase__note:not(.purchase__note--small) {
		display: none;
	}
}

.about__grid {
	display: grid;
	gap: 32px;
	align-items: center;
}

.about__photo {
	margin: 0;
	justify-self: center;
	max-width: 420px;
}

.about__photo img {
	display: block;
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
}

.about__text .section__title {
	margin-bottom: 0.5em;
}

.about__text p {
	max-width: 56ch;
}

@media (min-width: 800px) {
	.about__grid {
		grid-template-columns: minmax(280px, 420px) 1fr;
		gap: 72px;
	}
}

/* ==========================================================================
   6. Copertine e scaffale
   ========================================================================== */
.cover {
	position: relative;
	display: block;
	line-height: 0;
	text-decoration: none;
}

.cover__img {
	display: block;
	max-width: 100%;
	width: auto;
	height: auto;
	border-radius: 2px 5px 5px 2px;
	box-shadow: 0 1px 2px rgba(31, 36, 33, 0.18), 0 10px 22px -8px rgba(31, 36, 33, 0.4), 0 22px 40px -18px rgba(31, 36, 33, 0.35);
}

.cover__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 3 / 4;
	padding: 14%;
	background: linear-gradient(160deg, var(--accent), var(--accent-dark));
	color: #fff;
	border-radius: 2px 5px 5px 2px;
	font-family: var(--font-head);
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	box-shadow: 0 10px 22px -8px rgba(31, 36, 33, 0.4);
}

/* Copertina su uno scaffale: cornice 2:3, tutte appoggiate sulla stessa base */
.cover--shelf {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	aspect-ratio: 2 / 3;
	padding-bottom: 8px;
}

.cover--shelf::before {
	content: "";
	position: absolute;
	left: 8%;
	right: 8%;
	bottom: 0;
	height: 14px;
	background: radial-gradient(ellipse at center, rgba(31, 36, 33, 0.22), transparent 70%);
}

.cover--shelf .cover__img {
	position: relative;
	max-height: calc(100% - 8px);
	transition: transform 0.25s ease;
}

.cover--shelf .cover__placeholder {
	position: relative;
	height: calc(100% - 8px);
	max-width: 86%;
	aspect-ratio: auto;
}

.book-card__link:hover .cover__img,
.book-card__link:focus-visible .cover__img {
	transform: translateY(-6px);
}

.cover--feature {
	justify-self: center;
	max-width: 100%;
}

.cover--feature .cover__img {
	max-height: 350px;
	margin-inline: auto;
}

@media (min-width: 800px) {
	.cover--feature {
		justify-self: stretch;
	}
}

.cover--hero {
	max-width: 440px;
	margin-inline: auto;
}

.cover--hero .cover__img {
	margin-inline: auto;
	max-height: 520px;
	box-shadow: 0 2px 4px rgba(31, 36, 33, 0.2), 0 18px 36px -12px rgba(31, 36, 33, 0.45), 0 40px 70px -30px rgba(31, 36, 33, 0.4);
}

.shelf {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px 16px;
}

@media (min-width: 700px) {
	.shelf {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 36px 22px;
	}
}

@media (min-width: 1100px) {
	.shelf {
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: 40px 26px;
	}
}

@media (min-width: 1380px) {
	.shelf {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}

/* Riga unica ("Altri libri"): scorrimento orizzontale fino a 1100px, poi sei colonne */
.shelf--row {
	display: grid;
	grid-template-columns: none;
	grid-auto-flow: column;
	grid-auto-columns: minmax(150px, 40%);
	gap: 16px;
	overflow-x: auto;
	padding: 4px 2px 16px;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 2px;
	-webkit-overflow-scrolling: touch;
}

.shelf--row > .book-card {
	scroll-snap-align: start;
}

@media (min-width: 700px) {
	.shelf--row {
		grid-template-columns: none;
		grid-auto-columns: minmax(170px, 24%);
		gap: 22px;
	}
}

@media (min-width: 1100px) {
	.shelf--row {
		grid-template-columns: repeat(6, minmax(0, 1fr));
		grid-auto-flow: row;
		grid-auto-columns: auto;
		gap: 26px;
		overflow: visible;
		padding: 0;
	}
}

.book-card {
	min-width: 0;
}

.book-card[hidden] {
	display: none;
}

.book-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.book-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	padding-top: 14px;
}

.book-card__kind {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.8rem;
	font-weight: 500;
	line-height: 1.4;
	color: var(--muted);
}

.book-card__title {
	min-height: 2.6em;
	font-family: var(--font-head);
	font-size: 1.02rem;
	font-weight: 600;
	line-height: 1.3;
	hyphens: auto;
	overflow-wrap: break-word;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.book-card__link:hover .book-card__title {
	color: var(--accent);
}

.book-card__price {
	display: flex;
	align-items: center;
	min-height: 28px;
	margin-top: 4px;
}

.book-card__soldout {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--muted);
}

.price-badge {
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--ochre-soft);
	color: var(--ochre-ink);
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.6;
}

.ribbon {
	position: absolute;
	top: 6px;
	left: 6px;
	z-index: 2;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.5;
}

.ribbon--new {
	background: var(--ochre);
	color: var(--ink);
}

.book-card.is-out .cover__img {
	filter: grayscale(0.55);
	opacity: 0.8;
}

/* Filtri */
.chips {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	margin: 0 calc(var(--gutter) * -1) 28px;
	padding: 2px var(--gutter);
	overflow-x: auto;
	scrollbar-width: none;
}

.chips::-webkit-scrollbar {
	display: none;
}

@media (min-width: 700px) {
	.chips {
		margin-inline: 0;
		padding-inline: 0;
		overflow: visible;
	}
}

.chips[hidden] {
	display: none;
}

.chip {
	flex: 0 0 auto;
	white-space: nowrap;
	padding: 9px 18px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink);
	font: inherit;
	font-size: 0.92rem;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.chip:hover {
	border-color: var(--accent);
	background: var(--accent-tint);
	color: var(--accent-deep);
}

.chip.is-active {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.chip.is-active:hover {
	background: var(--accent-deep);
	border-color: var(--accent-deep);
	color: #fff;
}

.book-section + .book-section {
	margin-top: 48px;
	padding-top: 40px;
	border-top: 1px solid var(--line);
}

.book-section[hidden] {
	display: none;
}

.book-section__title {
	font-size: clamp(1.6rem, 4vw, 2.3rem);
	margin-bottom: 0.3em;
}

.book-section__note {
	color: var(--muted);
	margin-bottom: 28px;
}

.book-section__title + .shelf {
	margin-top: 28px;
}

/* ==========================================================================
   7. Pagina del libro
   ========================================================================== */
.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding-block: 20px 8px;
	font-size: 0.86rem;
	color: var(--muted);
}

.breadcrumb a {
	color: var(--muted);
}

.breadcrumb [aria-current] {
	color: var(--ink);
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.book__grid {
	display: flex;
	flex-direction: column;
	gap: 28px;
	padding-block: 12px 56px;
}

.book__head {
	order: 2;
	min-width: 0;
}

.book__aside {
	display: contents;
}

.book__visual {
	order: 1;
	min-width: 0;
}

.book__buy {
	order: 3;
	min-width: 0;
}

.book__description {
	order: 4;
	min-width: 0;
	padding-top: 32px;
	border-top: 1px solid var(--line);
}

ul.book__gallery {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin: 0;
	padding: 0;
	margin-top: 28px;
	list-style: none;
}

.book__gallery a {
	display: block;
	border-radius: 8px;
	line-height: 0;
}

.book__gallery img {
	display: block;
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 8px;
	box-shadow: var(--shadow-sm);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.book__gallery a:hover img,
.book__gallery a:focus-visible img {
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}

@media (prefers-reduced-motion: reduce) {
	.book__gallery img {
		transition: none;
	}

	.book__gallery a:hover img,
	.book__gallery a:focus-visible img {
		transform: none;
	}
}

.book__title {
	font-size: clamp(1.9rem, 5vw, 3rem);
	margin-bottom: 0.25em;
}

.book__subtitle {
	font-size: 1.15rem;
	color: var(--muted);
	margin-bottom: 0;
}

.book__buy .purchase {
	margin-top: 0;
}

.book__description .section__title {
	margin-bottom: 0.6em;
}

@media (min-width: 1000px) {
	.book__grid {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 380px;
		grid-template-areas:
			"head aside"
			"desc aside";
		grid-template-rows: auto 1fr;
		column-gap: 80px;
		row-gap: 0;
		align-items: start;
		padding-bottom: 72px;
	}

	.book__head,
	.book__description,
	.book__aside,
	.book__visual,
	.book__buy {
		order: 0;
	}

	.book__head {
		grid-area: head;
		padding-bottom: 28px;
	}

	.book__description {
		grid-area: desc;
	}

	.book__aside {
		display: block;
		grid-area: aside;
	}

	.cover--hero {
		max-width: 260px;
	}

	.cover--hero .cover__img {
		max-height: 380px;
	}

	.book__visual {
		margin-bottom: 28px;
	}

	ul.book__gallery {
		margin-top: 40px;
	}

	.book__buy .purchase {
		margin-bottom: 20px;
		padding: 18px 20px;
	}
}

@media (min-width: 1000px) and (min-height: 820px) {
	.book__aside {
		position: sticky;
		top: calc(var(--header-h) + 20px);
	}
}

.purchase {
	margin: 24px 0 28px;
	padding: 22px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
}

.purchase__price {
	margin: 0 0 4px;
	font-family: var(--font-head);
	font-size: 2.1rem;
	font-weight: 600;
	line-height: 1.1;
	color: var(--accent-dark);
}

.purchase__note {
	margin: 0 0 12px;
	font-size: 0.92rem;
	color: var(--muted);
	line-height: 1.5;
}

.purchase__note--small {
	margin: 12px 0 0;
	font-size: 0.82rem;
}

.purchase__actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.purchase__actions .btn {
	width: 100%;
}

.purchase__status {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--accent);
}

.purchase__status .dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #3f9b6e;
}

.purchase--out {
	background: var(--sand);
	box-shadow: none;
}

.purchase__status--out {
	margin: 0 0 6px;
	font-family: var(--font-head);
	font-size: 1.4rem;
	color: var(--ink);
}

.specs {
	margin: 0;
	border-top: 1px solid var(--line);
}

.specs__row {
	display: grid;
	grid-template-columns: 7.5rem 1fr;
	gap: 12px;
	padding: 11px 0;
	border-bottom: 1px solid var(--line);
	font-size: 0.97rem;
}

.specs dt {
	color: var(--muted);
}

.specs dd {
	margin: 0;
	font-weight: 500;
}

/* ==========================================================================
   8. Schede con foto (escursioni, articoli) e archivi
   ========================================================================== */
.card-grid {
	display: grid;
	gap: 28px;
}

@media (min-width: 640px) {
	.card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1000px) {
	.card-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 32px;
	}
}

.post-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.post-card__media {
	display: block;
	aspect-ratio: 3 / 2;
	background: var(--sand);
	border-radius: var(--radius);
	overflow: hidden;
}

.post-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.post-card:hover .post-card__media img {
	transform: scale(1.04);
}

.post-card__placeholder {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: var(--accent);
	background: linear-gradient(160deg, #e9efe9, var(--sand));
}

.post-card__placeholder svg {
	width: 70%;
	height: auto;
}

.post-card__body {
	padding: 14px 0 0;
}

.post-card__body .eyebrow {
	margin-bottom: 4px;
	font-size: 0.7rem;
	letter-spacing: 0.1em;
}

.post-card__title {
	margin: 0 0 4px;
	font-size: 1.1rem;
	line-height: 1.3;
}

.post-card__title a {
	color: var(--ink);
	text-decoration: none;
}

.post-card__title a:hover,
.post-card:hover .post-card__title a {
	color: var(--accent);
}

.post-card__meta {
	margin: 0;
	font-size: 0.85rem;
	color: var(--muted);
}

.pagination {
	margin-top: 48px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.page-numbers {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink);
	text-decoration: none;
	font-size: 0.95rem;
}

.page-numbers.current {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

a.page-numbers:hover {
	border-color: var(--accent);
}

/* ==========================================================================
   9. Articolo singolo e pagine: colonna di lettura e vecchi contenuti
   ========================================================================== */
.article__header {
	padding-block: 44px 28px;
}

.article__title {
	font-size: clamp(2rem, 5.5vw, 3.2rem);
	margin-bottom: 0.3em;
}

.article__meta {
	color: var(--muted);
	font-size: 0.92rem;
}

.article__figure figure {
	margin: 0 0 40px;
}

.article__figure img {
	display: block;
	width: 100%;
	max-height: 560px;
	object-fit: cover;
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
}

.page-body,
.article {
	padding-bottom: 56px;
}

.prose {
	max-width: 68ch;
	overflow-wrap: break-word;
}

.prose > * {
	max-width: 100%;
}

/* Vecchi contenuti: stili inline (font, colori, interlinea) non devono rompere il design */
.prose [style*="font-family"],
.prose font,
.prose span,
.prose p,
.prose li,
.prose div {
	font-family: inherit !important;
}

.prose [style*="font-size"],
.prose font {
	font-size: inherit !important;
	line-height: inherit !important;
}

.prose [style*="color"],
.prose font {
	color: inherit !important;
}

.prose [style*="text-align"],
.prose p {
	text-align: left !important;
}

.prose [style*="background"] {
	background: none !important;
}

.prose h2 {
	font-size: 1.8rem;
	margin-top: 1.8em;
}

.prose h3 {
	font-size: 1.4rem;
	margin-top: 1.6em;
}

.prose h4 {
	font-size: 1.15rem;
	margin-top: 1.4em;
}

.prose p,
.prose li {
	line-height: 1.75;
}

/* Immagini dei vecchi contenuti: sempre in colonna, centrate, mai affiancate al testo */
.entry-content img,
.prose img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: 70vh;
	height: auto;
	object-fit: contain;
	margin: 1.4em auto;
	border-radius: 6px;
}

.entry-content img.is-wide {
	position: relative;
	left: 50%;
	max-width: min(var(--wrap), calc(100vw - var(--gutter) * 2));
	transform: translateX(-50%);
}

.prose figure,
.prose .wp-caption {
	width: fit-content !important;
	max-width: 100% !important;
	margin: 1.6em auto;
	float: none !important;
}

.prose figure img,
.prose .wp-caption img {
	margin: 0 auto;
}

.prose figcaption,
.prose .wp-caption-text {
	margin-top: 8px;
	font-size: 0.86rem;
	color: var(--muted);
	line-height: 1.5;
	text-align: center !important;
}

.prose .alignleft,
.prose .alignright,
.prose .aligncenter,
.prose img.alignleft,
.prose img.alignright,
.prose img.aligncenter {
	float: none !important;
	display: block;
	margin: 1.4em auto;
	max-width: 100%;
}

.prose::after {
	content: "";
	display: table;
	clear: both;
}

.prose table {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
	font-size: 0.95rem;
	-webkit-overflow-scrolling: touch;
}

.prose th,
.prose td {
	padding: 8px 12px;
	border: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

.prose th {
	background: var(--sand);
	font-weight: 600;
}

.prose blockquote {
	margin: 1.6em 0;
	padding: 4px 0 4px 20px;
	border-left: 4px solid var(--ochre);
	font-family: var(--font-head);
	font-size: 1.12rem;
	font-style: italic;
	color: #3c433e;
}

.prose iframe,
.prose video,
.prose embed,
.prose object {
	max-width: 100%;
}

.prose iframe[src*="youtube"],
.prose iframe[src*="youtu.be"],
.prose iframe[src*="vimeo"],
.prose .wp-block-embed iframe {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

.prose pre {
	max-width: 100%;
	overflow-x: auto;
	padding: 14px;
	background: var(--sand);
	border-radius: 8px;
	font-size: 0.9rem;
}

.prose hr {
	margin: 2.4em 0;
	border: 0;
	border-top: 1px solid var(--line);
}

.post-nav {
	display: grid;
	gap: 14px;
	margin: 56px 0 24px;
}

@media (min-width: 640px) {
	.post-nav {
		grid-template-columns: 1fr 1fr;
	}

	.post-nav__item--next {
		text-align: right;
		grid-column: 2;
	}
}

.post-nav__item {
	display: block;
	padding: 16px 18px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	color: var(--ink);
	text-decoration: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.post-nav__item:hover {
	border-color: var(--accent);
	box-shadow: var(--shadow-sm);
	color: var(--ink);
}

.post-nav__label {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}

.post-nav__title {
	display: block;
	font-family: var(--font-head);
	font-weight: 600;
	line-height: 1.3;
}

.page-links {
	margin: 2em 0;
}

/* ==========================================================================
   10. Ricerca
   ========================================================================== */
.search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	max-width: 520px;
	margin: 24px auto 0;
}

.page-hero:not(.page-hero--center) .search-form {
	margin-left: 0;
}

.search-form__input {
	flex: 1 1 220px;
	min-width: 0;
	padding: 0.8rem 1.2rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink);
	font: inherit;
}

/* ==========================================================================
   11. Piè di pagina
   ========================================================================== */
.site-footer {
	margin-top: 0;
	background: var(--bg);
	border-top: 1px solid var(--line);
	font-size: 0.95rem;
}

.site-footer__grid {
	display: grid;
	gap: 32px;
	padding-block: 56px 40px;
}

@media (min-width: 700px) {
	.site-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1000px) {
	.site-footer__grid {
		grid-template-columns: 1.3fr 1.3fr 1fr 1.2fr;
		gap: 48px;
	}
}

.site-footer__name {
	margin: 0 0 8px;
	font-family: var(--font-head);
	font-size: 1.5rem;
	font-weight: 600;
}

.site-footer__title {
	margin: 0 0 12px;
	font-family: var(--font-body);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
}

.site-footer__text {
	margin: 0 0 12px;
	color: #3c433e;
}

.footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer__list li {
	margin-bottom: 6px;
}

.footer__list a {
	color: var(--ink);
	text-decoration: none;
}

.footer__list a:hover {
	color: var(--accent);
	text-decoration: underline;
}

.site-footer__bar {
	padding-block: 20px 28px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.85rem;
}

.site-footer__bar p {
	margin: 0;
}

/* ==========================================================================
   12. Modulo WPForms
   ========================================================================== */
.wpforms-container {
	max-width: 620px;
	margin: 8px 0 24px;
}

.wpforms-container .wpforms-field {
	padding: 0 0 18px;
}

.wpforms-container .wpforms-field-label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 0.95rem;
}

.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="tel"],
.wpforms-container input[type="url"],
.wpforms-container input[type="number"],
.wpforms-container select,
.wpforms-container textarea {
	width: 100% !important;
	max-width: 100% !important;
	padding: 0.8rem 1rem;
	border: 1px solid #cfc9bb;
	border-radius: 10px;
	background: var(--surface);
	color: var(--ink);
	font: inherit;
	line-height: 1.4;
	box-shadow: none;
}

.wpforms-container input:focus,
.wpforms-container textarea:focus,
.wpforms-container select:focus {
	outline: 3px solid var(--focus);
	outline-offset: 1px;
	border-color: var(--accent);
}

.wpforms-container button[type="submit"],
.wpforms-container .wpforms-submit {
	padding: 0.85rem 1.8rem !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--accent) !important;
	color: #fff !important;
	font: inherit !important;
	font-weight: 600 !important;
	cursor: pointer;
}

.wpforms-container button[type="submit"]:hover {
	background: var(--accent-dark) !important;
}

.wpforms-container .wpforms-error,
.wpforms-container label.wpforms-error {
	color: #a12a1b;
	font-size: 0.88rem;
}

.wpforms-confirmation-container-full {
	padding: 16px 20px;
	border: 1px solid #b8d4c3;
	border-radius: 10px;
	background: #eaf4ee;
}

/* ==========================================================================
   13. WooCommerce (minimo, dormiente finché il negozio è spento)
   ========================================================================== */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
	padding: 0.8rem 1.5rem;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font-weight: 600;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover {
	background: var(--accent-dark);
	color: #fff;
}

.woocommerce table.shop_table {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	border-collapse: separate;
	overflow: hidden;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	padding: 14px 16px;
	border-color: var(--line);
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	padding: 0.7rem 0.9rem;
	border: 1px solid #cfc9bb;
	border-radius: 10px;
	background: var(--surface);
	font: inherit;
}

.woocommerce-message,
.woocommerce-info {
	padding: 14px 18px;
	border-left: 4px solid var(--accent);
	background: var(--sand);
	border-radius: 8px;
	list-style: none;
}

.woocommerce-error {
	padding: 14px 18px;
	border-left: 4px solid #a12a1b;
	background: #fbeeec;
	border-radius: 8px;
	list-style: none;
}

/* ==========================================================================
   14. Allineamenti del block editor e movimento ridotto
   ========================================================================== */
.alignwide {
	max-width: var(--wrap);
}

.alignfull {
	max-width: none;
}

@media (prefers-reduced-motion: reduce) {
	.btn:hover,
	.btn:active {
		transform: none;
	}

	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* ==========================================================================
   15. Pagine "Chi sono", "Contattami" e modulo WPForms
   ========================================================================== */
.page-hero + .page-body {
	padding-top: 16px;
}

/* Chi sono: ritratto e testo */
.about-page__grid {
	display: grid;
	gap: 28px;
	align-items: start;
}

.about-page__photo {
	margin: 0;
	justify-self: center;
	max-width: 440px;
	width: 100%;
}

.about-page__photo img {
	display: block;
	width: 100%;
	max-height: 70vh;
	object-fit: cover;
	height: auto;
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
}

.about-page__photo figcaption {
	margin-top: 8px;
	font-size: 0.86rem;
	color: var(--muted);
}

.about-page__text.prose {
	font-size: 1.12rem;
	max-width: 56ch;
}

.about-page__text.prose p:first-child {
	margin-top: 0;
}

@media (min-width: 800px) {
	.about-page__grid {
		grid-template-columns: minmax(280px, 440px) 1fr;
		gap: 64px;
		align-items: center;
	}

	.about-page__photo {
		justify-self: start;
	}
}

/* Chi sono: pubblicazioni */
.chi-sezione__body h3 {
	margin: 2em 0 0.6em;
	font-family: var(--font-body);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
}

.chi-sezione__body h3:first-child {
	margin-top: 0;
}

.chi-sezione--table .wp-block-table {
	margin: 0 0 8px;
	overflow-x: auto;
}

.chi-sezione--table table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	font-size: 1rem;
}

.chi-sezione--table td {
	padding: 14px 18px;
	border: 0;
	border-top: 1px solid var(--line);
	vertical-align: top;
	line-height: 1.45;
}

.chi-sezione--table tr:first-child td {
	border-top: 0;
}

.chi-sezione--table td:nth-child(1) {
	width: 3rem;
	padding-right: 0;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.chi-sezione--table td:nth-child(2) {
	width: 8.5rem;
	font-family: var(--font-head);
	color: var(--accent-dark);
}

.chi-sezione--table td a {
	color: var(--ink);
	text-decoration-color: var(--line);
	text-underline-offset: 3px;
}

.chi-sezione--table td a:hover {
	color: var(--accent);
	text-decoration-color: currentColor;
}

.chi-sezione--table small {
	display: inline-block;
	margin-top: 2px;
	font-size: 0.85rem;
	line-height: 1.45;
	color: var(--muted);
}

.pub-tag {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 9px;
	border-radius: 999px;
	background: var(--ochre-soft);
	color: var(--ochre-ink);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	vertical-align: 2px;
	white-space: nowrap;
}

@media (max-width: 640px) {
	.chi-sezione--table tr {
		display: grid;
		grid-template-columns: 2.2rem 1fr;
		column-gap: 4px;
		padding: 12px 16px;
		border-top: 1px solid var(--line);
	}

	.chi-sezione--table tr:first-child {
		border-top: 0;
	}

	.chi-sezione--table td {
		display: block;
		width: auto !important;
		padding: 0;
		border: 0;
	}

	.chi-sezione--table td:nth-child(2) {
		grid-column: 2;
		font-size: 0.9rem;
	}

	.chi-sezione--table td:nth-child(3) {
		grid-column: 2;
	}

	.chi-sezione--table td:nth-child(1) {
		grid-row: 1 / span 2;
	}
}

/* Chi sono: fotografie */
.chi-sezione--gallery .wp-block-gallery {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin: 0;
	padding: 0;
}

.chi-sezione--gallery .wp-block-gallery .wp-block-image {
	position: relative;
	display: block !important;
	width: 100% !important;
	max-width: none;
	flex: none !important;
	margin: 0;
	overflow: hidden;
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
	background: var(--surface);
}

.chi-sezione--gallery .wp-block-gallery .wp-block-image img {
	display: block;
	width: 100%;
	max-height: none;
	height: auto;
	aspect-ratio: 4 / 5;
	margin: 0;
	border-radius: 0;
	object-fit: cover;
	object-position: 50% 30%;
}

.chi-sezione--gallery .wp-block-gallery figcaption {
	position: absolute;
	inset: auto 0 0 0;
	padding: 28px 14px 12px;
	background: linear-gradient(180deg, transparent, rgba(31, 36, 33, 0.7));
	color: #fff;
	font-size: 0.86rem;
	line-height: 1.4;
	text-align: left;
}

@media (min-width: 700px) {
	.chi-sezione--gallery .wp-block-gallery {
		grid-template-columns: repeat(3, 1fr);
		gap: 20px;
	}
}

.about-page__cta {
	padding-block: 40px 72px;
	background: var(--bg);
}

.about-page__cta .actions {
	margin-top: 0;
}

/* Contattami */
.card-surface {
	padding: 24px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow-sm);
}

.contact__grid {
	display: grid;
	gap: 24px;
	align-items: start;
}

.contact__aside {
	background: var(--sand);
	box-shadow: none;
}

.contact__aside-title {
	margin: 0 0 0.5em;
	font-size: 1.3rem;
}

.contact__aside p {
	margin: 0 0 1em;
}

.contact__aside-note {
	margin-bottom: 0 !important;
	font-size: 0.9rem;
	color: var(--muted);
}

@media (min-width: 900px) {
	.contact__grid {
		grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
		gap: 32px;
	}

	.card-surface {
		padding: 36px;
	}

	.contact__aside {
		position: sticky;
		top: calc(var(--header-h) + 24px);
	}
}

/* WPForms: stesso aspetto del tema (specificità alzata per battere i CSS del plugin) */
.contact .wpforms-container.wpforms-container {
	margin: 0;
	font-family: var(--font-body);
}

.contact .wpforms-container .wpforms-form .wpforms-field {
	padding: 0 0 20px;
}

.contact .wpforms-container .wpforms-form .wpforms-field-label,
.contact .wpforms-container .wpforms-form .wpforms-field-sublabel {
	display: block;
	margin: 0 0 6px;
	font-family: var(--font-body);
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--ink);
}

.contact .wpforms-container .wpforms-form .wpforms-field-sublabel {
	margin: 4px 0 0;
	font-size: 0.82rem;
	font-weight: 400;
	color: var(--muted);
}

.contact .wpforms-container .wpforms-form .wpforms-required-label {
	color: #a12a1b;
	font-weight: 600;
}

.contact .wpforms-container .wpforms-form input[type="text"],
.contact .wpforms-container .wpforms-form input[type="email"],
.contact .wpforms-container .wpforms-form input[type="tel"],
.contact .wpforms-container .wpforms-form input[type="url"],
.contact .wpforms-container .wpforms-form input[type="number"],
.contact .wpforms-container .wpforms-form select,
.contact .wpforms-container .wpforms-form textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	padding: 0.75rem 0.9rem;
	border: 1px solid #cfc9bb;
	border-radius: 10px;
	background: var(--bg);
	box-shadow: none;
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
	color: var(--ink);
	transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.contact .wpforms-container .wpforms-form textarea {
	min-height: 160px;
	resize: vertical;
}

.contact .wpforms-container .wpforms-form input:focus,
.contact .wpforms-container .wpforms-form select:focus,
.contact .wpforms-container .wpforms-form textarea:focus {
	border-color: var(--accent);
	background: var(--surface);
	outline: 0;
	box-shadow: 0 0 0 3px rgba(47, 93, 80, 0.25);
}

/* Nome e cognome affiancati */
.contact .wpforms-container .wpforms-form .wpforms-field-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0 16px;
	width: 100%;
	max-width: 100%;
	margin: 0;
}

.contact div.wpforms-container-full .wpforms-form input.wpforms-field-medium,
.contact div.wpforms-container-full .wpforms-form select.wpforms-field-medium,
.contact div.wpforms-container-full .wpforms-form .wpforms-field-row.wpforms-field-medium,
.contact div.wpforms-container-full .wpforms-form .wpforms-field-large {
	max-width: 100% !important;
}

.contact .wpforms-container .wpforms-form .wpforms-field-row::before,
.contact .wpforms-container .wpforms-form .wpforms-field-row::after {
	display: none;
}

.contact .wpforms-container .wpforms-form .wpforms-field-row .wpforms-field-row-block {
	flex: 1 1 200px;
	width: auto !important;
	min-width: 0;
	padding: 0;
	margin: 0;
	float: none;
}

.contact .wpforms-container .wpforms-form .wpforms-submit-container {
	padding: 4px 0 0;
}

.contact .wpforms-container .wpforms-form button[type="submit"].wpforms-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.8rem 1.8rem;
	border: 2px solid transparent;
	border-radius: 999px;
	background: var(--accent);
	box-shadow: none;
	font-family: var(--font-body);
	font-size: 0.98rem;
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
	cursor: pointer;
	transition: background 0.15s, transform 0.15s;
}

.contact .wpforms-container .wpforms-form button[type="submit"].wpforms-submit:hover,
.contact .wpforms-container .wpforms-form button[type="submit"].wpforms-submit:focus {
	background: var(--accent-dark);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 0 0 3px rgba(47, 93, 80, 0.25);
	outline: 0;
}

/* Errori e conferma */
.contact .wpforms-container .wpforms-form label.wpforms-error,
.contact .wpforms-container .wpforms-form em.wpforms-error {
	display: block;
	margin-top: 6px;
	font-size: 0.86rem;
	font-style: normal;
	font-weight: 400;
	color: #a12a1b;
}

.contact .wpforms-container .wpforms-form input.wpforms-error,
.contact .wpforms-container .wpforms-form textarea.wpforms-error,
.contact .wpforms-container .wpforms-form select.wpforms-error {
	border-color: #a12a1b;
	box-shadow: 0 0 0 3px rgba(161, 42, 27, 0.15);
}

.contact .wpforms-container .wpforms-error-container,
.contact .wpforms-container .wpforms-error-alert {
	margin-bottom: 20px;
	padding: 14px 18px;
	border: 0;
	border-left: 4px solid #a12a1b;
	border-radius: 8px;
	background: #fbeeec;
	color: #7d2014;
}

.contact .wpforms-container.wpforms-container-full .wpforms-confirmation-container-full,
.contact .wpforms-confirmation-container-full {
	margin: 0;
	padding: 16px 20px;
	border: 0;
	border-left: 4px solid var(--accent);
	border-radius: 8px;
	background: var(--sand);
	color: var(--ink);
}

.contact .wpforms-confirmation-container-full p {
	margin: 0;
}

/* Lightbox */
.lb-trigger {
	cursor: zoom-in;
}

img.lb-trigger:focus-visible,
a.lb-trigger:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 3px;
}

.lb-lock {
	overflow: hidden;
}

.lb {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	overflow: hidden;
}

.lb::backdrop {
	background: rgba(14, 18, 16, 0.86);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.lb.is-open::backdrop {
	opacity: 1;
}

.lb__stage {
	position: absolute;
	inset: 0 0 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 56px 16px 0;
	opacity: 0;
	transform: scale(0.97);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.lb.is-open .lb__stage {
	opacity: 1;
	transform: none;
}

.lb__img {
	display: block;
	max-width: 92vw;
	max-height: 88vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.6);
	transition: opacity 0.2s ease;
}

.lb.is-loading .lb__img {
	opacity: 0;
}

.lb__spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 36px;
	height: 36px;
	margin: -18px 0 0 -18px;
	border: 3px solid rgba(255, 255, 255, 0.25);
	border-top-color: #fff;
	border-radius: 50%;
	opacity: 0;
	animation: lb-spin 0.8s linear infinite;
	pointer-events: none;
}

.lb.is-loading .lb__spinner {
	opacity: 1;
}

@keyframes lb-spin {
	to {
		transform: rotate(360deg);
	}
}

.lb__caption,
.lb__counter {
	position: absolute;
	right: 72px;
	left: 72px;
	margin: 0;
	text-align: center;
	font-size: 0.92rem;
	line-height: 1.4;
}

.lb__caption {
	bottom: 14px;
	color: rgba(255, 255, 255, 0.92);
	max-height: 3em;
	overflow: hidden;
}

.lb__counter {
	top: 22px;
	color: rgba(255, 255, 255, 0.75);
	font-variant-numeric: tabular-nums;
}

.lb [hidden] {
	display: none !important;
}

.lb__btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.15s;
}

.lb__btn:hover {
	background: rgba(255, 255, 255, 0.28);
}

.lb__btn:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

.lb__close {
	top: 12px;
	right: 12px;
}

.lb__prev,
.lb__next {
	top: 50%;
	margin-top: -22px;
}

.lb__prev {
	left: 12px;
}

.lb__next {
	right: 12px;
}

@media (max-width: 600px) {
	.lb__prev,
	.lb__next {
		top: auto;
		bottom: 10px;
		margin-top: 0;
	}

	.lb__caption {
		right: 64px;
		left: 64px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lb::backdrop,
	.lb__stage,
	.lb__img {
		transition: none;
	}

	.lb__spinner {
		animation-duration: 2s;
	}
}
