
/* --- This handles the "Center-Aligned" navbar and the professional Hamburger animation. --- */
.mobile-only-actions {
    display: none; /* Hidden by default on desktop */
}
.cepha-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    padding: 0 5%;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 2000;
    transition: all 0.3s ease;
}

/* Flex Zones */
.cepha-nav__logo, .cepha-nav__actions { flex: 1; display: flex; align-items: center; }
.cepha-nav__actions { justify-content: flex-end; gap: 1rem; }

.cepha-nav__main {
    flex: 2;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
}

.cepha-nav__logo a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
}
.cepha-nav__logo span { color: var(--accent); }

.cepha-nav__main a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s;
    position: relative;
}

.cepha-nav__main a:hover, .cepha-nav__main a.active { color: var(--accent); }

/* Active Indicator */
.cepha-nav__main a.active::after {
    content: ''; position: absolute; bottom: -8px; left: 0;
    width: 100%; height: 2px; background: var(--accent);
}

/* Hamburger */
.hamburger {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2100; /* Ensure it stays above the menu */
    position: relative;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-main);
    border-radius: 5px;
    transition: all 0.3s ease-in-out; /* Critical for the X animation */
    transform-origin: center;
}

/* Mobile State */
@media (max-width: 992px) {
    .hamburger { display: flex; }

    /* Hide the original right-side buttons on mobile to avoid duplicates */
    .cepha-nav__actions .btn, 
    .cepha-nav__actions .btn-login { 
        display: none; 
    }

    .cepha-nav__main {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center; /* Centers items vertically */
        align-items: center;     /* Centers items horizontally */
        gap: 2rem;               /* Space between links */
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1500;
    }

    .cepha-nav__main.active {
        right: 0;
    }

    /* Show the buttons inside the menu on mobile */
    .mobile-only-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
        margin-top: 2rem; /* Space from the last nav link */
    }

    .mobile-only-actions .btn {
        width: 80%; /* Makes buttons wider and easier to tap on mobile */
        text-align: center;
    }

    /* Increase font size for mobile links */
    .cepha-nav__main a {
        font-size: 1.5rem;
    }
    
    /* Hamburger Animation to X */
    /* --- The X Animation Logic --- */
    /* These styles trigger when the 'active' class is added via JS */
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

.user-profile-nav {
    background: rgba(var(--accent-rgb), 0.05);
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid rgba(var(--accent-rgb), 0.1);
}

.btn-logout-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.1);
    transition: 0.3s;
}

.btn-logout-icon:hover {
    background: #ef4444;
}

.btn-logout-icon:hover stroke {
    stroke: white;
}

/* Ensure mobile menu also shows logout correctly */
@media (max-width: 992px) {
    .mobile-only-actions .user-details-mobile {
        text-align: center;
        margin-bottom: 20px;
        padding: 20px;
        background: #f8fafc;
        width: 100%;
    }
}