/* =====================================================================
   TLP SISTEMA GRAFICO UNICO — 20/11/2026 (COMANDO 11)
   Colori, caratteri, misure, header mobile, pulsante segnalazioni
   e gli 8 componenti .tlp-* per le pagine ricostruite in Gutenberg.
   Per tornare indietro: cancellare da qui alla fine del file.
   ===================================================================== */

:root {
	--tlp-navy: #0F1E3D;
	--tlp-gold: #C9A24B;
	--tlp-gold-light: #E2BE6A;
	--tlp-gold-dark: #8A6A1F;
	--tlp-text: #33405C;
	--tlp-sand: #F6F3EC;
	--tlp-line: #E4DED0;
	--tlp-white: #FFFFFF;
	--tlp-ok: #1D5E33;   --tlp-ok-bg: #DDF3E4;
	--tlp-wait: #6B4300; --tlp-wait-bg: #FFE8C2;
	--tlp-stop: #7A1E1E; --tlp-stop-bg: #F8D9D9;
	--tlp-serif: "Playfair Display", Georgia, serif;
	--tlp-sans: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
	--tlp-text-w: 720px;
	--tlp-wide-w: 1120px;
	--tlp-radius: 16px;
}

/* ---------- Caratteri di base: Source Sans per il testo, Playfair per i titoli ---------- */
body, button, input, select, textarea, .main-navigation, .site-footer {
	font-family: var(--tlp-sans);
}
.entry-content h1, .entry-content h2, .entry-content h3,
.page-header h1, h1.entry-title {
	font-family: var(--tlp-serif);
	line-height: 1.15;
}
.entry-content h4, .entry-content h5, .entry-content h6 {
	font-family: var(--tlp-sans);
}
.entry-content h2, .entry-content h3 { margin-top: 1.6em; margin-bottom: .5em; }
.entry-content h2 + h3 { margin-top: .4em; }

/* Logo testuale nel font del marchio */
.site-branding .main-title, .site-branding .main-title a, .site-title, .site-title a {
	font-family: var(--tlp-serif) !important;
	font-weight: 700 !important;
	letter-spacing: .01em;
}

/* ---------- Header compatto su telefono ---------- */
@media (max-width: 768px) {
	.site-header { position: static !important; }
	.site-header .inside-header { padding: 12px 20px !important; }
	.site-branding .main-title { font-size: 22px !important; line-height: 1.2 !important; }
	#site-navigation.main-navigation { position: sticky; top: 0; z-index: 999; }
	#site-navigation .inside-navigation {
		display: flex !important;
		flex-wrap: wrap !important;
		align-items: center !important;
		justify-content: space-between !important;
		min-height: 52px;
		padding: 0 12px !important;
	}
	#site-navigation .menu-toggle {
		order: 1;
		height: 52px !important;
		min-height: 52px !important;
		line-height: 52px !important;
		padding: 0 8px !important;
		width: auto !important;
		flex: 0 0 auto;
	}
	#site-navigation .tlp-mobile-lang {
		order: 2 !important;
		width: auto !important;
		flex: 0 0 auto !important;
		position: static !important;
		height: 52px !important;
		margin: 0 !important;
		padding: 0 !important;
		align-items: center;
	}
	#site-navigation #primary-menu, #site-navigation .main-nav {
		order: 3 !important;
		flex: 1 0 100%;
		width: 100%;
	}
	.admin-bar #site-navigation.main-navigation { top: 46px; }
}

/* ---------- Pulsante «Segnala un problema»: più piccolo ---------- */
#tlp-bug-btn {
	font-size: 13px !important;
	padding: 8px 14px !important;
	right: 14px !important;
	bottom: 14px !important;
	opacity: .92;
	box-shadow: 0 2px 8px rgba(15, 30, 61, .25) !important;
}
@media (max-width: 768px) {
	#tlp-bug-btn {
		font-size: 0 !important;
		width: 44px !important;
		height: 44px !important;
		padding: 0 !important;
		border-radius: 50% !important;
		display: flex !important;
		align-items: center;
		justify-content: center;
		right: 10px !important;
		bottom: 10px !important;
		overflow: hidden;
	}
	#tlp-bug-btn * { font-size: 0 !important; }
	#tlp-bug-btn::after {
		content: "!";
		font: 700 20px/1 var(--tlp-sans);
		color: #FFFFFF;
	}
	.generate-back-to-top { bottom: 62px !important; right: 10px !important; }
}

