@charset "utf-8";
/* ============================================================
   QUIZ ARCOBALETE — "Ogni gesto conta"
   Le regole di layout sono annidate sotto .quiz-page per non
   avere impatto sulle altre pagine. I font (@font-face qui sotto)
   e i token colore (:root in assets/css/css.css) sono invece
   condivisi da tutto il sito, per restare coerenti con il quiz.
   ============================================================ */

/* ----------------------------
   FONT (locali, nessuna CDN)
   ---------------------------- */
@font-face {
	font-family: 'Poppins';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/Poppins-Medium.woff2') format('woff2'),
	     url('../fonts/Poppins-Medium.ttf') format('truetype');
}

@font-face {
	font-family: 'Poppins';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/Poppins-Bold.woff2') format('woff2'),
	     url('../fonts/Poppins-Bold.ttf') format('truetype');
}

@font-face {
	font-family: 'Cream Beige';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/CreamBeige.woff2') format('woff2'),
	     url('../fonts/Cream Beige.otf') format('opentype');
}

/* ----------------------------
   LAYOUT DI PAGINA
   (i token colore/font sono definiti una sola volta in
   assets/css/css.css, dentro :root, e condivisi da tutto il sito)
   ---------------------------- */
.quiz-page {
	font-family: var(--font-body);
	color: var(--q-navy);
	display: block;
	position: relative;
	overflow: hidden;
	padding: 40px 16px 70px;
}

.quiz-page * {
	box-sizing: border-box;
}

/* decorative bubbles behind everything */
.quiz-page::before,
.quiz-page::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.85), rgba(255,255,255,.15) 70%);
	pointer-events: none;
}

.quiz-page::before {
	width: 220px;
	height: 220px;
	top: -60px;
	left: -80px;
}

.quiz-page::after {
	width: 160px;
	height: 160px;
	bottom: 10%;
	right: -60px;
}

/* ----------------------------
   STAGE / PROGRESS
   ---------------------------- */
.quiz-stage {
	max-width: 430px;
	margin: 0 auto;
	position: relative;
	z-index: 1;
}

/* Ogni "schermata" è renderizzata da PHP ed è già presente nel DOM:
   il JS si limita ad aggiungere/rimuovere .is-active. */
.quiz-screen {
	display: none;
}

.quiz-screen.is-active {
	display: block;
}

.quiz-count {
	text-align: center;
	font-family: var(--font-display);
	font-size: 1.6rem;
	color: var(--q-navy);
	letter-spacing: .5px;
	margin-bottom: 10px;
}

/* ----------------------------
   CARD
   ---------------------------- */
.quiz-card {
	position: relative;
	border-radius: 32px;
	overflow: hidden;
	box-shadow: 0 18px 40px rgba(11,28,70,.28);
	min-height: 560px;
	display: flex;
	flex-direction: column;
	animation: quizCardIn .35s ease both;
	background-color: var(--q-sky-bottom);
	background-image: url('../img/arcobaleni/bg.jpg');
	background-size: cover;
	background-position: center;
}

.rosso-border-quiz-card {
	border: 5px solid var(--q-rosso);
}
.arancione-border-quiz-card {
	border: 5px solid var(--q-arancione);
}
.giallo-border-quiz-card {
	border: 5px solid var(--q-giallo);
}
.verde-border-quiz-card {
	border: 5px solid var(--q-verde);
}
.azzurro-border-quiz-card {
	border: 5px solid var(--q-azzurro);
}
.blu-border-quiz-card {
	border: 5px solid var(--q-blu);
}
.viola-border-quiz-card {
	border: 5px solid var(--q-viola);
}

.rosso-unlock {
	color: var(--q-rosso);
}
.arancione-unlock {
	color: var(--q-arancione);
}
.giallo-unlock {
	color: var(--q-giallo);
}
.verde-unlock {
	color: var(--q-verde);
}
.azzurro-unlock {
	color: var(--q-azzurro);
}
.blu-unlock {
	color: var(--q-blu);
}
.viola-unlock {
	color: var(--q-viola);
}

