/* ==========================================================
   NOWANA
   Public Navbar
   Author: Arin Rayan Kavir
========================================================== */


/* ==========================================================
   Header
========================================================== */

.public-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;

    z-index: 1000;

    width: 100%;

    padding: 18px 0;

    transition:
        padding 0.3s ease,
        background 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease,
        backdrop-filter 0.3s ease;
}


/* ==========================================================
   Scrolled Header
========================================================== */

.public-header.is-scrolled {
    padding: 10px 0;

    background:
        rgba(255, 255, 255, 0.82);

    border-bottom:
        1px solid rgba(166, 147, 255, 0.12);

    box-shadow:
        0 12px 40px rgba(30, 25, 60, 0.06);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);
}


/* ==========================================================
   Navbar
========================================================== */

.public-navbar {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 32px;

    min-height: 64px;
}


/* ==========================================================
   Brand
========================================================== */

.public-navbar__brand {
    display: inline-flex;
    align-items: center;

    gap: 12px;

    flex-shrink: 0;

    text-decoration: none;
}


.public-navbar__logo-wrap {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;

    border-radius: 16px;

    background:
        linear-gradient(
            135deg,
            rgba(166, 147, 255, 0.15),
            rgba(224, 118, 255, 0.10)
        );

    border:
        1px solid rgba(166, 147, 255, 0.18);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


.public-navbar__brand:hover
.public-navbar__logo-wrap {
    transform:
        translateY(-2px)
        rotate(-2deg);

    box-shadow:
        0 12px 30px rgba(166, 147, 255, 0.18);
}


.public-navbar__logo {
    display: block;

    width: 36px;
    height: 36px;

    object-fit: contain;
}


.public-navbar__brand-text {
    display: flex;
    flex-direction: column;

    gap: 2px;

    line-height: 1;
}


.public-navbar__brand-en {
    font-family:
        "Impact",
        sans-serif;

    font-size: 22px;

    font-weight: 400;

    letter-spacing: 1.7px;

    line-height: 1;

    background:
        linear-gradient(
            135deg,
            #7561e8,
            #d25ce9
        );

    background-clip: text;

    -webkit-background-clip: text;

    color: transparent;

    -webkit-text-fill-color: transparent;
}


.public-navbar__brand-fa {
    margin-top: 5px;

    font-size: 11px;

    color:
        var(--public-text-muted, #8d8b9d);

    white-space: nowrap;
}


/* ==========================================================
   Main Menu
========================================================== */

.public-navbar__menu {
    display: flex;
    align-items: center;

    flex: 1;

    justify-content: center;
}


.public-navbar__links {
    display: flex;
    align-items: center;

    gap: 6px;

    margin: 0;
    padding: 0;

    list-style: none;
}


.public-navbar__links li {
    position: relative;

    margin: 0;
    padding: 0;
}


.public-navbar__link {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 0 14px;

    border-radius: 12px;

    font-size: 14px;
    font-weight: 500;

    color:
        var(--public-text-secondary, #5f5d6f);

    text-decoration: none;

    transition:
        color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease;
}


.public-navbar__link::after {
    content: "";

    position: absolute;

    right: 50%;
    bottom: 4px;

    width: 0;
    height: 2px;

    border-radius: 20px;

    background:
        linear-gradient(
            90deg,
            #a693ff,
            #e076ff
        );

    transform:
        translateX(50%);

    transition:
        width 0.25s ease;
}


.public-navbar__link:hover {
    color:
        var(--public-primary, #8d79f5);

    background:
        rgba(166, 147, 255, 0.07);
}


.public-navbar__link:hover::after {
    width: 18px;
}


.public-navbar__link.is-active {
    color:
        var(--public-primary, #8d79f5);

    background:
        rgba(166, 147, 255, 0.10);
}


.public-navbar__link.is-active::after {
    width: 22px;
}


/* ==========================================================
   Navbar Actions
========================================================== */

.public-navbar__actions {
    display: flex;
    align-items: center;

    gap: 12px;

    flex-shrink: 0;
}


.public-navbar__login {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 0 14px;

    border-radius: 12px;

    color:
        var(--public-text-primary, #282634);

    font-size: 14px;
    font-weight: 600;

    text-decoration: none;

    transition:
        color 0.25s ease,
        background 0.25s ease;
}


.public-navbar__login:hover {
    color:
        var(--public-primary, #8d79f5);

    background:
        rgba(166, 147, 255, 0.08);
}


/* ==========================================================
   Public Button
========================================================== */

.public-btn {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    min-height: 46px;

    padding:
        0 20px;

    border:
        1px solid transparent;

    border-radius:
        14px;

    font: inherit;

    font-size:
        14px;

    font-weight:
        600;

    line-height:
        1;

    cursor:
        pointer;

    text-decoration:
        none;

    overflow:
        hidden;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease;
}


.public-btn--primary {
    color:
        #ffffff;

    background:
        linear-gradient(
            135deg,
            #a693ff 0%,
            #e076ff 100%
        );

    box-shadow:
        0 10px 25px rgba(166, 147, 255, 0.26);
}


.public-btn--primary::before {
    content: "";

    position: absolute;

    top: -50%;
    left: -80%;

    width: 45%;
    height: 200%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.25),
            transparent
        );

    transform:
        rotate(20deg);

    transition:
        left 0.55s ease;
}


.public-btn--primary:hover::before {
    left: 140%;
}


.public-btn--primary:hover {
    transform:
        translateY(-2px);

    box-shadow:
        0 15px 35px rgba(166, 147, 255, 0.35);
}


.public-btn--ghost {
    color:
        var(--public-primary, #8d79f5);

    background:
        rgba(166, 147, 255, 0.07);

    border-color:
        rgba(166, 147, 255, 0.18);
}


.public-btn--ghost:hover {
    background:
        rgba(166, 147, 255, 0.13);

    border-color:
        rgba(166, 147, 255, 0.30);
}


.public-btn--full {
    width: 100%;
}


.public-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 17px;

    transition:
        transform 0.25s ease;
}


.public-btn:hover
.public-btn__icon {
    transform:
        translateX(-3px);
}


/* ==========================================================
   Mobile Toggle
========================================================== */

.public-navbar__toggle {
    display: none;

    position: relative;

    width: 46px;
    height: 46px;

    flex-shrink: 0;

    padding: 0;

    border:
        1px solid rgba(166, 147, 255, 0.16);

    border-radius:
        14px;

    background:
        rgba(255, 255, 255, 0.78);

    cursor: pointer;

    box-shadow:
        0 8px 25px rgba(30, 25, 60, 0.05);
}


.public-navbar__toggle span {
    position: absolute;

    right: 50%;

    width: 20px;
    height: 2px;

    border-radius: 20px;

    background:
        var(--public-text-primary, #282634);

    transform:
        translateX(50%);

    transition:
        transform 0.3s ease,
        top 0.3s ease,
        opacity 0.25s ease;
}


.public-navbar__toggle span:nth-child(1) {
    top: 15px;
}


.public-navbar__toggle span:nth-child(2) {
    top: 22px;
}


.public-navbar__toggle span:nth-child(3) {
    top: 29px;
}


/* Open Toggle */

.public-navbar__toggle.is-open
span:nth-child(1) {
    top: 22px;

    transform:
        translateX(50%)
        rotate(45deg);
}


.public-navbar__toggle.is-open
span:nth-child(2) {
    opacity: 0;
}


.public-navbar__toggle.is-open
span:nth-child(3) {
    top: 22px;

    transform:
        translateX(50%)
        rotate(-45deg);
}


/* ==========================================================
   Mobile Actions
========================================================== */

.public-navbar__mobile-actions {
    display: none;
}


/* ==========================================================
   Overlay
========================================================== */

.public-navbar__overlay {
    position: fixed;

    inset: 0;

    z-index: 998;

    background:
        rgba(19, 16, 35, 0.40);

    backdrop-filter:
        blur(4px);

    -webkit-backdrop-filter:
        blur(4px);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}


.public-navbar__overlay.is-visible {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}


/* ==========================================================
   Tablet & Mobile
========================================================== */

@media (max-width: 992px) {

    .public-header {
        padding: 12px 0;
    }


    .public-navbar {
        min-height: 58px;

        gap: 15px;
    }


    .public-navbar__actions {
        display: none;
    }


    .public-navbar__toggle {
        display: block;
    }


    .public-navbar__menu {
        position: fixed;

        top: 0;
        right: 0;

        z-index: 999;

        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;

        width: min(
            340px,
            calc(100vw - 40px)
        );

        height: 100dvh;

        padding:
            105px
            20px
            24px;

        background:
            rgba(255, 255, 255, 0.96);

        border-left:
            1px solid rgba(166, 147, 255, 0.14);

        box-shadow:
            -20px 0 60px rgba(25, 20, 50, 0.13);

        backdrop-filter:
            blur(22px);

        -webkit-backdrop-filter:
            blur(22px);

        transform:
            translateX(105%);

        visibility:
            hidden;

        transition:
            transform 0.35s cubic-bezier(
                0.22,
                1,
                0.36,
                1
            ),
            visibility 0.35s ease;
    }


    .public-navbar__menu.is-open {
        transform:
            translateX(0);

        visibility:
            visible;
    }


    .public-navbar__links {
        flex-direction:
            column;

        align-items:
            stretch;

        width:
            100%;

        gap:
            6px;
    }


    .public-navbar__link {
        justify-content:
            flex-start;

        width:
            100%;

        min-height:
            50px;

        padding:
            0 16px;

        font-size:
            15px;
    }


    .public-navbar__link::after {
        display:
            none;
    }


    .public-navbar__mobile-actions {
        display:
            flex;

        flex-direction:
            column;

        gap:
            10px;

        width:
            100%;

        margin-top:
            auto;

        padding-top:
            20px;

        border-top:
            1px solid rgba(166, 147, 255, 0.12);
    }

}


/* ==========================================================
   Small Mobile
========================================================== */

@media (max-width: 576px) {

    .public-navbar__brand {
        gap: 9px;
    }


    .public-navbar__logo-wrap {
        width: 44px;
        height: 44px;

        border-radius:
            13px;
    }


    .public-navbar__logo {
        width: 30px;
        height: 30px;
    }


    .public-navbar__brand-en {
        font-size:
            19px;
    }


    .public-navbar__brand-fa {
        font-size:
            9px;
    }


    .public-navbar__toggle {
        width:
            43px;

        height:
            43px;
    }

}


/* ==========================================================
   Very Small Devices
========================================================== */

@media (max-width: 390px) {

    .public-navbar__brand-fa {
        display:
            none;
    }


    .public-navbar__menu {
        width:
            calc(100vw - 24px);
    }

}