/* Tesla Official Design Inspired Styles */
:root {
    --tesla-black: #171a20;
    --tesla-white: #ffffff;
    --tesla-gray: #393c41;
    --tesla-light-gray: #f4f4f4;
    --tesla-blue: #3866f4;
    --tesla-text-secondary: #5c5e62;
    --tesla-border: #e8e8e8;
}

/* Typography - Tesla Style */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--tesla-gray);
    background-color: var(--tesla-white);
    padding-top: 80px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    letter-spacing: -0.5px;
    color: var(--tesla-black);
}

.display-1, .display-2 {
    font-weight: 300;
    letter-spacing: -2px;
}

/* Tesla Button Styles */
.btn-tesla-primary {
    background-color: var(--tesla-black);
    border: 2px solid var(--tesla-black);
    color: white;
    padding: 12px 32px;
    border-radius: 6px;
    font-weight: 500;
    text-transform: none;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.btn-tesla-primary:hover {
    background-color: var(--tesla-gray);
    border-color: var(--tesla-gray);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-tesla-secondary {
    background-color: transparent;
    border: 2px solid var(--tesla-black);
    color: var(--tesla-black);
    padding: 12px 32px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.btn-tesla-secondary:hover {
    background-color: var(--tesla-black);
    border-color: var(--tesla-black);
    color: white;
    transform: translateY(-1px);
}

.btn-tesla-blue {
    background-color: var(--tesla-blue);
    border: 2px solid var(--tesla-blue);
    color: white;
    padding: 12px 32px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.btn-tesla-blue:hover {
    background-color: #2952d1;
    border-color: #2952d1;
    color: white;
    transform: translateY(-1px);
}

/* Navbar - Tesla Style */
.navbar {
    background-color: rgba(23, 26, 32, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 500;
    color: white !important;
    letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.8) !important;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: white !important;
}

/* Navbar Toggler - Hamburger Menu */
.navbar-toggler {
    border: none;
    padding: 4px 8px;
    color: white;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile Navigation */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--tesla-black);
        margin-top: 1rem;
        padding: 1rem;
        border-radius: 8px;
        border: 1px solid rgba(255,255,255,0.1);
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* Hero Section - Tesla Style */
.hero-section {
    height: 100vh;
    position: relative;
    overflow: hidden;
    margin-top: -80px;
}

.hero-swiper {
    width: 100%;
    height: 100%;
}

.hero-slide {
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-content {
    max-width: 600px;
    text-align: center;
    color: white;
    padding: 2rem;
    z-index: 10;
    position: relative;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
    letter-spacing: -1px;
    color: white !important;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
    line-height: 1.6;
    color: rgba(255,255,255,0.95) !important;
}

/* Sections - Tesla Spacing */
.section {
    padding: 5rem 0;
}

.section-lg {
    padding: 7.5rem 0;
}

.section-light {
    background-color: var(--tesla-light-gray);
}

/* Car Cards - Tesla Style */
.car-card {
    background: white;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    height: 100%;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    will-change: transform, box-shadow;
}

.car-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    z-index: 100;
}

.car-image {
    height: 280px;
    object-fit: cover;
    object-position: center;
    width: 100%;
    border-radius: 12px 12px 0 0;
}

.car-card .card-body {
    padding: 2rem;
}

.car-card .card-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--tesla-black);
    height: 1.8rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.car-card .card-text {
    color: var(--tesla-text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    height: 3.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 1rem;
}

/* Pricing Table - Tesla Style */
.pricing-table {
    background-color: var(--tesla-light-gray);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.pricing-table .price-row {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--tesla-border);
}

.pricing-table .price-row:last-child {
    border-bottom: none;
}

.pricing-table .price-label {
    font-weight: 500;
    color: var(--tesla-gray);
    font-size: 0.9rem;
}

.pricing-table .price-value {
    font-weight: 600;
    color: var(--tesla-black);
    font-size: 1.1rem;
}

/* Features List - Tesla Style */
.car-features {
    height: 4rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.features-list li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--tesla-text-secondary);
    display: flex;
    align-items: center;
}

.features-list li i {
    margin-right: 0.75rem;
    font-size: 1rem;
}

/* Status Badges - Tesla Style */
.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-available {
    background-color: #4caf50;
    color: white;
}

.status-rented {
    background-color: #f44336;
    color: white;
}

.status-maintenance {
    background-color: #ff9800;
    color: white;
}

/* Page Headers - Tesla Style */
.page-hero {
    background: linear-gradient(135deg, var(--tesla-black) 0%, var(--tesla-gray) 100%);
    color: white;
    padding: 6rem 0 4rem;
    text-align: center;
    position: relative;
}

.page-hero.has-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 8rem 0 6rem;
}

.page-hero.has-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.4));
    z-index: 1;
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.page-hero h1 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.page-hero .lead {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.95;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

/* Forms - Tesla Style */
.form-control {
    border: 2px solid var(--tesla-border);
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--tesla-blue);
    box-shadow: 0 0 0 0.2rem rgba(56, 102, 244, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--tesla-gray);
    margin-bottom: 0.5rem;
}

