/*
 * Tema Natale (lib/seasonal.php): testata blu notte con neve, luci colorate
 * in cima, alberi e regali. Rosso, verde e oro. Si carica solo nel periodo
 * del tema; fuori da li' il sito e' quello di sempre.
 */

.theme-natale {
	overflow-x: clip;
	--caorle-yellow: #f6c744;
	--cx-red: #d7263d;
	--cx-green: #1f7a45;
	--cx-night: #3f0813;
}

/* ------------------------------------------------------------ colori */

.theme-natale .site-header__bar {
	box-shadow: 4px 4px 0 var(--cx-red);
}

.theme-natale .btn-ghost {
	box-shadow: 4px 4px 0 var(--cx-red) !important;
}

.theme-natale .btn-ghost:hover {
	background: var(--cx-green);
	box-shadow: 1px 1px 0 var(--cx-red) !important;
	color: #fff;
}

.theme-natale .main-menu__trigger:hover,
.theme-natale .main-menu__item.is-open > .main-menu__trigger {
	background: #fde9ec;
}

/* ------------------------------------------------------------ testata */

.theme-natale .hero {
	background:
		url("../assets/natale/santa.svg") no-repeat 42% 100% / auto 100px,
		radial-gradient(ellipse 55% 60% at 80% 18%, rgba(255, 214, 120, .30) 0, rgba(255, 214, 120, 0) 70%),
		linear-gradient(180deg, #b3182c 0, #7d1020 55%, #3f0813 100%) !important;
}

.theme-natale .hero__kicker,
.theme-natale .hero__lead {
	color: #e4eef5 !important;
}

.theme-natale .hero__title {
	color: #fff !important;
	text-shadow: 0 0 26px rgba(246, 199, 68, .4);
}

.theme-natale .hero__watermark {
	opacity: .07;
	filter: grayscale(1) brightness(2);
}

.theme-natale .hero__blob {
	background: var(--caorle-yellow);
}

.theme-natale .sky::after,
.theme-natale .sky__cloud,
.theme-natale .sky__rain {
	display: none !important;
}

.theme-natale .sky__stars {
	opacity: 1 !important;
}

.theme-natale .sky__sun {
	background: radial-gradient(circle at 38% 36%, #fffdf0 0, #ffeaa0 55%, #f1c24d 100%) !important;
	box-shadow: 0 0 60px 18px rgba(255, 238, 170, .45) !important;
}

/* alberi sul bordo basso della testata, con un poco di neve */

.theme-natale .hero::before,
.theme-natale .hero::after {
	content: "";
	position: absolute;
	bottom: 0;
	background: url("../assets/natale/tree.svg") center bottom / contain no-repeat;
	pointer-events: none;
	z-index: 1;
}

.theme-natale .hero::before {
	left: 46%;
	width: 82px;
	height: 110px;
}

.theme-natale .hero::after {
	left: calc(46% + 62px);
	width: 54px;
	height: 72px;
}

/* ------------------------------------------------------------ pie' di pagina */

.theme-natale .site-footer {
	background-color: #0f3b2a;
	margin-top: 5rem;
	position: relative;
}

.theme-natale .site-footer::before,
.theme-natale .site-footer::after {
	content: "";
	position: absolute;
	top: -54px;
	width: 64px;
	height: 64px;
	background: url("../assets/natale/gift.svg") center bottom / contain no-repeat;
	pointer-events: none;
}

.theme-natale .site-footer::before {
	left: max(1rem, 8%);
	transform: rotate(-5deg);
}

.theme-natale .site-footer::after {
	right: max(1rem, 10%);
	width: 48px;
	height: 48px;
	top: -38px;
	transform: rotate(6deg);
}

/* ------------------------------------------------------------ luci */

.cx-lights {
	position: absolute;
	inset: 0 0 auto 0;
	height: 36px;
	z-index: 1035;
	pointer-events: none;
	overflow: hidden;
}

.cx-lights__layer {
	position: absolute;
	inset: 0;
	background-repeat: repeat-x;
	background-position: 0 0;
	background-size: 160px 36px;
}

.cx-lights__layer--wire {
	background-image: url("../assets/natale/lights-wire.svg");
}

.cx-lights__layer--red {
	background-image: url("../assets/natale/lights-red.svg");
	animation: cx-twinkle 2.2s ease-in-out infinite;
}

.cx-lights__layer--gold {
	background-image: url("../assets/natale/lights-gold.svg");
	animation: cx-twinkle 2.2s ease-in-out -.55s infinite;
}

.cx-lights__layer--green {
	background-image: url("../assets/natale/lights-green.svg");
	animation: cx-twinkle 2.2s ease-in-out -1.1s infinite;
}

.cx-lights__layer--blue {
	background-image: url("../assets/natale/lights-blue.svg");
	animation: cx-twinkle 2.2s ease-in-out -1.65s infinite;
}

@keyframes cx-twinkle {
	0%, 100% { opacity: .35; }
	50% { opacity: 1; }
}

/* ------------------------------------------------------------ neve */

.cx-snow {
	position: fixed;
	inset: 0;
	z-index: 1010;
	pointer-events: none;
	overflow: hidden;
}

.cx-flake {
	position: absolute;
	top: -30px;
	left: var(--x);
	width: var(--size);
	height: var(--size);
	opacity: var(--alpha);
	filter: drop-shadow(0 0 2px rgba(60, 20, 30, .55));
	animation: cx-fall var(--fall) linear var(--delay) infinite;
}

@keyframes cx-fall {
	0% { transform: translate(0, 0) rotate(0deg); }
	50% { transform: translate(var(--sway), 55vh) rotate(180deg); }
	100% { transform: translate(calc(var(--sway) * -1), 112vh) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.cx-snow {
		display: none;
	}

	.cx-lights__layer--red,
	.cx-lights__layer--gold,
	.cx-lights__layer--green,
	.cx-lights__layer--blue {
		animation: none;
		opacity: 1;
	}
}

/* ------------------------------------------------------------ tinte crema */

.theme-natale .card--featured,
.theme-natale .news-event,
.theme-natale .news-range,
.theme-natale .request-choose,
.theme-natale .request-done,
.theme-natale .request-cta,
.theme-natale .main-menu__feature,
.theme-natale .search-empty {
	background: #fff1f2;
}

.theme-natale .quote-form__field label {
	color: #3a2a00;
}

.theme-natale .quote-form,
.theme-natale .quote-form a {
	color: #000;
}

/* ------------------------------------------------------------ fiocchi tondi */

.cx-dot {
	position: absolute;
	top: -12px;
	left: var(--x);
	width: var(--size);
	height: var(--size);
	border-radius: 50%;
	background: #fff;
	opacity: .85;
	box-shadow: 0 0 3px rgba(50, 100, 170, .8);
	animation: cx-fall var(--fall) linear var(--delay) infinite;
}

@media (max-width: 991.98px) {
	.cx-flake:nth-child(n+24),
	.cx-dot:nth-child(n+14) {
		display: none;
	}

	/* La luna sta a destra, accanto al titolo: al centro copriva il testo. */
	.theme-natale .sky__sun {
		left: calc(100% - 44px) !important;
		top: 190px !important;
		width: 48px;
		height: 48px;
		margin: -24px 0 0 -24px;
	}

	.theme-natale .hero {
		background:
			radial-gradient(ellipse 55% 60% at 80% 18%, rgba(255, 214, 120, .30) 0, rgba(255, 214, 120, 0) 70%),
			linear-gradient(180deg, #b3182c 0, #7d1020 55%, #3f0813 100%) !important;
	}
}
