/* Playgroup Sections – frontend
 *
 * Variabili globali (da Sezioni → Stile): --pgs-accent, --pgs-accent-fg, --pgs-font-heading,
 * --pgs-font-body, --pgs-btn-radius.
 * Variabili per sezione: --pgs-bg, --pgs-color.
 */

.pgs {
	--pgs-max: var(--wp--style--global--wide-size, 1240px);
	--pgs-gutter: clamp(1.25rem, 4vw, 2rem);
	--pgs-radius: 8px;
	--pgs-muted: color-mix(in srgb, currentColor 72%, transparent);
	--pgs-line: color-mix(in srgb, currentColor 18%, transparent);

	position: relative;
	box-sizing: border-box;
	background-color: var(--pgs-bg, transparent);
	color: var(--pgs-color, inherit);
	font-family: var(--pgs-font-body, inherit);
}

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

/* Sezioni consecutive senza spazio tra loro (i temi aggiungono margini tra i blocchi). */
.pgs + .pgs {
	margin-block-start: 0;
}

/* "Tutta larghezza" per temi classici (es. Avada) senza supporto ad alignfull.
 * --pgs-scrollbar è calcolata via JS: 100vw include la barra di scorrimento verticale. */
.pgs--full:not(.has-global-padding > .alignfull) {
	--pgs-vw: calc(100vw - var(--pgs-scrollbar, 0px));

	width: var(--pgs-vw);
	max-width: none;
	margin-inline: calc((100% - var(--pgs-vw)) / 2);
}

.pgs--pad-none { padding-block: 0; }
.pgs--pad-small { padding-block: clamp(1.5rem, 4vw, 2.5rem); }
.pgs--pad-medium { padding-block: clamp(3rem, 6vw, 4.5rem); }
.pgs--pad-large { padding-block: clamp(4rem, 9vw, 7.5rem); }

.pgs__inner {
	position: relative;
	width: 100%;
	max-width: var(--pgs-max);
	margin-inline: auto;
	padding-inline: var(--pgs-gutter);
}

.pgs--full .pgs__inner {
	padding-inline: max(var(--pgs-gutter), var(--wp--style--root--padding-left, 0px));
}

.pgs-align-center { text-align: center; }
.pgs-align-center .pgs-buttons { justify-content: center; }

/* ---------- Tipografia comune ---------- */

.pgs :is(h1, h2, h3, h4, h5, h6) {
	font-family: var(--pgs-font-heading, inherit);
	/* Alcuni temi forzano il colore dei titoli: dentro le sezioni decide il colore della sezione. */
	color: inherit !important;
}

.pgs .pgs-eyebrow {
	margin: 0 0 0.75rem;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.75;
}

.pgs .pgs-title {
	margin: 0 0 1.5rem;
	font-size: clamp(1.75rem, 2.6vw, 2.2rem);
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: -0.015em;
}

/* Titolo sottolineato con il colore di accento. */
.pgs--title-underline .pgs-title {
	line-height: 1.75;
	text-decoration: underline 4px var(--pgs-accent, currentColor);
	text-decoration-skip-ink: none;
	text-underline-offset: 10px;
}

.pgs .pgs-intro {
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.7;
	color: var(--pgs-muted);
}

.pgs-header {
	max-width: 720px;
	margin: 0 auto clamp(2rem, 4vw, 3rem);
	text-align: center;
}

.pgs-header--left {
	max-width: none;
	margin-inline: 0;
	text-align: left;
}

.pgs-header > :last-child { margin-bottom: 0; }

.pgs .pgs-content {
	font-size: 1.0625rem;
	line-height: 1.75;
}

.pgs-content > :first-child { margin-top: 0; }
.pgs-content > :last-child { margin-bottom: 0; }
.pgs .pgs-content a { color: var(--pgs-accent, inherit); }

/* Linea separatrice nei testi (pulsante "Linea orizzontale" dell'editor). */
.pgs .pgs-content hr {
	height: 0;
	margin: 1.75rem 0;
	border: 0;
	border-top: 1px solid currentColor;
	background: none;
	opacity: 0.85;
}

/* Elenchi puntati con spunta nel colore di accento. */
.pgs .pgs-content ul {
	margin: 1.25rem 0;
	padding: 0;
	list-style: none;
}

.pgs .pgs-content ul li {
	position: relative;
	margin: 0 0 1rem;
	padding-left: 2.25rem;
}

