﻿/* Guest Navbar Styles */
.guest-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    padding: 1.5rem 0;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.guest-navbar .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Removed padding reduction on scroll to keep position stable */
/*.guest-navbar.scrolled {
    padding: 1rem 0;
}*/

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.7); /* Dark Glass */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0.75rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
}

/* Logo dan Brand Section */
.navbar-brand-section {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 1002;
    margin-right: auto; /* Push everything else to the right on desktop */
}

.navbar-logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.navbar-logo-link:hover {
    opacity: 0.9;
}

.navbar-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.3));
}

.navbar-brand-text {
    font-size: 1.125rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.01em;
}

/* Menu Wrapper (Nav + Actions) */
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Menu Navigasi */
.navbar-nav {
    display: flex;
    flex-direction: row; /* FORCE ROW LAYOUT ON DESKTOP */
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: block;
    padding: 0.5rem 0;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: #f8fafc;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #3b82f6;
    border-radius: 50%;
    box-shadow: 0 0 8px #3b82f6;
}

/* Navbar Actions */
.navbar-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.btn-masuk {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: poPoppins;
    white-space: nowrap;
}

.btn-masuk:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

/* User Profile */
.user-profile-dropdown {
    position: relative;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    cursor: poPoppins;
    transition: all 0.2s ease;
    color: #e2e8f0;
}

.user-profile-btn:hover, .user-profile-dropdown.active .user-profile-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.user-profile-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.user-profile-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.user-profile-menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.user-profile-dropdown.active .user-profile-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.profile-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

/* Mobile Toggle */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    position: relative;
    cursor: poPoppins;
    z-index: 1002;
    padding: 0;
}

.toggle-icon {
    width: 24px;
    height: 2px;
    background: #e2e8f0;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-icon::before,
.toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: #e2e8f0;
    transition: all 0.3s ease;
}

.toggle-icon::before { top: -8px; }
.toggle-icon::after { top: 8px; }

/* Toggle Animation */
.guest-navbar.active .toggle-icon { background: transparent; }
.guest-navbar.active .toggle-icon::before { top: 0; transform: rotate(45deg); }
.guest-navbar.active .toggle-icon::after { top: 0; transform: rotate(-45deg); }

/* RESPONSIVE DESIGN */
@media (max-width: 991px) {
    .navbar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: auto; /* Push to far right */
        order: 2; /* Ensure visual order is last if needed */
    }

    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        margin: 10px 1rem;
        border-radius: 16px;
        padding: 1.5rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    }

    .guest-navbar.active .navbar-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        text-align: center;
        padding: 0.875rem;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.03);
    }
    
    .nav-link:active {
        background: rgba(255, 255, 255, 0.1);
        transform: scale(0.98);
    }

    .nav-link.active::after {
        display: none;
    }

    .navbar-actions {
        width: 100%;
        justify-content: center;
        margin: 0 !important; /* Override ms-lg-4 */
    }

    .btn-masuk {
        width: 100%;
        justify-content: center;
        padding: 0.875rem;
    }
    
    .user-profile-btn {
        width: 100%;
        justify-content: center;
        background: rgba(255,255,255,0.05);
    }
}

@media (max-width: 576px) {
    .navbar-content {
        padding: 0.75rem 1rem;
    }
    
    .navbar-brand-text {
        font-size: 1rem;
    }
    
    .guest-navbar .container {
        padding: 0 1rem;
    }
    
    .navbar-menu {
        margin: 10px 0;
        border-radius: 12px;
    }

    .user-profile-name {
        display: none;
    }
}



