﻿/* 
 * navigation.css
 * Custom Navigation Styles (Bootstrap-free)
 */

/* ========================================
   NAVBAR BASE STYLES
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
    border-bottom: 1px solid var(--border-color);
    height: 60px;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ========================================
   NAVBAR BRAND / LOGO
   ======================================== */

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition-base);
}

.navbar-logo {
    height: 40px;
    width: auto;
    transition: var(--transition-base);
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

/* ========================================
   NAVBAR TOGGLE (HAMBURGER)
   ======================================== */

.navbar-toggler {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.navbar-toggler-icon {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--accent-cyan);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.navbar-toggler.active .navbar-toggler-icon:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.navbar-toggler.active .navbar-toggler-icon:nth-child(2) {
    opacity: 0;
}

.navbar-toggler.active .navbar-toggler-icon:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ========================================
   NAVBAR COLLAPSE CONTAINER
   ======================================== */

.navbar-collapse {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
}

/* ========================================
   NAVBAR NAVIGATION LINKS
   ======================================== */

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition-base);
    position: relative;
}

    .nav-link i {
        font-size: 16px;
    }

    .nav-link:hover,
    .nav-link.active {
        color: var(--accent-cyan);
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -8px;
        left: 0;
        width: 0;
        height: 2px;
        background-color: var(--accent-cyan);
        transition: width 0.3s ease;
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        width: 100%;
    }

/* ========================================
   NAVBAR RIGHT SECTION
   ======================================== */

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 20px;
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.lang-btn {
    padding: 6px 12px;
    border: none;
    border-radius: var(--border-radius-sm);
    background-color: transparent;
    color: var(--text-white);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
}

    .lang-btn:hover {
        background-color: rgba(0, 212, 255, 0.1);
        color: var(--accent-cyan);
    }

    .lang-btn.active {
        background-color: var(--accent-cyan);
        color: var(--primary-dark);
    }

/* Auth Buttons */
.navbar-right .btn {
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--border-radius-md);
    transition: var(--transition-base);
    text-decoration: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-white);
    border: 1px solid var(--text-white);
}

    .btn-secondary:hover {
        background-color: var(--text-white);
        color: var(--primary-dark);
        transform: translateY(-2px);
    }

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
    color: var(--primary-dark);
}

    .btn-primary:hover {
        background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-cyan) 100%);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0, 212, 255, 0.4);
    }

/* ========================================
   NOTIFICATION & MESSAGE ICONS
   ======================================== */

.nav-icon-wrapper {
    position: relative;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-white);
    font-size: 18px;
    transition: var(--transition-base);
    border-radius: 50%;
    position: relative;
    text-decoration: none;
}

    .nav-icon:hover {
        color: var(--accent-cyan);
        transform: scale(1.1);
    }

    .nav-icon .badge {
        position: absolute;
        top: -5px;
        right: -5px;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        font-size: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--error-color);
        color: white;
        border-radius: 10px;
        font-weight: 600;
    }

/* ========================================
   USER AVATAR DROPDOWN
   ======================================== */

.nav-user-dropdown {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent-cyan);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    transition: var(--transition-base);
}

    .user-avatar:hover {
        transform: scale(1.1);
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    }

    .user-avatar:focus {
        outline: 2px solid var(--accent-cyan);
        outline-offset: 2px;
    }

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 14px;
}

/* User Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background-color: var(--primary-darker);
    border: 1px solid var(--accent-cyan);
    border-radius: var(--border-radius-md);
    min-width: 240px;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

    .user-dropdown-menu.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        display: flex !important;
    }

.dropdown-user-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(0, 212, 255, 0.05);
}

.dropdown-user-name {
    color: var(--text-white);
    font-weight: 600;
    margin: 0 0 6px 0;
    font-size: 15px;
}

.dropdown-user-role {
    color: var(--text-gray);
    display: block;
    font-size: 12px;
}

    .dropdown-user-role .badge {
        display: inline-block;
        padding: 4px 10px;
        border-radius: 12px;
        font-size: 11px;
        font-weight: 600;
    }

.badge-purple {
    background-color: var(--accent-purple);
    color: white;
}

.badge-info {
    background-color: var(--info-color);
    color: white;
}

.badge-cyan {
    background-color: var(--accent-cyan);
    color: var(--primary-dark);
}

.dropdown-menu {
    display: flex;
    flex-direction: column;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition-fast);
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-family: inherit;
}

    .dropdown-item:hover {
        background-color: rgba(0, 212, 255, 0.1);
        color: var(--accent-cyan);
    }

    .dropdown-item i {
        font-size: 16px;
        color: var(--accent-cyan);
        min-width: 20px;
    }

.dropdown-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 8px 0;
}

.dropdown-logout {
    padding: 0;
    margin: 0;
}

.dropdown-logout-btn {
    color: var(--error-color) !important;
    width: 100%;
}

    .dropdown-logout-btn:hover {
        background-color: rgba(239, 68, 68, 0.1) !important;
    }

    .dropdown-logout-btn i {
        color: var(--error-color) !important;
    }

/* ========================================
   DROPDOWN SUBMENU (Submit Idea)
   ======================================== */