@keyframes quizCardIn {
	from { opacity: 0; transform: translateY(14px) scale(.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.quiz-card__inner {
	position: relative;
	z-index: 1;
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 32px 26px 28px;
}

/* .quiz-card--sky / --reveal condividono lo sfondo bg.jpg impostato su .quiz-card */

/* logo */
.quiz-logo {
	display: block;
	max-width: 220px;
	margin: 0 auto 18px;
}

/* headings */
.quiz-title {
	font-family: var(--font-display);
	color: var(--q-white);
	text-align: center;
	font-size: 1.9rem;
	line-height: 1.15;
	letter-spacing: .3px;
	text-shadow: 0 3px 0 rgba(11,28,70,.25);
	margin: 0 0 14px;
}

.quiz-title2 {
	font-size: 150%;
	-webkit-text-stroke: 1px white;
}

.quiz-subtitle {
	font-family: var(--font-body);
	font-weight: 700;
	color: var(--q-white);
	text-align: center;
	font-size: 1rem;
	margin: 0 0 20px;
}

.quiz-copy {
	font-family: var(--font-body);
	font-weight: 500;
	color: var(--q-white);
	text-align: center;
	font-size: .98rem;
	line-height: 1.5;
	margin: 0 0 20px;
}

.quiz-context {
	font-family: var(--font-body);
	font-weight: 700;
	color: var(--q-white);
	text-align: center;
	font-size: 1.05rem;
	line-height: 1.4;
	margin: 4px 0 22px;
}

.quiz-context--dim {
	opacity: .55;
	font-size: .85rem;
	margin-bottom: 14px;
}

/* rainbow mascot slot */
.quiz-mascot {
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 4px 0 20px;
	flex: 1;
	min-height: 140px;
}

.quiz-mascot__img {
	width: 100%;
	max-width: 300px;
	height: auto;
	filter: drop-shadow(0 10px 14px rgba(11,28,70,.3));
}

/* ----------------------------
   ANSWERS
   ---------------------------- */
.quiz-answers {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.quiz-answer {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	text-align: left;
	background: var(--q-white);
	border: none;
	border-radius: 20px;
	padding: 12px 16px;
	box-shadow: 0 4px 10px rgba(11,28,70,.18);
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease;
	font-family: var(--font-body);
}

.quiz-answer:hover,
.quiz-answer:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 8px 16px rgba(11,28,70,.25);
	outline: none;
}

.quiz-answer__badge {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--q-navy);
	color: var(--q-white);
	font-family: var(--font-display);
	font-size: 1.05rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.quiz-answer__text {
	font-weight: 700;
	font-size: .92rem;
	line-height: 1.35;
	color: var(--q-navy);
}

/* ----------------------------
   FEEDBACK PANEL
   ---------------------------- */
.quiz-feedback {
	margin-top: auto;
	background: var(--q-bubble);
	border-radius: 26px;
	padding: 26px 22px 24px;
	text-align: center;
	box-shadow: 0 -6px 18px rgba(11,28,70,.15);
}

.quiz-feedback__mascot {
	margin: 0 auto 10px;
}

.quiz-feedback__mascot-img {
	width: 64px;
	height: auto;
	display: block;
	margin: 0 auto;
}

.quiz-feedback__title {
	font-family: var(--font-display);
	color: var(--q-navy);
	font-size: 1.25rem;
	line-height: 1.2;
	margin: 0 0 12px;
}

.quiz-feedback__text {
	font-family: var(--font-body);
	font-weight: 500;
	color: var(--q-navy);
	font-size: .92rem;
	line-height: 1.5;
	margin: 0 0 20px;
}

/* ----------------------------
   BUTTONS
   ---------------------------- */
.quiz-btn {
	font-family: var(--font-display);
	display: block;
	width: max-content;
	max-width: 100%;
	margin: 0 auto;
	background: var(--q-navy);
	color: var(--q-white);
	border: none;
	border-radius: 40px;
	padding: 14px 34px;
	font-size: 1.05rem;
	letter-spacing: .4px;
	cursor: pointer;
	box-shadow: 0 6px 14px rgba(11,28,70,.35);
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.quiz-btn:hover,
.quiz-btn:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 10px 20px rgba(11,28,70,.4);
	outline: none;
}

.quiz-btn--light {
	background: var(--q-white);
	color: var(--q-navy);
}

.quiz-btn--wrap {
	margin-top: auto;
	padding-top: 10px;
	text-align: center;
}

/* ----------------------------
   RESULT CARD (immagine reale da assets/img/colori/)
   ---------------------------- */
.quiz-result__card {
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 18px 40px rgba(11,28,70,.28);
	animation: quizCardIn .35s ease both;
}

.quiz-result__card-img {
	display: block;
	width: 100%;
	height: auto;
}

.quiz-result__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 18px;
}

.quiz-btn--small {
	padding: 10px 22px;
	font-size: .85rem;
	box-shadow: 0 4px 10px rgba(11,28,70,.2);
}

/* ----------------------------
   RESTART LINK
   ---------------------------- */
.quiz-restart {
	display: block;
	text-align: center;
	margin: 18px auto 0;
	font-family: var(--font-body);
	font-weight: 700;
	font-size: .8rem;
	color: var(--q-navy);
	text-decoration: underline;
	cursor: pointer;
	background: none;
	border: none;
}

/* ============================================================
   DESKTOP
   ============================================================ */
@media (min-width: 992px) {
	.quiz-page {
		padding: 70px 16px 110px;
		min-height: 90vh;
		display: flex;
		align-items: center;
	}

	.quiz-stage {
		max-width: 480px;
	}

	.quiz-page::before {
		width: 380px;
		height: 380px;
		top: -100px;
		left: 4%;
	}

	.quiz-page::after {
		width: 300px;
		height: 300px;
		bottom: 6%;
		right: 6%;
	}

	.quiz-card {
		min-height: 640px;
		box-shadow: 0 30px 60px rgba(11,28,70,.32);
	}

	.quiz-card__inner {
		padding: 44px 40px 36px;
	}

	.quiz-title {
		font-size: 2.3rem;
	}

	.quiz-copy,
	.quiz-context {
		font-size: 1.05rem;
	}

	.quiz-answer {
		padding: 14px 20px;
	}

	.quiz-answer__text {
		font-size: 1rem;
	}

	.quiz-btn {
		padding: 16px 40px;
		font-size: 1.15rem;
	}

	.quiz-result__card {
		max-width: 480px;
		margin: 0 auto;
	}
}

/* ============================================================
   STAMPA — attiva quando l'utente preme "Stampa la card"
   (window.print(), vedi assets/js/quiz.js). Il menu e il footer
   del sito sono già nascosti globalmente in assets/css/css.css.
   ============================================================ */
@media print {
	.quiz-page {
		background: none !important;
		padding: 0 !important;
		min-height: auto !important;
		display: block !important;
	}

	.quiz-page::before,
	.quiz-page::after {
		display: none !important;
	}

	.quiz-stage {
		max-width: 100% !important;
	}

	/* solo la schermata risultato attiva è visibile in pagina:
	   le altre .quiz-screen restano display:none e non vengono stampate */
	.quiz-print-hide {
		display: none !important;
	}

	.quiz-result__card {
		box-shadow: none !important;
		border-radius: 0 !important;
		animation: none !important;
		max-width: 100% !important;
		margin: 0 !important;
		page-break-inside: avoid;
	}

	.quiz-result__card-img {
		width: auto;
		max-width: 100%;
		max-height: 95vh;
		margin: 0 auto;
	}
}
