/* Color variables */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #2c2c2c;
    --accent-color: #7899a0; /* Nummi logo primary blue-gray */
    --accent-red: #f22a0a; /* Nummi logo red accent */
    --text-color: #ffffff;
    --bg-color: #0f0f0f;
    --card-bg: #1e1e1e;
    
    /* Logo-inspired colors */
    --logo-primary: #7899a0;
    --logo-secondary: #697576;
    --logo-accent: #9fd4d5;
    --logo-red: #f22a0a;
}





/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    opacity: 1;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    position: absolute;
    top: 10vh;
    left: 50%;
    transform: translate(-50%, 0);
    width: 100%;
}

.splash-text {
    font-family: 'VAG Rounded', 'VAG Rounded Std', 'VAG Rounded Next', sans-serif;
    font-size: 3rem;
    color: #7899a0;
    margin-bottom: 2rem;
    font-weight: bold;
    opacity: 0;
    animation: textFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}



@keyframes textFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroLogoFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}



@keyframes splashFadeIn {
    0% {
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 1;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'VAG Rounded', 'VAG Rounded Std', 'VAG Rounded Next', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

/* Video Container */
.video-container {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 0;
}

.video-container iframe {
    width: 100vw;
    height: 56.25vw; /* 21:9 aspect ratio */
    max-height: 80vh;
    min-height: 400px;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.3s ease;
}

/* Mobile-specific styling to maintain 21:9 aspect ratio */
@media (max-width: 768px) {
    .video-container iframe {
        height: calc(100vw * 9 / 21); /* Force 21:9 ratio on mobile */
        min-height: 200px;
        max-height: 60vh;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .video-container iframe {
        height: calc(100vw * 9 / 21);
        min-height: 150px;
        max-height: 50vh;
    }
}

.video-container iframe:hover {
    transform: scale(1.02);
}

.instagram-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #E4405F !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.instagram-link:hover {
    color: #C13584 !important;
    transform: translateY(-1px);
}

.instagram-link i {
    font-size: 1.1rem;
}

.video-section {
    background: var(--card-bg);
    padding: 2rem 0;
    text-align: center;
    margin: 0 -20px;
    width: calc(100% + 40px);
}

.video-section h2 {
    color: white;
    margin-bottom: 2rem;
    font-size: 3.5rem;
}

.video-section p {
    color: var(--text-color);
    margin-bottom: 3rem;
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.btn-primary {
    background: var(--accent-red);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(179, 64, 45, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
    background: var(--accent-color);
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}



.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo a {
    text-decoration: none;
    transition: transform 0.3s ease;
}

.nav-logo a:hover {
    transform: scale(1.05);
}

.nav-logo-img {
    height: 100px;
    width: auto;
    border-radius: 5px;
    object-fit: contain;
}

.nav-logo h2 {
    font-family: 'VAG Rounded', 'VAG Rounded Std', 'VAG Rounded Next', sans-serif;
    color: var(--accent-color);
    font-size: 1.5rem;
    margin: 0;
}



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

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}



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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}



/* Custom theme icons */
.theme-icon {
    font-size: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.theme-icon:hover {
    transform: scale(1.1);
}



/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: var(--text-color);
}



.hero-content {
    z-index: 1002;
    position: absolute;
    top: 33.33vh;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    /* Ensure exact same positioning as splash */
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-logo {
    height: 700px;
    width: auto;
    margin-bottom: 2rem;
    border-radius: 15px;
    object-fit: contain;
    filter: drop-shadow(3px 3px 12px rgba(0, 0, 0, 0.6));
    /* Logo specific styling */
    max-width: 95%;
    display: block;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    position: relative;
}



.hero-title {
    font-family: 'VAG Rounded', 'VAG Rounded Std', 'VAG Rounded Next', sans-serif;
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #ccc;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/hero-bg2-web.jpg') 67.2% 61.9%/cover;
    z-index: 1;
}





/* Countdown Section */
.countdown-section {
    background: #1a1a1a;
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.countdown-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.countdown-race {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid var(--accent-red);
}

.countdown-race h3 {
    color: var(--accent-red);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.race-details {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.race-details p {
    color: var(--text-color) !important;
    margin: 0.3rem 0;
}

.countdown-section {
    color: var(--text-color) !important;
}

.countdown-section h2 {
    color: white !important;
    font-size: 3.5rem !important;
    margin-bottom: 2rem !important;
    text-align: center !important;
}

.countdown-label {
    color: var(--text-color) !important;
}

.schedule-section {
    color: var(--text-color) !important;
}

.schedule-section h2,
.schedule-section h3 {
    color: var(--text-color) !important;
}

/* Only the race cards with white backgrounds should have dark text */
.race-item {
    background: white;
    color: #1a1a1a !important;
}

.race-item * {
    color: #1a1a1a !important;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.countdown-item {
    text-align: center;
    min-width: 70px;
}

.countdown-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent-red);
    font-family: 'Orbitron', monospace;
}

.countdown-label {
    font-size: 0.9rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sections */
section {
    padding: 5rem 0;
    background: var(--bg-color);
    color: var(--text-color);
}

section:nth-child(even) {
    background: var(--secondary-color);
}

/* Standard section headers */
section h2 {
    color: white;
    margin-bottom: 2rem;
    font-size: 3.5rem;
    text-align: center;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* Results Section */
.results-section {
    background: var(--bg-color);
    color: var(--text-color);
    padding: 5rem 0;
    text-align: center;
}

.results-section h2 {
    color: white;
    margin-bottom: 2rem;
    font-size: 3.5rem;
}

.results-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.results-overview {
    margin-bottom: 3rem;
}

/* Increase spacing between digital stats and season results */
.digital-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 6rem;
    align-items: center;
}

.stat-line {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.counter-number {
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--accent-color);
}

.counter-label {
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem;
    color: var(--accent-color);
    font-weight: 900;
}

.season-results {
    text-align: left;
}

.season {
    margin-bottom: 3rem;
}

.season h3 {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* New Result Cards Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    background: #000;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 300px;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.track-name {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    z-index: 2;
    position: relative;
    flex-shrink: 0;
}

.track-map {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem 0;
    min-height: 0;
    width: 100%;
}

.track-canvas {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    border-radius: 8px;
    background: #000;
    z-index: 1;
    object-fit: contain;
    position: relative;
}

.race-position {
    font-size: 8rem;
    font-weight: bold;
    font-family: 'Orbitron', monospace;
    margin: 0;
    z-index: 2;
    position: absolute;
    opacity: 0.7;
    text-align: center;
    line-height: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

/* Position colors */
.race-position.p1 {
    color: #FFD700; /* Gold */
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.race-position.p2 {
    color: white; /* White (previously P4+ color) */
}

.race-position.p3 {
    color: #CD7F32; /* Bronze */
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}

.race-position.p4,
.race-position.p5,
.race-position.p6,
.race-position.p7,
.race-position.p12 {
    color: #C0C0C0; /* Silver (previously P2 color) */
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.race-position.dnf {
    color: #dc3545;
}

.race-number {
    font-size: 1.6rem;
    color: var(--text-color);
    opacity: 0.8;
    z-index: 2;
    position: relative;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    margin-top: auto;
    flex-shrink: 0;
}

/* Responsive grid */
@media (max-width: 1024px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .result-card {
        aspect-ratio: auto;
        min-height: 250px;
    }
}

/* Keep existing race-results styles for backward compatibility */
.race-results {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.race-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border-radius: 5px;
    border: 1px solid var(--secondary-color);
    transition: background-color 0.2s ease;
}

.race-item:hover {
    background: rgba(120, 153, 160, 0.1);
}

.race-name {
    color: var(--text-color);
    font-size: 0.9rem;
}

.season-divider {
    display: none;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .race-results {
        grid-template-columns: 1fr;
    }
    
    .race-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    /* Results summary mobile optimization */
    .results-overview {
        margin-bottom: 2rem;
    }
    
    .digital-stats {
        gap: 0.75rem;
        margin-bottom: 4rem;
    }
    
    .stat-line {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        width: 100%;
    }
    
    .counter-number {
        font-size: 2.5rem;
        line-height: 1;
    }
    
    .counter-label {
        font-size: 1.2rem;
        line-height: 1.2;
        text-align: center;
        max-width: 100%;
        word-wrap: break-word;
    }
    
    /* Mobile-only: Hide dash between championship and position */
    .season h3 {
        font-size: 1.3rem;
        line-height: 1.3;
    }
    
    /* Hide the dash character on mobile */
    .season-dash {
        display: inline;
    }
    
    @media (max-width: 768px) {
        .season-dash {
            display: none;
        }
        
        /* Mobile: Three-line layout for season headers */
        .season h3 {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.5rem;
            text-align: center;
        }
        
        .season-year {
            display: block;
            width: 100%;
        }
        
        .season-position {
            display: block;
            width: 100%;
            margin-top: 0.5rem;
        }
    }
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Drivers and Crew Sections */
.drivers-grid, .crew-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Simple Flip Card Styles */
.driver-card, .crew-card {
    height: 350px;
    cursor: pointer;
    position: relative;
    perspective: 1000px;
}

.flip-card {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.driver-card.flipped .flip-card,
.crew-card.flipped .flip-card {
    transform: rotateY(180deg);
}

/* Desktop hover effect */
@media (hover: hover) {
    .driver-card:hover .flip-card,
    .crew-card:hover .flip-card {
        transform: rotateY(180deg);
    }
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
}

.flip-card-front {
    background: var(--card-bg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.flip-card-back {
    background: white !important;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 1.5rem;
    text-align: center;
    box-shadow: none !important;
    border: none !important;
}

.back-top-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

.back-content-area {
    flex-grow: 1;
    width: 100%;
    padding: 0.5rem;
}

.driver-bio, .crew-bio {
    font-size: 0.8rem;
    line-height: 1.4;
    color: #1a1a1a;
    margin: 0;
    max-height: 150px;
    overflow-y: auto;
    text-align: left;
}

.about-label {
    color: #1a1a1a !important;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0.5rem 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.back-bottom-content {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.instagram-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #E4405F !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.instagram-link:hover {
    color: #C13584 !important;
    transform: translateY(-1px);
}

.instagram-link i {
    font-size: 1.1rem;
}

.driver-image, .crew-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.driver-info-front, .crew-info-front {
    padding: 1rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.driver-info-back, .crew-info-back {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
}

.driver-name, .crew-name {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: bold;
}

.driver-role, .crew-role {
    color: var(--accent-red);
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.driver-image-small, .crew-image-small {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 0.8rem;
    border: 2px solid var(--accent-color);
}

.flip-card-back .driver-name,
.flip-card-back .crew-name {
    color: #1a1a1a !important;
    font-size: 0.9rem;
    font-weight: normal;
    margin-bottom: 0;
}

/* Ensure flip card back has no card styling */
.flip-card-back .driver-info-back,
.flip-card-back .crew-info-back {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Ensure cards maintain consistent height */
.drivers-grid, .crew-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

/* Car Section */
.car-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.car-specs {
    margin: 0 0 1.5rem 0;
    font-family: 'Roboto', sans-serif;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    gap: 1rem;
}

.spec-label {
    font-weight: 600;
    color: var(--accent-color);
    flex-shrink: 0;
}

.spec-value {
    text-align: right;
    flex-shrink: 0;
}

.spec-label {
    font-weight: 600;
    color: var(--accent-color);
}

.car-gallery {
    margin-top: 4rem;
}

.car-gallery img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.car-thumbnails {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.car-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.car-thumbnail:hover {
    opacity: 0.8;
}

/* Schedule Section */
.schedule-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

/* Center upcoming races when previous results is removed */
.schedule-content:has(.upcoming-races:only-child) {
    display: flex;
    justify-content: center;
    align-items: center;
}

.upcoming-races:only-child {
    max-width: 1000px;
    width: 100%;
    font-family: 'Roboto', sans-serif;
}

.race-item, .result-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
}

/* Upcoming races specific styling */
.upcoming-races .race-item {
    background: #1a1a1a; /* Dark grey background (matches menu) */
    color: white !important;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr auto;
    align-items: center;
    gap: 1rem;
}

.upcoming-races .race-item * {
    color: white !important;
}

.upcoming-races .race-item:hover {
    background: white;
    color: #1a1a1a !important;
}

.upcoming-races .race-item:hover * {
    color: #1a1a1a !important;
}



.race-date, .result-date {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.race-location, .result-location {
    font-weight: 500;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.race-status, .result-position {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}



.race-status.completed {
    background: #e8f5e8;
    color: #388e3c;
}

.result-position.first {
    background: #fff3e0;
    color: #f57c00;
}

.result-position.second {
    background: #f3e5f5;
    color: #7b1fa2;
}

.result-position.third {
    background: #e8f5e8;
    color: #388e3c;
}

/* Gallery Section */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--accent-color);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item img[style*="display: none"] + .gallery-overlay {
    transform: translateY(0);
    background: rgba(0, 0, 0, 0.9);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* Merch Section */
.merch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.merch-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.merch-item:hover {
    transform: translateY(-5px);
}

.merch-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.merch-item:has(img[style*="display: none"]) .merch-info {
    margin-top: 20px;
}

.merch-info {
    padding: 1.5rem;
}

.merch-name {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.merch-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: #28a745;
    margin-bottom: 1rem;
}

.merch-description {
    color: #666;
    margin-bottom: 1rem;
}

/* Sponsors Section */
.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(4, 226px);
    row-gap: 2rem;
    column-gap: 2rem;
    margin-top: 2rem;
    justify-content: center;
}

/* Tablet breakpoint - 3-3-2 layout */
@media (max-width: 1024px) and (min-width: 769px) {
    .sponsors-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    /* Make sponsor items responsive on tablet */
    .sponsor-item {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        padding: 1.5rem;
    }
}

.sponsor-item {
    background: #000000;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid transparent;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 226px;
    height: 226px;
    flex-shrink: 0;
}

.sponsor-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.sponsor-logo {
    width: 85%;
    height: 85%;
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.sponsor-item:hover .sponsor-logo {
    transform: scale(1.05);
}

/* Become a Sponsor Section */
.become-sponsor-container {
    margin-top: 3rem;
    text-align: center;
}

.become-sponsor-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.become-sponsor-btn:hover {
    background: var(--accent-red);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(179, 64, 45, 0.3);
}

.become-sponsor-btn i {
    transition: transform 0.3s ease;
}

.become-sponsor-btn.active i {
    transform: rotate(45deg);
}

.sponsor-form {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--secondary-color);
}

.sponsor-form h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.sponsor-form p {
    color: var(--text-color);
    margin-bottom: 2rem;
    opacity: 0.8;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-color);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--accent-color);
    color: white;
}



/* Connect Section */
.connect-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.connect-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
}

.connect-btn i {
    font-size: 1.2rem;
}

.facebook-btn {
    background: #1877f2;
    color: white;
}

.facebook-btn:hover {
    background: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(24, 119, 242, 0.3);
}

.instagram-btn {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.instagram-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(188, 24, 136, 0.3);
}

.youtube-btn {
    background: #ff0000;
    color: white;
}

.youtube-btn:hover {
    background: #e60000;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
}

.email-btn {
    background: var(--accent-color);
    color: white;
}

.email-btn:hover {
    background: var(--accent-red);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(122, 146, 146, 0.3);
}



/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3, .footer-section h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

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

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

.footer-section ul li a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
    opacity: 0.8;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: color 0.3s ease;
    opacity: 0.8;
}

.footer-social a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--accent-color);
    color: var(--text-color);
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
    }



    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

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

    .hero-logo {
        height: 490px;
        max-width: 98%;
    }

    .splash-text {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .splash-logo {
        height: 260px;
        max-width: 95%;
    }



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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .countdown-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .countdown-race {
        padding: 1.5rem;
    }

    .countdown-timer {
        gap: 1rem;
    }

    .countdown-item {
        min-width: 60px;
    }

    .countdown-number {
        font-size: 2rem;
    }

    .about-content, .car-content, .schedule-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .spec-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem 0;
    }
    
    .spec-label {
        min-width: auto;
        font-size: 0.9rem;
    }
    
    .spec-value {
        text-align: left;
        max-width: 100%;
        font-size: 0.9rem;
    }
    
    .car-specs {
        margin: 1rem 0;
    }
    
    .connect-buttons {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
    
    .connect-btn {
        min-width: 200px;
    }

    .gallery-grid, .merch-grid {
        grid-template-columns: 1fr;
    }
    
    .sponsors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .sponsor-item {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        padding: 1.5rem;
    }
}

/* Mobile and small tablets/foldables - single column for driver/crew cards */
@media (max-width: 768px) {
    .drivers-grid, .crew-grid {
        grid-template-columns: 1fr;
    }



    .gallery-filters {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 200px;
    }
}

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

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

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

    .countdown-timer {
        flex-direction: column;
        gap: 0.5rem;
    }

    .countdown-item {
        min-width: auto;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* Update existing styles to use CSS variables */
.navbar {
    background: var(--primary-color);
}

.hero {
    background: var(--bg-color);
    color: var(--text-color);
}

.about-section, .drivers-section, .crew-section, .car-section, .schedule-section, .contact-section, .countdown-section {
    background: var(--bg-color);
    color: var(--text-color);
}

.driver-card, .crew-card, .car-specs {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--secondary-color);
}

.footer {
    background: var(--primary-color);
    color: var(--text-color);
}

/* Ensure all sections have dark backgrounds */
.about-section, .drivers-section, .crew-section, .car-section, .schedule-section, .contact-section, .countdown-section {
    background: var(--bg-color) !important;
    color: var(--text-color) !important;
}

/* Override any light backgrounds */
section {
    background: var(--bg-color) !important;
    color: var(--text-color) !important;
}

/* Focal Point CSS for Nummi Racing Driver/Crew Images */

/* Adam */
.driver-card[data-driver="adam mann"] img,
.crew-card[data-crew="adam mann"] img {
    object-position: 54.3% 33.1% !important;
}

/* Vpee */
.driver-card[data-driver="vpee"] img,
.crew-card[data-crew="vpee"] img {
    object-position: 40.6% 51.0% !important;
}



/* Jason */
.driver-card[data-driver="jason li"] img,
.crew-card[data-crew="jason li"] img {
    object-position: 63% 30% !important;
}

/* Joseph */
.driver-card[data-driver="joseph yang"] img,
.crew-card[data-crew="joseph yang"] img {
    object-position: 44% 31% !important;
}

/* Luke */
.driver-card[data-driver="luke pham"] img,
.crew-card[data-crew="luke pham"] img {
    object-position: 71% 30% !important;
}

/* Manitha */
.driver-card[data-driver="manitha chandrasena"] img,
.crew-card[data-crew="manitha chandrasena"] img {
    object-position: 54% 44% !important;
}

/* Nick */
.driver-card[data-driver="nick"] img,
.crew-card[data-crew="nick"] img {
    object-position: 93% 49% !important;
}

/* Patrick */
.driver-card[data-driver="patrick alex"] img,
.crew-card[data-crew="patrick alex"] img {
    object-position: 59% 35% !important;
}

/* Amando */
.driver-card[data-driver="amando widjaja"] img,
.crew-card[data-crew="amando widjaja"] img {
    object-position: 47.3% 27.5% !important;
}

/* Paul */
.driver-card[data-driver="paul joakim"] img,
.crew-card[data-crew="paul joakim"] img {
    object-position: 45.2% 19.8% !important;
}

/* Vinh */
.driver-card[data-driver="vinh pham"] img,
.crew-card[data-crew="vinh pham"] img {
    object-position: 61% 32% !important;
}

/* Mobile/Tablet Responsive Adjustments */
@media (max-width: 768px) {
    /* Use focal points but adjust vertical positioning for mobile */
    .driver-card[data-driver="adam mann"] img,
    .crew-card[data-crew="adam mann"] img {
        object-position: 54.3% 26.5% !important;
    }
    .driver-card[data-driver="vpee"] img,
    .crew-card[data-crew="vpee"] img {
        object-position: 40.6% 40.8% !important;
    }
    
    .driver-card[data-driver="jason"] img,
    .crew-card[data-crew="jason"] img {
        object-position: 63% 30% !important;
    }
    
    .driver-card[data-driver="joseph"] img,
    .crew-card[data-crew="joseph"] img {
        object-position: 44% 30% !important;
    }
    
    .driver-card[data-driver="luke"] img,
    .crew-card[data-crew="luke"] img {
        object-position: 71% 30% !important;
    }
    
    .driver-card[data-driver="manitha"] img,
    .crew-card[data-crew="manitha"] img {
        object-position: 54% 35% !important;
    }
    
    .driver-card[data-driver="nick"] img,
    .crew-card[data-crew="nick"] img {
        object-position: 93% 40% !important;
    }
    
    .driver-card[data-driver="patrick"] img,
    .crew-card[data-crew="patrick"] img {
        object-position: 59% 30% !important;
    }
    
    .driver-card[data-driver="paul joakim"] img,
    .crew-card[data-crew="paul joakim"] img {
        object-position: 45.2% 15.9% !important;
    }
    
    .driver-card[data-driver="amando widjaja"] img,
    .crew-card[data-crew="amando widjaja"] img {
        object-position: 47.3% 22.0% !important;
    }
    
    .driver-card[data-driver="vinh"] img,
    .crew-card[data-crew="vinh"] img {
        object-position: 61% 30% !important;
    }
}

/* Extra narrow screens (Samsung Fold, etc.) */
@media (max-width: 480px) {
    .driver-card[data-driver="adam"] img,
    .crew-card[data-crew="adam"] img {
        object-position: 64% 25% !important;
    }
    
    .driver-card[data-driver="jason"] img,
    .crew-card[data-crew="jason"] img {
        object-position: 63% 20% !important;
    }
    
    .driver-card[data-driver="joseph"] img,
    .crew-card[data-crew="joseph"] img {
        object-position: 44% 20% !important;
    }
    
    .driver-card[data-driver="luke"] img,
    .crew-card[data-crew="luke"] img {
        object-position: 71% 20% !important;
    }
    
    .driver-card[data-driver="manitha"] img,
    .crew-card[data-crew="manitha"] img {
        object-position: 54% 25% !important;
    }
    
    .driver-card[data-driver="nick"] img,
    .crew-card[data-crew="nick"] img {
        object-position: 93% 30% !important;
    }
    
    .driver-card[data-driver="patrick"] img,
    .crew-card[data-crew="patrick"] img {
        object-position: 59% 20% !important;
    }
    
    .driver-card[data-driver="paul"] img,
    .crew-card[data-crew="paul"] img {
        object-position: 57% 20% !important;
    }
    
    .driver-card[data-driver="vinh"] img,
    .crew-card[data-crew="vinh"] img {
        object-position: 61% 20% !important;
    }
}

/* Samsung Fold and ultra-narrow screens */
@media (max-width: 360px) {
    .driver-card[data-driver="adam"] img,
    .crew-card[data-crew="adam"] img {
        object-position: 64% 20% !important;
    }
    
    .driver-card[data-driver="jason"] img,
    .crew-card[data-crew="jason"] img {
        object-position: 63% 15% !important;
    }
    
    .driver-card[data-driver="joseph"] img,
    .crew-card[data-crew="joseph"] img {
        object-position: 44% 15% !important;
    }
    
    .driver-card[data-driver="luke"] img,
    .crew-card[data-crew="luke"] img {
        object-position: 71% 15% !important;
    }
    
    .driver-card[data-driver="manitha"] img,
    .crew-card[data-crew="manitha"] img {
        object-position: 54% 20% !important;
    }
    
    .driver-card[data-driver="nick"] img,
    .crew-card[data-crew="nick"] img {
        object-position: 93% 25% !important;
    }
    
    .driver-card[data-driver="patrick"] img,
    .crew-card[data-crew="patrick"] img {
        object-position: 59% 15% !important;
    }
    
    .driver-card[data-driver="paul"] img,
    .crew-card[data-crew="paul"] img {
        object-position: 57% 15% !important;
    }
    
    .driver-card[data-driver="vinh"] img,
    .crew-card[data-crew="vinh"] img {
        object-position: 61% 15% !important;
    }
}

/* iPad Mini and similar horizontal thin layouts */
@media (min-width: 768px) and (max-width: 1024px) {
    .driver-card[data-driver="vinh"] img,
    .crew-card[data-crew="vinh"] img {
        object-position: 61% 45% !important;
    }
    
    .driver-card[data-driver="patrick"] img,
    .crew-card[data-crew="patrick"] img {
        object-position: 59% 55% !important;
    }
    
    .driver-card[data-driver="jason"] img,
    .crew-card[data-crew="jason"] img {
        object-position: 63% 65% !important;
    }
    
    .driver-card[data-driver="paul"] img,
    .crew-card[data-crew="paul"] img {
        object-position: 57% 65% !important;
    }
    
    .driver-card[data-driver="joseph"] img,
    .crew-card[data-crew="joseph"] img {
        object-position: 44% 65% !important;
    }
    
    .driver-card[data-driver="luke"] img,
    .crew-card[data-crew="luke"] img {
        object-position: 71% 55% !important;
    }
}

/* Alternative: Target very specific iPad Mini dimensions */
@media (min-width: 768px) and (max-width: 820px) {
    .driver-card[data-driver="vinh"] img,
    .crew-card[data-crew="vinh"] img {
        object-position: 61% 45% !important;
    }
    
    .driver-card[data-driver="patrick"] img,
    .crew-card[data-crew="patrick"] img {
        object-position: 59% 55% !important;
    }
    
    .driver-card[data-driver="jason"] img,
    .crew-card[data-crew="jason"] img {
        object-position: 63% 65% !important;
    }
    
    .driver-card[data-driver="paul"] img,
    .crew-card[data-crew="paul"] img {
        object-position: 57% 65% !important;
    }
    
    .driver-card[data-driver="joseph"] img,
    .crew-card[data-crew="joseph"] img {
        object-position: 44% 65% !important;
    }
    
    .driver-card[data-driver="luke"] img,
    .crew-card[data-crew="luke"] img {
        object-position: 71% 55% !important;
    }
}

/* Season headers */
.season h3 {
    color: white;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: bold;
}

.season-year {
    color: white;
}

.season-position {
    font-weight: bold;
}

.season-position.gold {
    color: #FFD700; /* Gold for 1st */
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.season-position.silver {
    color: #C0C0C0; /* Silver for 2nd */
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.season-position.bronze {
    color: #CD7F32; /* Bronze for 3rd */
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}