/* Cards - Tesla Style */
.card {
    border: 1px solid var(--tesla-border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card-header {
    background-color: var(--tesla-light-gray);
    border-bottom: 1px solid var(--tesla-border);
    font-weight: 500;
    padding: 1.5rem;
}

.card-body {
    padding: 2rem;
}

/* Alerts - Tesla Style */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background-color: #e8f5e8;
    color: #2e7d32;
}

.alert-danger {
    background-color: #ffebee;
    color: #c62828;
}

.alert-info {
    background-color: #e3f2fd;
    color: #1565c0;
}

/* Footer - Tesla Style */
.footer {
    background-color: var(--tesla-black);
    color: rgba(255,255,255,0.8);
    padding: 3rem 0 2rem;
}

.footer h5 {
    color: white;
    font-weight: 500;
    margin-bottom: 1rem;
}

.footer a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: white;
}

/* Grid Container Fixes */
.cars-section .container,
.featured-cars .container {
    overflow: visible;
    padding: 0 2rem;
}

.row.g-4 {
    row-gap: 3rem;
    margin-bottom: 3rem;
}

/* Ensure proper spacing between cards */
.col-lg-6.col-xl-4,
.col-lg-6.col-xl-3.col-md-6 {
    padding-bottom: 2rem;
    position: relative;
    display: flex;
    align-items: stretch;
}

/* Make sure cards stretch to full height */
.col-lg-6.col-xl-4 .car-card,
.col-lg-6.col-xl-3.col-md-6 .car-card {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        height: 70vh;
        margin-top: -60px;
    }
    
    .hero-slide {
        height: 70vh;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
        color: white !important;
        text-shadow: 0 3px 15px rgba(0,0,0,0.8);
    }
    
    .hero-content p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        color: rgba(255,255,255,0.95) !important;
        text-shadow: 0 2px 10px rgba(0,0,0,0.6);
    }
    
    .hero-content {
        padding: 1.5rem;
    }
    
    .page-hero h1 {
        font-size: 2.5rem;
    }
    
    .page-hero.has-bg {
        padding: 6rem 0 4rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-lg {
        padding: 4rem 0;
    }
    
    .car-card .card-body {
        padding: 1.5rem;
    }
    
    .car-image {
        height: 220px;
    }
    
    .car-card {
        margin-bottom: 1rem;
    }
    
    .row.g-4 {
        row-gap: 2rem;
        margin-bottom: 2rem;
    }
    
    .cars-section .container,
    .featured-cars .container {
        padding: 0 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        height: 60vh;
        margin-top: -60px;
    }
    
    .hero-slide {
        height: 60vh;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.1;
        color: white !important;
        text-shadow: 0 3px 15px rgba(0,0,0,0.8);
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        color: rgba(255,255,255,0.95) !important;
        text-shadow: 0 2px 10px rgba(0,0,0,0.6);
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .page-hero h1 {
        font-size: 2rem;
    }
    
    .page-hero.has-bg {
        padding: 4rem 0 3rem;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
}

/* Swiper Pagination - Tesla Style */
.swiper-pagination {
    bottom: 30px !important;
    z-index: 10;
}

.swiper-pagination-bullet {
    background: rgba(255,255,255,0.6);
    opacity: 1;
    width: 12px;
    height: 12px;
    margin: 0 8px !important;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: white;
    transform: scale(1.2);
}

.swiper-button-next,
.swiper-button-prev {
    color: rgba(255,255,255,0.8);
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
    margin-top: -25px;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    color: white;
    background: rgba(0,0,0,0.4);
    transform: scale(1.1);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px;
    font-weight: 600;
}

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

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

/* Utility classes */
.text-tesla-gray {
    color: var(--tesla-gray) !important;
}

.text-tesla-black {
    color: var(--tesla-black) !important;
}

.bg-tesla-light {
    background-color: var(--tesla-light-gray) !important;
}

.border-tesla {
    border-color: var(--tesla-border) !important;
}