/* FAST COOL CARS 2026 - MASTER STYLESHEET
   A blend of speed, luxury, and modern dark-mode.
*/

:root {
    --bg-black: #050505;
    --surface-dark: #121212;
    --primary-red: #E63946;    /* "Brembo" Red */
    --accent-blue: #00B4D8;     /* "Electric" Blue */
    --text-primary: #F8F9FA;
    --text-muted: #ADB5BD;
    --border-color: #2D2D2D;
    --glass-effect: rgba(255, 255, 255, 0.05);
}

/* Base Body Styles */
body {
    background-color: var(--bg-black);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    line-height: 1.6;
}

/* Headlines with the "Speed" Font */
h1, h2, h3, .brand-font {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 900;
}

/* Interior Page Header */
.page-header {
    background: linear-gradient(180deg, var(--surface-dark) 0%, var(--bg-black) 100%);
    padding: 3rem 1rem;
    text-align: center;
    border-bottom: 2px solid var(--primary-red);
}

/* Responsive Image Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.gallery-item {
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
    transform: scale(1.03);
    border-color: var(--primary-red);
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.2);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* The Data Table (Modern replacement for old HTML tables) */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--surface-dark);
    border-radius: 8px;
    overflow: hidden;
}

.spec-table th {
    background: var(--primary-red);
    color: white;
    padding: 12px;
    text-align: left;
}

.spec-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

/* Navigation Menu */
.sub-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    background: var(--surface-dark);
    padding: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sub-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: 4px;
}

.sub-nav a:hover {
    background: var(--glass-effect);
    color: var(--primary-red);
}

/* --- Navigation & Hamburger Logic --- */

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: #000;
    border-bottom: 2px solid var(--primary-red);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Hide the actual checkbox */
#menu-toggle {
    display: none;
}

/* Desktop Links */
.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--primary-red);
}

/* Mobile Hamburger Icon (Hidden on Desktop) */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    transition: 0.3s;
}

/* --- Responsive Breakpoint (Mobile) --- */

@media (max-width: 768px) {
    .hamburger {
        display: flex; /* Show hamburger on mobile */
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        align-items: center;
        padding: 0;
        max-height: 0; /* Hidden by default */
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
    }

    .nav-links a {
        padding: 20px;
        width: 100%;
        text-align: center;
        margin: 0;
        border-bottom: 1px solid #222;
    }

    /* The "Magic": When checkbox is checked, show the menu */
    #menu-toggle:checked ~ .nav-links {
        max-height: 500px; /* Adjust based on number of links */
    }

    /* Animate Hamburger into an 'X' when open */
    #menu-toggle:checked ~ .hamburger span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    #menu-toggle:checked ~ .hamburger span:nth-child(2) {
        opacity: 0;
    }
    #menu-toggle:checked ~ .hamburger span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}