/* =====================================================================
   COMPONENTI .tlp-* (da usare nelle pagine ricostruite)
   ===================================================================== */
.tlp-wrap { max-width: var(--tlp-wide-w); margin: 0 auto; padding: 0 20px; }
.tlp-narrow { max-width: var(--tlp-text-w); margin-left: auto; margin-right: auto; }
.tlp-kicker {
	display: block; font: 700 14px/1.3 var(--tlp-sans);
	letter-spacing: .1em; text-transform: uppercase; color: var(--tlp-gold-dark); margin-bottom: 8px;
}
.tlp-lead { font-size: 19px; line-height: 1.55; color: var(--tlp-text); }

/* Pulsanti */
.tlp-btn, .entry-content a.tlp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 13px 24px; border-radius: 12px;
	font: 700 17px/1.2 var(--tlp-sans); text-decoration: none !important;
	border: 2px solid var(--tlp-navy); background: var(--tlp-navy); color: #FFFFFF !important;
	cursor: pointer; transition: filter .15s ease;
}
.tlp-btn:hover { filter: brightness(1.12); }
.tlp-btn--gold { background: var(--tlp-gold); border-color: var(--tlp-gold); color: var(--tlp-navy) !important; }
.tlp-btn--ghost { background: transparent; color: var(--tlp-navy) !important; }
.tlp-hero .tlp-btn--ghost { color: #FFFFFF !important; border-color: #FFFFFF; }
.tlp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

/* 1 · Testata della pagina */
.tlp-hero {
	background: var(--tlp-navy); color: #FFFFFF;
	border-radius: var(--tlp-radius); padding: clamp(28px, 5vw, 56px);
	margin: 0 0 40px;
}
.tlp-hero h1, .tlp-hero h2 { color: #FFFFFF !important; font-size: clamp(32px, 5vw, 48px); margin: 0 0 12px; }
.tlp-hero h1 em, .tlp-hero h2 em { color: var(--tlp-gold-light); }
.tlp-hero p { color: #DCE3F0; font-size: 19px; max-width: 640px; }
.tlp-hero .tlp-kicker { color: var(--tlp-gold-light); }

/* 2 · Sezione */
.tlp-section { padding: clamp(28px, 5vw, 48px) 0; }
.tlp-section--sand { background: var(--tlp-sand); border-radius: var(--tlp-radius); padding-left: clamp(20px, 4vw, 40px); padding-right: clamp(20px, 4vw, 40px); }
.tlp-section h2 { font-size: clamp(28px, 4vw, 34px); margin-top: 0; }
.tlp-section p, .tlp-section li { font-size: 17px; line-height: 1.6; color: var(--tlp-text); }

/* 3 · Griglia di schede */
.tlp-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 20px 0; }
.tlp-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tlp-card {
	background: #FFFFFF; border: 1px solid var(--tlp-line); border-radius: var(--tlp-radius);
	padding: 24px; display: flex; flex-direction: column; gap: 10px;
}
a.tlp-card { text-decoration: none !important; color: inherit; transition: box-shadow .15s ease; }
a.tlp-card:hover { box-shadow: 0 6px 20px rgba(15, 30, 61, .12); }
.tlp-card--dark { background: var(--tlp-navy); border-color: var(--tlp-navy); color: #FFFFFF; }
.tlp-card--dark h3, .tlp-card--dark strong { color: #FFFFFF !important; }
.tlp-card--dark p { color: #DCE3F0 !important; }
.tlp-card h3 { font-size: 22px; margin: 0; }
.tlp-card p { margin: 0; font-size: 16px; }
.tlp-card svg { width: 32px; height: 32px; stroke: var(--tlp-gold-dark); fill: none; stroke-width: 1.6; }
.tlp-card .tlp-btn { margin-top: auto; align-self: flex-start; }

/* 4 · Passi numerati */
.tlp-steps { list-style: none !important; margin: 20px 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: tlpstep; }
.tlp-steps > li {
	counter-increment: tlpstep; background: #FFFFFF; border: 1px solid var(--tlp-line);
	border-radius: var(--tlp-radius); padding: 22px; font-size: 16px; color: var(--tlp-text); margin: 0 !important;
}
.tlp-steps > li::before {
	content: counter(tlpstep, decimal-leading-zero);
	display: block; font: 700 34px/1 var(--tlp-serif); color: var(--tlp-gold-dark); margin-bottom: 10px;
}
.tlp-steps > li strong { display: block; color: var(--tlp-navy); font-size: 18px; margin-bottom: 4px; }

/* 5 · Domande frequenti (blocco Dettagli di Gutenberg con classe tlp-faq) */
.tlp-faq details, details.tlp-faq { border-top: 1px solid var(--tlp-line); padding: 14px 0; }
.tlp-faq details:last-child, details.tlp-faq:last-of-type { border-bottom: 1px solid var(--tlp-line); }
.tlp-faq summary, details.tlp-faq summary {
	cursor: pointer; list-style: none; font: 600 18px/1.4 var(--tlp-sans); color: var(--tlp-navy);
	display: flex; justify-content: space-between; gap: 16px;
}
.tlp-faq summary::-webkit-details-marker, details.tlp-faq summary::-webkit-details-marker { display: none; }
.tlp-faq summary::after, details.tlp-faq summary::after { content: "+"; font-size: 22px; color: var(--tlp-gold-dark); }
.tlp-faq details[open] summary::after, details.tlp-faq[open] summary::after { content: "−"; }
.tlp-faq details p, details.tlp-faq p { margin: 10px 0 0; font-size: 17px; color: var(--tlp-text); }

/* 6 · Riquadri avviso */
.tlp-note { border-radius: 14px; padding: 16px 20px; font-size: 17px; margin: 18px 0; border: 2px solid var(--tlp-navy); background: #EAF1FB; color: var(--tlp-navy); }
.tlp-note--warn { border-color: var(--tlp-gold); background: #FFF4D6; }
.tlp-note p { margin: 0; }

/* Semaforo */
.tlp-pill { display: inline-block; font: 700 14px/1 var(--tlp-sans); padding: 6px 12px; border-radius: 999px; }
.tlp-pill--ok { color: var(--tlp-ok); background: var(--tlp-ok-bg); }
.tlp-pill--wait { color: var(--tlp-wait); background: var(--tlp-wait-bg); }
.tlp-pill--stop { color: var(--tlp-stop); background: var(--tlp-stop-bg); }

/* 7 · Tabella */
.tlp-table table, table.tlp-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.tlp-table th { text-align: left; color: var(--tlp-navy); border-bottom: 2px solid var(--tlp-navy); padding: 10px; }
.tlp-table td { border-bottom: 1px solid var(--tlp-line); padding: 10px; color: var(--tlp-text); }

/* 8 · Chiamata finale */
.tlp-cta {
	background: var(--tlp-sand); border-radius: var(--tlp-radius);
	padding: clamp(24px, 4vw, 40px); margin: 40px 0; text-align: center;
}
.tlp-cta h2 { margin: 0 0 10px; font-size: clamp(26px, 4vw, 32px); }
.tlp-cta .tlp-actions { justify-content: center; }

/* Telefono: una colonna */
@media (max-width: 760px) {
	.tlp-cards, .tlp-cards--2, .tlp-steps { grid-template-columns: 1fr; }
	.tlp-table thead { display: none; }
	.tlp-table tr { display: block; border: 1px solid var(--tlp-line); border-radius: 12px; margin-bottom: 10px; padding: 6px 10px; }
	.tlp-table td { display: block; border: 0; padding: 4px 0; }
	.tlp-table td[data-label]::before { content: attr(data-label) " · "; font-weight: 700; color: var(--tlp-navy); }
}
/* ===================== FINE TLP SISTEMA GRAFICO ===================== */