.pgs .pgs-content ul li::before {
	content: "";
	position: absolute;
	top: 0.2em;
	left: 0;
	width: 1.4em;
	height: 1.4em;
	border-radius: 50%;
	background: var(--pgs-accent, currentColor);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-1.9 17.3-5-5 1.8-1.8 3.2 3.2 7-7 1.8 1.8z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-1.9 17.3-5-5 1.8-1.8 3.2 3.2 7-7 1.8 1.8z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Occhiello come etichetta colorata. */
.pgs .pgs-eyebrow--badge {
	font-size: 1rem;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	opacity: 1;
}

.pgs-eyebrow--badge span {
	display: inline-block;
	padding: 0.2em 0.45em;
	background: var(--pgs-accent, currentColor);
	color: var(--pgs-accent-fg, #fff);
	line-height: 1.3;
}

/* ---------- Pulsanti ---------- */

.pgs-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2rem;
}

.pgs .pgs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.8em 1.8em;
	border: 2px solid transparent;
	border-radius: var(--pgs-btn-radius, 999px);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.015em;
	text-decoration: none;
	transition: transform 0.15s ease, filter 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.pgs .pgs-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.pgs .pgs-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.pgs .pgs-btn--primary {
	border-color: var(--pgs-accent, currentColor);
	background-color: var(--pgs-accent, var(--wp--preset--color--contrast, #111));
	color: var(--pgs-accent-fg, #fff);
}

.pgs .pgs-btn--secondary {
	border-color: currentColor;
	color: inherit;
}

.pgs .pgs-btn--secondary:hover {
	border-color: var(--pgs-accent, currentColor);
	background-color: var(--pgs-accent, transparent);
	color: var(--pgs-accent-fg, inherit);
}

.pgs .pgs-btn--link {
	padding-inline: 0;
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* ---------- Hero ---------- */

.pgs--hero {
	display: flex;
	flex-direction: column;
	justify-content: center;
	overflow: hidden;
	background-color: var(--pgs-bg, #111);
	color: var(--pgs-color, #fff);
}

.pgs--hero:has(.pgs-hero--h-small) { min-height: 320px; }
.pgs--hero:has(.pgs-hero--h-medium) { min-height: 480px; }
.pgs--hero:has(.pgs-hero--h-large) { min-height: 680px; }
.pgs--hero:has(.pgs-hero--h-screen) { min-height: 100svh; }

.pgs-hero {
	display: flex;
	flex: 1;
	align-items: center;
}

.pgs-hero__content { max-width: 820px; }
.pgs-align-center .pgs-hero__content { margin-inline: auto; }

.pgs-hero__media,
.pgs-cta__media {
	position: absolute;
	inset: 0;
}

.pgs-hero__media :is(.pgs-hero__img, .pgs-hero__video),
.pgs-cta__media .pgs-cta__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pgs-hero__overlay {
	position: absolute;
	inset: 0;
	background: #000;
}

.pgs .pgs-hero__title {
	margin: 0;
	font-size: clamp(2.25rem, 4vw, 3.45rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.015em;
}

.pgs .pgs-hero__subtitle {
	margin: 1.25rem 0 0;
	font-size: clamp(1.05rem, 1.6vw, 1.25rem);
	opacity: 0.9;
}

.pgs .pgs-hero__subtitle--accent {
	color: var(--pgs-accent, inherit);
	font-family: var(--pgs-font-heading, inherit);
	font-size: clamp(1.15rem, 1.8vw, 1.45rem);
	font-weight: 600;
	letter-spacing: -0.015em;
	opacity: 1;
}

.pgs--hero .pgs-btn {
	font-size: 1.125rem;
	padding: 0.95em 2.2em;
}

.pgs-hero__logos {
	position: relative;
	width: 100%;
	margin-top: 2.5rem;
}

/* ---------- Scorrimento continuo (loghi, gallerie) ---------- */

.pgs-marquee {
	--pgs-marquee-gap: clamp(2rem, 4vw, 4rem);

	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.pgs-marquee__track {
	display: flex;
	width: max-content;
	animation: pgs-marquee var(--pgs-marquee-duration, 40s) linear infinite;
}

.pgs-marquee:hover .pgs-marquee__track { animation-play-state: paused; }

.pgs-marquee__group {
	display: flex;
	align-items: center;
	gap: var(--pgs-marquee-gap);
	padding-right: var(--pgs-marquee-gap);
}

.pgs-marquee__item { flex: 0 0 auto; }

.pgs-marquee--logos .pgs-marquee__img {
	display: block;
	width: auto;
	max-width: 200px;
	height: 60px;
	object-fit: contain;
}

@keyframes pgs-marquee {
	to { transform: translateX(-50%); }
}

/* ---------- Testo ---------- */

.pgs-text--narrow { --pgs-max: 640px; }
.pgs-text--normal { --pgs-max: 820px; }
.pgs-text--wide { --pgs-max: var(--wp--style--global--wide-size, 1240px); }

/* ---------- Testo + immagine ---------- */

.pgs-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(2rem, 6vw, 5rem);
	align-items: center;
}

.pgs-split--v-top { align-items: start; }

.pgs-split:not(:has(.pgs-split__media)) { grid-template-columns: 1fr; }

.pgs-split--img-left .pgs-split__media { order: -1; }

.pgs-split__media { margin: 0; }

.pgs-split__media .pgs-split__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--pgs-radius);
}

@media (max-width: 781px) {
	.pgs-split { grid-template-columns: 1fr; }
	.pgs-split .pgs-split__media { order: 0; }
}

/* ---------- Galleria / carosello ---------- */

.pgs-gallery { --pgs-cols: 4; --pgs-gallery-gap: 2px; }
.pgs-gallery.pgs-cols-2 { --pgs-cols: 2; }
.pgs-gallery.pgs-cols-3 { --pgs-cols: 3; }
.pgs-gallery.pgs-cols-5 { --pgs-cols: 5; }
.pgs-gallery.pgs-cols-6 { --pgs-cols: 6; }

.pgs-gallery.pgs-gap-none { --pgs-gallery-gap: 0px; }
.pgs-gallery.pgs-gap-medium { --pgs-gallery-gap: 10px; }

@media (max-width: 1024px) {
	.pgs-gallery:is(.pgs-cols-4, .pgs-cols-5, .pgs-cols-6) { --pgs-cols: 3; }
}

@media (max-width: 781px) {
	.pgs-gallery.pgs-gallery { --pgs-cols: 2; }
}

@media (max-width: 480px) {
	.pgs-gallery--carousel.pgs-gallery { --pgs-cols: 1.25; }
	.pgs-gallery--grid.pgs-gallery { --pgs-cols: 1; }
}

.pgs-gallery__item {
	position: relative;
	margin: 0;
	overflow: hidden;
}

.pgs-gallery__item a { display: block; height: 100%; }

.pgs-gallery__img,
.pgs-gallery .pgs-marquee__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.pgs-gallery__item:hover .pgs-gallery__img { transform: scale(1.04); }

.pgs-ratio-portrait :is(.pgs-gallery__item, .pgs-marquee__item) { aspect-ratio: 7 / 10; }
.pgs-ratio-square :is(.pgs-gallery__item, .pgs-marquee__item) { aspect-ratio: 1; }
.pgs-ratio-landscape :is(.pgs-gallery__item, .pgs-marquee__item) { aspect-ratio: 4 / 3; }
.pgs-ratio-auto .pgs-gallery__img { height: auto; }

.pgs-gallery--grid {
	display: grid;
	grid-template-columns: repeat(var(--pgs-cols), minmax(0, 1fr));
	gap: var(--pgs-gallery-gap);
}

.pgs-gallery--carousel { position: relative; }

.pgs-carousel__track {
	display: grid;
	grid-auto-columns: calc((100% - (var(--pgs-cols) - 1) * var(--pgs-gallery-gap)) / var(--pgs-cols));
	grid-auto-flow: column;
	gap: var(--pgs-gallery-gap);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.pgs-carousel__track::-webkit-scrollbar { display: none; }
.pgs-carousel__track > * { scroll-snap-align: start; }
.pgs-carousel__track:focus-visible { outline: 2px solid var(--pgs-accent, currentColor); outline-offset: 4px; }

.pgs .pgs-carousel__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: var(--pgs-btn-radius, 999px);
	background: var(--pgs-accent, #111);
	color: var(--pgs-accent-fg, #fff);
	cursor: pointer;
	transform: translateY(-50%);
	transition: opacity 0.2s ease;
}

.pgs-carousel__nav svg { width: 22px; height: 22px; }
.pgs-carousel__nav--prev { left: 1rem; }
.pgs-carousel__nav--prev svg { transform: rotate(180deg); }
.pgs-carousel__nav--next { right: 1rem; }
.pgs .pgs-carousel__nav:disabled { opacity: 0; pointer-events: none; }
.pgs .pgs-carousel__nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.pgs-gallery.pgs-marquee .pgs-marquee__item { width: clamp(220px, calc(100vw / var(--pgs-cols)), 420px); }
.pgs-gallery.pgs-marquee .pgs-marquee__group { gap: var(--pgs-gallery-gap); padding-right: var(--pgs-gallery-gap); }
.pgs-gallery.pgs-marquee { -webkit-mask-image: none; mask-image: none; }

/* ---------- Elenco con icone ---------- */

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

.pgs-feature {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 3vw, 2.5rem);
	padding-block: clamp(1.75rem, 4vw, 2.75rem);
	border-bottom: 1px dashed var(--pgs-line);
}

.pgs-feature__icon,
.pgs .pgs-feature__link {
	display: grid;
	flex: 0 0 auto;
	place-items: center;
	width: 84px;
	height: 84px;
	border-radius: 24px;
}

.pgs-feature__icon {
	background: #f5f7f9;
	color: var(--pgs-accent, #111);
}

.pgs-feature__icon svg { width: 40px; height: 40px; }
.pgs-feature__icon .pgs-feature__img { width: 34px; height: 34px; object-fit: contain; }

.pgs-feature__body { flex: 1; min-width: 0; }

.pgs .pgs-feature__title {
	margin: 0 0 0.5rem;
	font-family: var(--pgs-font-body, inherit);
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.4;
	text-transform: capitalize;
}

.pgs .pgs-feature__text {
	max-width: 720px;
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.7;
	color: var(--pgs-muted);
}

.pgs .pgs-feature__link {
	background: var(--pgs-accent, #111);
	color: var(--pgs-accent-fg, #fff);
	text-decoration: none;
	transition: transform 0.2s ease, filter 0.2s ease;
}

.pgs .pgs-feature__link:hover { transform: translateX(3px); filter: brightness(1.08); }
.pgs-feature__link svg { width: 34px; height: 34px; }

@media (max-width: 640px) {
	.pgs-feature { flex-wrap: wrap; align-items: flex-start; }
	.pgs-feature__body { flex-basis: calc(100% - 84px - 1rem); }
	.pgs .pgs-feature__link { width: 48px; height: 48px; margin-left: calc(84px + 1rem); border-radius: 14px; }
}

/* ---------- Riquadri con immagine ---------- */

.pgs-tiles__grid {
	--pgs-tile-h: 182px;

	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: clamp(1rem, 2.5vw, 2rem);
}

.pgs-tiles--h-medium { --pgs-tile-h: 260px; }
.pgs-tiles--h-large { --pgs-tile-h: 360px; }

.pgs-tile { grid-column: span 2; }
.pgs-tiles--p2 .pgs-tile { grid-column: span 3; }
.pgs-tiles--p3-2 .pgs-tile:is(:nth-child(5n + 4), :nth-child(5n + 5)) { grid-column: span 3; }
.pgs-tiles--p4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pgs-tiles--p4 .pgs-tile { grid-column: span 1; }

.pgs .pgs-tile {
	position: relative;
	display: grid;
	place-items: center;
	min-height: var(--pgs-tile-h);
	overflow: hidden;
	isolation: isolate;
	border-radius: 5px;
	background: #222;
	color: #fff;
	text-decoration: none;
}

.pgs-tile__img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.pgs-tile::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: #000;
	opacity: var(--pgs-tile-overlay, 0.65);
	transition: opacity 0.3s ease;
}

.pgs-tile:is(:hover, :focus-visible) .pgs-tile__img { transform: scale(1.06); }
.pgs-tile:is(:hover, :focus-visible)::after { opacity: calc(var(--pgs-tile-overlay, 0.65) * 0.7); }
.pgs .pgs-tile:focus-visible { outline: 2px solid var(--pgs-accent, #fff); outline-offset: 3px; }

.pgs .pgs-tile__title {
	margin: 0;
	padding: 1rem;
	font-size: clamp(1.4rem, 2.4vw, 2.2rem);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.015em;
	text-align: center;
}

@media (max-width: 1024px) {
	.pgs-tiles__grid .pgs-tile.pgs-tile { grid-column: span 3; }
	.pgs-tiles--p4 .pgs-tile.pgs-tile { grid-column: span 2; }
}

@media (max-width: 640px) {
	.pgs-tiles__grid .pgs-tile.pgs-tile { grid-column: 1 / -1; }
}

/* ---------- Call to action ---------- */

.pgs--cta {
	overflow: hidden;
	background-color: var(--pgs-bg, #1f2937);
	color: var(--pgs-color, #fff);
}

.pgs-cta__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.45) 85%);
}

.pgs-cta__body { max-width: 720px; }
.pgs-cta.pgs-align-center .pgs-cta__body { margin-inline: auto; }
.pgs .pgs-cta__text { margin: 0; font-size: 1.125rem; opacity: 0.9; }

/* Variante riquadro: il colore va sul box, non sulla fascia. */
.pgs--cta:has(.pgs-cta--box) { background-color: transparent; color: inherit; }

.pgs-cta--box .pgs-cta__body {
	max-width: none;
	padding: clamp(2rem, 6vw, 4rem);
	border-radius: calc(var(--pgs-radius) * 1.5);
	background-color: var(--pgs-bg, #1f2937);
	color: var(--pgs-color, #fff);
}

/* ---------- Card ---------- */

.pgs-cards__grid {
	display: grid;
	gap: clamp(1rem, 3vw, 2rem);
}

.pgs-cards__grid.pgs-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pgs-cards__grid.pgs-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pgs-cards__grid.pgs-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1024px) {
	.pgs-cards__grid:is(.pgs-cols-3, .pgs-cols-4) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
	.pgs-cards__grid.pgs-cards__grid { grid-template-columns: 1fr; }
}

.pgs-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--pgs-line);
	border-radius: var(--pgs-radius);
}

.pgs-card__media .pgs-card__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.pgs-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1.5rem;
}

.pgs .pgs-card__title { margin: 0 0 0.5rem; font-size: 1.25rem; }
.pgs .pgs-card__text { margin: 0; color: var(--pgs-muted); }

.pgs .pgs-card__link {
	margin-top: auto;
	padding-top: 1rem;
	color: inherit;
	font-weight: 600;
}

/* ---------- FAQ ---------- */

.pgs-faq { --pgs-max: 860px; }

.pgs-faq__item { border-bottom: 1px solid var(--pgs-line); }
.pgs-faq__item:first-child { border-top: 1px solid var(--pgs-line); }

.pgs-faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 0;
	font-size: 1.1rem;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}

.pgs-faq__question::-webkit-details-marker { display: none; }

.pgs-faq__question::after {
	content: "+";
	flex-shrink: 0;
	color: var(--pgs-accent, currentColor);
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1;
	transition: transform 0.2s ease;
}

.pgs-faq__item[open] .pgs-faq__question::after { transform: rotate(45deg); }

.pgs-faq__answer { padding-bottom: 1.25rem; color: var(--pgs-muted); }
.pgs-faq__answer > :first-child { margin-top: 0; }
.pgs-faq__answer > :last-child { margin-bottom: 0; }

/* ---------- Intestazione pagina ---------- */

.pgs.pgs--page-title { padding-top: 0; }

.pgs-page-title__banner {
	position: relative;
	height: var(--pgs-banner-h, 420px);
	overflow: hidden;
}

.pgs-page-title__banner--small { --pgs-banner-h: clamp(200px, 25vw, 300px); }
.pgs-page-title__banner--medium { --pgs-banner-h: clamp(260px, 32vw, 440px); }
.pgs-page-title__banner--large { --pgs-banner-h: clamp(320px, 45vw, 620px); }

.pgs-page-title__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Sfumatura verso il colore della sezione. */
.pgs-page-title__banner::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.15) 55%, var(--pgs-bg, #000) 100%);
}

.pgs-page-title { padding-top: clamp(2rem, 4vw, 3rem); }
.pgs--page-title:not(:has(.pgs-page-title__banner)) .pgs-page-title { padding-top: 0; }
.pgs .pgs-page-title__title { font-size: clamp(2rem, 3.2vw, 2.75rem); margin-bottom: 0; }
.pgs-page-title__intro { max-width: 900px; margin-top: 1.75rem; }
.pgs-align-center .pgs-page-title__intro { margin-inline: auto; }

/* ---------- Team ---------- */

.pgs-team .pgs-header { max-width: 1000px; }
.pgs-team .pgs-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; text-transform: uppercase; }

.pgs-team__tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin: 0 auto clamp(2rem, 4vw, 3rem);
}

.pgs .pgs-team__tab {
	flex: 1 1 180px;
	max-width: 240px;
	padding: 1rem 1.25rem;
	border: 0;
	border-radius: var(--pgs-btn-radius, 4px);
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.pgs .pgs-team__tab:hover { color: var(--pgs-accent, inherit); }

.pgs .pgs-team__tab[aria-pressed="true"] {
	background: var(--pgs-accent, currentColor);
	color: var(--pgs-accent-fg, #fff);
}

.pgs .pgs-team__tab:focus-visible { outline: 2px solid var(--pgs-accent, currentColor); outline-offset: 3px; }

@media (max-width: 640px) {
	.pgs .pgs-team__tab { flex-basis: calc(50% - 0.25rem); max-width: none; padding: 0.75rem; }
}

.pgs .pgs-team__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: clamp(2rem, 4vw, 3rem) 2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pgs-member {
	flex: 0 1 260px;
	margin: 0;
	text-align: center;
}

.pgs-member[hidden] { display: none; }

.pgs-member__photo {
	display: block;
	width: 190px;
	height: 190px;
	margin: 0 auto 1rem;
	border: 2px solid var(--pgs-accent, currentColor);
	border-radius: 50%;
	background: #fff;
	object-fit: cover;
}

.pgs .pgs-member__name { margin: 0 0 0.25rem; font-size: 1.15rem; font-weight: 600; }
.pgs .pgs-member__role { margin: 0 0 0.25rem; color: var(--pgs-accent, inherit); line-height: 1.7; }

.pgs .pgs-member__email {
	color: inherit;
	font-size: 0.95rem;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.pgs .pgs-member__email:hover { color: var(--pgs-accent, inherit); }

/* ---------- Contatti ---------- */

.pgs-contact__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(2rem, 6vw, 5rem);
	align-items: center;
}

.pgs .pgs-contact__list { margin: 0; }
.pgs-contact__item { margin-bottom: 1.5rem; }

.pgs .pgs-contact__item dt {
	margin: 0 0 0.35rem;
	font-size: 1.05rem;
}

.pgs .pgs-contact__item dd {
	margin: 0;
	color: var(--pgs-accent, inherit);
	font-family: var(--pgs-font-menu, inherit);
	font-size: 1.3rem;
}

.pgs .pgs-contact__item dd a { color: inherit; text-decoration: none; }
.pgs .pgs-contact__item dd a:hover { text-decoration: underline; }

.pgs .pgs-social {
	display: flex;
	gap: 0.6rem;
	margin: 2rem 0 0;
	padding: 0;
	list-style: none;
}

.pgs .pgs-social a {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	background: var(--pgs-accent, currentColor);
	color: var(--pgs-accent-fg, #fff);
	transition: filter 0.2s ease;
}

.pgs .pgs-social a:hover { filter: brightness(1.1); }
.pgs-social svg { width: 20px; height: 20px; }

/* Modulo (Contact Form 7 o altri): campi sottolineati, pulsante di accento. */
.pgs-contact__form :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], select, textarea) {
	width: 100%;
	margin-top: 0.35rem;
	padding: 0.65rem 0;
	border: 0;
	border-bottom: 2px solid currentColor;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	box-shadow: none;
}

.pgs-contact__form :is(input, select, textarea):focus { border-bottom-color: var(--pgs-accent, currentColor); outline: none; }
.pgs-contact__form textarea { min-height: 150px; resize: vertical; }
.pgs-contact__form label { display: block; color: inherit; font-weight: 500; }
.pgs-contact__form p { margin: 0 0 1.5rem; }

.pgs-contact__form :is(input[type="submit"], button[type="submit"]) {
	text-transform: none;
	letter-spacing: normal;
	padding: 0.8em 1.8em;
	border: 2px solid var(--pgs-accent, currentColor);
	border-radius: var(--pgs-btn-radius, 4px);
	background: var(--pgs-accent, currentColor);
	color: var(--pgs-accent-fg, #fff);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.pgs-contact__form :is(input[type="submit"], button[type="submit"]):hover {
	background: #fff;
	color: var(--pgs-accent, #111);
}

@media (max-width: 781px) {
	.pgs-contact__grid { grid-template-columns: 1fr; }
}

/* ---------- Video ---------- */

.pgs-videos__grid {
	display: grid;
	grid-template-columns: repeat(var(--pgs-video-cols, 3), minmax(0, 1fr));
	gap: clamp(1rem, 2.5vw, 2rem);
}

.pgs-videos__grid.pgs-cols-1 { --pgs-video-cols: 1; }
.pgs-videos__grid.pgs-cols-2 { --pgs-video-cols: 2; }

@media (max-width: 1024px) {
	.pgs-videos__grid.pgs-cols-3 { --pgs-video-cols: 2; }
}

@media (max-width: 640px) {
	.pgs-videos__grid.pgs-videos__grid { --pgs-video-cols: 1; }
}

.pgs-video { margin: 0; }

.pgs-video__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 6px;
	background: #111;
}

.pgs-video__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.pgs-video__title { margin-top: 0.75rem; font-weight: 600; }

/* ---------- Galleria: "Carica altro" e lightbox ---------- */

.pgs-gallery__item[hidden] { display: none; }
.pgs-gallery__more { justify-content: center; }

.pgs-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: 4rem 1rem;
	background: rgba(0, 0, 0, 0.92);
}

.pgs-lightbox[hidden] { display: none; }

.pgs-lightbox__img {
	display: block;
	max-width: min(1400px, 100%);
	max-height: calc(100vh - 8rem);
	width: auto;
	height: auto;
	object-fit: contain;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.pgs-lightbox__btn {
	position: absolute;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 0;
	border-radius: var(--pgs-btn-radius, 999px);
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.pgs-lightbox__btn:hover { background: var(--pgs-accent, rgba(255, 255, 255, 0.25)); }
.pgs-lightbox__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pgs-lightbox__btn svg { width: 26px; height: 26px; }
.pgs-lightbox__close { top: 1rem; right: 1rem; }
.pgs-lightbox__prev { top: 50%; left: 1rem; transform: translateY(-50%); }
.pgs-lightbox__prev svg { transform: rotate(180deg); }
.pgs-lightbox__next { top: 50%; right: 1rem; transform: translateY(-50%); }

.pgs-lightbox__count {
	position: absolute;
	bottom: 1.25rem;
	left: 50%;
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.9rem;
	transform: translateX(-50%);
}

/* ---------- Header del sito ---------- */

.pgs.pgs--site-header {
	z-index: 1000;
	background-color: var(--pgs-bg, #000);
	color: var(--pgs-color, #fff);
}

.pgs-header--sticky {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
}

/* Homepage: sovrapposto alla prima sezione, semitrasparente; diventa pieno scorrendo. */
.pgs.pgs--site-header.pgs-header--overlay {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	right: 0;
	left: 0;
	width: auto;
	margin: 0;
	background-color: color-mix(in srgb, var(--pgs-bg, #000) var(--pgs-header-overlay, 80%), transparent);
	transition: background-color 0.3s ease;
}

.pgs.pgs--site-header.pgs-header--overlay.is-scrolled {
	background-color: color-mix(in srgb, var(--pgs-bg, #000) 92%, transparent);
}

.pgs--site-header .pgs-site-header {
	display: flex;
	align-items: center;
	gap: 2rem;
	max-width: none;
	min-height: var(--pgs-header-h, 120px);
	padding-inline: clamp(1.25rem, 4vw, 3.6rem);
}

.pgs-site-header__logo {
	display: block;
	flex: 0 0 auto;
	color: inherit;
	text-decoration: none;
}

.pgs-site-header__logo-img {
	display: block;
	width: auto;
	height: var(--pgs-logo-h, 80px);
}

.pgs-site-header__name {
	font-family: var(--pgs-font-heading, inherit);
	font-size: 1.5rem;
	font-weight: 700;
}

.pgs-site-header__nav { flex: 1; }

.pgs .pgs-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.25rem 2.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: var(--pgs-font-menu, var(--pgs-font-body, inherit));
}

.pgs-menu li {
	position: relative;
	margin: 0;
	list-style: none;
}

.pgs .pgs-menu a {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	color: inherit;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.015em;
	text-decoration: none;
	transition: color 0.2s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.pgs-menu > li > a { position: relative; padding-block: 0.5rem; }

/* Barra sotto la voce attiva / in hover. */
.pgs-menu > li:not(.pgs-menu__button) > a::before {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 2px;
	background: var(--pgs-accent, currentColor);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
}

.pgs .pgs-menu li:is(:hover, :focus-within) > a,
.pgs .pgs-menu :is(.current-menu-item, .current-menu-ancestor) > a {
	color: var(--pgs-accent, inherit);
}

.pgs-menu > li:is(:hover, .current-menu-item, .current-menu-ancestor) > a::before { transform: scaleX(1); }

/* Freccia sulle voci con sottomenu. */
.pgs-menu .menu-item-has-children > a::after {
	content: "";
	color: inherit;
	width: 0.42em;
	height: 0.42em;
	margin-top: -0.25em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

.pgs-menu svg { width: 1.2em; height: 1.2em; flex: 0 0 auto; }

/* Voce-pulsante (classe pgs-button o btn-contacts). */
.pgs .pgs-menu .pgs-menu__button > a {
	padding: 0.45em 0.9em;
	border: 2px solid var(--pgs-accent, currentColor);
	border-radius: var(--pgs-btn-radius, 4px);
	background-color: var(--pgs-accent, transparent);
	color: var(--pgs-accent-fg, #fff);
}

.pgs .pgs-menu .pgs-menu__button > a:is(:hover, :focus-visible) {
	background-color: #fff;
	color: var(--pgs-accent, #111);
}

.pgs-menu__button svg { width: 1em; height: 1em; }

/* Sottomenu. */
.pgs .pgs-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: -20px;
	z-index: 10;
	min-width: 230px;
	margin: 0;
	padding: 0.5rem 0;
	background: rgba(0, 0, 0, 0.85);
	list-style: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.pgs-menu li:is(:hover, :focus-within) > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.pgs .pgs-menu .sub-menu a {
	display: block;
	padding: 12px 20px;
	font-size: 14px;
	font-weight: 400;
}

.pgs-site-header__toggle {
	display: none;
	margin-left: auto;
	padding: 0.5rem;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.pgs-site-header__toggle svg { display: block; width: 30px; height: 30px; }
.pgs-site-header__toggle .pgs-icon--close,
.pgs--site-header.is-open .pgs-site-header__toggle .pgs-icon--open { display: none; }
.pgs--site-header.is-open .pgs-site-header__toggle .pgs-icon--close { display: block; }

@media (max-width: 1024px) {
	.pgs--site-header .pgs-site-header { min-height: min(var(--pgs-header-h, 120px), 90px); }
	.pgs-site-header__logo-img { height: min(var(--pgs-logo-h, 80px), 56px); }
	.pgs-site-header__toggle { display: block; }

	.pgs-site-header__nav {
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		display: none;
		max-height: calc(100vh - 90px);
		overflow-y: auto;
		padding: 1rem clamp(1.25rem, 4vw, 3.6rem) 2rem;
		background-color: var(--pgs-bg, #000);
	}

	.pgs--site-header.is-open .pgs-site-header__nav { display: block; }

	.pgs .pgs-menu { flex-direction: column; align-items: stretch; gap: 0; }
	.pgs .pgs-menu > li > a { display: flex; padding-block: 0.8rem; }
	.pgs-menu > li:not(.pgs-menu__button) > a::before { display: none; }
	.pgs .pgs-menu .pgs-menu__button { margin-top: 0.75rem; }
	.pgs .pgs-menu .pgs-menu__button > a { display: inline-flex; }

	.pgs .pgs-menu .sub-menu {
		position: static;
		min-width: 0;
		padding: 0 0 0.5rem 1rem;
		background: transparent;
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.pgs .pgs-menu .sub-menu a { padding: 0.5rem 0; font-size: 15px; }
	.pgs-menu .menu-item-has-children > a::after { display: none; }
}

/* ---------- Footer del sito ---------- */

.pgs.pgs--site-footer {
	background-color: var(--pgs-bg, #111010);
	color: var(--pgs-color, #fff);
}

.pgs-site-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) repeat(var(--pgs-footer-cols, 3), minmax(0, 1fr));
	gap: 2rem;
}

.pgs-site-footer__brand {
	display: flex;
	justify-content: center;
	align-items: flex-start;
}

.pgs-site-footer__logo {
	display: block;
	width: auto;
	height: var(--pgs-logo-h, 80px);
	object-fit: contain;
}

.pgs .pgs-site-footer__title {
	margin: 0 0 1.25rem;
	font-family: var(--pgs-font-body, inherit);
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.5;
}

.pgs .pgs-site-footer__content {
	font-size: 1rem;
	line-height: 1.8;
}

.pgs .pgs-site-footer__content p { margin: 0 0 1rem; }
.pgs .pgs-site-footer__content p:last-child { margin-bottom: 0; }

.pgs .pgs-site-footer__content a {
	color: var(--pgs-accent, inherit);
	text-decoration: none;
}

.pgs .pgs-site-footer__content a:hover { text-decoration: underline; }

.pgs-site-footer__bottom {
	margin-top: clamp(2rem, 4vw, 3rem);
	padding-top: 1.75rem;
	border-top: 1px solid var(--pgs-line);
	text-align: center;
}

.pgs .pgs-site-footer__bottom p {
	margin: 0;
	color: color-mix(in srgb, currentColor 50%, transparent);
	font-size: 0.875rem;
	line-height: 1.4;
}

.pgs .pgs-site-footer__bottom a {
	color: var(--pgs-footer-bottom-link, var(--pgs-accent, inherit));
	text-decoration: none;
}

@media (max-width: 1024px) {
	.pgs-site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pgs-site-footer__brand { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 640px) {
	.pgs-site-footer__grid { grid-template-columns: 1fr; }
}

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

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

@media (prefers-reduced-motion: reduce) {
	.pgs .pgs-btn,
	.pgs-faq__question::after,
	.pgs-tile__img,
	.pgs-gallery__img { transition: none; }

	.pgs-marquee__track { flex-wrap: wrap; width: auto; animation: none; }
	.pgs-marquee__group { flex-wrap: wrap; justify-content: center; }
	.pgs-marquee__group[aria-hidden="true"] { display: none; }
	.pgs-marquee { -webkit-mask-image: none; mask-image: none; }
	.pgs-carousel__track { scroll-behavior: auto; }
}
