/*
Theme Name: Tessuinum
Description: Tema per Tessuinum – The Slow Valley, turismo lento nella Valle del Tesino.
Version: 1.1.1
Requires at least: 6.5
Requires PHP: 7.4
Author: Nextlab
Text Domain: tessuinum
*/

/* ==========================================================================
   Font
   ========================================================================== */

@font-face { font-family: "Inter"; src: url("assets/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/inter-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Cabinet Grotesk"; src: url("assets/fonts/cabinet-grotesk-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cabinet Grotesk"; src: url("assets/fonts/cabinet-grotesk-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Clash Grotesk"; src: url("assets/fonts/clash-grotesk-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* ==========================================================================
   Variabili
   ========================================================================== */

:root {
	--fondo: #EEF2EC;
	--superficie: #F7F9F4;
	--inchiostro: #282828;
	--tenue: #5C5C58;
	--chiaro: #D8DBD4;
	--verde: #1A3D1F;
	--verde-hover: #2B5A31;
	--scuro: #1F2A1E;
	--segnaposto: #2A3328;
	--bordo: #DADFD6;

	--font-testo: "Inter", system-ui, sans-serif;
	--font-titoli: "Cabinet Grotesk", sans-serif;
	--font-display: "Clash Grotesk", sans-serif;

	--ease: cubic-bezier(.22, 1, .36, 1);
	--max: 1266px;
	--margine: 32px;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--fondo);
	color: var(--inchiostro);
	font-family: var(--font-testo);
	font-weight: 300;
	font-optical-sizing: auto;
	font-size: 16px;
	line-height: 1.4;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }

h3 { font-family: var(--font-titoli); font-weight: 500; font-size: 24px; line-height: 1.3; }

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

a { color: var(--verde); }
a:hover { color: var(--verde-hover); }

[hidden] { display: none !important; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Tipografia */
.ts-display, .ts-titolo, .ts-h2 { font-family: var(--font-titoli); font-weight: 400; line-height: 1.1; letter-spacing: -.03em; }
.ts-display { font-size: 96px; line-height: 1; font-weight: 500; }
.ts-titolo { font-size: 64px; }
.ts-h2 { font-size: 48px; }
.ts-clash { font-family: var(--font-display); font-weight: 400; font-size: 36px; line-height: 1.1; letter-spacing: -.03em; }
.ts-occhiello { font-size: 14px; line-height: 1.2; color: var(--inchiostro); }
.ts-occhiello::before { content: "› "; }
.ts-occhiello a { color: inherit; text-decoration: none; }
.ts-testo { font-size: 16px; line-height: 1.4; color: var(--tenue); }

/* Pulsanti (template, blocco Pulsante, invio dei moduli) */
.ts-btn,
.wp-block-button .wp-block-button__link,
input[type="submit"] {
	display: inline-flex;
	align-items: center;
	height: 44px;
	padding: 0 16px;
	border: 0;
	border-radius: 8px;
	background: var(--verde);
	color: var(--superficie);
	font: inherit;
	font-size: 16px;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
}
.ts-btn:hover, .wp-block-button .wp-block-button__link:hover { color: var(--superficie); }
.ts-btn--chiaro,
.wp-block-button.is-style-chiaro .wp-block-button__link { background: var(--superficie); color: var(--inchiostro); }
.ts-btn--chiaro:hover,
.wp-block-button.is-style-chiaro .wp-block-button__link:hover { color: var(--inchiostro); }
.wp-block-button.is-style-tenue .wp-block-button__link { height: 40px; padding: 0 14px; background: #E4EADF; color: var(--inchiostro); font-size: 15px; }
.wp-block-button.is-style-tenue .wp-block-button__link:hover { color: var(--inchiostro); }

.ts-roll { display: flex; flex-direction: column; height: 19px; overflow: hidden; line-height: 19px; }
.ts-roll span { transition: transform .5s var(--ease); }
.ts-btn:hover .ts-roll span,
.ts-card-esperienza:hover .ts-roll span,
.wp-block-button__link:hover .ts-roll span { transform: translateY(-100%); }

/* Moduli (anche quelli dei plugin, es. Contact Form 7) */
form { display: flex; flex-direction: column; gap: 16px; }
label { display: block; font-size: 14px; }
input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), select, textarea {
	width: 100%;
	height: 44px;
	padding: 0 12px;
	border: 1px solid var(--bordo);
	border-radius: 8px;
	background: #FFFFFF;
	color: var(--inchiostro);
	font: inherit;
	font-size: 16px;
	transition: border-color .3s ease, box-shadow .3s ease;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--verde); box-shadow: 0 0 0 3px rgba(26, 61, 31, .15); }
.wpcf7-form-control-wrap { display: block; margin-top: 8px; }
.wpcf7-form br { display: none; }
select { appearance: none; padding-right: 36px; background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23282828' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center / 16px no-repeat; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; margin: 0; accent-color: var(--verde); }
.wpcf7-list-item { display: inline-flex; margin: 0 16px 8px 0; }
.wpcf7-list-item label { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.wpcf7-acceptance .wpcf7-list-item-label { font-size: 13px; line-height: 1.4; color: var(--tenue); }
.wpcf7-not-valid-tip { margin-top: 6px; font-size: 13px; color: #9B2C2C; }
.wpcf7 form .wpcf7-response-output { margin: 0; padding: 12px; border-radius: 8px; font-size: 14px; }

/* ==========================================================================
   Animazioni
   ========================================================================== */

@keyframes tsFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tsHero { from { transform: scale(1.05); } to { transform: scale(1); } }
@keyframes tsSu { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes tsParola { from { opacity: 0; transform: translateY(10px); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes tsSlide { from { opacity: .4; transform: scale(1.03); } to { opacity: 1; transform: none; } }
@keyframes tsPre { to { transform: translateY(-100%); } }
@keyframes tsPreTesto { 0% { opacity: 0; transform: translateY(12px); } 35%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes tsMenu { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes tsPin { from { opacity: 0; transform: translate(-12px, -30%); } to { opacity: 1; transform: translate(-12px, -50%); } }
@keyframes tsGrande { from { opacity: 0; transform: translateY(30px); filter: blur(16px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes tsFluttua { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Schermata iniziale con il nome del sito */
.ts-pre {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--fondo);
	pointer-events: none;
	animation: tsPre .9s cubic-bezier(.76, 0, .24, 1) 1.2s both;
}
.ts-pre span {
	font-family: var(--font-titoli);
	font-size: 48px;
	font-weight: 500;
	letter-spacing: -.03em;
	animation: tsPreTesto 1.5s ease both;
}

/* Comparsa al caricamento e durante lo scroll */
.ts-load { animation: tsFade 1.5s var(--ease) var(--d, 1s) both; }
.ts-header.ts-load { --d: .8s; }
.ts-hero-img { animation: tsHero 1.5s cubic-bezier(.12, .23, .5, 1) 1s both; }
.ts-parola { display: inline-block; animation: tsParola 1.5s var(--ease) calc(1s + var(--i, 0) * .08s) both; }

.ts-js .ts-rivela { opacity: 0; transition: opacity 1.5s var(--ease) var(--d, 0s), transform 1.5s var(--ease) var(--d, 0s), filter 1.5s var(--ease) var(--d, 0s); }
.ts-js .ts-rivela[data-reveal="blur"] { transform: translateY(10px); filter: blur(10px); }
.ts-js .ts-rivela.is-visibile { opacity: 1; transform: none; filter: none; }

/* Zoom delle immagini al passaggio del mouse */
.ts-sfondo, .ts-sfondo img, .ts-storia__foto img, .ts-mosaico img { transition: transform 1.2s var(--ease); }
.ts-card:hover .ts-sfondo,
.ts-card-esperienza:hover .ts-sfondo,
.ts-storia__foto:hover img,
.ts-mosaico figure:hover img { transform: scale(1.05); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.ts-pre { display: none; }
}

/* ==========================================================================
   Struttura
   ========================================================================== */

.ts-contenitore { width: min(var(--max), 100% - 2 * var(--margine)); margin-inline: auto; }

.ts-pagina { display: flex; flex-direction: column; gap: 48px; padding: 80px 0 120px; }
.ts-pagina--alta { padding-top: 40px; }
.ts-pagina--breve { padding-bottom: 60px; }
.ts-pagina--libera { padding-top: 24px; }
.ts-pagina--scheda { gap: 56px; }
.ts-pagina--legale { gap: 56px; padding-top: 60px; }
.ts-pagina--esperienza { gap: 80px; padding-top: 28px; }
.ts-pagina:has(> .ts-contenuto > .ts-faq:last-child) { padding-bottom: 0; }

/* Contenuto delle pagine (blocchi e pattern) */
.ts-contenuto > * + * { margin-top: 24px; }
.ts-contenuto > * + .ts-blocco,
.ts-contenuto > .ts-blocco + * { margin-top: 48px; }
.ts-contenuto > .ts-sezione,
.ts-contenuto > .ts-sezione + *,
.ts-contenuto > .ts-faq { margin-top: 0; }
.ts-pagina .ts-faq { width: 100%; }
.ts-contenuto > p { max-width: 720px; line-height: 1.5; color: var(--tenue); }

.ts-contenuto--pieno > * { width: min(var(--max), 100% - 2 * var(--margine)); margin-inline: auto; }
.ts-contenuto--pieno > .ts-hero,
.ts-contenuto--pieno > .tv-track { width: 100%; }
.ts-contenuto--pieno > .ts-sezione:last-child { padding-bottom: 120px; }

/* Immagine che riempie il contenitore */
.ts-sfondo, .ts-sfondo img { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; object-fit: cover; }

/* Velo scuro in basso, per leggere i testi sopra le foto */
.ts-velo::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(18, 24, 17, 0) 40%, rgba(18, 24, 17, .75) 100%);
	pointer-events: none;
}
.ts-velo > :not(.ts-sfondo) { position: relative; z-index: 1; }

/* Griglie di card */
.ts-griglia { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--minimo, 340px)), 1fr)); gap: 16px; }
/* Blocco Correlati: colonne strette quanto basta per stare anche nella colonna del testo (800px) e, con poche card, allargate a riempire la riga */
.ts-correlati { grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--minimo, 240px)), 1fr)); }
.ts-griglia--card-esperienza { grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--minimo, 520px)), 1fr)); gap: 24px; }

.ts-elenco { display: flex; flex-direction: column; gap: 24px; }
.ts-blocco.ts-elenco { gap: 32px; }
.ts-vuoto { padding: 40px; border-radius: 8px; background: var(--superficie); text-align: center; color: var(--tenue); }

/* Disposizioni ricorrenti in più componenti */
.ts-etichette, .ts-filtri, .nav-links,
.ts-percorso .wp-block-buttons /* anche nell'archivio, dove il CSS dei blocchi non c'è */ { display: flex; flex-wrap: wrap; gap: 8px; }
.ts-testata > *, .ts-contatti__pannello > div:first-child, .ts-faq__intro > div, .ts-card-esperienza__testo { display: flex; flex-direction: column; gap: 8px; }
.ts-punto, .ts-valore > div, .ts-card-servizio > div, .ts-persona > div, .ts-percorso__testo > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.ts-esperienza__corpo, .ts-legale { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 64px; } /* testo e riquadro a lato */
.wp-block-gallery.has-nested-images.ts-mosaico img, .wp-block-gallery.has-nested-images.is-style-slider img, .ts-storia__foto img, .tv-card-img img { width: 100%; height: 100%; object-fit: cover; }
.ts-dettagli__righe a:hover, .ts-indice a:hover { padding-left: 6px; color: var(--verde); }

/* Pillole */
.ts-etichetta {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 8px 12px;
	border-radius: 8px;
	background: rgba(255, 255, 255, .12);
	backdrop-filter: blur(5px);
	color: var(--superficie);
	font-size: 16px;
	font-weight: 500;
}
a.ts-etichetta, a.ts-etichetta:hover { color: var(--superficie); text-decoration: none; } /* pillole cliccabili (es. apertura della home): uguali alle altre, anche al passaggio del mouse */

/* Filtri (esperienze, categorie del Journal) */
.ts-filtro,
.page-numbers {
	display: inline-flex;
	align-items: center;
	height: 40px;
	padding: 0 14px;
	border: 0;
	border-radius: 8px;
	background: var(--superficie);
	color: var(--inchiostro);
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	transition: background .3s ease, color .3s ease;
}
.ts-filtro:hover, .page-numbers:hover { background: #DDE4D7; color: var(--inchiostro); }
.ts-filtro[aria-pressed="true"],
.ts-filtro[aria-current="page"],
.page-numbers.current { background: var(--verde); color: var(--superficie); }

/* ==========================================================================
   Menu
   ========================================================================== */

.ts-header { position: relative; z-index: 5; padding: 0 var(--margine); background: var(--fondo); color: var(--inchiostro); --pannello: var(--fondo); }
.ts-header--chiaro { position: absolute; top: 0; left: 0; right: 0; background: transparent; color: var(--superficie); --pannello: var(--scuro); }
.admin-bar .ts-header--chiaro { top: 32px; }

.ts-nav { max-width: var(--max); min-height: 92px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.ts-nav a { color: inherit; text-decoration: none; }
.ts-nav__logo { font-family: var(--font-titoli); font-size: 24px; font-weight: 500; }

.ts-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; margin: 0; padding: 0; list-style: none; }
.ts-menu a { font-size: 16px; font-weight: 500; }

.ts-burger { display: none; position: relative; width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.ts-burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .4s var(--ease); }
.ts-burger span:first-child { transform: translateY(-4px); }
.ts-burger span:last-child { transform: translateY(4px); }
.ts-burger[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.ts-burger[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }

/* ==========================================================================
   Intestazione delle pagine
   ========================================================================== */

.ts-intestazione,
.ts-intestazione__testa { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.ts-intestazione--affiancata { max-width: none; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.ts-intestazione--affiancata .ts-intestazione__testa { max-width: 640px; }
.ts-intestazione__lato { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; max-width: 420px; text-align: right; }

.ts-media { position: relative; height: var(--altezza, 560px); border-radius: 8px; overflow: hidden; background: var(--segnaposto); }
.ts-media__etichette { position: absolute; top: 16px; left: 16px; }

.ts-esperienza__testa { display: flex; flex-direction: column; gap: 40px; }

/* ==========================================================================
   Sezioni dei pattern
   ========================================================================== */

.ts-sezione { display: flex; flex-direction: column; gap: 48px; padding: 60px 0; }
.ts-sezione p, .ts-blocco p { font-size: 16px; line-height: 1.4; color: var(--tenue); }
.ts-sezione .ts-occhiello, .ts-blocco .ts-occhiello { font-size: 14px; color: var(--inchiostro); }

/* Riga di testata: titolo a sinistra, testo a destra */
.ts-testata { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.ts-testata .ts-h2 { max-width: 560px; }
.ts-testata__lato { align-items: flex-end; gap: 24px; max-width: 440px; text-align: right; }

/* Apertura della home */
.ts-hero {
	position: relative;
	height: clamp(560px, 100svh, 900px);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0 var(--margine);
	overflow: hidden;
	background: var(--scuro);
	color: var(--superficie);
}
.ts-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(18, 24, 17, .35) 0%, rgba(18, 24, 17, 0) 22%, rgba(18, 24, 17, 0) 45%, rgba(18, 24, 17, .7) 100%);
}
.ts-hero__corpo { position: relative; z-index: 1; width: 100%; max-width: var(--max); padding-bottom: 60px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; }
.ts-hero__titolo { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ts-hero__titolo .ts-display { max-width: 640px; margin-bottom: 16px; }
.ts-hero__luogo { --d: 1s; font-size: 14px; color: var(--chiaro); }
.ts-hero__titolo .wp-block-buttons { --d: 1.2s; }
.ts-hero__lato { --d: 1.2s; display: flex; flex-direction: column; align-items: flex-end; gap: 24px; max-width: 420px; }
.ts-hero__lato p { font-size: 20px; line-height: 1.4; color: var(--chiaro); text-align: right; }
.ts-hero__lato .ts-etichette { justify-content: flex-end; gap: 12px; }

/* La valle + mappa */
.ts-valle { flex-direction: row; flex-wrap: wrap; align-items: stretch; }
.ts-valle__testo { flex: 1 1 420px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.ts-valle__testo > p:not(.ts-occhiello) { max-width: 480px; }
.ts-valle > .ts-mappa { flex: 1 1 560px; min-width: 0; }
.ts-punti { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 480px; margin-top: 32px; }
.ts-punto .ts-icona { margin-bottom: 12px; }

/* Valori */
.ts-valori { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 176px; gap: 16px; }
.ts-valore { display: flex; flex-direction: column; justify-content: space-between; padding: 16px; border-radius: 8px; background: var(--superficie); }
.ts-valore--foto { grid-column: span 2; justify-content: flex-end; background: var(--segnaposto); color: var(--superficie); }
.ts-valore--foto p, .ts-persona p { color: var(--chiaro); }

/* Mosaico di quattro foto */
.wp-block-gallery.has-nested-images.ts-mosaico { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: 300px 300px; gap: 16px; }
.wp-block-gallery.has-nested-images.ts-mosaico figure.wp-block-image { width: auto !important; height: 100%; margin: 0; border-radius: 8px; overflow: hidden; }
.wp-block-gallery.has-nested-images.ts-mosaico figure:first-child { grid-row: span 2; }
.wp-block-gallery.has-nested-images.ts-mosaico figure:nth-child(4) { grid-column: span 2; }

/* Galleria "Masonry" */
.wp-block-gallery.has-nested-images.is-style-masonry { display: block; columns: 3 300px; column-gap: 16px; }
.wp-block-gallery.has-nested-images.is-style-masonry figure.wp-block-image { width: 100% !important; margin: 0 0 16px; border-radius: 8px; overflow: hidden; break-inside: avoid; }
.wp-lightbox-overlay .scrim { background-color: rgba(18, 24, 17, .88) !important; }

/* Galleria "Slider" */
.wp-block-gallery.has-nested-images.is-style-slider { position: relative; display: block; height: 440px; border-radius: 8px; overflow: hidden; background: var(--segnaposto); }
.wp-block-gallery.has-nested-images.is-style-slider figure.wp-block-image { position: absolute; inset: 0; width: 100% !important; margin: 0; animation: tsSlide .8s var(--ease) both; }
.ts-slider__comandi { position: absolute; right: 16px; bottom: 16px; z-index: 1; display: flex; gap: 8px; }
.ts-freccia { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 999px; background: rgba(247, 249, 244, .85); color: var(--inchiostro); cursor: pointer; transition: background .3s ease, transform .3s ease; }
.ts-freccia:hover { background: #FFFFFF; transform: scale(1.06); }
.ts-slider__contatore { position: absolute; left: 16px; bottom: 16px; z-index: 1; padding: 6px 10px; border-radius: 8px; background: rgba(18, 24, 17, .5); color: var(--superficie); font-size: 14px; }

/* Card di sezione (icona, titolo, testo) */
.ts-schede { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.ts-card-servizio { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 180px; padding: 16px; border-radius: 8px; background: var(--superficie); color: var(--inchiostro); }
.ts-card-servizio h3 a { color: inherit; text-decoration: none; }
.ts-card-servizio h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }

/* Foto grande con card in sovrimpressione */
.ts-vetrina { position: relative; min-height: 620px; display: flex; align-items: flex-end; padding: 16px; border-radius: 8px; overflow: hidden; background: var(--segnaposto); }
.ts-vetrina > .ts-schede { position: relative; width: 100%; }

/* La storia */
.ts-storia { flex-direction: row; flex-wrap: wrap; align-items: center; }
.ts-storia > .wp-block-group { flex: 999 1 520px; display: flex; flex-direction: column; gap: 16px; }
.ts-storia p.ts-lead { font-family: var(--font-titoli); font-size: 24px; line-height: 32px; color: var(--inchiostro); }
.ts-storia > p:last-child, .ts-storia .ts-lead + p { line-height: 24px; }
.ts-storia__foto { flex: 1 1 360px; height: 440px; margin: 0; border-radius: 8px; overflow: hidden; background: var(--segnaposto); }

/* Persone */
.ts-persone { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.ts-persona { height: 460px; flex-direction: column; justify-content: flex-end; padding: 16px; }
.ts-persona p.ts-citazione { margin-bottom: 8px; font-size: 15px; line-height: 21px; color: var(--fondo); opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease; }
.ts-persona:hover .ts-citazione { opacity: 1; transform: none; }
.ts-persona p.ts-ruolo { font-size: 13px; }
.ts-persona p.ts-ruolo::before { content: "› "; }
.ts-persona p.ts-nome { font-family: var(--font-titoli); font-size: 24px; font-weight: 500; color: var(--superficie); }
@media (hover: none) { .ts-persona p.ts-citazione { opacity: 1; transform: none; } }

/* Contatti */
.ts-contatti { --d: .9s; position: relative; min-height: 820px; display: flex; justify-content: flex-end; align-items: flex-start; padding: 16px; border-radius: 8px; overflow: hidden; background: var(--segnaposto); }
.ts-contatti__pannello { position: relative; width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 32px; padding: 32px; border-radius: 6px; background: var(--superficie); animation: tsSu 1.2s var(--ease) 1.2s both; }
.ts-recapiti { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.ts-recapiti p { font-size: 14px; }
.ts-recapiti p + p { margin-top: 4px; font-size: 16px; font-weight: 500; color: var(--inchiostro); }

/* FAQ (blocchi "Dettagli" della pagina /faq/) */
.ts-faq { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px; padding: 60px 0; }
.ts-faq__intro { flex: 1 1 360px; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.ts-faq__intro .ts-h2, .ts-faq__intro .ts-testo { max-width: 420px; }
.ts-faq__elenco { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ts-faq details { border-radius: 8px; background: var(--superficie); }
.ts-faq summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 20px;
	font-family: var(--font-titoli);
	font-size: 20px;
	font-weight: 500;
	line-height: 26px;
	list-style: none;
	cursor: pointer;
}
.ts-faq summary::-webkit-details-marker { display: none; }
.ts-faq summary::after {
	content: "";
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23282828' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform .4s var(--ease);
}
.ts-faq details[open] summary::after { transform: rotate(45deg); }
.ts-faq details > :not(summary) { margin: 0; padding: 0 20px 20px; font-size: 16px; line-height: 1.4; color: var(--tenue); }

/* Mappa illustrata */
.ts-mappa { position: relative; height: var(--altezza, 560px); border-radius: 8px; overflow: hidden; background: #DCE5D6; }
.ts-mappa svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ts-mappa__nota { position: absolute; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.ts-mappa__nota--monti { left: 4%; top: 7%; color: #5C6658; }
.ts-mappa__nota--mare { right: 1.5%; top: 8%; color: #4D6E76; writing-mode: vertical-rl; }
.ts-mappa__nota--fiume { left: 60%; top: 59%; color: #4D6E76; font-style: italic; letter-spacing: 0; text-transform: none; }
.ts-pin { position: absolute; transform: translate(-12px, -50%); text-decoration: none; animation: tsPin 1s var(--ease) var(--d, 1.4s) both; }
.ts-pin span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px 6px 8px;
	border-radius: 8px;
	background: var(--verde);
	color: var(--superficie);
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(18, 24, 17, .2);
	transition: background .3s ease, transform .3s ease;
}
.ts-pin span::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: #B9D98C; }
.ts-pin:hover span { background: var(--verde-hover); transform: translateY(-2px); }
.ts-mappa__link { position: absolute; right: 16px; bottom: 14px; font-size: 14px; font-weight: 500; }

/* Mappa interattiva (inc/mappa.php, assets/js/mappa.js) */
.ts-mappa-vera__filtri { margin-bottom: 16px; }
.ts-mappa-vera__filtri .ts-filtro { gap: 8px; }
.ts-filtro[aria-pressed="false"] { opacity: .65; }
.ts-filtro[aria-pressed="false"] .ts-segno { background: transparent; }
.ts-mappa-vera__conta { font-size: 13px; opacity: .7; }
.ts-mappa-vera__mappa { height: var(--altezza, 680px); border-radius: 8px; overflow: hidden; background: #EEF2EC; font-family: var(--font-testo); }
.ts-segno { width: 10px; height: 10px; border-radius: 999px; border: 2px solid currentColor; }
.ts-segno--borgo { background: #B9D98C; color: var(--verde); }
.ts-segno--poi { background: var(--verde-hover); color: var(--verde-hover); }
.ts-segno--evento { background: #D9895B; color: #D9895B; }
.ts-filtro[aria-pressed="true"] .ts-segno { border-color: var(--superficie); }

.ts-segnaposto { display: block; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.ts-segnaposto[hidden] { display: none; }
.ts-segnaposto--borgo { z-index: 1; } /* le etichette dei borghi sopra i punti vicini */
.ts-mappa-popup { z-index: 2; }
.ts-segnaposto--borgo span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 9px 5px 7px;
	border-radius: 8px;
	background: var(--verde);
	color: var(--superficie);
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(18, 24, 17, .2);
	transition: background .3s ease;
}
.ts-segnaposto--borgo span::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: #B9D98C; }
.ts-segnaposto--borgo:hover span { background: var(--verde-hover); }
.ts-segnaposto--poi, .ts-segnaposto--evento {
	width: 16px;
	height: 16px;
	border: 2px solid var(--superficie);
	border-radius: 999px;
	background: var(--verde-hover);
	box-shadow: 0 1px 6px rgba(18, 24, 17, .3);
	transition: width .2s ease, height .2s ease;
}
.ts-segnaposto--evento { background: #D9895B; }
.ts-segnaposto--poi:hover, .ts-segnaposto--evento:hover { width: 20px; height: 20px; }
.ts-segnaposto:focus-visible { outline: 2px solid var(--verde); outline-offset: 2px; border-radius: 8px; }

.ts-mappa-popup .maplibregl-popup-content { padding: 0; border-radius: 8px; overflow: hidden; box-shadow: 0 8px 24px rgba(18, 24, 17, .18); }
.ts-mappa-popup .maplibregl-popup-close-button { width: 28px; height: 28px; margin: 6px; border-radius: 999px; background: rgba(247, 249, 244, .9); color: var(--inchiostro); font-size: 18px; line-height: 1; }
.ts-mappa-scheda { display: block; color: var(--inchiostro); text-decoration: none; }
.ts-mappa-scheda img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.ts-mappa-scheda__testo { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px 14px; }
.ts-mappa-scheda__testo strong { font-family: var(--font-titoli); font-size: 18px; font-weight: 700; line-height: 1.2; }
.ts-mappa-scheda__tipo { color: var(--tenue); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.ts-mappa-scheda__vai { margin-top: 4px; color: var(--verde); font-size: 14px; font-weight: 500; }
.ts-mappa-scheda:hover .ts-mappa-scheda__vai { text-decoration: underline; }

/* Card dei cammini (template-parts/card-cammino.php) */
.ts-percorso { display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; background: var(--superficie); }
.ts-percorso__mappa { position: relative; display: block; aspect-ratio: 400 / 220; overflow: hidden; background: #DCE5D6; }
.ts-percorso__foto { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.ts-percorso:hover .ts-percorso__foto { transform: scale(1.05); }
.ts-percorso__mezzo { position: absolute; top: 12px; right: 12px; padding: 6px 10px; border-radius: 8px; font-size: 12px; font-weight: 500; background: var(--verde); color: var(--superficie); }
.ts-percorso__testo { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; }
.ts-percorso h3 a { color: inherit; text-decoration: none; transition: color .3s ease; }
.ts-percorso h3 a:hover { color: var(--verde); }
.ts-percorso p { margin: 0; line-height: 1.4; color: var(--tenue); }
.ts-percorso__testo h3 + p { font-size: 14px; }
.ts-percorso__dati { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ts-percorso__dati > div { display: flex; flex-direction: column; gap: 2px; }
.ts-percorso__dati p { font-size: 12px; }
.ts-percorso__dati p + p { font-size: 15px; font-weight: 500; color: var(--inchiostro); }
.ts-percorso .wp-block-button .wp-block-button__link { height: 40px; padding: 0 14px; font-size: 15px; }

/* La valle: viaggio a scorrimento lungo il Tesino (animazione in main.js) */
.tv-track { --vh: 9px; --colw: min(100vw, clamp(420px, 56vw, 820px)); position: relative; height: calc(var(--vh) * 1550); background: #0F1510; }
.tv-stage { position: sticky; top: 0; height: calc(var(--vh) * 100); min-height: 520px; overflow: hidden; isolation: isolate; background: #6E9FC0; color: var(--superficie); }
.tv-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tv-sky { z-index: 1; height: 140%; transform-origin: 50% 0%; will-change: transform, opacity; }
.tv-sky::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34%; background: linear-gradient(180deg, rgba(4, 6, 4, 0), rgba(4, 6, 4, .55) 45%, #040604); }
.tv-seam { position: absolute; left: 0; right: 0; top: 100%; height: 46vh; background: linear-gradient(180deg, #040604, rgba(4, 6, 4, .9) 25%, rgba(4, 6, 4, .45) 60%, rgba(4, 6, 4, 0)); }
.tv-sky-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.tv-top { z-index: 3; background: linear-gradient(180deg, rgba(12, 22, 30, .42) 0%, rgba(12, 22, 30, 0) 34%); }
.tv-mount { position: absolute; bottom: 0; z-index: 2; pointer-events: none; will-change: transform, opacity; }
.tv-mount img { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .35)); }
.tv-mount-l { left: -7vw; bottom: -16vh; width: 60vw; transform-origin: 100% 100%; }
.tv-mount-r { right: -8vw; bottom: -28vh; width: 74vw; transform-origin: 0% 100%; }
.tv-peak { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translate(-50%, -100%); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; text-shadow: 0 1px 10px rgba(0, 0, 0, .5); opacity: 0; }
.tv-peak::after { content: ""; width: 1px; height: 28px; background: linear-gradient(var(--superficie), rgba(247, 249, 244, 0)); }
.tv-river { perspective: 900px; perspective-origin: 50% 0%; background: #2F4A2A; }
.tv-river-side { position: absolute; inset: -6%; overflow: hidden; filter: blur(22px) saturate(1.05) brightness(.97); }
.tv-river-side-img, .tv-river-img { display: block; width: 100%; height: auto; will-change: transform; }
.tv-river-plane { position: absolute; inset: 0; transform-origin: 50% 100%; will-change: transform; }
.tv-river-col { position: absolute; left: 50%; top: 0; width: var(--colw); transform: translateX(-50%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 26%, #000 74%, transparent); mask-image: linear-gradient(90deg, transparent, #000 26%, #000 74%, transparent); }
.tv-mist { z-index: 2; background: radial-gradient(90% 70% at 50% 60%, rgba(4, 6, 4, .55), rgba(4, 6, 4, .35) 50%, rgba(4, 6, 4, .15) 100%); opacity: 0; }
.tv-intro { z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 22vh 24px 0; text-align: center; }
.tv-eyebrow { font-size: 14px; line-height: 1.2; letter-spacing: .02em; color: #F1F4EE; text-shadow: 0 1px 10px rgba(0, 0, 0, .35); }
.tv-title.ts-display { max-width: 900px; text-shadow: 0 4px 40px rgba(10, 30, 45, .45); }
.tv-lead { --d: 1.4s; max-width: 540px; font-size: 20px; line-height: 28px; color: #F1F4EE; text-shadow: 0 1px 14px rgba(0, 0, 0, .4); }
.tv-hint { position: absolute; z-index: 4; bottom: 40px; left: 50%; transform: translateX(-50%); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #E4E8DF; }
.tv-hint > span { --d: 1.8s; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tv-hint i { width: 1px; height: 44px; background: linear-gradient(rgba(247, 249, 244, 0), var(--superficie)); animation: tvHint 2.2s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes tvHint { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.tv-source-note { z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; opacity: 0; }
.tv-source-note p { max-width: 680px; padding: 0 24px; font-family: var(--font-titoli); font-size: 44px; line-height: 48px; letter-spacing: -.03em; text-shadow: 0 2px 30px rgba(0, 0, 0, .55), 0 0 2px rgba(0, 0, 0, .25); }
.tv-card { position: absolute; z-index: 3; top: 50%; right: max(24px, calc((100% - var(--colw)) / 2 - 400px)); width: 360px; margin-top: -210px; display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; background: rgba(247, 249, 244, .94); backdrop-filter: blur(10px); color: var(--inchiostro); box-shadow: 0 24px 60px rgba(8, 16, 8, .35); opacity: 0; visibility: hidden; will-change: transform, opacity; }
.tv-card[data-side="sinistra"] { right: auto; left: max(24px, calc((100% - var(--colw)) / 2 - 400px)); }
.tv-card-img { height: 180px; overflow: hidden; background: var(--segnaposto); }
.tv-card-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 20px 20px; }
.tv-card-num { font-size: 13px; color: var(--tenue); }
.tv-card-name { font-family: var(--font-titoli); font-weight: 400; font-size: 40px; line-height: 42px; letter-spacing: -.03em; }
.tv-card-desc { font-size: 15px; line-height: 21px; color: var(--tenue); }
.tv-cta { margin-top: 8px; }
.tv-cta-ghost { background: rgba(255, 255, 255, .14); backdrop-filter: blur(6px); }
.tv-outro { z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 0 24px; text-align: center; opacity: 0; visibility: hidden; }
.tv-outro-title { font-family: var(--font-titoli); font-weight: 400; font-size: 72px; line-height: 74px; letter-spacing: -.03em; text-shadow: 0 2px 30px rgba(0, 30, 40, .4); }
.tv-outro-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; pointer-events: auto; }
.tv-grain { z-index: 3; opacity: .06; mix-blend-mode: overlay; }
.tv-vignette { z-index: 3; background: radial-gradient(120% 90% at 50% 45%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, .35) 100%); }
.tv-river-map { position: absolute; z-index: 5; left: 50%; bottom: 28px; transform: translateX(-50%); width: min(760px, calc(100% - 64px)); display: flex; align-items: center; gap: 16px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #F1F4EE; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); opacity: 0; }
.tv-map-line { position: relative; flex: 1; height: 2px; border-radius: 2px; background: rgba(247, 249, 244, .35); }
.tv-map-fill { position: absolute; inset: 0; border-radius: 2px; background: #B9D98C; transform: scaleX(0); transform-origin: left; }
.tv-dot { position: absolute; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.tv-dot::before { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 999px; background: var(--superficie); box-shadow: 0 0 0 3px rgba(15, 21, 16, .35); transition: transform .4s var(--ease), background .4s; }
.tv-dot span { position: absolute; bottom: 26px; left: 50%; transform: translate(-50%, 6px); white-space: nowrap; font-size: 12px; letter-spacing: .04em; text-transform: none; opacity: 0; transition: opacity .4s, transform .4s var(--ease); pointer-events: none; }
.tv-dot:hover span, .tv-dot:focus-visible span, .tv-dot[data-on] span { opacity: 1; transform: translate(-50%, 0); }
.tv-dot[data-on]::before { background: #B9D98C; transform: scale(1.5); }

/* Dopo il viaggio */
.ts-sezione.ts-dopo-viaggio { padding-top: 100px; }
.ts-intro { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }

/* ==========================================================================
   Card
   ========================================================================== */

.ts-card { position: relative; display: flex; overflow: hidden; border-radius: 8px; background: var(--segnaposto); color: var(--superficie); text-decoration: none; }
.ts-card:hover { color: var(--superficie); }

/* Card scheda: borghi, botteghe, eventi, temi, stagioni */
.ts-card-scheda { align-items: flex-end; height: var(--altezza, 320px); }
.ts-card-scheda__testo { display: flex; flex-direction: column; gap: 4px; padding: 16px; }
.ts-card-scheda p { font-size: 16px; line-height: 1.4; color: var(--chiaro); }

/* Card esperienza */
.ts-card-esperienza { display: block; height: 600px; padding: 4px; border-radius: 8px; background: var(--superficie); color: var(--superficie); text-decoration: none; }
.ts-card-esperienza:hover { color: var(--superficie); }
.ts-card-esperienza__media { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 16px; border-radius: 6px; overflow: hidden; background: var(--segnaposto); }
.ts-card-esperienza__testo p { max-width: 440px; font-size: 16px; line-height: 1.4; color: var(--chiaro); }
.ts-card-esperienza__testo .ts-btn { align-self: flex-end; margin-top: 8px; }

/* Card articolo */
.ts-card-articolo { flex-direction: column; justify-content: space-between; height: 420px; padding: 16px; }
.ts-card-articolo .ts-etichetta { font-size: 14px; }
.ts-card-articolo .ts-clash { font-size: 32px; }
.ts-card-articolo--grande { height: 520px; padding: 20px; }
.ts-card-articolo--grande .ts-etichetta { font-size: 16px; }
.ts-card-articolo--grande .ts-clash { font-size: 48px; }
.ts-card-articolo__testo { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.ts-card-articolo__testo p { color: var(--chiaro); }
.ts-card-articolo h3 + p { font-size: 14px; line-height: 20px; }
.ts-card-articolo__invito { margin-top: 8px; font-size: 15px; font-weight: 500; }
.ts-pagina--esperienza .ts-card-articolo { height: 380px; }

/* ==========================================================================
   Testi lunghi (contenuto di schede e articoli)
   ========================================================================== */

.ts-prose { display: flex; flex-direction: column; gap: 16px; max-width: 800px; }
.ts-prose--piena { max-width: none; } /* schede senza riquadro a lato (borghi): testo a tutta larghezza */
.ts-prose > * { margin: 0; }
.ts-prose h2 { margin-top: 40px; font-family: var(--font-titoli); font-size: 24px; font-weight: 500; line-height: 1.3; }
/* Titoli e paragrafi del testo, non quelli delle card del blocco Correlati (:where non aumenta la specificità) */
.ts-prose h3:where(:not(.ts-correlati *)) { margin-top: 16px; font-size: 20px; }
.ts-prose > :first-child { margin-top: 0; }
.ts-prose p:where(:not(.ts-correlati *)), .ts-prose li:where(:not(.ts-correlati *)) { line-height: 24px; color: var(--tenue); }
.ts-prose strong { font-weight: 500; color: var(--inchiostro); }
.ts-prose img { border-radius: 8px; }
.ts-prose figcaption, .ts-prose .has-small-font-size { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--tenue); } /* didascalie e crediti delle foto */
.ts-prose figcaption a, .ts-prose .has-small-font-size a { color: inherit; }
.ts-prose ul, .ts-prose ol { padding-left: 20px; }

/* Esperienza: elenco delle caratteristiche su due colonne */
.ts-prose--esperienza ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px 24px; padding: 0; list-style: none; }
.ts-prose--esperienza li { display: flex; align-items: center; gap: 8px; color: var(--inchiostro); }
.ts-prose--esperienza li::before {
	content: "";
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C5C58' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12l3 3 5-6'/%3E%3C/svg%3E") center / contain no-repeat;
}


/* Esperienza: testo e prenotazione */
.ts-esperienza__testo { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 56px; }
.ts-esperienza__testo .ts-elenco { gap: 20px; }
.ts-esperienza__testo .ts-elenco h2 { font-family: var(--font-titoli); font-size: 24px; font-weight: 500; line-height: 1.3; }
.ts-prenota { flex: 1 1 360px; display: flex; flex-direction: column; gap: 24px; padding: 24px; border-radius: 8px; background: var(--superficie); }

/* Racconto: collegamenti a lato */

/* Dato in evidenza accanto ai pulsanti dell'intestazione (es. la data di un evento) */
.ts-intestazione__data { font-family: var(--font-titoli); font-size: 24px; font-weight: 500; }

/* Riquadro dei dettagli a lato delle schede (template-parts/dettagli.php) */
.ts-dettagli__date { display: flex; align-items: center; gap: 12px; }
.ts-dettagli__date div { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.ts-dettagli__date div:last-child:not(:first-child) { text-align: right; }
.ts-dettagli__date span:first-child { font-size: 20px; line-height: 28px; font-weight: 500; white-space: nowrap; }
.ts-dettagli__date span:last-child,
.ts-dettagli__testi span:last-child { font-size: 14px; font-weight: 300; color: var(--tenue); }
.ts-dettagli__righe { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.ts-dettagli__righe li, .ts-dettagli__righe a { display: flex; align-items: center; gap: 12px; }
.ts-dettagli__righe li { padding: 14px 0; border-top: 1px solid var(--bordo); }
.ts-dettagli__righe li:last-child { border-bottom: 1px solid var(--bordo); }
.ts-dettagli__righe a { flex: 1; min-width: 0; color: var(--inchiostro); text-decoration: none; transition: color .3s ease, padding .3s ease; }
.ts-dettagli__righe .ts-icona { flex-shrink: 0; color: var(--tenue); }
.ts-dettagli__righe a:hover .ts-icona { color: var(--verde); }
.ts-dettagli__testi { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 16px; line-height: 1.4; font-weight: 500; overflow-wrap: anywhere; }
.ts-dettagli__prezzo { display: flex; align-items: baseline; gap: 6px; margin: 0; font-size: 16px; font-weight: 500; }
.ts-dettagli__nota { font-size: 13px; line-height: 1.4; color: var(--tenue); }

/* Pagine legali */
.ts-indice { flex: 1 1 260px; position: sticky; top: 24px; display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 8px; background: var(--superficie); }
.ts-indice span { font-family: var(--font-titoli); font-size: 20px; font-weight: 500; }
.ts-indice a { font-size: 15px; color: var(--tenue); text-decoration: none; transition: color .3s ease, padding .3s ease; }
.ts-prose--legale { flex: 999 1 560px; min-width: 0; max-width: none; gap: 10px; }
.ts-prose--legale > p:first-child { margin-bottom: 22px; font-size: 18px; line-height: 28px; color: var(--inchiostro); }
.ts-prose--legale h2 { margin-top: 22px; scroll-margin-top: 24px; }
.ts-prose--legale p { line-height: 25px; }

/* 404 */
.ts-404 { display: flex; flex-direction: column; align-items: center; gap: 20px; max-width: 640px; padding: 60px 0 140px; text-align: center; }
.ts-404 .ts-h2 { --d: .9s; }
.ts-404 .ts-testo { --d: 1.1s; }
.ts-404 .ts-btn { --d: 1.3s; }
.ts-404__numero { font-family: var(--font-titoli); font-size: 240px; line-height: 1; letter-spacing: -.05em; color: var(--verde); animation: tsGrande 1.6s var(--ease) .4s both, tsFluttua 6s ease-in-out 2.2s infinite; }

/* ==========================================================================
   Footer
   ========================================================================== */

.ts-footer { position: relative; overflow: hidden; background: var(--scuro); color: var(--superficie); }
.ts-footer::before {
	content: "";
	position: absolute;
	z-index: 1;
	inset: 0;
	background: linear-gradient(180deg, var(--fondo) 0%, rgba(238, 242, 236, 0) 16%, rgba(18, 24, 17, .2) 40%, rgba(18, 24, 17, .75) 72%, rgba(18, 24, 17, .9) 100%);
}
.ts-footer a { color: var(--superficie); text-decoration: none; }
.ts-footer__corpo { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 140px; padding-top: 240px; }
.ts-footer__invito { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.ts-footer__invito .ts-h2 { max-width: 460px; }
.ts-footer__invito p { max-width: 420px; margin-top: -8px; color: var(--fondo); }
.ts-footer__invito .ts-btn { color: var(--inchiostro); }
.ts-footer__righe { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.ts-footer__marchio { display: flex; flex-direction: column; gap: 16px; max-width: 360px; }
.ts-footer__marchio p { color: var(--chiaro); }
.ts-footer__marchio p:nth-child(3) { color: var(--fondo); }
.ts-footer__nome { font-family: var(--font-titoli); font-size: 24px; font-weight: 500; color: var(--superficie) !important; }
.ts-footer__social { display: flex; gap: 14px; }
.ts-footer__colonne { display: flex; flex-wrap: wrap; gap: 80px; }
.ts-footer__colonne > div { display: flex; flex-direction: column; gap: 12px; }
.ts-footer__colonne span { font-size: 14px; color: var(--chiaro); }
.ts-footer__colonne ul { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; font-weight: 500; }
.ts-footer__scritta {
	margin-bottom: -.18em;
	font-family: var(--font-titoli);
	font-size: clamp(80px, 16.5vw, 240px);
	line-height: 1;
	letter-spacing: -.04em;
	white-space: nowrap;
	background: linear-gradient(180deg, rgba(247, 249, 244, .55) 0%, rgba(247, 249, 244, 0) 90%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* ==========================================================================
   Telefono
   ========================================================================== */

@media (max-width: 1100px) {
	.tv-card, .tv-card[data-side="sinistra"] { width: 320px; }
}

@media (max-width: 900px) {
	.tv-card, .tv-card[data-side="sinistra"] { top: auto; bottom: 76px; left: 16px; right: 16px; width: auto; margin-top: 0; flex-direction: row; }
	.tv-card-img { width: 38%; height: auto; flex-shrink: 0; }
	.tv-card-body { gap: 6px; padding: 14px 16px 16px; }
	.tv-card-name { font-size: 28px; line-height: 30px; }
	.tv-card-desc { font-size: 14px; line-height: 19px; }
}

@media (max-width: 782px) {
	.admin-bar .ts-header--chiaro { top: 46px; }
}

@media (max-width: 767px) {
	:root { --margine: 16px; }

	.ts-display { font-size: 56px; }
	.ts-titolo { font-size: 44px; line-height: 48px; }
	.ts-h2 { font-size: 34px; line-height: 38px; }
	.ts-clash { font-size: 28px; line-height: 31px; }
	.ts-card-articolo .ts-clash { font-size: 28px; }
	.ts-card-articolo--grande .ts-clash { font-size: 34px; }
	.ts-404__numero { font-size: 140px; }

	.ts-pagina { padding-top: 40px; }

	/* Menu a tendina */
	.ts-nav { min-height: 72px; }
	.ts-burger { display: block; }
	.ts-menu { display: none; }
	.ts-menu.is-aperto {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		width: calc(100% + 32px);
		margin: 0 -16px;
		padding: 8px 16px 24px;
		background: var(--pannello);
		animation: tsMenu .45s var(--ease) both;
	}
	.ts-menu.is-aperto li { width: 100%; }
	.ts-menu.is-aperto a { display: block; padding: 14px 0; border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent); font-family: var(--font-titoli); font-size: 28px; font-weight: 400; letter-spacing: -.03em; }

	/* Testi allineati a sinistra */
	.ts-testata__lato, .ts-intestazione__lato, .ts-hero__lato { align-items: flex-start; text-align: left; }
	.ts-hero__lato p { text-align: left; }
	.ts-hero__lato .ts-etichette { justify-content: flex-start; }

	/* Altezze ridotte */
	.ts-media, .ts-mappa { height: calc(var(--altezza, 560px) * .72); }
	.ts-mappa-vera__mappa { height: min(var(--altezza, 680px), 75vh); }
	.ts-contatti { min-height: 640px; }
	.ts-card-esperienza { height: 500px; }

	/* Viaggio */
	.tv-mount-l { left: -30vw; bottom: -6vh; width: 115vw; }
	.tv-mount-r { right: -38vw; bottom: -16vh; width: 125vw; }
	.tv-intro { padding-top: 17vh; }
	.tv-lead { font-size: 17px; line-height: 24px; }
	.tv-source-note p { font-size: 28px; line-height: 32px; }
	.tv-outro-title { font-size: 44px; line-height: 46px; }
	.tv-river-map { bottom: 22px; width: calc(100% - 32px); gap: 10px; }
	.tv-map-end, .tv-dot span, .tv-card-img { display: none; }
	.tv-peak { font-size: 10px; }

	/* Griglie a due colonne */
	.ts-valori { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wp-block-gallery.has-nested-images.ts-mosaico { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: 180px; }
}

@media (max-width: 520px) {
	.ts-valori, .ts-punti, .ts-recapiti { grid-template-columns: minmax(0, 1fr); }
	.ts-valore--foto { grid-column: auto; }
	.wp-block-gallery.has-nested-images.ts-mosaico { grid-template-columns: minmax(0, 1fr); }
	.wp-block-gallery.has-nested-images.ts-mosaico figure { grid-column: auto !important; grid-row: auto !important; }
}
