/* Kids Campus Pro Inverno - decorazioni invernali.
   I colori principali (pulsanti, menu, footer, titoli) sono cambiati in functions.php
   rimappando le opzioni del tema padre; qui ci sono solo le decorazioni. */

:root {
	--inv-blu: #1e88e5;
	--inv-blu-scuro: #0d47a1;
	--inv-indaco: #283593;
	--inv-ghiaccio: #b3e0fb;
}

/* ---------- Ghiaccioli lungo l'header ---------- */
.tema-inverno .site-header::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 34px;
	pointer-events: none;
	z-index: 5;
	background-repeat: repeat-x;
	background-size: 140px 34px;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='34' viewBox='0 0 140 34'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23ffffff'/><stop offset='1' stop-color='%23b3e0fb'/></linearGradient></defs><path d='M0 0 H140 V6 L132 6 L128 22 L124 6 L112 6 L107 32 L102 6 L88 6 L85 16 L82 6 L66 6 L61 26 L56 6 L42 6 L39 14 L36 6 L22 6 L17 30 L12 6 L0 6 Z' fill='url(%23g)' stroke='%2390caf9' stroke-width='1'/></svg>");
	filter: drop-shadow(0 2px 2px rgba(13, 71, 161, .18));
}

/* ---------- Menu: bordo a maglia (sciarpa a righe) ---------- */
@media screen and (min-width: 981px) {
	.tema-inverno .header-nav {
		border: 5px solid transparent;
		background-image:
			linear-gradient(#fff, #fff),
			repeating-linear-gradient(90deg, #1e88e5 0 14px, #fff 14px 20px, #90caf9 20px 34px, #fff 34px 40px);
		background-origin: border-box;
		background-clip: padding-box, border-box;
	}
}

/* ---------- Titoli di sezione ---------- */
.tema-inverno h2.section_title::before,
.tema-inverno h2.section_title::after,
.tema-inverno h3.section_title::before,
.tema-inverno h3.section_title::after {
	content: "\2744\FE0E";
	display: inline-block;
	font-size: .5em;
	color: #64b5f6;
	vertical-align: middle;
	margin: 0 .5em;
	text-shadow: 0 0 6px rgba(144, 202, 249, .8);
	animation: inv-gira 12s linear infinite;
}
.tema-inverno h2.section_title::after,
.tema-inverno h3.section_title::after { animation-direction: reverse; }
@keyframes inv-gira {
	to { transform: rotate(360deg); }
}

/* ---------- Sezione «Le nostre sezioni»: nuvole verdi -> azzurro ghiaccio ---------- */
.tema-inverno #section3 { background-image: url("../img/nuvole-ghiaccio.webp") !important; }

/* ---------- Foto di testata: le fasce azzurro/verde virano a cielo d'inverno ---------- */
.tema-inverno .slider-main::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 5;
	pointer-events: none;
	background: linear-gradient(180deg, #5c9fdc 0%, #90caf9 50%, #e3f2fd 100%);
	mix-blend-mode: color;
	-webkit-mask-image: radial-gradient(ellipse 40% 68% at 50% 88%, transparent 80%, #000 100%);
	mask-image: radial-gradient(ellipse 40% 68% at 50% 88%, transparent 80%, #000 100%);
}
/* Il fiocco sorride in alto a destra, fuori dalle mani */
@media screen and (min-width: 1200px) {
	.tema-inverno .slider-main::before {
		content: "";
		position: absolute;
		right: 1.5%;
		top: 190px;
		width: 140px;
		height: 150px;
		z-index: 6;
		pointer-events: none;
		background: url("../img/fiocco.webp") no-repeat center / contain;
		filter: drop-shadow(0 0 12px rgba(179, 224, 251, .9));
		animation: inv-dondola 5s ease-in-out infinite;
	}
}
@keyframes inv-dondola {
	0%, 100% { transform: rotate(-8deg) translateY(0); }
	50% { transform: rotate(8deg) translateY(6px); }
}

/* ---------- Pulsanti ---------- */
.tema-inverno .button,
.tema-inverno .wpcf7 form input[type='submit'] { box-shadow: 0 4px 0 var(--inv-blu-scuro); }
.tema-inverno .button:hover { box-shadow: 0 4px 0 #1a237e; }

/* ---------- Fiocchi di neve (canvas creato da inverno.js) ---------- */
.inverno-fiocchi {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 9990;
}

/* ---------- Pettirosso in volo ---------- */
.inverno-fly {
	position: fixed;
	top: 24vh;
	left: 0;
	width: 170px;
	z-index: 9980;
	pointer-events: none;
	transform: translateX(-120%);
	animation: inv-volo 40s linear 4s infinite;
}
.inverno-fly img { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .2)); }
@keyframes inv-volo {
	0%   { transform: translate(-120%, 0) rotate(4deg); }
	8%   { transform: translate(calc(18vw - 60%), -35px) rotate(-5deg); }
	16%  { transform: translate(calc(40vw - 60%), 20px) rotate(5deg); }
	24%  { transform: translate(calc(65vw - 60%), -25px) rotate(-4deg); }
	32%  { transform: translate(calc(100vw + 20%), 10px) rotate(3deg); }
	100% { transform: translate(calc(100vw + 20%), 10px) rotate(3deg); }
}

/* ---------- Scena invernale sopra il footer ---------- */
.inverno-scene { display: none; }
.inverno-scene.is-placed {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 2vw;
	position: relative;
	z-index: 1;
	padding: 30px 20px 150px;
	background: linear-gradient(180deg, #fff 0%, #e3f2fd 100%);
	overflow: hidden;
}
.inverno-scene__center { text-align: center; flex: 0 1 560px; }
.inverno-scene__pattinaggio { display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 10px rgba(13, 71, 161, .14)); }
.inverno-scene__greeting {
	margin: 6px 0 0;
	font-family: 'Amatic SC', cursive;
	font-weight: 700;
	font-size: 64px;
	line-height: 1;
	color: var(--inv-blu);
	text-shadow: 0 2px 0 #fff, 0 0 12px rgba(144, 202, 249, .6);
}
.inverno-scene__greeting::before,
.inverno-scene__greeting::after { content: "\2744\FE0E"; color: #64b5f6; font-size: .6em; margin: 0 .4em; }
.inverno-scene__side { flex: 0 1 260px; width: 260px; height: auto; }
.inverno-scene__pinguino { flex-basis: 210px; width: 210px; margin-bottom: 10px; }

@media screen and (max-width: 760px) {
	.inverno-scene.is-placed { padding-bottom: 120px; }
	.inverno-scene__side { display: none; }
	.inverno-scene__center { flex-basis: 340px; }
	.inverno-scene__greeting { font-size: 46px; }
	.inverno-fly { width: 110px; top: 16vh; }
}

/* ---------- Footer: fiocchi in trasparenza ---------- */
.tema-inverno .copyright-wrapper .container { border-top-color: rgba(255, 255, 255, .5); }
.tema-inverno .copyright-wrapper {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'><g stroke='%23ffffff' stroke-opacity='.18' stroke-width='1.5' stroke-linecap='round' fill='none'><path d='M15 7v16M8 11l14 8M8 19l14-8'/><path d='M45 37v16M38 41l14 8M38 49l14-8'/></g></svg>");
}

/* ---------- Chi preferisce meno movimento ---------- */
@media (prefers-reduced-motion: reduce) {
	.inverno-fiocchi, .inverno-fly { display: none; }
	.tema-inverno .slider-main::before,
	.tema-inverno h2.section_title::before,
	.tema-inverno h2.section_title::after,
	.tema-inverno h3.section_title::before,
	.tema-inverno h3.section_title::after { animation: none; }
}
