/* Новогодняя гирлянда - версия Tapochek.net */

/* ГЛАВНЫЙ КОНТЕЙНЕР */
.b-page_newyear {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    z-index: 10;
    display: none; /* Скрыта по умолчанию */
}

/* Показываем гирлянду только когда body имеет класс garland-active */
body.garland-active .b-page_newyear {
    display: block;
}

body.garland-active {
    padding-top: 90px; /* <--- Отступ для наезда на меню */
    background: #FFFFFF !important;
}

body.garland-active .b-page__content {
    min-height: 200px;
}

/* Скрываем декор по умолчанию */
.b-head-decor {
    display: none;
}

/*    ПОЛОСА ГИРЛЯНДЫ */
.b-page_newyear .b-head-decor {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    height: 115px;
    width: 100%;
    overflow: hidden;
    pointer-events: none;
    
    background-color: transparent;
    background-image: url(../images/girlyanda_balls/b-head-decor_newyear.png);
    background-repeat: repeat-x;
    background-position: 0 0;
}

/* Тень сверху */
.b-page_newyear .b-head-decor::before {
    content: '';
    display: block;
    position: absolute;
    top: -115px;
    left: 0;
    z-index: 3;
    height: 115px;
    width: 100%;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.75);
    pointer-events: none;
}

.b-page_newyear .b-head-decor__inner {
    position: absolute;
    top: 0;
    left: 0;
    height: 115px;
    display: block;
    width: 373px;
    pointer-events: none;
}

/* Позиционирование секций */
.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; }

/* 
   ШАРИКИ
*/
.b-ball {
    position: absolute;
    pointer-events: auto;
    cursor: pointer;  
}

/* Координаты шариков */
.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; }

/* Внутренности шариков */
.b-ball__i {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-origin: 50% 0;
    transition: all 0.3s ease-in-out;
    pointer-events: none; 
    background-repeat: no-repeat;
}

/* Ссылки на картинки */
.b-ball_n1 .b-ball__i { background-image: url(../images/girlyanda_balls/b-ball_n1.png); }
.b-ball_n2 .b-ball__i { background-image: url(../images/girlyanda_balls/b-ball_n2.png); }
.b-ball_n3 .b-ball__i { background-image: url(../images/girlyanda_balls/b-ball_n3.png); }
.b-ball_n4 .b-ball__i { background-image: url(../images/girlyanda_balls/b-ball_n4.png); }
.b-ball_n5 .b-ball__i { background-image: url(../images/girlyanda_balls/b-ball_n5.png); }
.b-ball_n6 .b-ball__i { background-image: url(../images/girlyanda_balls/b-ball_n6.png); }
.b-ball_n7 .b-ball__i { background-image: url(../images/girlyanda_balls/b-ball_n7.png); }
.b-ball_n8 .b-ball__i { background-image: url(../images/girlyanda_balls/b-ball_n8.png); }
.b-ball_n9 .b-ball__i { background-image: url(../images/girlyanda_balls/b-ball_n9.png); }

/* Мелкие детали */
.b-ball_i1 .b-ball__i { background-image: url(../images/girlyanda_balls/b-ball_i1.png); }
.b-ball_i2 .b-ball__i { background-image: url(../images/girlyanda_balls/b-ball_i2.png); }
.b-ball_i3 .b-ball__i { background-image: url(../images/girlyanda_balls/b-ball_i3.png); }
.b-ball_i4 .b-ball__i { background-image: url(../images/girlyanda_balls/b-ball_i4.png); }
.b-ball_i5 .b-ball__i { background-image: url(../images/girlyanda_balls/b-ball_i5.png); }
.b-ball_i6 .b-ball__i { background-image: url(../images/girlyanda_balls/b-ball_i6.png); }

.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; }

/* Анимация */
.b-ball_bounce .b-ball__right {
    position: absolute;
    top: 0;
    right: 0;
    left: 50%;
    bottom: 0;
    z-index: 9;
}

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

.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); }
