/* --- Variables --- */
:root {
    --primary-color: #D32F2F; /* Red */
    --primary-hover: #B71C1C;
    --dark-bg: #121212;
    --card-bg: #1E1E1E;
    --text-color: #E0E0E0;
    --text-muted: #A0A0A0;
    --white: #FFFFFF;
    --nav-height: 80px;
}

/* --- Global Reset & Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden; /* Fixes side-scrolling on mobile */
    width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    /* Pushes content down so it's not hidden behind the fixed navbar */
    padding-top: var(--nav-height); 
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Navigation (Fixed) --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--nav-height);
    background-color: rgba(18, 18, 18, 0.95);
    padding: 0 5%;
    
    /* FIXED POSITION SETTINGS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Ensures nav stays on top of everything */
    
    border-bottom: 2px solid var(--primary-color);
}

.logo a {
    display: flex;
    align-items: center;
}

/* --- LOGO SIZE --- */
.nav-logo {
    max-height: 100px;
    width: auto;      
}

.nav-links {
    display: flex;
    gap: 30px;
    font-size: 18px;
}

.nav-links li a {
    color: var(--white);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--primary-color);
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 5px;
    transition: all 0.3s ease;
}

/* --- Hero Section --- */
.hero {
    /* Ensure images/car.jpg exists */
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/car.jpg');
    background-size: cover;
    background-position: center;
    padding: 4rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 2rem;
}

.hero-content {
    flex: 1;
    text-align: left;
}

.hero-image {
    flex: 1;
}

.hero-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

/* --- Buttons --- */
.cta-button {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    display: inline-block;
}

.cta-button:hover {
    background-color: var(--primary-hover);
}

/* --- Common Section Styles --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 20px;
    text-align: center;
}

h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.narrow-text {
    max-width: 70%;
    margin: 0 auto;
    line-height: 1.6;
}

.page-header {
    background-color: var(--card-bg);
    padding: 40px 20px;
    text-align: center;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-header h1 {
    color: var(--primary-color);
    margin-top: 13px;
    margin-bottom: auto;
}

/* --- Gallery Styles --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.car-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.car-card:hover {
    transform: translateY(-5px);
}

.car-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.car-image-placeholder {
    width: 100%;
    height: 200px;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.car-info {
    padding: 20px;
}

.car-info h3 {
    margin-bottom: 10px;
    color: var(--white);
}

.car-info .price {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 5px;
}

/* --- Contact Styles --- */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    text-align: left;
    padding-right: 20px;
}

.contact-info h2 {
    text-align: left;
    color: var(--white);
    margin-bottom: 1rem;
}

.info-item {
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.info-item h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Clickable Contact Links */
.contact-link, 
.footer-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-link:hover,
.footer-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: #2b2b2b;
    border: 1px solid #444;
    color: var(--white);
    border-radius: 4px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Success Message Styling */
.success-message {
    background-color: #4CAF50;
    color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #45a049;
    margin-bottom: 20px;
}

.success-message h3 {
    color: white;
    margin-bottom: 10px;
}

.success-message button {
    background-color: white;
    color: #4CAF50;
    border: none;
    padding: 10px 20px;
    margin-top: 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.success-message button:hover {
    background-color: #f1f1f1;
}

/* Utility Class */
.hidden {
    display: none !important;
}

/* --- Footer --- */
footer {
    background-color: #000;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    border-top: 1px solid #333;
    color: var(--text-muted);
}

footer p {
    margin: 5px 0;
}

/* --- Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1000;
    border: 1px solid var(--primary-color);
    width: 90%;
    max-width: 600px;
}

.cookie-banner.hidden {
    display: none;
}

.cookie-banner button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    white-space: nowrap;
}

/* --- MOBILE RESPONSIVENESS --- */
@media screen and (max-width: 768px) {
    
    /* Navigation Mobile */
    .nav-links {
        position: fixed;
        right: 0px;
        
        /* UPDATED: Starts below the nav and takes remaining height */
        height: calc(100vh - var(--nav-height));
        top: var(--nav-height);
        
        background-color: var(--card-bg);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        padding-top: 50px;
        border-left: 1px solid #333;
        z-index: 99;
    }

    .nav-links li {
        opacity: 0;
    }

    .burger {
        display: block;
    }

    .nav-active {
        transform: translateX(0%);
    }

    /* Page Headers (Fix for Overlap & Centering) */
    .page-header {
        position: relative; 
        height: auto;
        padding: 40px 20px;
        margin-bottom: 2rem;
        display: block;
    }

    /* Hero Mobile */
    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }

    /* Contact Mobile */
    .contact-section {
        grid-template-columns: 1fr;
    }

    .contact-info {
        text-align: center;
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    .contact-info h2 {
        text-align: center;
    }

    /* About Us Text Mobile */
    .narrow-text {
        max-width: 100%;
    }
}

/* --- Animations --- */
@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0px);
    }
}

.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}
.toggle .line2 {
    opacity: 0;
}
.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}