/* Новогоднее оформление goalstube.ru.
   Подключается только с 1 декабря по 14 января (functions.php). */

/* --- Фон страницы --- */
body.ny {
	background:
		radial-gradient(1100px 520px at 50% -8%, rgba(124, 188, 10, 0.12), transparent 62%),
		linear-gradient(180deg, #eef6ee 0%, #f7fbf7 260px, #ffffff 100%);
}

.theme-dark body.ny {
	background:
		radial-gradient(1100px 520px at 50% -8%, rgba(38, 140, 86, 0.22), transparent 64%),
		linear-gradient(180deg, #14201a 0%, #121814 260px, #1e1e1e 100%);
}

/* --- Снег (canvas создаёт js/newyear.js) --- */
.ny-snow {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 9999;
}

/* --- Шапка --- */
.ny #header {
	position: relative;
	background:
		radial-gradient(120% 180% at 50% -60%, rgba(255, 255, 255, 0.26), transparent 60%),
		linear-gradient(160deg, #0d3b2c 0%, #155c3d 48%, #0e4a32 100%);
	box-shadow:
		inset 0 -1px 0 rgba(255, 255, 255, 0.18),
		0 10px 26px rgba(10, 40, 25, 0.25);
}

/* Логотип с шапкой Санты */
.ny .ny-logo-wrap {
	position: relative;
	display: inline-block;
	line-height: 0;
	z-index: 2;
}

.ny .ny-logo-wrap .logo {
	position: relative;
	z-index: 1;
}

.ny .ny-santa-hat {
	position: absolute;
	z-index: 2;
	top: -21px;
	right: -28px;
	width: 80px;
	height: 66px;
	transform: rotate(26deg);
	filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.28));
	pointer-events: none;
}

@media all and (max-width: 679px) {
	.ny .ny-santa-hat {
		top: -19px;
		right: -25px;
		width: 73px;
		height: 60px;
	}
}

/* Гирлянда под шапкой */
.ny .ny-garland {
	--ny-swag: 25%;
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: auto;
	height: 28px;
	z-index: 0;
	pointer-events: none;
}

.ny .ny-garland::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 28px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 28' preserveAspectRatio='none'%3E%3Cpath d='M0 2 Q120 30 240 2' fill='none' stroke='%23ffffff' stroke-opacity='.5' stroke-width='2'/%3E%3C/svg%3E");
	background-size: var(--ny-swag) 28px;
	background-repeat: repeat-x;
}

