/* css/header.css - FIXED WITH SEARCH FUNCTIONALITY */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --text: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.92);
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow);
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.logo {
    height: 60px;
    filter: drop-shadow(0 5px 15px rgba(99, 102, 241, 0.3));
}

.developer-name {
    margin-top: 0.75rem;
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: lowercase;
    letter-spacing: 3px;
    animation: typewriter 1.5s ease-out, gradientShift 3s ease-in-out infinite, pulseScale 2s ease-in-out infinite;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.developer-name::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(245, 158, 11, 0.1));
    animation: borderGlow 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes typewriter {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
        width: 0;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        width: 100%;
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes pulseScale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0.3;
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
    }
    50% {
        opacity: 0.6;
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.4), 0 0 30px rgba(245, 158, 11, 0.3);
    }
}

.search-container {
    width: 100%;
    max-width: 500px;
    position: relative;
}

.search-bar {
    position: relative;
    width: 100%;
}

.search-bar input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    background: var(--white);
    box-shadow: var(--shadow);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
    border: 2px solid transparent;
}

.search-bar input:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), var(--shadow);
    border-color: var(--primary-light);
}

.search-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    transition: var(--transition);
}

.search-bar input:focus + .search-icon {
    color: var(--primary-dark);
    transform: translateY(-50%) scale(1.1);
}

/* Search Results Styles */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 0.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.search-results.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-result-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:hover {
    background: #f8fafc;
    transform: translateX(5px);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-result-title::before {
    content: '🎯';
    font-size: 0.9rem;
}

.search-result-description {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.search-result-category {
    font-size: 0.75rem;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    display: inline-block;
}

.no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

.no-results::before {
    content: '🔍';
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.contact-link {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: var(--transition);
}

.contact-link:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
    color: var(--white);
}

.contact-link::after {
    display: none;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: var(--transition);
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 100%;
}

/* Search highlight animation */
.demo-highlight {
    animation: highlightPulse 2s ease;
}

@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(99, 102, 241, 0.2);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 1rem;
        gap: 1rem;
    }
    
    .main-nav ul {
        gap: 1.5rem;
    }
    
    .logo {
        height: 50px;
    }
    
    .search-bar input {
        font-size: 0.9rem;
        padding: 0.8rem 1.2rem;
    }
    
    .search-results {
        left: 0.5rem;
        right: 0.5rem;
    }
}