/*
Theme Name: Playgroup
Theme URI: https://www.playgroupsrl.com/
Author: Playgroup
Description: Tema leggero su misura per Playgroup. Header, contenuti e footer sono gestiti dal plugin Playgroup Sections (Sezioni → Stile e layout); il tema fornisce solo la struttura della pagina e gli stili di base.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: playgroup
*/

/* ---------- Base ---------- */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

body {
	margin: 0;
	background-color: #000;
	color: #fff;
	font-family: var(--pgs-font-body, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	font-size: 1rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.75em;
	font-family: var(--pgs-font-heading, inherit);
	font-weight: 600;
	line-height: 1.2;
}

h1 { font-size: clamp(2rem, 3.5vw, 2.75rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.25em; }

a { color: var(--pgs-accent, #26d07c); }
a:hover { text-decoration: none; }

img,
video,
iframe {
	max-width: 100%;
}

img { height: auto; }

:focus-visible {
	outline: 2px solid var(--pgs-accent, #26d07c);
	outline-offset: 2px;
}

/* ---------- Accessibilità ---------- */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link:focus {
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100001;
	width: auto;
	height: auto;
	padding: 0.75rem 1.25rem;
	clip-path: none;
	background: #fff;
	color: #000;
	font-weight: 600;
}

/* ---------- Struttura ---------- */

.pg-main { display: block; }
.pg-main:focus { outline: none; }

.pg-container {
	width: 100%;
	max-width: var(--wp--style--global--wide-size, 1240px);
	margin-inline: auto;
	padding-inline: clamp(1.25rem, 4vw, 2rem);
}

/* Pagine/articoli senza sezioni (es. privacy, articoli del blog). */
.pg-entry {
	padding-block: clamp(3rem, 6vw, 5rem);
}

.pg-entry__header { margin-bottom: 2rem; }

.pg-entry__title {
	display: inline-block;
	text-decoration: underline 4px var(--pgs-accent, #26d07c);
	text-underline-offset: 10px;
	line-height: 1.6;
}

.pg-entry__meta { color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; }

.pg-entry__content {
	max-width: 820px;
	font-size: 1.0625rem;
}

.pg-entry__content > :last-child { margin-bottom: 0; }

.pg-entry__thumb { margin: 0 0 2rem; }
.pg-entry__thumb img { display: block; border-radius: 8px; }

/* Elenco articoli (blog, archivi, ricerca). */
.pg-list { display: grid; gap: 2.5rem; }
.pg-list__item { padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.pg-list__title { margin-bottom: 0.5rem; font-size: 1.5rem; }
.pg-list__title a { color: inherit; text-decoration: none; }
.pg-list__title a:hover { color: var(--pgs-accent, #26d07c); }

.pg-pagination { margin-top: 3rem; }
.pg-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.pg-pagination .page-numbers {
	padding: 0.4em 0.9em;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: var(--pgs-btn-radius, 4px);
	color: inherit;
	text-decoration: none;
}

.pg-pagination .page-numbers.current {
	border-color: var(--pgs-accent, #26d07c);
	background: var(--pgs-accent, #26d07c);
	color: var(--pgs-accent-fg, #fff);
}

/* Pagina 404. */
.pg-404 {
	min-height: 60vh;
	display: grid;
	place-items: center;
	text-align: center;
}

.pg-404__code {
	margin: 0;
	color: var(--pgs-accent, #26d07c);
	font-family: var(--pgs-font-heading, inherit);
	font-size: clamp(4rem, 12vw, 8rem);
	font-weight: 700;
	line-height: 1;
}

.pg-button {
	display: inline-block;
	padding: 0.8em 1.8em;
	border-radius: var(--pgs-btn-radius, 4px);
	background: var(--pgs-accent, #26d07c);
	color: var(--pgs-accent-fg, #fff);
	font-weight: 600;
	text-decoration: none;
}

.pg-button:hover { filter: brightness(1.08); }

/* Header e footer di riserva (se nel plugin non è impostato un header/footer). */
.pg-fallback-header,
.pg-fallback-footer {
	padding-block: 1.25rem;
	background: #000;
}

.pg-fallback-header .pg-container,
.pg-fallback-footer .pg-container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.pg-fallback-header a,
.pg-fallback-footer a { color: inherit; text-decoration: none; }

.pg-fallback-header ul,
.pg-fallback-footer ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pg-fallback-header .sub-menu { display: none; }
.pg-fallback-footer { border-top: 1px solid rgba(255, 255, 255, 0.15); font-size: 0.9rem; }

/* ---------- Classi di WordPress ---------- */

.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text,
figcaption { color: rgba(255, 255, 255, 0.65); font-size: 0.875rem; }
.sticky,
.bypostauthor,
.gallery-caption { /* richieste dai controlli dei temi WordPress */ }
