/* =========================================================
   2 Year Celebration badge — sits between the logo and the
   main menu. Purely additive: nothing of the theme removed.
   ========================================================= */

.celebration-badge {
    --cb-height: 54px;
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    margin: 0 12px 0 26px;
    line-height: 0;
    isolation: isolate;
    animation: cbFloat 3.6s ease-in-out infinite,
        cbPopIn 1s cubic-bezier(.2, 1.3, .4, 1) both;
}

.celebration-badge picture,
.celebration-badge img {
    display: block;
}

.celebration-badge img {
    height: var(--cb-height);
    width: auto;
    max-width: 100%;
    animation: cbGlow 2.8s ease-in-out infinite;
    transition: transform .35s ease;
}

/* light sweep, masked to the artwork so it never shows as a box */
.celebration-badge .cb-shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(105deg,
            rgba(255, 255, 255, 0) 38%,
            rgba(255, 255, 255, .85) 50%,
            rgba(255, 255, 255, 0) 62%);
    background-repeat: no-repeat;
    background-size: 260% 100%;
    background-position: 190% 0;
    -webkit-mask-image: url('../../../images/celebration/2-year-celebration.png');
    mask-image: url('../../../images/celebration/2-year-celebration.png');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    mix-blend-mode: screen;
    animation: cbShine 4.6s ease-in-out infinite;
}

/* twinkling sparkles around the badge */
.celebration-badge .cb-sparkles i {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 9px 2px rgba(255, 214, 92, .95);
    opacity: 0;
    pointer-events: none;
    animation: cbTwinkle 3.2s ease-in-out infinite;
}

.celebration-badge .cb-sparkles i:nth-child(1) {
    top: -3px;
    left: 10%;
    animation-delay: .2s;
}

.celebration-badge .cb-sparkles i:nth-child(2) {
    top: 16%;
    right: 5%;
    width: 5px;
    height: 5px;
    animation-delay: 1.3s;
}

.celebration-badge .cb-sparkles i:nth-child(3) {
    bottom: -2px;
    left: 56%;
    width: 4px;
    height: 4px;
    animation-delay: 2.2s;
}

.celebration-badge:hover img {
    transform: scale(1.07);
}

@keyframes cbFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-4px) rotate(-.7deg);
    }
}

@keyframes cbGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 5px rgba(255, 178, 32, .45)) brightness(1);
    }

    50% {
        filter: drop-shadow(0 0 15px rgba(255, 196, 46, .95)) brightness(1.13);
    }
}

@keyframes cbShine {

    0%,
    55% {
        background-position: 190% 0;
    }

    92%,
    100% {
        background-position: -90% 0;
    }
}

@keyframes cbTwinkle {

    0%,
    70%,
    100% {
        opacity: 0;
        transform: scale(.4);
    }

    80% {
        opacity: 1;
        transform: scale(1.15);
    }

    90% {
        opacity: .5;
        transform: scale(.8);
    }
}

@keyframes cbPopIn {
    0% {
        opacity: 0;
        transform: translateY(-12px) scale(.8);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ---------------------------------------------------------
   Menu breathing room, so logo + badge + menu stay one line
   --------------------------------------------------------- */
@media (min-width: 992px) {
    .header .navbar {
        flex-wrap: nowrap;
    }

    .header .navbar-nav.nav-menu {
        flex-wrap: nowrap;
    }

    /* keep Login | Register on a single line next to the menu */
    .login-registration-list {
        flex-wrap: nowrap !important;
        white-space: nowrap;
    }

    .nav-menu .nav-item.order-lg-last {
        padding-left: 6px;
    }

    .nav-menu .nav-item .nav-link {
        font-size: 1rem !important;
        padding: 24px 0 !important;
        white-space: nowrap;
    }

    .nav-menu .nav-item {
        padding-right: 14px !important;
    }

    .login-registration-list__link {
        font-size: 1rem !important;
        white-space: nowrap;
    }
}

@media (min-width: 1400px) {
    .celebration-badge {
        --cb-height: 58px;
    }

    .nav-menu .nav-item .nav-link {
        font-size: 1.0625rem !important;
    }

    .nav-menu .nav-item {
        padding-right: 20px !important;
    }
}

@media screen and (min-width: 1200px) and (max-width: 1399px) {
    .celebration-badge {
        --cb-height: 46px;
        margin: 0 8px 0 16px;
    }

    .nav-menu .nav-item .nav-link {
        font-size: .95rem !important;
    }

    .nav-menu .nav-item {
        padding-right: 11px !important;
    }
}

@media screen and (min-width: 992px) and (max-width: 1199px) {
    .celebration-badge {
        --cb-height: 32px;
        margin: 0 12px 0 10px;
    }

    .nav-menu .nav-item .nav-link {
        font-size: .875rem !important;
        padding: 20px 0 !important;
    }

    .nav-menu .nav-item {
        padding-right: 8px !important;
    }

    .login-registration-list__link {
        font-size: .875rem !important;
    }
}

/* mobile: menu is collapsed, badge sits next to the logo */
@media screen and (max-width: 991px) {
    .celebration-badge {
        --cb-height: 36px;
        margin: 0 10px;
    }
}

@media screen and (max-width: 575px) {
    .celebration-badge {
        --cb-height: 27px;
        margin: 0 6px;
    }

    .navbar-brand.logo img {
        max-width: 125px;
    }
}

@media screen and (max-width: 359px) {
    .celebration-badge {
        --cb-height: 22px;
        margin: 0 4px;
    }

    .navbar-brand.logo img {
        max-width: 108px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .celebration-badge,
    .celebration-badge img,
    .celebration-badge .cb-shine,
    .celebration-badge .cb-sparkles i {
        animation: none !important;
    }
}
