/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --ferrari-red: #DC143C;
    --ferrari-dark-red: #8B0000;
    --dark-bg: #0a0a0a;
    --light-text: #ffffff;
    --gray-text: #b0b0b0;
    --border-color: #2a2a2a;
}

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

html {
    scroll-behavior: smooth;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(220, 20, 60, 0.1);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--ferrari-red);
    text-shadow: 0 0 20px rgba(220, 20, 60, 0.3);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-menu a {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--ferrari-red);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--ferrari-red);
}

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

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #1a0000 0%, #0a0a0a 50%, #1a0000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(220, 20, 60, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

.hero-content {
    text-align: center;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

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

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: 5px;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, var(--ferrari-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--gray-text);
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 3rem;
}

.cta-button {
    background: var(--ferrari-red);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    background: var(--ferrari-dark-red);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(220, 20, 60, 0.4);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--ferrari-red);
    border-radius: 15px;
    position: relative;
}

.mouse::before {
    content: '';
    width: 4px;
    height: 8px;
    background: var(--ferrari-red);
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(15px); }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-title {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    margin-bottom: 1rem;
}

.title-underline {
    width: 100px;
    height: 4px;
    background: var(--ferrari-red);
    margin: 0 auto;
}

/* Models Section */
.models {
    padding: 8rem 3rem;
    max-width: 1600px;
    margin: 0 auto;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 3rem;
}

.model-card {
    background: #141414;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.5s ease;
    position: relative;
}

.model-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(220, 20, 60, 0.2);
    border-color: var(--ferrari-red);
}

.model-image {
    height: 300px;
    position: relative;
    overflow: hidden;
}

.model-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.model-card:hover .model-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.model-overlay h3 {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 3px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.model-info {
    padding: 2.5rem;
}

.model-info h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(220, 20, 60, 0.05);
    border-left: 3px solid var(--ferrari-red);
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.spec-label {
    font-size: 0.75rem;
    color: var(--gray-text);
    font-weight: 600;
    letter-spacing: 1px;
}

.spec-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ferrari-red);
}

.model-description {
    color: var(--gray-text);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.discover-btn {
    background: transparent;
    color: var(--ferrari-red);
    border: 2px solid var(--ferrari-red);
    padding: 1rem 2.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    width: 100%;
}

.discover-btn:hover {
    background: var(--ferrari-red);
    color: white;
    transform: translateY(-2px);
}

/* Heritage Section */
.heritage {
    padding: 8rem 3rem;
    background: linear-gradient(135deg, #1a0000 0%, #0a0a0a 100%);
    position: relative;
}

.heritage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(220, 20, 60, 0.03) 10px,
            rgba(220, 20, 60, 0.03) 20px
        );
}

.heritage-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.heritage-text {
    font-size: 1.3rem;
    line-height: 2;
    color: var(--gray-text);
    max-width: 900px;
    margin: 0 auto 5rem;
    font-weight: 300;
}

.heritage-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    margin-top: 5rem;
}

.stat {
    padding: 2rem;
    border: 1px solid var(--border-color);
    background: rgba(20, 20, 20, 0.5);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat:hover {
    border-color: var(--ferrari-red);
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(220, 20, 60, 0.2);
}

.stat h3 {
    font-size: 4rem;
    font-weight: 900;
    color: var(--ferrari-red);
    margin-bottom: 1rem;
}

.stat p {
    font-size: 1.1rem;
    color: var(--gray-text);
    font-weight: 600;
    letter-spacing: 1px;
}

/* Racing Section */
.racing {
    height: 70vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23DC143C" width="1200" height="600"/><path fill="%238B0000" d="M0 300L50 320L100 280L150 310L200 270L250 300L300 260L350 290L400 250L450 280L500 240L550 270L600 230L650 260L700 220L750 250L800 210L850 240L900 200L950 230L1000 190L1050 220L1100 180L1150 210L1200 170V600H0Z"/></svg>') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.racing-overlay {
    text-align: center;
    z-index: 2;
}

.racing-text {
    font-size: 1.3rem;
    line-height: 2;
    color: var(--gray-text);
    max-width: 700px;
    margin: 2rem auto 3rem;
    font-weight: 300;
}

/* Footer */
.footer {
    background: #0a0a0a;
    border-top: 1px solid var(--border-color);
    padding: 4rem 3rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    color: var(--ferrari-red);
}

.footer-section p {
    color: var(--gray-text);
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: var(--gray-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--ferrari-red);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--gray-text);
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .models-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-menu {
        gap: 1.5rem;
        font-size: 0.8rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .models-grid {
        grid-template-columns: 1fr;
    }

    .heritage-stats {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .specs {
        grid-template-columns: 1fr;
    }
}

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

    .nav-menu {
        display: none;
    }

    .hero-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .models,
    .heritage,
    .racing {
        padding: 4rem 1.5rem;
    }

    .cta-button {
        padding: 1rem 2rem;
        font-size: 0.85rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
