/*
=========================================================
                    HEADER
=========================================================
*/

.header {
    position: fixed;
    top: 18px;
    left: 0;
    width: 100%;
    z-index: 9999;
    transition: top .45s ease, transform .45s ease;
}

    .header * {
        box-sizing: border-box;
    }

/*=========================================================
                    NAVBAR
=========================================================*/

.navbar {
    width: min(1400px,calc(100% - 48px));
    width: calc(100% - 80px);
    height: 90px;
    margin: auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: visible;
    border-radius: 18px;
    border: 1px solid rgba(20,217,235,.30);
    background: rgba(7,25,42,.80);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 12px 35px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.05);
    transition: height .45s ease, width .45s ease, padding .45s ease, border-radius .45s ease, background .45s ease, box-shadow .45s ease;
}

    /* خط نور پایین */

    .navbar::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: 0;
        width: 0;
        height: 2px;
        background: rgba(20,217,235,.40);
        transition: width .45s ease;
    }

/*=========================================================
                        LOGO
=========================================================*/

.logo {
    width: 225px;
    height: 72px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    transition: width .45s ease, transform .45s ease;
}

/* لوگوی اصلی */

.logo-full {
    display: block;
    height: 72px;
    width: auto;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity .45s ease, transform .45s ease;
}

/* لوگوی لوزی */

.logo-diamond {
    position: absolute;
    right: 0;
    top: 50%;
    height: 34px;
    width: auto;
    opacity: 0;
    transform: translateY(-50%) translateX(0) scale(.35);
    filter: drop-shadow(0 0 0 rgba(0,217,255,0));
    transition: opacity .45s ease, transform .45s ease, filter .35s ease;
}


/*
=========================================================
            MENU + PHONE + HAMBURGER
=========================================================
*/

.menu {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 34px;
    margin: 0 30px;
    transition: gap .45s ease, margin .45s ease;
}

    .menu a {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 90px;
        color: #fff;
        text-decoration: none;
        font-size: 16px;
        font-weight: 600;
        white-space: nowrap;
        transition: color .30s ease, transform .30s ease, font-size .35s ease;
    }

        /* Hover */

        .menu a:hover {
            color: #00d9ff;
        }

        /* Underline */

        .menu a::after {
            content: "";
            position: absolute;
            right: 0;
            bottom: 22px;
            width: 0;
            height: 2px;
            border-radius: 2px;
            background: #00d9ff;
            transition: width .30s ease;
        }

        .menu a:hover::after,
        .menu a.active::after {
            width: 100%;
        }

        .menu a.active {
            color: #00d9ff;
        }


/*=========================================================
                    PHONE
=========================================================*/

.phone {
    flex-shrink: 0;
    overflow: hidden;
    transition: opacity .45s ease, width .45s ease, transform .45s ease;
}

    .phone a {
        display: flex;
        align-items: center;
        gap: 10px;
        color: #fff;
        text-decoration: none;
        font-size: 15px;
        font-weight: 600;
        white-space: nowrap;
        transition: .30s;
    }


        .phone a:hover {
            background: var(--color-primary);
            color: #041018;
            box-shadow: 0 10px 28px rgba(20,217,235,.30);
            transform: translateY(-2px);
        }

            .phone a:hover,
            .phone a:hover span,
            .phone a:hover i {
                color: #041018 !important;
            }

    .phone i {
        color: #00d9ff;
        font-size: 18px;
    }


/*=========================================================
                HAMBURGER
=========================================================*/

.hamburger {
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-shrink: 0;
}

    .hamburger span {
        display: block;
        width: 26px;
        height: 2px;
        border-radius: 3px;
        background: #fff;
        transition: transform .35s ease, opacity .35s ease, background .35s ease;
    }

    /* Hover */

    .hamburger:hover span {
        background: #00d9ff;
    }

    /* Animation */

    .hamburger.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }


/*
=========================================================
                SCROLLED HEADER
=========================================================
*/

