/* ==================== HEADER.CSS - FIXED ==================== */

.header {
    background-color: rgba(11, 15, 42, 0.95);
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(31, 182, 232, 0.15);
    position: fixed;
    top: 0;
    z-index: 100;
    width: 100%;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(31, 182, 232, 0.2);
    transition: all 0.3s ease;
}

.header.scrolled {
    padding: 15px 0;
    box-shadow: 0 8px 30px rgba(31, 182, 232, 0.2);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.logo-wrapper:hover {
    transform: translateY(-2px);
}

.logo-image {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(31, 182, 232, 0.3);
    transition: all 0.3s ease;
    border: 2px solid rgba(31, 182, 232, 0.3);
    cursor: pointer;
}

.logo-wrapper:hover .logo-image {
    box-shadow: 0 6px 20px rgba(142, 60, 247, 0.4);
    border-color: rgba(142, 60, 247, 0.5);
    transform: scale(1.05);
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav a {
    text-decoration: none;
    color: #ccc;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
    letter-spacing: 0.3px;
    padding-bottom: 6px;
}

/* Underline animation for hover and active states */
.nav a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-gradient);
    transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 2px;
}

.nav a:hover {
    color: var(--accent-white);
}

.nav a:hover::after {
    width: 100%;
}

/* ========== ACTIVE STATE - Shows full underline ========== */
.nav a.active {
    color: var(--accent-white);
    font-weight: 600;
}

.nav a.active::after {
    width: 100%;
    background: var(--primary-gradient);
    box-shadow: 0 0 10px rgba(31, 182, 232, 0.5);
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    background: none;
    border: none;
    padding: 8px;
}

.nav-toggle span {
    width: 28px;
    height: 3px;
    background: var(--primary-blue);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 16px 0;
    }

    .logo-image {
        width: 40px;
        height: 40px;
    }

    .logo-text {
        font-size: 1.3rem;
    }

    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background-color: rgba(11, 15, 42, 0.98);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 99;
        padding: 20px;
        border-top: 1px solid rgba(31, 182, 232, 0.2);
    }

    .nav.active {
        transform: translateX(0);
    }

    .nav a {
        padding: 15px 0;
        font-size: 1rem;
        border-bottom: 1px solid rgba(31, 182, 232, 0.1);
    }

    /* Mobile: show underline only for active */
    .nav a::after {
        display: none;
    }

    /* Mobile: active link has different styling */
    .nav a.active {
        color: var(--primary-blue);
        padding-left: 10px;
        background: rgba(31, 182, 232, 0.1);
        border-radius: 6px;
    }

    .nav a:hover {
        color: var(--primary-blue);
        padding-left: 10px;
        background: rgba(31, 182, 232, 0.05);
    }

    .nav-toggle {
        display: flex;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 14px 0;
    }

    .logo-image {
        width: 38px;
        height: 38px;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .nav a {
        font-size: 0.95rem;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}