.nav-item.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

    .dropdown-toggle::after {
        display: inline-block;
        margin-left: 6px;
        vertical-align: 2px;
        content: "";
        border-top: 4px solid;
        border-right: 4px solid transparent;
        border-bottom: 0;
        border-left: 4px solid transparent;
        transition: transform 0.3s ease;
    }

    .dropdown-toggle.active::after {
        transform: rotate(180deg);
    }

.dropdown-submenu {
    background-color: var(--primary-darker);
    border: 1px solid var(--accent-cyan);
    border-radius: var(--border-radius-md);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    margin: 0;
    padding: 8px 0;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

    .dropdown-submenu.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        display: block !important;
        pointer-events: auto;
    }

    .dropdown-submenu li {
        list-style: none;
    }

    .dropdown-submenu .dropdown-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 20px;
        color: var(--text-gray);
        text-decoration: none;
        transition: var(--transition-fast);
        font-size: 14px;
        white-space: nowrap;
        background: transparent;
        border: none;
        width: 100%;
        text-align: left;
    }

        .dropdown-submenu .dropdown-item:hover {
            background-color: rgba(0, 212, 255, 0.1);
            color: var(--accent-cyan);
        }

        .dropdown-submenu .dropdown-item i {
            font-size: 16px;
            color: var(--accent-cyan);
            min-width: 20px;
        }

/* Desktop Hover Effect (Optional) */
@media (min-width: 992px) {
    .nav-item.dropdown:hover .dropdown-submenu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        display: block !important;
        pointer-events: auto;
    }
}

/* ========================================
   MOBILE RESPONSIVE (< 992px)
   ======================================== */

@media (max-width: 991px) {
    .navbar-toggler {
        display: flex;
    }

    .navbar-collapse {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background-color: var(--primary-darker);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 20px;
        overflow-y: auto;
        transition: left 0.3s ease;
        border-top: 1px solid var(--border-color);
    }

        .navbar-collapse.show {
            left: 0;
        }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-link {
        padding: 15px 10px;
        width: 100%;
        justify-content: flex-start;
    }

        .nav-link::after {
            display: none;
        }

    .navbar-right {
        flex-direction: column;
        width: 100%;
        margin-left: 0;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--border-color);
        gap: 15px;
    }

    .lang-toggle {
        width: 100%;
        justify-content: center;
    }

    .navbar-right .btn {
        width: 100%;
        text-align: center;
    }

    .nav-icon-wrapper {
        width: 100%;
    }

    .nav-icon {
        width: 100%;
        justify-content: center;
        padding: 12px;
        border-radius: var(--border-radius-md);
        border: 1px solid var(--border-color);
    }

    .nav-user-dropdown {
        width: 100%;
    }

    .user-avatar {
        width: 100%;
        height: 50px;
        border-radius: var(--border-radius-md);
        justify-content: space-between;
        padding: 0 15px;
    }

        .user-avatar::after {
            content: '\f078';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: static;
            transform: none;
            border: none;
            color: var(--accent-cyan);
            font-size: 12px;
            margin-left: auto;
        }

    .avatar-initials,
    .avatar-img {
        margin-right: auto;
    }

    .user-dropdown-menu {
        position: static;
        width: 100%;
        margin-top: 10px;
        box-shadow: none;
        border: 1px solid var(--border-color);
        transform: none !important;
    }

        .user-dropdown-menu.show {
            display: flex !important;
        }

    .dropdown-submenu {
        position: static !important;
        box-shadow: none;
        border: none;
        border-left: 3px solid var(--accent-cyan);
        margin-left: 20px;
        margin-top: 0;
        background-color: rgba(0, 212, 255, 0.05);
        padding: 0;
        transform: none !important;
        pointer-events: auto;
    }

        .dropdown-submenu.show {
            display: block !important;
        }

        .dropdown-submenu .dropdown-item {
            padding: 12px 16px;
            font-size: 13px;
        }
}

@media (max-width: 576px) {
    .navbar {
        height: 56px;
    }

    .navbar-logo {
        height: 36px;
    }

    .navbar-collapse {
        top: 56px;
        height: calc(100vh - 56px);
    }
}
