/* ============================================================
   components/navbar.css  — Global Navbar & Mobile Sidebar
   ============================================================ */

/* ─── Base Navbar (all pages, top of scroll) ───────────────── */
#navbar {
    background: transparent;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid transparent;
    z-index: 999990;
}

/* Scrolled state blur — using pseudo-element to prevent blur interference with dropdowns/sidebar */
#navbar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: transparent;
    transition: all 0.5s ease;
    pointer-events: none;
}

#navbar.nav-scrolled::before {
    background: rgba(10, 14, 39, 0.2);
    backdrop-filter: blur(15px) saturate(160%);
    -webkit-backdrop-filter: blur(15px) saturate(160%);
}

#navbar.nav-scrolled {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* ─── Scrolled state — reveal glass effect ─── */
#navbar.nav-scrolled {
    background: transparent;
}

#navbar.navbar-home.nav-scrolled {
    background: transparent;
}

/* ─── Nav Links ─────────────────────────────────────────────── */
.navLink {
    color: #fff;
    opacity: 0.85;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s ease;
    display: inline-block;
}

.navLink::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 2px;
    background: #35b6b4;
    transition: width 0.35s ease;
}

.navLink:hover::after,
.navLink.active::after {
    width: 100%;
}

.navLink:hover {
    color: #35b6b4;
    opacity: 1;
}

.navLink.active {
    color: #35b6b4;
    opacity: 1;
}

/* ─── Icon Buttons (bell, profile) ─────────────────────────── */
.iconBtn {
    color: #fff;
    opacity: 0.8;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iconBtn:hover {
    color: #76e2dd;
    opacity: 1;
}

/* ─── Dropdown Menus ────────────────────────────────────────── */
.dropdownMenu {
    background: rgba(10, 14, 39, 0.45);
    /* More transparent for better blur visibility */
    backdrop-filter: blur(25px) saturate(90%);
    -webkit-backdrop-filter: blur(25px) saturate(90%);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    border: 1px solid rgba(255, 255, 255, 0.12);
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    /* Slightly wider for better readability */
    border-radius: 18px;
    /* Softer corners */
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top right;
}

.dropdownMenu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

#notificationMenu {
    width: 340px;
}

.dropdownMenu a,
.dropdownMenu .notif-item {
    display: block;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.dropdownMenu a:last-child,
.dropdownMenu .notif-item:last-child {
    border-bottom: none;
}

.dropdownMenu a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #76e2dd;
    padding-left: 24px;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 640px) {
    #notificationMenu {
        right: -60px;
        /* Center it better on mobile */
        width: 300px;
        max-width: 80vw;
    }

    #profileMenu {
        width: 180px;
    }

    .dropdownMenu {
        border-radius: 16px;
        margin-top: 8px;
    }

    .dropdownMenu a {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
}

/* ─── Mobile Sidebar Overlay ────────────────────────────────── */
/* ─── Mobile Sidebar ────────────────────────────────────────── */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 9999998 !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s ease;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 0;
}

.glass-dropdown {
    position: absolute;
    top: 0;
    left: 0;
    width: 72vw;
    max-width: 300px;
    height: 100%;
    background: rgba(10, 14, 39, 0.40);
    backdrop-filter: blur(28px) saturate(130%);
    -webkit-backdrop-filter: blur(28px) saturate(130%);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.35);
    z-index: 9999999;
    transform: translateX(-100%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.mobile-menu.open .glass-dropdown {
    transform: translateX(0);
}

.glass-dropdown a {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    padding: 13px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    border-radius: 10px;
    margin: 2px 0;
    border-left: 3px solid transparent;
}

.glass-dropdown a:hover {
    background: rgba(53, 182, 180, 0.14);
    color: #76e2dd !important;
    border-left-color: rgba(53, 182, 180, 0.4);
}

.glass-dropdown a.active-mobile {
    background: rgba(53, 182, 180, 0.18);
    color: #76e2dd !important;
    border-left: 3px solid #35b6b4;
}

body.menu-open {
    overflow: hidden;
}

/* ─── Footer ────────────────────────────────────────────────── */
#site-footer {
    width: 100%;
}