/*
Theme Name: Peccioli
Theme URI: https://www.peccioli.net/
Description: Tema a blocchi del Sistema Peccioli. Solo funzioni native di WordPress, nessuna dipendenza esterna, caratteri ospitati localmente.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.2
Text Domain: peccioli
License: GPLv2 or later
*/

/* Piccole regole che theme.json non copre. */

.pec-header {
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}

.admin-bar .pec-header { top: 32px; }

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

/* Schede (card) usate negli elenchi di articoli, eventi e luoghi */
.pec-card {
	height: 100%;
	transition: box-shadow .2s ease, transform .2s ease;
}

.pec-card:hover,
.pec-card:focus-within {
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	transform: translateY(-2px);
}

.pec-card .wp-block-post-featured-image img { aspect-ratio: 4 / 3; object-fit: cover; }

/* Data evento evidenziata */
.pec-data-evento {
	display: inline-block;
	padding: .2em .6em;
	background: var(--wp--preset--color--primario);
	color: var(--wp--preset--color--bianco);
	font-weight: 500;
}

/* Mappe incorporate: sempre proporzionate e responsive */
.pec-mappa iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
}

/* Selettore lingua */
.pec-lingue { display: flex; gap: .75rem; list-style: none; margin: 0; padding: 0; }
.pec-lingue a { text-decoration: none; text-transform: uppercase; font-weight: 500; }
.pec-lingue .is-attiva a { text-decoration: underline; text-underline-offset: .3em; }

/* Accessibilita': focus sempre visibile */
:where(a, button, input, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--primario);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.pec-card { transition: none; }
	.pec-card:hover { transform: none; }
}
