.topnav {
    position: fixed;
    top: 30px;
    left: 0;
    right: 0;
    z-index: 200;

    transition: top .3s ease;
}
.topnav--scrolled {
    top: 12px;
}

.topnav__container {

    position: relative;
    width: min(1131px, 92%);
    margin-inline: auto;
    padding: 13px 20px;

    background: rgba(255, 255, 255, 0.77);
    backdrop-filter: blur(12px);

    border-radius: 30px;

    display: flex;
    align-items: center;
    box-shadow:
        0 8px 12px 6px rgba(0, 0, 0, 0.15),
        0 4px 4px 0 rgba(0, 0, 0, 0.30);

    transition: padding .3s ease, background .3s ease, box-shadow .3s ease;
}
.topnav--scrolled .topnav__container {
    padding: 9px 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.16);
}
.topnav__logo {
    display: inline-flex;
    flex-shrink: 0;
}

.topnav__logo img {
    width: 141.818px;
    height: auto;
    aspect-ratio: 141.818 / 47.843;
}
.topnav__menu {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-left: auto;
}
.topnav__links {
    display: flex;
    align-items: center;
    gap: 2px;
}
.topnav__link {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;

    padding: 16px 20px;

    border-radius: 100px;

    color: var(--black-800);
    font-family: "Poppins", sans-serif;
    font-size: 15.8px;
    font-weight: 700;
    line-height: 24px;
    white-space: nowrap;

    transition: var(--transition);
}

.topnav__link:hover {
    color: var(--gold-500);
}

.topnav__link--active {
    background: var(--gold-400);
    color: var(--black-800);
}

.topnav__link--active:hover {
    color: var(--black-800);
}
.topnav__button {

    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0;

    height: 52px;
    padding: 12px 20px;

    border-radius: 100px;
    background: transparent;

    color: #000;
    text-align: center;
    font-family: "Poppins", sans-serif;
    font-size: 15.8px;
    font-weight: 700;
    line-height: 24px;
    white-space: nowrap;

    transition: background .3s ease, transform .3s ease, box-shadow .3s ease;
}
.topnav__button-arrow {
    display: inline-flex;
    align-items: center;
    line-height: 1;

    max-width: 0;
    margin-left: 0;
    opacity: 0;
    overflow: hidden;

    font-size: 14px;

    transition: max-width .3s ease, margin-left .3s ease, opacity .3s ease;
}

.topnav__button:hover {
    background: var(--gold-400);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 180, 16, .45);
}

.topnav__button:hover .topnav__button-arrow {
    max-width: 1.4em;
    margin-left: 8px;
    opacity: 1;
}

.topnav__toggle,
.topnav__close {
    display: none;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--black-800);
}

.topnav__backdrop {
    display: none;
}

@media (max-width: 991px) {

    .topnav__toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        font-size: 22px;
        border-radius: 12px;
        margin-left: auto;
        transition: var(--transition);
    }

    .topnav__toggle:hover {
        background: var(--black-50);
    }

    .topnav__menu {

        position: fixed;
        top: 0;
        right: 0;

        height: 100dvh;
        width: min(320px, 82%);

        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 6px;

        margin-left: 0;

        padding: 90px 24px 32px;

        background: var(--white);

        box-shadow: -20px 0 60px rgba(0, 0, 0, .25);

        transform: translateX(110%);
        transition: transform .35s cubic-bezier(.4, 0, .2, 1),
                    visibility 0s linear .35s;
        visibility: hidden;

        z-index: 210;
    }

    .topnav__menu--open {
        transform: translateX(0);
        visibility: visible;
        transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    }

    .topnav__links {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        width: 100%;
    }

    .topnav__link {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 16px;
    }
    .topnav__button {
        width: 100%;
        justify-content: center;
        margin-top: 28px;
        background: var(--gold-400);
        box-shadow: 0 6px 16px rgba(249, 180, 16, .35);
    }

    .topnav__button-arrow {
        max-width: 1.4em;
        margin-left: 8px;
        opacity: 1;
    }

    .topnav__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        position: absolute;
        top: 22px;
        right: 22px;

        width: 42px;
        height: 42px;

        font-size: 22px;
        border-radius: 12px;
    }

    .topnav__close:hover {
        background: var(--black-50);
    }

    .topnav__backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .5);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 205;
    }

    .topnav__backdrop--show {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    body.nav-open {
        overflow: hidden;
    }
}

@media (max-width: 576px) {

    .topnav {
        top: 14px;
    }

    .topnav--scrolled {
        top: 8px;
    }

    .topnav__container {
        padding: 10px 14px;
    }

    .topnav--scrolled .topnav__container {
        padding: 8px 14px;
    }

    .topnav__logo img {
        width: 120px;
    }
}

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

    .topnav,
    .topnav__container {
        transition: none;
    }
}
