/* Base Design System - F1rstMotors Inspired */
:root {
    /* Radani Auto Dark Navy Backgrounds */
    --bg-primary: #0c131d;
    --bg-secondary: #070b12;
    --bg-card: #151e2b;

    /* Radani Auto Silver/White Text */
    --text-primary: #f0f4f8;
    --text-secondary: #a0aab2;
    --text-dark: #000000;

    /* Radani Auto Red Accent */
    --accent: #ff0b11;
    --accent-glow: rgba(255, 11, 17, 0.3);

    --transition-fast: 0.2s ease-in-out;
    --transition-smooth: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', 'Outfit', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Inter', 'Outfit', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.flex {
    display: flex;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.gap-4 {
    gap: 2rem;
}

.gap-6 {
    gap: 3rem;
}

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

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

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-base {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.text-4xl {
    font-size: 2.25rem;
}

.text-5xl {
    font-size: 3rem;
}

.text-6xl {
    font-size: 3.75rem;
}

.font-bold {
    font-weight: 700;
}

.font-light {
    font-weight: 300;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.my-8 {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Base button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-decoration: none;
}

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

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-primary:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-primary:hover {
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* =========================================
   COMPONENTS
   ========================================= */

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background: linear-gradient(to bottom, rgba(12, 19, 29, 0.8) 0%, rgba(12, 19, 29, 0) 100%);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    height: 70px;
    background: #f0f4f8;
    box-shadow: 0 2px 10px rgba(12, 19, 29, 0.2);
}

.navbar.scrolled .logo,
.navbar.scrolled .nav-link,
.navbar.scrolled .mobile-menu-btn {
    color: #0c131d;
}

.navbar.scrolled .btn-outline {
    color: #000000;
    border-color: #000000;
}

.navbar.scrolled .nav-link::after {
    background: var(--accent);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 3px;
    z-index: 1001;
    /* Keep logo above mobile menu overlay */
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.logo-img {
    height: 40px;
    /* Adjust this value based on the actual logo proportions */
    width: auto;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.navbar.scrolled .logo-img {
    filter: invert(1);
    /* If the logo is white text, invert it for the bright scrolled navbar */
}

.logo span {
    color: var(--accent);
    font-weight: 900;
}

.nav-links {
    height: 100%;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition-fast);
}

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

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {

    .nav-links,
    .nav-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    width: 100%;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    transform: scale(1.05);
    animation: slowZoom 25s infinite alternate ease-in-out;
}

@keyframes slowZoom {
    0% {
        transform: scale(1.0);
    }

    100% {
        transform: scale(1.1);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient fading from black at the bottom to transparent at the top */
    background: linear-gradient(to top,
            rgba(12, 19, 29, 0.95) 0%,
            rgba(12, 19, 29, 0.6) 30%,
            rgba(12, 19, 29, 0.1) 100%);
    z-index: -1;
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1;
}

.pb-20 {
    padding-bottom: 5rem;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 7rem);
    line-height: 0.9;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* =========================================
   INVENTORY SECTION
   ========================================= */

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

.tracking-widest {
    letter-spacing: 0.25em;
}

.border-b {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mr-2 {
    margin-right: 0.5rem;
}

.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.car-card {
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
    overflow: hidden;
}

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

.car-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.car-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

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

.car-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent);
    color: #fff;
    padding: 0.2rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

.car-info {
    padding: 1.5rem;
}

.car-brand {
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
}

.car-model {
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0;
    text-transform: none;
}

/* =========================================
   FOOTER & UTILITIES
   ========================================= */
.relative {
    position: relative;
}

.z-10 {
    z-index: 10;
}

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

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

.transition {
    transition: var(--transition-fast);
}

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

@media (max-width: 768px) {
    .car-grid {
        grid-template-columns: 1fr;
    }

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

    .flex-wrap {
        flex-wrap: wrap;
    }

    footer .flex {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
}