﻿/* ==========================================================
   MILX PREMIUM
   navbar.css
==========================================================*/

/* ===============================
   NAVBAR
================================ */

.xs-navbar {
    position: sticky;
    top: 0;
    z-index: 1050;
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    background: rgba(11,11,11,.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(212,175,55,.12);
    transition: all .35s ease;
}

    /* عند النزول بالصفحة */

    .xs-navbar.scrolled {
        background: rgba(8,8,8,.97);
        box-shadow: 0 10px 35px rgba(0,0,0,.35);
        border-bottom-color: rgba(212,175,55,.22);
    }

    /* ===============================
   BRAND
================================ */

    .xs-navbar .navbar-brand {
        display: flex;
        align-items: center;
        gap: .75rem;
        font-family: var(--font-display);
        font-size: 1.35rem;
        font-weight: 700;
        color: var(--white);
    }

        .xs-navbar .navbar-brand img {
            width: 42px;
            height: 42px;
            object-fit: contain;
            transition: .35s;
        }

        .xs-navbar .navbar-brand:hover img {
            transform: rotate(-6deg) scale(1.05);
        }

        .xs-navbar .navbar-brand span {
            color: var(--gold-light);
            letter-spacing: .08em;
        }

    /* ===============================
   NAV LINKS
================================ */

    .xs-navbar .navbar-nav {
        gap: .35rem;
    }

    .xs-navbar .nav-link {
        position: relative;
        color: #D7D7D7 !important;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .06em;
        font-size: .82rem;
        padding: .75rem 1rem !important;
        transition: .3s;
    }

        /* الخط الذهبي */

        .xs-navbar .nav-link::after {
            content: "";
            position: absolute;
            left: 50%;
            bottom: 8px;
            width: 0;
            height: 2px;
            transform: translateX(-50%);
            background: var(--gold-gradient-horizontal);
            transition: .35s;
            border-radius: 10px;
        }

        .xs-navbar .nav-link:hover {
            color: var(--gold-bright) !important;
        }

            .xs-navbar .nav-link:hover::after {
                width: 70%;
            }

        .xs-navbar .nav-link.active {
            color: var(--gold-bright) !important;
        }

            .xs-navbar .nav-link.active::after {
                width: 70%;
            }

/* ===============================
   TOGGLER
================================ */

.navbar-toggler {
    border: none;
    box-shadow: none !important;
    padding: .45rem;
}

    .navbar-toggler:focus {
        box-shadow: none;
    }

.navbar-toggler-icon {
    filter: invert(1);
}

/* ===============================
   SEARCH
================================ */

.xs-search-wrap {
    position: relative;
}

.xs-search-input {
    width: 250px;
    height: 46px;
    background: #141414;
    border: 1px solid #2d2d2d;
    border-radius: 999px;
    color: #fff;
    padding-inline: 18px;
    transition: .3s;
}

    .xs-search-input::placeholder {
        color: #777;
    }

    .xs-search-input:focus {
        outline: none;
        border-color: var(--gold);
        background: #191919;
        box-shadow: 0 0 0 3px rgba(212,175,55,.15);
    }

/* ===============================
   SEARCH DROPDOWN
================================ */

#searchSuggestions {
    position: absolute;
    inset-inline: 0;
    top: 115%;
    background: #121212;
    border: 1px solid #2A2A2A;
    border-radius: 14px;
    overflow: hidden;
    display: none;
    box-shadow: var(--shadow-lg);
}

    #searchSuggestions a {
        display: flex;
        align-items: center;
        gap: .9rem;
        padding: .8rem;
        color: #DDD;
        transition: .25s;
        border-bottom: 1px solid #232323;
    }

        #searchSuggestions a:last-child {
            border-bottom: none;
        }

        #searchSuggestions a:hover {
            background: #1B1B1B;
        }

    #searchSuggestions img {
        width: 48px;
        height: 48px;
        object-fit: cover;
        border-radius: 8px;
    }

    #searchSuggestions small {
        color: #8F8F8F;
    }

/* ===============================
   MOBILE
================================ */

@media(max-width:991px) {

    .xs-navbar {
        height: auto;
        padding: .8rem 0;
    }

    .navbar-collapse {
        margin-top: 1rem;
        background: #111;
        border: 1px solid #242424;
        border-radius: 16px;
        padding: 1rem;
    }

    .xs-navbar .navbar-nav {
        gap: .25rem;
    }

    .xs-navbar .nav-link {
        padding: .9rem !important;
        border-radius: 10px;
    }

        .xs-navbar .nav-link:hover {
            background: #1B1B1B;
        }

    .xs-search-input {
        width: 100%;
    }
}

/* ===============================
   RTL
================================ */

html[dir="rtl"] .navbar-brand {
    flex-direction: row-reverse;
}

html[dir="rtl"] .xs-navbar .nav-link {
    letter-spacing: 0;
}

html[dir="rtl"] #searchSuggestions {
    text-align: right;
}
