.header {
    background: linear-gradient(rgba(46, 35, 129, 0.85), rgba(0, 159, 226, 0.85)), url('../img/racing-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}



.logo {
    width: 20em;
}

.header h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out 0.5s both;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: var(--background-color);
    position: relative;
    display: inline-block;
}

.header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--accent-color);
    animation: widthGrow 1s ease-out 1s both;
}

.header-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    max-width: 800px;
    margin: 2rem auto 0;
    animation: fadeIn 1s ease-out 1s both;
    color: var(--background-color);
    line-height: 1.6;
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes widthGrow {
    from {
        width: 0;
    }
    to {
        width: 100px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 3rem 1.5rem;
        min-height: 60vh;
    }
    
    .logo-container {
        padding: 1.5rem;
    }
    
    .logo {
        max-width: 150px;
    }
}

@media (max-width: 576px) {
    .header {
        padding: 2rem 1rem;
        min-height: 50vh;
    }
    
    .logo-container {
        padding: 1rem;
    }
    
    .logo {
        max-width: 120px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .header h1,
    .logo-container,
    .header-subtitle {
        animation: none;
    }
    
    .header h1::after {
        animation: none;
        width: 100px;
    }
}

@media (prefers-contrast: high) {
    .header {
        background: var(--primary-color);
    }
    
    .header h1::after {
        background: white;
    }
}