.ny .ny-garland::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 28px;
	background-image:
		radial-gradient(circle at 6.25% 5px, #ffd86b 0 2.6px, rgba(255, 216, 107, 0.5) 3.4px, transparent 4.6px),
		radial-gradient(circle at 18.75% 11px, #ff7b6b 0 2.6px, rgba(255, 123, 107, 0.45) 3.4px, transparent 4.6px),
		radial-gradient(circle at 31.25% 14px, #8ff0c1 0 2.4px, rgba(143, 240, 193, 0.45) 3.2px, transparent 4.4px),
		radial-gradient(circle at 43.75% 16px, #ffd86b 0 2.6px, rgba(255, 216, 107, 0.5) 3.4px, transparent 4.6px),
		radial-gradient(circle at 56.25% 16px, #ff7b6b 0 2.6px, rgba(255, 123, 107, 0.45) 3.4px, transparent 4.6px),
		radial-gradient(circle at 68.75% 14px, #8ff0c1 0 2.4px, rgba(143, 240, 193, 0.45) 3.2px, transparent 4.4px),
		radial-gradient(circle at 81.25% 11px, #ffd86b 0 2.6px, rgba(255, 216, 107, 0.5) 3.4px, transparent 4.6px),
		radial-gradient(circle at 93.75% 5px, #ff7b6b 0 2.6px, rgba(255, 123, 107, 0.45) 3.4px, transparent 4.6px);
	background-size: var(--ny-swag) 28px;
	background-repeat: repeat-x;
	filter: drop-shadow(0 0 4px rgba(255, 220, 120, 0.6));
	animation: ny-twinkle 3.2s ease-in-out infinite;
}

@media all and (max-width: 679px) {
	.ny .ny-garland {
		--ny-swag: 20%;
	}
}

@keyframes ny-twinkle {
	0%, 100% { opacity: 0.82; }
	50% { opacity: 1; }
}

/* --- Праздничный баннер на главной --- */
.ny .ny-banner {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 22px;
	row-gap: 14px;
	margin: 18px 0 18px;
	padding: 22px 24px;
	color: #f4fff8;
	background:
		radial-gradient(160% 200% at 100% 0%, rgba(255, 216, 107, 0.18), transparent 55%),
		radial-gradient(120% 200% at 0% 100%, rgba(255, 255, 255, 0.1), transparent 60%),
		linear-gradient(135deg, #0d3b2c 0%, #176244 55%, #0d3b2c 100%);
	border: 1px solid rgba(255, 216, 107, 0.35);
	border-radius: 16px;
	box-shadow:
		0 14px 30px rgba(9, 45, 28, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.ny .ny-banner::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	background: linear-gradient(90deg, transparent, #ffd86b, #fff, #ffd86b, transparent);
	opacity: 0.75;
}

.ny .ny-banner-text,
.ny .ny-countdown {
	position: relative;
	z-index: 1;
}

.ny .ny-banner-kicker {
	margin: 0 0 4px;
	font-size: 12px;
	line-height: 1.2;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #ffd86b;
}

.ny .ny-banner-title {
	margin: 0;
	font-size: clamp(24px, 3.4vw, 38px);
	line-height: 1.12;
	color: #fff;
	text-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}

.ny .ny-banner-sub {
	margin: 8px 0 0;
	max-width: 52ch;
	font-size: 14px;
	line-height: 1.45;
	color: rgba(244, 255, 248, 0.78);
}

@media all and (min-width: 721px) {
	.ny .ny-banner-title {
		font-size: clamp(18px, 2.6vw, 32px);
	}
}

.ny .ny-countdown {
	flex: 0 0 auto;
	text-align: center;
}

.ny .ny-countdown[hidden] {
	display: none;
}

.ny .ny-countdown-label {
	display: block;
	margin-bottom: 6px;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.65);
}

.ny .ny-clock {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 16px;
}

.ny .ny-clock-cell {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	min-width: 0;
	padding: 0;
	border-radius: 0;
	background: none;
	border: 0;
	box-shadow: none;
}

.ny .ny-clock-cell b {
	display: inline;
	font-size: 34px;
	line-height: 1;
	color: #ffd86b;
	font-variant-numeric: tabular-nums;
}

.ny .ny-clock-cell small {
	display: inline;
	position: relative;
	top: 4px;
	margin-top: 0;
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.6);
}

@media all and (min-width: 721px) {
	.ny .ny-banner-text,
	.ny .ny-countdown {
		flex: 1 1 0;
		min-width: 0;
	}

	.ny .ny-countdown {
		text-align: center;
	}

	.ny .ny-clock {
		justify-content: center;
	}
}

/* Иконка меню должна быть выше гирлянды */
.ny #menu-button {
	z-index: 2;
}

@media all and (min-width: 680px) {
	.ny #menu-button {
		position: relative;
		top: auto;
		right: auto;
	}
}

@media all and (max-width: 720px) {
	.ny .ny-banner {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
		padding: 18px;
		border-radius: 0;
		border-left-width: 0;
		border-right-width: 0;
	}

	.ny .ny-countdown {
		width: 100%;
		text-align: left;
	}

	.ny .ny-clock {
		gap: 12px;
	}

	.ny .ny-clock-cell b {
		font-size: 28px;
	}

	.ny .ny-clock-cell small {
		font-size: 10px;
	}
}

/* --- Подвал --- */
.ny #footer {
	position: relative;
	background: linear-gradient(180deg, #e4f0e4 0%, #d5e5d5 100%);
	border-top: 1px solid rgba(255, 255, 255, 0.7);
}

.theme-dark #footer {
	background: #151b17;
}

.ny .ny-footer-greeting {
	flex: 0 0 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 2px 0 10px;
	color: #1a5c3d;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.ny .ny-footer-greeting::before,
.ny .ny-footer-greeting::after {
	content: "";
	flex: 0 1 160px;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(26, 92, 61, 0.35), transparent);
}

.theme-dark .ny-footer-greeting {
	color: #bfe3cc;
}

@media all and (max-width: 679px) {
	.ny .ny-footer-greeting {
		gap: 8px;
		padding: 4px 6px 10px;
		font-size: 12px;
		letter-spacing: 0.02em;
	}

	.ny .ny-footer-greeting::before,
	.ny .ny-footer-greeting::after {
		flex: 1 1 auto;
		min-width: 0;
	}
}

/* --- Меню --- */
.ny #menu {
	background-color: #123a2a;
	border-bottom: 2px solid rgba(255, 255, 255, 0.12);
}

.theme-dark #menu {
	background-color: #101a15;
}

/* --- Доступность и печать --- */
@media (prefers-reduced-motion: reduce) {
	.ny .ny-garland::after {
		animation: none !important;
	}
}

@media print {
	.ny-snow,
	.ny .ny-garland,
	.ny .ny-santa-hat,
	.ny .ny-banner,
	.ny .ny-footer-greeting {
		display: none !important;
	}
}