.header.scrolled {
    top: 0;
}

    /*=========================================================
                    NAVBAR
=========================================================*/

    .header.scrolled .navbar {
        width: 100%;
        height: 52px;
        padding: 0 22px;
        border-radius: 0;
        background: rgba(7,25,42,.75);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        box-shadow: 0 8px 25px rgba(0,0,0,.25);
    }

    /* هنگام Hover دوباره کاملاً مات شود */

    .header.scrolled:hover .navbar {
        background: rgba(7,25,42,1);
    }

    /* خط نور */

    .header.scrolled .navbar::after {
        width: 100%;
    }


    /*=========================================================
                        LOGO
=========================================================*/

    /* جای لوگو کوچک می‌شود */

    .header.scrolled .logo {
        width: 58px;
    }

    /* لوگوی اصلی محو می‌شود */

    .header.scrolled .logo-full {
        opacity: 0;
        transform: translateY(-10px) scale(.82);
        pointer-events: none;
    }

    /* لوزی ظاهر می‌شود */

    .header.scrolled .logo-diamond {
        opacity: 1;
        transform: translateY(-50%) translateX(-18px) scale(1);
    }

    /* Glow */

    .header.scrolled:hover .logo-diamond,
    .header.scrolled .logo:hover .logo-diamond {
        filter: drop-shadow(0 0 10px rgba(0,217,255,.95)) drop-shadow(0 0 22px rgba(0,217,255,.45));
    }


    /*=========================================================
                        MENU
=========================================================*/

    .header.scrolled .menu {
        gap: 26px;
        margin: 0 18px;
    }

        .header.scrolled .menu a {
            height: 52px;
            font-size: 14px;
        }

            .header.scrolled .menu a::after {
                bottom: 11px;
            }


    /*=========================================================
                        PHONE
=========================================================*/

    .header.scrolled .phone {
        width: 0;
        opacity: 0;
        overflow: hidden;
        transform: translateX(25px);
        pointer-events: none;
    }


/*=========================================================
                    PERFORMANCE
=========================================================*/

.header,
.navbar,
.logo,
.logo-full,
.logo-diamond,
.menu,
.phone {
    will-change: transform, opacity;
}

/*
=========================================================
            RESPONSIVE
=========================================================
*/

/*
=========================================================
            TABLET (993px - 1200px)
=========================================================
*/
@media (max-width:1300px) {
    .header {
        top: 10px;
    }

    .navbar {
        width: calc(100% - 20px);
        height: 74px;
        padding: 0 18px;
        border-radius: 16px;
    }

    /* Logo */

    .logo {
        width: 170px;
        height: 48px;
        flex: 0 0 170px;
    }

    .logo-full {
        width: 170px;
        height: auto;
        max-height: 48px;
        display: block;
        object-fit: contain;
    }

    .logo-diamond {
        display: none;
    }

    /* Phone */

    .phone {
        display: none;
    }

    /* Menu */

    .menu {
        flex: 1;
        margin: 0 15px;
        gap: 18px;
    }

        .menu a {
            height: 74px;
            font-size: 14px;
        }
}


/*
=========================================================
                    MOBILE
=========================================================
*/

@media (max-width:992px) {

    /*=========================
            HEADER
    =========================*/

    .header {
        top: 10px;
    }

    .navbar {
        width: calc(100% - 20px);
        height: 70px;
        padding: 0 16px;
        border-radius: 16px;
        justify-content: space-between;
        overflow: visible;
    }

    /*=========================
            LOGO
    =========================*/

    .logo {
        width: 170px;
        height: 42px;
        flex: 0 0 170px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .logo-full {
        width: 170px;
        height: auto;
        max-height: 42px;
        object-fit: contain;
        display: block;
    }

    .logo-diamond {
        display: none;
    }

    /*=========================
            PHONE
    =========================*/

    .phone {
        display: none;
    }

    /*=========================
        HAMBURGER
    =========================*/

    .hamburger {
        display: flex;
        order: -1;
        z-index: 1002;
    }

    /*=========================
            MENU
    =========================*/

    .menu {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(7,25,42,.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 0 0 16px 16px;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        z-index: 999;
        transition: max-height .35s ease, opacity .35s ease, visibility .35s ease;
    }

        .menu.open {
            max-height: 700px;
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

        .menu a {
            width: 100%;
            height: 56px;
            justify-content: center;
            font-size: 15px;
            border-bottom: 1px solid rgba(255,255,255,.08);
        }

            .menu a:last-child {
                border-bottom: none;
            }

            .menu a::after {
                display: none;
            }

    /*=========================
        SCROLLED
    =========================*/

    .header.scrolled {
        top: 0;
    }

        .header.scrolled .navbar {
            width: 100%;
            height: 58px;
            padding: 0 16px;
            border-radius: 0;
        }

        .header.scrolled .logo {
            width: 170px;
            height: 36px;
            flex: 0 0 170px;
        }

        .header.scrolled .logo-full {
            width: 170px;
            max-height: 36px;
            opacity: 1 !important;
            transform: none !important;
        }

        .header.scrolled .logo-diamond {
            display: none !important;
        }
}


/*
=========================================================
                SMALL MOBILE
=========================================================
*/

@media (max-width:576px) {

    .navbar {
        height: 64px;
        padding: 0 14px;
    }

    .logo {
        width: 145px;
        height: 34px;
        flex: 0 0 145px;
    }

    .logo-full {
        width: 145px;
        max-height: 34px;
    }

    .header.scrolled .logo {
        width: 145px;
        height: 34px;
        flex: 0 0 145px;
    }

    .header.scrolled .logo-full {
        width: 145px;
        max-height: 34px;
    }

    .menu a {
        height: 52px;
        font-size: 14px;
    }

    .phone {
        display: none;
    }
    /*
=========================================================
                    END HEADER.CSS
=========================================================
*/
