/*
 * Photo Contest — pagina del concorso ([pct_pagina], blocco, indirizzo della galleria).
 * Tutto sotto .pct-pg per non toccare il tema; regole con almeno due classi per prevalere
 * sugli stili del tema su h2, p, a, button.
 * Font inclusi nel plugin (OFL): Big Shoulders Display, Atkinson Hyperlegible.
 */

@font-face { font-family: "PCT Display"; font-weight: 900; font-style: normal; font-display: swap; src: url("../fonts/big-shoulders-display-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "PCT Text"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "PCT Text"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }

.pct-pg {
	--pg-ink: #17202e;
	--pg-ground: #ede9e0;
	--pg-card: #fff;
	--pg-muted: #3d4a5c;
	--pg-navy: #1f3a5f;
	--pg-red: #c8233f;
	--pg-gold: #f2b705;
	--pg-display: "PCT Display", Impact, "Arial Narrow", sans-serif;
	--pg-text: "PCT Text", system-ui, -apple-system, "Segoe UI", sans-serif;

	display: flex;
	flex-direction: column;
	gap: 52px;
	box-sizing: border-box;
	margin-block: 0 32px;
	padding: 28px;
	border-radius: 20px;
	background: var(--pg-ground);
	color: var(--pg-ink);
	font-family: var(--pg-text);
	font-size: 17px;
	line-height: 1.55;
}

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

.pct-pg [hidden] {
	display: none !important;
}

.pct-pg p {
	margin: 0;
}

.pct-pg .pct-pg-h1 {
	margin: 0;
	font-family: var(--pg-display);
	font-weight: 900;
	font-size: clamp(46px, 7.5vw, 88px);
	line-height: .93;
	letter-spacing: 0;
	text-transform: uppercase;
	text-wrap: balance;
	color: inherit;
}

.pct-pg .pct-pg-h2 {
	margin: 0 0 16px;
	font-family: var(--pg-display);
	font-weight: 900;
	font-size: clamp(32px, 4.5vw, 44px);
	line-height: 1;
	letter-spacing: 0;
	text-transform: uppercase;
	text-wrap: balance;
	color: inherit;
}

.pct-pg .pct-pg-eyebrow {
	color: var(--pg-navy);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.pct-pg a {
	color: var(--pg-navy);
}

.pct-pg-preview {
	padding: 10px 14px;
	border-radius: 10px;
	background: #fff8e1;
	color: #6b5000;
	font-size: 14px;
}

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

.pct-pg .pct-pg-btn {
	display: inline-flex;
	align-items: center;
	min-height: 50px;
	padding: 0 24px;
	border: 2px solid var(--pg-red);
	border-radius: 999px;
	background: var(--pg-red);
	color: #fff;
	font-family: var(--pg-text);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.1;
	text-decoration: none;
	transition: transform .15s ease, background .15s ease;
}

.pct-pg .pct-pg-btn:hover,
.pct-pg .pct-pg-btn:focus-visible {
	transform: translateY(-1px);
	background: #a91c34;
	border-color: #a91c34;
	color: #fff;
}

.pct-pg .pct-pg-btn-ghost {
	border-color: var(--pg-ink);
	background: transparent;
	color: var(--pg-ink);
}

.pct-pg .pct-pg-btn-ghost:hover,
.pct-pg .pct-pg-btn-ghost:focus-visible {
	background: var(--pg-ink);
	border-color: var(--pg-ink);
	color: #fff;
}

.pct-pg .pct-pg-btn-dark {
	border-color: var(--pg-ink);
	background: var(--pg-ink);
}

.pct-pg .pct-pg-btn-light {
	border-color: #fff;
	background: #fff;
	color: var(--pg-ink);
}

.pct-pg .pct-pg-btn-light:hover {
	background: #f3f3f3;
	border-color: #f3f3f3;
	color: var(--pg-ink);
}

.pct-pg-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* ---------- Banner ---------- */

.pct-pg-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 24px;
	padding: 18px 22px;
	border-radius: 16px;
	background: var(--pg-navy);
	color: #fff;
}

.pct-pg-banner-body {
	display: flex;
	flex: 1 1 320px;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.pct-pg-banner-title {
	font-family: var(--pg-display);
	font-weight: 900;
	font-size: 30px;
	line-height: 1.05;
	text-transform: uppercase;
}

.pct-pg-banner.pct-pg-slim {
	padding: 12px 20px;
	background: var(--pg-card);
	color: var(--pg-ink);
}

.pct-pg-banner.pct-pg-slim .pct-pg-banner-title {
	font-size: 22px;
}

.pct-pg-banner.pct-pg-warm {
	background: var(--pg-gold);
	color: var(--pg-ink);
}

.pct-pg-banner.pct-pg-hot {
	background: var(--pg-red);
}

.pct-pg-banner.pct-pg-calm {
	background: var(--pg-muted);
}

.pct-pg-mine {
	font-weight: 700;
}

.pct-pg-clock {
	display: flex;
	gap: 8px;
}

.pct-pg-clock:empty {
	display: none;
}

.pct-pg-clock .pct-clock-unit {
	min-width: 62px;
	background: rgba(255, 255, 255, .16);
	box-shadow: none;
	color: #fff;
}

.pct-pg-clock .pct-clock-unit strong {
	color: #fff;
	font-family: var(--pg-display);
	font-size: 34px;
	line-height: 1;
}

/* ---------- Apertura ---------- */

.pct-pg-hero {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
	align-items: center;
	gap: 36px;
}

.pct-pg-hero-text {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.pct-pg-lead {
	max-width: 36em;
	font-size: 19px;
}

.pct-pg-lead p + p {
	margin-top: .7em;
}

.pct-pg-hero-art {
	position: relative;
	display: flex;
	justify-content: center;
	padding: 10px 0 34px;
}

.pct-pg-frame {
	display: block;
	width: min(100%, 420px);
	padding: 14px 14px 52px;
	background: #fff;
	box-shadow: 0 12px 34px rgba(23, 32, 46, .2);
	transform: rotate(-2.5deg);
}

.pct-pg-frame img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

.pct-pg-frame-empty {
	display: grid;
	place-items: center;
	aspect-ratio: 4 / 5.6;
	color: #b0b7c1;
}

.pct-pg-frame-empty svg {
	width: 80px;
	height: 80px;
}

.pct-pg-stamp {
	position: absolute;
	left: 50%;
	bottom: 4px;
	padding: 10px 18px;
	border-radius: 8px;
	background: var(--pg-ink);
	color: #fff;
	font-family: var(--pg-display);
	font-weight: 900;
	font-size: 26px;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
	transform: translateX(-50%) rotate(-3deg);
}

.pct-pg-stamp-risultati {
	background: var(--pg-gold);
	color: var(--pg-ink);
}

/* ---------- Tappe ---------- */

.pct-pg .pct-pg-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pct-pg-step {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	padding: 16px 18px;
	border-radius: 14px;
	background: var(--pg-card);
}

.pct-pg-step strong {
	font-size: 19px;
}

.pct-pg-step span:last-child {
	font-size: 15px;
}

.pct-pg-step-tag {
	align-self: flex-start;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--pg-ground);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.pct-pg-step-tag:empty {
	display: none;
}

.pct-pg-step.is-now {
	background: var(--pg-ink);
	color: #fff;
}

.pct-pg-step.is-now .pct-pg-step-tag {
	background: var(--pg-gold);
	color: var(--pg-ink);
}

.pct-pg-step.is-done {
	color: #5a6678;
}

/* ---------- Numeri ---------- */

.pct-pg-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
	gap: 12px;
}

.pct-pg-stat {
	display: flex;
	flex-direction: column;
	padding: 18px 20px;
	border-radius: 14px;
	background: var(--pg-card);
}

.pct-pg-stat strong {
	font-family: var(--pg-display);
	font-weight: 900;
	font-size: 52px;
	line-height: 1;
}

.pct-pg-stat span {
	color: var(--pg-muted);
	font-size: 15px;
}

/* ---------- Schede ---------- */

.pct-pg-card {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 28px;
	border-radius: 18px;
	background: var(--pg-card);
}

.pct-pg-card .pct-pg-h2 {
	margin: 0;
}

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

.pct-pg-gallery-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 10px 20px;
	margin-bottom: 16px;
}

.pct-pg-gallery-head .pct-pg-h2 {
	margin: 0;
}

.pct-pg-chip {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	border-radius: 999px;
	background: var(--pg-ink);
	color: #fff;
	font-weight: 700;
}

.pct-pg-chip:empty {
	display: none;
}

/* ---------- Premi ---------- */

.pct-pg-prizes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	gap: 12px;
}

.pct-pg-prize {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 18px 20px;
	border-top: 6px solid var(--pg-navy);
	border-radius: 14px;
	background: var(--pg-card);
}

.pct-pg-prize-0 { border-top-color: var(--pg-gold); }
.pct-pg-prize-1 { border-top-color: #9aa6b2; }
.pct-pg-prize-2 { border-top-color: var(--pg-navy); }
.pct-pg-prize-3 { border-top-color: var(--pg-red); }

.pct-pg-prize strong {
	font-size: 20px;
}

.pct-pg-prize span {
	color: var(--pg-muted);
}

/* ---------- Regolamento e domande ---------- */

.pct-pg-split {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
	align-items: start;
	gap: 28px;
}

.pct-pg-split-side {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
}

.pct-pg-acc {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.pct-pg-rules-intro {
	padding: 4px 2px 8px;
}

.pct-pg-details {
	border-radius: 12px;
	background: var(--pg-card);
}

.pct-pg-details > summary,
.pct-pg-faq-item > summary {
	position: relative;
	padding: 14px 44px 14px 18px;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.pct-pg-details > summary::-webkit-details-marker,
.pct-pg-faq-item > summary::-webkit-details-marker {
	display: none;
}

.pct-pg-details > summary::after,
.pct-pg-faq-item > summary::after {
	content: "+";
	position: absolute;
	right: 18px;
	top: 50%;
	font-size: 24px;
	font-weight: 400;
	line-height: 1;
	transform: translateY(-50%);
}

.pct-pg-details[open] > summary::after,
.pct-pg-faq-item[open] > summary::after {
	content: "–";
}

.pct-pg-details > div {
	padding: 0 18px 16px;
	color: var(--pg-muted);
}

.pct-pg-details > div p + p,
.pct-pg-details > div ul,
.pct-pg-details > div ol {
	margin-top: .6em;
}

.pct-pg-faq-item {
	border-bottom: 1px solid #c9c2b4;
}

.pct-pg-faq-item > summary {
	padding-left: 0;
}

.pct-pg-faq-a {
	padding: 0 0 16px;
	color: var(--pg-muted);
}

.pct-pg-faq-a > :first-child { margin-top: 0; }
.pct-pg-faq-a > :last-child { margin-bottom: 0; }

.pct-pg-faq-intro {
	margin-bottom: 8px;
}

.pct-pg-details > summary:focus-visible,
.pct-pg-faq-item > summary:focus-visible {
	outline: 2px solid var(--pg-navy);
	outline-offset: 2px;
}

/* ---------- Piede ---------- */

.pct-pg-foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px 20px;
	padding-top: 18px;
	border-top: 2px solid var(--pg-ink);
	font-size: 15px;
}

/* ---------- Telefono ---------- */

@media (max-width: 600px) {
	.pct-pg {
		gap: 40px;
		padding: 18px 16px;
		border-radius: 14px;
		font-size: 16px;
	}

	.pct-pg-banner-title {
		font-size: 24px;
	}

	.pct-pg-stamp {
		font-size: 21px;
	}

	.pct-pg-stat strong {
		font-size: 42px;
	}

	.pct-pg-card {
		padding: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pct-pg .pct-pg-btn {
		transition: none;
	}
}

@media (max-width: 600px) {
	.pct-pg-frame {
		width: 74%;
		padding: 10px 10px 38px;
	}

	.pct-pg-hero {
		gap: 24px;
	}
}
