/* Shared Header Styles - Used across all pages for consistency */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.125rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.navbar::after {
    content: none;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    width: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.nav-logo:hover {
    transform: translateX(2px);
}

.nav-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 280px;
}

.nav-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.3));
}

.nav-logo:hover img {
    transform: scale(1.08);
}

.nav-logo-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-bot-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-icon);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.nav-bot-icon::before {
    content: none;
}

.nav-bot-icon i {
    font-size: 1.375rem;
    color: var(--primary-blue-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.4));
    z-index: 1;
    position: relative;
}

.nav-logo:hover .nav-bot-icon {
    background: var(--bg-icon-hover);
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-sm);
}

.nav-logo:hover .nav-bot-icon::before {
    opacity: 1;
}

.nav-logo:hover .nav-bot-icon i {
    color: var(--text-primary);
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.6));
}

.nav-logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}

.nav-logo-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.nav-logo-subtitle {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.nav-logo:hover .nav-logo-title {
    color: var(--primary-blue-light);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: flex-end;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.desktop-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0.625rem 0.75rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.nav-link i {
    font-size: 1rem;
    flex-shrink: 0;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-blue-light);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.nav-link:hover {
    color: var(--primary-blue-light);
}

.nav-link:hover::before {
    width: 80%;
}

.nav-link:hover::after {
    opacity: 1;
}

.nav-link.active {
    color: var(--primary-blue-light);
}

.nav-link.active::after {
    opacity: 1;
}

.nav-signup {
    background: linear-gradient(135deg, var(--primary-blue-light), var(--primary-blue));
    color: #0a1320;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.nav-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.nav-signup i {
    font-size: 1rem;
    flex-shrink: 0;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.625rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.nav-dropdown-toggle:hover {
    color: var(--primary-blue-light);
    background: rgba(59, 130, 246, 0.1);
}

.nav-dropdown-toggle i:first-child {
    font-size: 1rem;
}

.nav-dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.nav-dropdown.active .nav-dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9375rem;
    font-weight: 500;
}

.nav-dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-blue-light);
}

.nav-dropdown-item i {
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-dropdown-item span {
    flex: 1;
}

.mobile-menu-header,
.mobile-menu-section {
    display: none;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-blue-light);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
}

/* Mobile Styles */
@media (max-width: 1024px) {
    .nav-logo-wrapper {
        max-width: 240px;
    }

    .nav-logo-text {
        min-width: 0;
    }

    .nav-logo-title {
        font-size: 0.875rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-logo-subtitle {
        display: none;
    }

    .desktop-nav,
    .desktop-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        background: var(--bg-card);
        border-left: 1px solid var(--border-color);
        padding: 2rem;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links > *:first-child {
        margin-top: 2rem;
    }

    .mobile-menu-header {
        display: flex !important;
        align-items: center;
        gap: 12px;
        padding-bottom: 2rem;
        margin-bottom: 2rem;
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-menu-logo {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
    }

    .mobile-menu-logo .nav-logo-container {
        width: 40px;
        height: 40px;
    }

    .mobile-menu-logo .nav-logo-container img {
        width: 40px;
        height: 40px;
    }

    .mobile-menu-bot-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        background: var(--bg-icon);
        border: 1px solid var(--border-color);
        flex-shrink: 0;
    }

    .mobile-menu-bot-icon i {
        font-size: 1rem;
        color: var(--primary-blue-light);
    }

    .mobile-menu-title {
        display: flex;
        flex-direction: column;
        gap: 2px;
        flex: 1;
    }

    .mobile-menu-title span:first-child {
        font-size: 0.9375rem;
        font-weight: 700;
        color: var(--text-primary);
    }

    .mobile-menu-subtitle {
        font-size: 0.75rem;
        color: var(--text-secondary);
    }

    .mobile-menu-section {
        display: block !important;
        margin-bottom: 2rem;
    }

    .mobile-menu-section:last-child {
        margin-bottom: 0;
    }

    .mobile-menu-section-title {
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 1rem;
        padding: 0 0.75rem;
    }

    .nav-link {
        padding: 1rem 0.75rem;
        border-radius: 12px;
        margin-bottom: 0.5rem;
        font-size: 1rem;
    }

    .nav-link i {
        font-size: 1.25rem;
        width: 24px;
        text-align: center;
    }

    .nav-link::before,
    .nav-link::after {
        display: none;
    }

    .nav-link:hover,
    .nav-link.active {
        background: rgba(59, 130, 246, 0.1);
        color: var(--primary-blue-light);
    }

    .nav-link.active {
        background: rgba(59, 130, 246, 0.15);
    }

    .nav-signup {
        margin: 1rem 0.75rem;
        padding: 1rem;
        justify-content: center;
        font-size: 1rem;
    }

    .nav-signup i {
        font-size: 1.25rem;
    }

    .nav-dropdown {
        margin-bottom: 0.5rem;
    }

    .nav-dropdown-toggle {
        width: 100%;
        padding: 1rem 0.75rem;
        border-radius: 12px;
        justify-content: space-between;
        font-size: 1rem;
        text-align: left;
    }

    .nav-dropdown-toggle:hover {
        background: rgba(59, 130, 246, 0.1);
    }

    .nav-dropdown-menu {
        position: static;
        width: 100%;
        margin-top: 0.5rem;
        margin-left: 1rem;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        transform: none;
        transition: all 0.3s ease;
    }

    .nav-dropdown.active .nav-dropdown-menu {
        opacity: 1;
        max-height: 300px;
        transform: none;
    }

    .nav-dropdown-item {
        padding: 0.75rem;
        margin-bottom: 0.25rem;
        border-radius: 8px;
        font-size: 0.9375rem;
    }

    .nav-dropdown-item:last-child {
        margin-bottom: 0;
    }

    .nav-dropdown-item:hover {
        background: rgba(59, 130, 246, 0.1);
    }

    .nav-dropdown-item i {
        font-size: 1.125rem;
        width: 20px;
    }

    .nav-dropdown-arrow {
        font-size: 0.875rem;
    }

    .nav-dropdown.active .nav-dropdown-arrow {
        transform: rotate(180deg);
    }
}

@media (max-width: 640px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-links {
        width: 100%;
        right: -100%;
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-header {
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .mobile-menu-section {
        margin-bottom: 1.5rem;
    }

    .nav-link {
        font-size: 0.9375rem;
        padding: 0.875rem 0.75rem;
    }

    .nav-link i {
        font-size: 1.125rem;
    }

    .nav-signup {
        font-size: 0.9375rem;
        padding: 0.875rem;
    }

    .nav-signup i {
        font-size: 1.125rem;
    }

    .nav-dropdown-toggle {
        font-size: 0.9375rem;
        padding: 0.875rem 0.75rem;
    }

    .nav-dropdown-item {
        font-size: 0.875rem;
        padding: 0.625rem 0.75rem;
    }

    .nav-dropdown-item i {
        font-size: 1rem;
    }
}