/* =========================
   NEW YEAR DECOR (Turkystan)
   File: public/assets/css/newyear-decor.css
   ========================= */

/* Wrapper */
.b-page_newyear.ny {
    position: relative;
    width: 100%;
    height: 100px;
    z-index: 10;
    margin-top: -30px;
    margin-bottom: 30px;
    background-color: inherit;
}

/* Main strip */
.b-page_newyear .b-head-decor {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    height: 115px;
    width: 100%;
    overflow: hidden;
    background: url(/assets/newyear/img/b-head-decor_newyear.png) repeat-x 0 0;
}

/* Inner groups (each 373px wide) */
.b-page_newyear .b-head-decor__inner {
    position: absolute;
    top: 0;
    left: 0;
    height: 115px;
    display: block;
    width: 373px;
}

/* Decorative overlay layer (if your original PNG relies on it) */
.b-page_newyear .b-head-decor:before {
    content: '';
    display: block;
    position: absolute;
    top: -115px;
    left: 0;
    z-index: 3;
    height: 115px;
    width: 100%;
}

/* Positions */
.b-page_newyear .b-head-decor__inner_n2 { left: 373px; }
.b-page_newyear .b-head-decor__inner_n3 { left: 746px; }
.b-page_newyear .b-head-decor__inner_n4 { left: 1119px; }
.b-page_newyear .b-head-decor__inner_n5 { left: 1492px; }
.b-page_newyear .b-head-decor__inner_n6 { left: 1865px; }
.b-page_newyear .b-head-decor__inner_n7 { left: 2238px; }

/* Ball base */
.b-ball {
    position: absolute;
}

/* ====== Ball sizes/positions (n1..n9) ====== */
.b-ball_n1 { top: 0; left: 3px; width: 59px; height: 83px; }
.b-ball_n2 { top: -19px; left: 51px; width: 55px; height: 70px; }
.b-ball_n3 { top: 9px; left: 88px; width: 49px; height: 67px; }
.b-ball_n4 { top: 0; left: 133px; width: 57px; height: 102px; }
.b-ball_n5 { top: 0; left: 166px; width: 49px; height: 57px; }
.b-ball_n6 { top: 6px; left: 200px; width: 54px; height: 70px; }
.b-ball_n7 { top: 0; left: 240px; width: 56px; height: 67px; }
.b-ball_n8 { top: 0; left: 283px; width: 54px; height: 53px; }
.b-ball_n9 { top: 10px; left: 321px; width: 49px; height: 66px; }

/* ====== Ball images (n1..n9) ====== */
.b-ball_n1 .b-ball__i { background: url(/assets/newyear/img/b-ball_n1.png) no-repeat; }
.b-ball_n2 .b-ball__i { background: url(/assets/newyear/img/b-ball_n2.png) no-repeat; }
.b-ball_n3 .b-ball__i { background: url(/assets/newyear/img/b-ball_n3.png) no-repeat; }
.b-ball_n4 .b-ball__i { background: url(/assets/newyear/img/b-ball_n4.png) no-repeat; }
.b-ball_n5 .b-ball__i { background: url(/assets/newyear/img/b-ball_n5.png) no-repeat; }
.b-ball_n6 .b-ball__i { background: url(/assets/newyear/img/b-ball_n6.png) no-repeat; }
.b-ball_n7 .b-ball__i { background: url(/assets/newyear/img/b-ball_n7.png) no-repeat; }
.b-ball_n8 .b-ball__i { background: url(/assets/newyear/img/b-ball_n8.png) no-repeat; }
.b-ball_n9 .b-ball__i { background: url(/assets/newyear/img/b-ball_n9.png) no-repeat; }

/* ====== Small decor images (i1..i6) ====== */
.b-ball_i1 .b-ball__i { background: url(/assets/newyear/img/b-ball_i1.png) no-repeat; }
.b-ball_i2 .b-ball__i { background: url(/assets/newyear/img/b-ball_i2.png) no-repeat; }
.b-ball_i3 .b-ball__i { background: url(/assets/newyear/img/b-ball_i3.png) no-repeat; }
.b-ball_i4 .b-ball__i { background: url(/assets/newyear/img/b-ball_i4.png) no-repeat; }
.b-ball_i5 .b-ball__i { background: url(/assets/newyear/img/b-ball_i5.png) no-repeat; }
.b-ball_i6 .b-ball__i { background: url(/assets/newyear/img/b-ball_i6.png) no-repeat; }

/* Positions/sizes for i1..i6 */
.b-ball_i1 { top: 0; left: 0; width: 25px; height: 71px; }
.b-ball_i2 { top: 0; left: 25px; width: 61px; height: 27px; }
.b-ball_i3 { top: 0; left: 176px; width: 29px; height: 31px; }
.b-ball_i4 { top: 0; left: 205px; width: 50px; height: 51px; }
.b-ball_i5 { top: 0; left: 289px; width: 78px; height: 28px; }
.b-ball_i6 { top: 0; left: 367px; width: 6px; height: 69px; }

/* Ball image layer (rotates) */
.b-ball__i {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-origin: 50% 0;
    transition: transform .3s ease-in-out;
    pointer-events: none;
    will-change: transform;
}

/* Hover zone (right half) */
.b-ball_bounce .b-ball__right {
    position: absolute;
    top: 0;
    right: 0;
    left: 50%;
    bottom: 0;
    z-index: 9;
}

/* When hovering the whole ball, right zone is hidden (original logic) */
.b-ball_bounce:hover .b-ball__right {
    display: none;
}

.b-ball_bounce .b-ball__right:hover {
    left: 0;
    display: block !important;
}

/* Rotation steps */
.b-ball_bounce.bounce > .b-ball__i {
    transform: rotate(-9deg);
}
.b-ball_bounce .b-ball__right.bounce + .b-ball__i {
    transform: rotate(9deg);
}

.b-ball_bounce.bounce1 > .b-ball__i {
    transform: rotate(6deg);
}
.b-ball_bounce .b-ball__right.bounce1 + .b-ball__i {
    transform: rotate(-6deg);
}

.b-ball_bounce.bounce2 > .b-ball__i {
    transform: rotate(-3deg);
}
.b-ball_bounce .b-ball__right.bounce2 + .b-ball__i {
    transform: rotate(3deg);
}

.b-ball_bounce.bounce3 > .b-ball__i {
    transform: rotate(1.5deg);
}
.b-ball_bounce .b-ball__right.bounce3 + .b-ball__i {
    transform: rotate(-1.5deg);
}

/* Optional: improve clickability on touch devices */
.b-ball_bounce {
    cursor: pointer;
}

/* Accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
    .b-ball__i {
        transition: none !important;
    }
}

/* Your original behavior: hide under 1240px */
@media (max-width: 1240px) {
    .b-page_newyear {
        display: none;
    }
}
