/* ============================================
   TOP NAVIGATION BAR v4.0
   No Sidebar — Clean Header Design
   ============================================ */

/* ===== NAVBAR BASE ===== */
.fg-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    z-index: 1000;
    transition: all 0.4s ease;
}

.fg-navbar.scrolled {
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.fg-navbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

/* ===== LOGO ===== */
.fg-navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.fg-logo-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-main);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
    animation: logoPulse 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.fg-logo-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.3) 50%, transparent 60%);
    animation: shimmer 2.5s ease-in-out infinite;
}

.fg-logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.fg-logo-text span {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== DESKTOP MENU ===== */
.fg-navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fg-nav-link {
    padding: 10px 18px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.fg-nav-link:hover {
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.05);
}

.fg-nav-link.active {
    color: var(--neon-cyan);
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(168, 85, 247, 0.04));
    border: 1px solid rgba(0, 240, 255, 0.12);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.06);
}

/* ===== DROPDOWN ===== */
.fg-nav-dropdown {
    position: relative;
}

.fg-nav-dropdown-toggle i {
    font-size: 10px;
    transition: transform 0.3s ease;
    margin-left: 4px;
}

.fg-nav-dropdown:hover .fg-nav-dropdown-toggle i {
    transform: rotate(180deg);
}

.fg-nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.96);
    min-width: 260px;
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    padding: 12px;
    box-shadow: var(--shadow-card), 0 20px 60px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
}

.fg-nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: var(--bg-card);
    border-left: 1px solid var(--border-glow);
    border-top: 1px solid var(--border-glow);
}

.fg-nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.fg-nav-dropdown-item i {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: rgba(0, 240, 255, 0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-cyan);
    font-size: 14px;
}

.fg-nav-dropdown-item div {
    display: flex;
    flex-direction: column;
}

.fg-nav-dropdown-item div span {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.fg-nav-dropdown-item div small {
    color: var(--text-tertiary);
    font-size: 0.8rem;
    margin-top: 2px;
}

.fg-nav-dropdown-item:hover {
    background: var(--bg-input);
    transform: translateX(4px);
}

.fg-nav-dropdown-item:hover i {
    background: rgba(0, 240, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

/* ===== NAVBAR ACTIONS ===== */
.fg-navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== MOBILE TOGGLE ===== */
.fg-mobile-toggle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fg-mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.fg-mobile-toggle:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

/* ===== MOBILE MENU ===== */
.fg-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: var(--bg-secondary);
    backdrop-filter: blur(24px);
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-light);
}

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

.fg-mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.fg-mobile-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fg-mobile-close:hover {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
}

.fg-mobile-menu-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fg-mobile-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.fg-mobile-link i:first-child {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--text-tertiary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.fg-mobile-link:hover,
.fg-mobile-link.active {
    background: var(--bg-input);
    color: var(--neon-cyan);
}

.fg-mobile-link:hover i:first-child,
.fg-mobile-link.active i:first-child {
    background: rgba(0, 240, 255, 0.1);
    color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.1);
}

.fg-mobile-divider {
    height: 1px;
    background: var(--border-light);
    margin: 12px 0;
}

.fg-mobile-theme {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.fg-mobile-theme:hover {
    background: var(--bg-input);
    color: var(--neon-cyan);
}

/* Mobile Dropdown */
.fg-mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 46px;
}

.fg-mobile-dropdown.open .fg-mobile-dropdown-menu {
    max-height: 300px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.fg-mobile-dropdown-item {
    padding: 10px 16px;
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.fg-mobile-dropdown-item:hover {
    color: var(--neon-cyan);
    background: var(--bg-input);
    padding-left: 20px;
}

.fg-mobile-dropdown-toggle i.fa-chevron-down {
    transition: transform 0.3s ease;
}

.fg-mobile-dropdown.open .fg-mobile-dropdown-toggle i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Overlay */
.fg-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.fg-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== MAIN CONTENT ADJUSTMENTS ===== */
.fg-main {
    margin-left: 0 !important;
    padding-top: 80px;
    padding-bottom: 0;
}

.fg-topbar {
    display: none; /* Replaced by navbar */
}

/* ===== SCROLL TOP ===== */
.scroll-top-glow {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--neon-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
    z-index: 998;
}

.scroll-top-glow.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-glow:hover {
    background: var(--bg-input);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
    transform: translateY(-4px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .fg-navbar-inner {
        padding: 0 20px;
    }
    .fg-logo-text {
        font-size: 1.3rem;
    }
}

@media (max-width: 767px) {
    .fg-navbar {
        height: 64px;
    }
    .fg-main {
        padding-top: 64px;
    }
    .fg-logo-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}