/* "Допълнителни активности" as three little worlds (parts/activities.php): the yard with the rolling ball and the
   mole to be caught, the snowy mountain with falling snow and a waving snowman, the bus driving through the hills. */

.play { position: relative; padding: 40px 0 70px; overflow: hidden; }
.station { position: relative; display: flex; align-items: center; gap: 0; max-width: 1170px; margin: 0 auto 60px; padding: 0 20px; }
.station.is-right { flex-direction: row-reverse; }
.station__text { position: relative; z-index: 2; flex: 1; min-width: 0; padding: 34px 40px; border-radius: 30px; background: #fff; box-shadow: 0 24px 40px -26px rgba(60, 40, 20, .5); border-bottom: 6px solid var(--c); opacity: 0; transform: translateX(-50px); transition: opacity .7s, transform 1s cubic-bezier(.34, 1.3, .64, 1); }
.is-right .station__text { transform: translateX(50px); }
.station.is-in .station__text { opacity: 1; transform: none; }
.station__text p { margin: 0; font-size: 18px; line-height: 1.8; color: #3c4741; }
.station__stage { position: relative; z-index: 1; flex: none; width: 480px; height: 320px; margin-left: -30px; border-radius: 32px; overflow: hidden; overflow: clip; display: flow-root; box-shadow: 0 26px 44px -24px rgba(40, 60, 90, .55); opacity: 0; transform: scale(.85) rotate(2deg); transition: opacity .8s .2s, transform 1.1s cubic-bezier(.34, 1.4, .64, 1) .2s; }
.is-right .station__stage { margin: 0 -30px 0 0; transform: scale(.85) rotate(-2deg); }
.station.is-in .station__stage { opacity: 1; transform: none; }

/* ---------- The yard: the ball rolls, the mole looks out and can be caught ---------- */
.stage--yard { background: linear-gradient(#7cc6fb, #d3ecfd); }
.stage--yard::after { content: ''; position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; height: 120px; background: url('../images/background-grass-top.svg') repeat-x center top / 960px 35px, linear-gradient(transparent 28px, #7ad068 28px); }
.yard__clouds { position: absolute; left: 0; top: 10px; width: 1920px; height: 95px; background: url('../images/clouds1.svg') repeat-x 0 0 / 960px 95px; animation: play-drift 40s linear infinite; }
@keyframes play-drift { to { transform: translateX(-960px); } }
.yard__score { position: absolute; z-index: 3; right: 14px; top: 12px; padding: 2px 12px; border-radius: 14px; background: #fff; color: #ff7b05; font: 400 22px/1.3 'Neucha', Arial, sans-serif; }
.yard__holes { position: absolute; z-index: 1; left: 0; right: 0; bottom: 30px; height: 110px; }
.yard__hole { position: absolute; bottom: 0; width: 120px; height: 90px; margin-left: -60px; overflow: hidden; }
.yard__hole:nth-child(1) { left: 20%; bottom: 26px; } .yard__hole:nth-child(2) { left: 52%; } .yard__hole:nth-child(3) { left: 82%; bottom: 38px; }
.yard__hole::after { content: ''; position: absolute; left: 6px; right: 6px; bottom: 0; height: 26px; border-radius: 50%; background: radial-gradient(ellipse at 50% 35%, #2b1d17 55%, #5a4033 72%); }
.yard__mole { position: absolute; z-index: 1; left: 0; bottom: -60px; width: 119px; height: 44px; background: url('../images/mole-sprite.svg') no-repeat 0 0 / 119px 132px; cursor: pointer; transition: bottom .22s cubic-bezier(.34, 1.4, .64, 1); }
.yard__mole.is-up { bottom: 12px; animation: play-sniff .6s steps(3, end) infinite alternate; }
.yard__mole.is-bonk { bottom: -60px; transition-duration: .12s; }
@keyframes play-sniff { from { background-position: 0 0; } to { background-position: 0 -132px; } }
.yard__star { position: absolute; z-index: 2; left: 50%; bottom: 20px; color: #ffe400; font-style: normal; font-size: 28px; text-shadow: 0 0 6px #ff7b05; pointer-events: none; animation: play-star .7s ease-out forwards; }
@keyframes play-star { from { transform: translate(-50%, 0) scale(.4); opacity: 1; } to { transform: translate(-50%, -64px) scale(1.4) rotate(90deg); opacity: 0; } }
.yard__ball { position: absolute; z-index: 2; left: 6%; bottom: 12px; width: 50px; height: 50px; transform-origin: 50% 100%; animation: play-roll 4.2s ease-in-out infinite alternate; }
.yard__ball i { display: block; width: 100%; height: 100%; background: url('../images/ball.svg') no-repeat center / contain; animation: play-spin 4.2s ease-in-out infinite alternate; }
@keyframes play-roll { 0% { left: 6%; transform: scale(.82, 1.12); } 6% { transform: none; } 94% { transform: none; } 100% { left: calc(94% - 50px); transform: scale(.82, 1.12); } }
@keyframes play-spin { to { transform: rotate(1000deg); } }

/* ---------- The snowy mountain: snow falls, the snowman waves ---------- */
.stage--snow { background: linear-gradient(#8ec3ee, #dcefff); }
/* the hills' drawing is empty at its foot: the snow goes on under it */
.stage--snow::after { content: ''; position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 46px; background: #fff; }
.snow__sun { position: absolute; right: 14%; top: 28px; width: 54px; height: 56px; background: url('../images/sun.svg') no-repeat center / contain; opacity: .9; animation: play-turn 16s linear infinite; }
@keyframes play-turn { to { transform: rotate(360deg); } }
/* the site's hills, covered with snow */
.snow__hill { position: absolute; left: -10%; right: -10%; bottom: -10px; height: 150px; background: url('../images/hills1.svg') no-repeat center bottom / 100% 100%; filter: brightness(0) invert(1); }
.snow__hill--back { bottom: 60px; height: 170px; background-image: url('../images/hills2.svg'); opacity: .7; filter: brightness(0) invert(.88); }
/* the ski slope: from high on the right down to the flat snow where the snowman stands (--flat: where it ends);
   the child on skis follows its edge, so the points here and in snow-ski below are the same */
.stage--snow { --flat: 190px; --tilt: 25deg; }
.snow__slope { position: absolute; z-index: 1; inset: 0; background: linear-gradient(170deg, #fff 40%, #e6f1fb); clip-path: polygon(0 calc(100% - 46px), var(--flat) calc(100% - 46px), calc(var(--flat) + 10%) calc(100% - 56px), 100% calc(100% - 168px), 100% 100%, 0 100%); }
.snow__man { position: absolute; z-index: 2; left: 8%; bottom: 46px; width: 90px; height: 150px; }
/* the child on skis looks left, the way it goes: down the slope, a stop by the snowman with a puff of snow, a
   moment there, then the run starts again from the top */
.snow__skier { position: absolute; z-index: 3; left: calc(100% + 30px); bottom: 178px; width: 96px; height: 96px; margin: 0 0 -9px -48px; transform-origin: 50% 92%; opacity: 0; } /* (the skis are 9px above the foot of the picture) */
.station.is-in .snow__skier { animation: snow-ski 9s cubic-bezier(.45, 0, .55, 1) .6s infinite; }
.snow__skier svg { display: block; width: 100%; height: 100%; overflow: visible; }
.snow__scarf { transform-box: fill-box; transform-origin: 0 50%; animation: snow-scarf .3s ease-in-out infinite alternate; }
@keyframes snow-scarf { from { transform: rotate(-6deg) scaleX(.9); } to { transform: rotate(5deg) scaleX(1.05); } }
@keyframes snow-ski {
	0% { left: calc(100% + 30px); bottom: 178px; transform: rotate(calc(var(--tilt) * -1)); opacity: 0; animation-timing-function: ease-in; }
	4% { left: calc(100% - 6px); bottom: 165px; opacity: 1; animation-timing-function: linear; }
	30% { left: calc(var(--flat) + 10%); bottom: 56px; transform: rotate(calc(var(--tilt) * -1)); opacity: 1; animation-timing-function: ease-out; }
	38% { left: calc(var(--flat) - 4px); bottom: 46px; transform: rotate(4deg); }
	42% { transform: rotate(0); }
	80% { left: calc(var(--flat) - 4px); bottom: 46px; transform: rotate(0); opacity: 1; }
	88%, 100% { left: calc(var(--flat) - 4px); bottom: 46px; transform: rotate(0); opacity: 0; }
}
/* the snow thrown up behind the skis on the way down, and the puff when it stops */
.snow__spray { position: absolute; z-index: -1; right: -14px; bottom: 0; width: 40px; height: 18px; border-radius: 50%; background: radial-gradient(ellipse, #fff 40%, rgba(255, 255, 255, 0) 70%); opacity: 0; }
.station.is-in .snow__spray { animation: snow-spray 9s linear .6s infinite; }
@keyframes snow-spray { 0%, 4% { opacity: 0; transform: none; } 8%, 28% { opacity: .95; transform: scale(1, 1.3); } 33% { opacity: .5; } 36% { opacity: 1; transform: translateX(-26px) scale(2.2, 2.6); } 46% { opacity: 0; transform: translateX(-30px) scale(2.8, 3); } 100% { opacity: 0; } }
.snow__body { position: absolute; left: 10px; bottom: 0; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #e3eef8); box-shadow: 0 4px 6px rgba(40, 70, 110, .2); }
/* three coal buttons down his front (2026-11-11, Влайо: "Снежния човек ... да му сложим 3 копчета") */
.snow__body::before { content: ''; position: absolute; left: 50%; top: 14px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #5b6670, #2f3740); box-shadow: 0 17px 0 #333b44, 0 34px 0 #333b44; }
.snow__head { position: absolute; left: 21px; bottom: 60px; width: 48px; height: 48px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #e3eef8); box-shadow: 0 3px 5px rgba(40, 70, 110, .15); }
.snow__head::before, .snow__head::after { content: ''; position: absolute; top: 16px; width: 6px; height: 6px; border-radius: 50%; background: #3c4741; }
.snow__head::before { left: 13px; } .snow__head::after { right: 13px; }
.snow__head b { position: absolute; left: 22px; top: 23px; width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 18px solid #ff7b05; }
.snow__hat { position: absolute; z-index: 1; left: 25px; bottom: 100px; width: 40px; height: 30px; background: #3c4741; border-radius: 4px 4px 0 0; transform: rotate(-8deg); }
.snow__hat::after { content: ''; position: absolute; left: -8px; right: -8px; bottom: -4px; height: 6px; border-radius: 3px; background: #3c4741; }
.snow__arm { position: absolute; bottom: 50px; width: 40px; height: 4px; border-radius: 2px; background: #7a5432; }
.snow__arm--l { left: -24px; transform: rotate(20deg); }
.snow__arm--r { right: -24px; transform-origin: 0 50%; animation: play-wave .7s ease-in-out infinite alternate; }
@keyframes play-wave { from { transform: rotate(-20deg); } to { transform: rotate(-50deg); } }
.snow__flakes i { position: absolute; z-index: 3; top: -12px; width: var(--s); height: var(--s); border-radius: 50%; background: #fff; opacity: .9; animation: play-fall var(--t) linear infinite; animation-delay: var(--d); }
@keyframes play-fall { 0% { transform: translate(0, -12px); } 33% { transform: translate(14px, 110px); } 66% { transform: translate(-10px, 220px); } 100% { transform: translate(6px, 340px); } }

/* ---------- The trip: the bus drives through the hills, slows down to look round, and drives on ---------- */
.stage--trip { background: linear-gradient(#6fbdf6, #cfeafc); }
/* the hills' drawing is empty at its foot: the grass goes on under it down to the road */
.stage--trip::before { content: ''; position: absolute; left: 0; right: 0; bottom: 30px; height: 60px; background: #7ad068; }
.trip__clouds { position: absolute; left: 0; top: 6px; width: 1920px; height: 140px; background: url('../images/clouds2.svg') repeat-x 0 0 / 960px 140px; opacity: .9; animation: play-drift 60s linear infinite; }
.trip__hill { position: absolute; left: -20%; right: -20%; bottom: 8px; height: 160px; background: url('../images/hills1.svg') no-repeat center bottom / 100% 100%; }
.trip__hill--back { bottom: 70px; height: 160px; background-image: url('../images/hills2.svg'); opacity: .85; }
.trip__road { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: linear-gradient(transparent 18px, #fff 18px, #fff 21px, transparent 21px) 0 0 / 40px 100% repeat-x, #6b6f78; }
.trip__bus { position: absolute; z-index: 2; left: 105%; bottom: 0; width: 150px; height: 150px; animation: play-drive 11s infinite; }
.trip__lottie { display: block; width: 100%; height: 100%; }
.trip__lottie svg { display: block; }
@keyframes play-drive { 0% { left: 105%; animation-timing-function: cubic-bezier(.5, 1, .89, 1); } 30% { left: calc(50% - 75px); } 45% { left: calc(50% - 75px); animation-timing-function: cubic-bezier(.11, 0, .5, 0); } 75%, 100% { left: -190px; } }

/* ---------- Smaller screens ---------- */
@media only screen and (max-width: 1100px) {
	.stage--snow { --flat: 180px; --tilt: 32deg; }
	.station__stage { width: 400px; height: 280px; }
	.station__text { padding: 28px 30px; }
	.station__text p { font-size: 17px; }
}
@media only screen and (max-width: 768px) {
	.station, .station.is-right { flex-direction: column; margin-bottom: 50px; }
	.station__text, .is-right .station__text { transform: translateY(40px); padding: 24px 22px 40px; }
	.station__text p { font-size: 16px; }
	.station__stage, .is-right .station__stage { width: 100%; max-width: 420px; height: 260px; margin: -24px 0 0; }
	.stage--snow { --flat: 160px; --tilt: 36deg; }
	.snow__skier { width: 78px; height: 78px; margin: 0 0 -7px -39px; }
	.snow__man { left: 6%; transform: scale(.88); transform-origin: 50% 100%; }
	/* the picture tucks under its text card: the stars counted in the yard come lower, in sight */
	.yard__score { top: 36px; right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
	.play *, .play *::before, .play *::after { animation: none !important; transition: none !important; }
	.station__text, .station__stage { opacity: 1 !important; transform: none !important; }
	.snow__flakes { display: none; }
	.snow__skier { left: calc(var(--flat) - 4px); bottom: 46px; opacity: 1 !important; }
	.snow__spray { display: none; }
	.trip__bus { left: calc(50% - 75px); }
}
