/* ========================================
   MODERN HEADER DESIGN
   ======================================== */

header {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-base);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-xl);
    height: 72px;
}

.header-container img {
    height: 2rem;
    width: auto;
    transition: transform var(--transition-fast);
}

.header-container img:hover {
    transform: scale(1.05);
}

/* Logo/Title */
h1 a {
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    transition: color var(--transition-fast);
}

h1 a:hover {
    color: var(--color-primary-light);
}

/* Navigation */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

nav ul li {
    display: inline-flex;
    margin: 0;
}

nav ul li a {
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

nav ul li a:hover {
    color: var(--color-primary);
    background-color: var(--color-background-alt);
}

/* Active/current page indicator */
nav ul li a.active {
    color: var(--color-primary);
    font-weight: 700;
}

/* Modern underline effect on hover */
nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--space-sm);
    right: var(--space-sm);
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transform: scaleX(0);
    transition: transform var(--transition-base);
    border-radius: var(--radius-full);
}

nav ul li a:hover::after {
    transform: scaleX(1);
}

/* Transparent header for homepage */
.transparent-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

.transparent-header .header-container {
    max-width: 1440px;
    margin: 0 auto;
}

.transparent-header h1 a {
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.transparent-header nav ul li a {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.transparent-header nav ul li a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Scrolled state */
.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.scrolled h1 a {
    color: var(--color-text-primary);
    text-shadow: none;
}

.scrolled nav ul li a {
    color: var(--color-text-secondary);
    text-shadow: none;
}

.scrolled nav ul li a:hover {
    color: var(--color-primary);
    background-color: var(--color-background-alt);
}

/* ========================================
   MODERN SEARCH BAR
   ======================================== */

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: var(--space-lg);
}

.search-input {
    padding: var(--space-xs) var(--space-xl) var(--space-xs) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-family: var(--font-primary);
    width: 240px;
    background: var(--color-background-alt);
    color: var(--color-text-primary);
    transition: all var(--transition-base);
}

.search-input::placeholder {
    color: var(--color-text-muted);
}

.search-input:focus {
    outline: none;
    background: var(--color-background);
    border-color: var(--color-primary);
    width: 280px;
    box-shadow: 0 0 0 3px rgba(0, 39, 76, 0.1);
}

.header-search .search-icon {
    position: absolute;
    right: var(--space-md);
    color: var(--color-text-muted);
    font-size: 0.875rem;
    pointer-events: none;
    transition: color var(--transition-fast);
}

.search-input:focus ~ .search-icon {
    color: var(--color-primary);
}

/* Search in transparent header */
.transparent-header .search-input {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(8px);
}

.transparent-header .search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.transparent-header .search-input:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.transparent-header .header-search .search-icon {
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1200px) {
    .header-container {
        padding: var(--space-md) var(--space-lg);
    }

    nav ul {
        gap: var(--space-md);
    }

    .search-input {
        width: 200px;
    }

    .search-input:focus {
        width: 220px;
    }
}

@media (max-width: 992px) {
    .header-search {
        display: none;
    }

    nav ul {
        gap: var(--space-sm);
    }

    nav ul li a {
        font-size: 0.875rem;
        padding: var(--space-xs);
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: var(--space-md);
        height: 64px;
    }

    h1 a {
        font-size: 1.25rem;
    }

    nav ul {
        gap: var(--space-xs);
    }

    nav ul li a {
        font-size: 0.8125rem;
        padding: var(--space-xs);
    }
}

@media (max-width: 480px) {
    nav ul li a {
        font-size: 0.75rem;
    }

    .header-container img {
        height: 1.5rem;
    }
}
