/* css/style.css */

:root {
    --bg-dark: #0b0f19;
    --bg-card: #151b2b;
    --primary: #593cfb;
    --accent: #38bdf8;
    --text-white: #ffffff;
    --text-muted: #94a3b8;
    --gold: #fbbf24;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* --- Navigation --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--text-white);
    letter-spacing: -1px;
    text-shadow: 0 0 20px rgba(89, 60, 251, 0.5);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
}

/* --- Hero Section (FIXED) --- */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    background: url('https://images.unsplash.com/photo-1493238792015-8098a281a05da?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') center/cover no-repeat;
    padding: 100px 20px;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(11, 15, 25, 0.7) 0%, rgba(11, 15, 25, 1) 100%);
    z-index: 1;
}

/* !!! THIS IS THE FIX !!! */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
    /* These 3 lines force vertical stacking */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.host-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(89, 60, 251, 0.2);
    border: 1px solid var(--primary);
    padding: 8px 16px;
    border-radius: 30px;
    color: #a5b4fc;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 800;
}

.text-gradient {
    background: linear-gradient(90deg, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 40px;
}

/* Stats Row */
.hero-stats-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px 40px;
    border-radius: 20px;
    /* Margin bottom pushes the button down */
    margin-bottom: 40px;
}

.h-stat {
    text-align: center;
}

.h-stat .num {
    font-weight: 800;
    font-size: 1.5rem;
    display: block;
    color: white;
}

.h-stat .lbl {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.h-stat-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
}

.text-gold {
    color: var(--gold);
}

/* Main Button */
.primary-btn {
    background-color: var(--primary);
    color: white;
    padding: 16px 50px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: 0.3s;
    box-shadow: 0 10px 30px rgba(89, 60, 251, 0.4);
    /* Ensures it doesn't get squashed */
    display: inline-block;
    min-width: 200px;
    text-align: center;
}

.primary-btn:hover {
    background-color: #4338ca;
    transform: translateY(-3px);
}

/* --- Fleet Section --- */
.fleet-section {
    padding: 60px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-muted);
}

/* Grid: 4 Columns Desktop */
.car-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* Car Cards */
.car-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.car-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.car-card:hover .card-image img {
    transform: scale(1.1);
}

.tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.tag.electric {
    background: var(--accent);
    color: #000;
}

.card-details {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-top {
    margin-bottom: 15px;
}

.card-top h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.3;
}

.rating-badge {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.rating-badge i {
    color: var(--primary);
    margin-left: 2px;
}

.rating-badge .trips {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85rem;
}

.features-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    margin-top: auto;
}

.features-list span {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 10px;
    border-radius: 6px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.arrow-icon {
    background: rgba(89, 60, 251, 0.1);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.car-card:hover .arrow-icon {
    background: var(--primary);
    color: white;
}

footer {
    text-align: center;
    padding: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-white);
}

.sub-footer {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 5px;
}


/* ------------------------------------------- */
/* --- RESPONSIVE FIXES --- */
/* ------------------------------------------- */

/* Tablet: 2 Columns */
@media (max-width: 1200px) {
    .hero h1 {
        font-size: 3rem;
    }

    .car-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 1 Column & Better Spacing */
@media (max-width: 768px) {
    .hero {
        padding: 80px 20px;
    }

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

    /* Stats Box Mobile Fix */
    .hero-stats-row {
        flex-wrap: wrap;
        width: 100%;
        padding: 20px;
        gap: 20px;
        justify-content: space-around;
        /* distribute items evenly */
    }

    .h-stat-divider {
        display: none;
    }

    /* Hide lines on mobile */

    /* Ensure Button has space */
    .primary-btn {
        width: 100%;
        /* Full width button on mobile looks better */
        max-width: 300px;
    }

    /* Fleet */
    .car-grid {
        grid-template-columns: 1fr;
    }
}