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

:root {
    --primary: #1a2e35;
    --secondary: #f39c12;
    --accent: #2c3e50;
    --light: #ecf0f1;
    --dark: #15272a;
    --text: #333;
    --text-light: #f8f9fa;
    --transition: all 0.3s ease;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background-color: #f8f9fa;
    line-height: 1.6;
}

/* ===== MODERN NAVBAR ===== */
nav {
    display: flex;
    flex-wrap: wrap;
    background: var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navitems a{
    text-decoration: none;
}

.top-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    background: var(--dark);
    font-size: 14px;
}

.contact {
    display: flex;
    gap: 25px;
}

.contact p a{
    text-decoration: none;
    color: white;
}

.contact a,
.contact a:visited,
.contact a:hover,
.contact a:focus {
    text-decoration: none;
}


.contact p {
    margin: 0;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.contact p strong {
    color: var(--secondary);
}

.socials {
    display: flex;
    gap: 15px;
}

.socials i {
    color: var(--light);
    font-size: 16px;
    transition: var(--transition);
    cursor: pointer;
}

.socials i:hover {
    color: var(--secondary);
    transform: translateY(-2px);
}

.main-nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.logo img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--secondary);
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.05);
}

.logo h1 {
    font-size: 24px;
    color: var(--light);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.logo span {
    color: var(--secondary);
}

.navitems {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: flex-end; /* Push items to right */
}

.navitems h3 {
    color: var(--light);
    font-weight: 500;
    position: relative;
    cursor: pointer;
    padding: 8px 0;
    transition: var(--transition);
}

.navitems h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

.navitems h3:hover:after {
    width: 100%;
}

.navitems h3:hover {
    color: var(--secondary);
}

.navitems button {
    background: var(--secondary);
    border: none;
    border-radius: 30px;
    padding: 12px 28px;
    color: var(--dark);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 8px rgba(243, 156, 18, 0.3);
}

.navitems button:hover {
    background: #e67e22;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(243, 156, 18, 0.4);
}

.navitems button h3 {
    color: var(--dark);
    margin: 0;
    padding: 0;
}

.navitems button h3:after {
    display: none;
}

.sidebar{
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 250px;
    z-index: 999;
    background-color: #1a2e3568;
    backdrop-filter: blur(10px);
    box-shadow: -10px 0 10px rgba(0, 0, 0, 0.1);
    /* 1. Always keep it in the flow: */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    /* 2. Hide it off-screen initially: */
    transform: translateX(100%);
    transition: transform 0.3s ease; /* animate the slide */
    pointer-events: none; 
}

.sidebar a{
    width: 100%;
}

.sidebar .main-nav{
    flex: 1;
}

.sidebar .bottom-bar{
    align-items: flex-start;
    justify-content: flex-start;
}

.sidebar-menu{
    display: none;
}

.sidebar.active {
    transform: translateX(0);
    pointer-events: auto;
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    height: 81vh;
    background: linear-gradient(rgba(26, 46, 53, 0.85), rgba(26, 46, 53, 0.9)), 
                url('https://images.unsplash.com/photo-1503376780353-7e6692767b70?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1740&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: var(--light);
    padding: 0 40px;
    overflow: hidden;
    background-repeat: no-repeat;
}

.hero-content {
    max-width: 650px;
    animation: fadeInUp 1s ease;
}

.hero h2 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero h2 span {
    color: var(--secondary);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.btn {
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
    font-size: 1rem;
}

.btn-primary {
    background: var(--secondary);
    color: var(--dark);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

.btn-primary:hover {
    background: #e67e22;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--light);
    border: 2px solid var(--light);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* ===== SERVICES SECTION ===== */
.services {
    padding: 100px 40px;
    background: var(--light);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--accent);
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.service-img {
    height: 200px;
    overflow: hidden;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-card:hover .service-img img {
    transform: scale(1.05);
}

.service-content {
    padding: 25px;
}

.service-content h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-content p {
    color: var(--text);
    margin-bottom: 20px;
}

.learn-more {
    display: inline-flex;
    align-items: center;
    color: var(--secondary);
    font-weight: 600;
    text-decoration: none;
    gap: 8px;
    transition: var(--transition);
}

.learn-more:hover {
    gap: 12px;
    color: #e67e22;
}

/* ===== BRANDS SECTION ===== */
.brands {
    padding: 100px 40px;
    background: white;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.brand-card {
    background: var(--light);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.brand-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
}

.brand-logo {
    height: 80px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-card h3 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.brand-card p {
    color: var(--accent);
    font-size: 0.95rem;
}

/* ===== CLEARING SECTION ===== */
.clearing {
    padding: 100px 40px;
    background: linear-gradient(rgba(26, 46, 53, 0.9), rgba(26, 46, 53, 0.9)), 
                url('https://images.unsplash.com/photo-1563720223880-1a5c4e1f1e8f?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1740&q=80');
    background-size: cover;
    background-position: center;
    color: var(--light);
}

.clearing-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 50px;
    align-items: center;
}

.clearing-text {
    flex: 1;
}

.clearing-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.clearing-text h2 span {
    color: var(--secondary);
}

.clearing-text p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    opacity: 0.9;
}

.clearing-steps {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.clearing-step {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--secondary);
}

.clearing-step h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.clearing-step h3 i {
    color: var(--secondary);
}

/* Enhanced vehicle card styling */
.vehicle-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.vehicle-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.vehicle-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.vehicle-card:hover .vehicle-image img {
    transform: scale(1.05);
}

.vehicle-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary);
    color: var(--dark);
    padding: 6px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.vehicle-content {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
    /* Ensures consistent spacing */
    justify-content: space-between;
}

.vehicle-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.vehicle-title {
    font-size: 1.45rem;
    color: var(--primary);
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    flex: 1;
}

.vehicle-price {
    color: var(--secondary);
    font-weight: 700;
    font-size: 1.3rem;
    margin-left: 15px;
    white-space: nowrap;
}

/* Fixed height for description */
.vehicle-description {
    min-height: 6.5em; /* Exactly 4 lines at 1.3em line-height */
    line-height: 1.3em;
    margin-bottom: 18px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Always show exactly 4 lines */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    color: var(--accent);
    font-size: 0.95rem;
    position: relative;
}

/* Horizontal alignment for details */
.vehicle-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: rgba(241, 241, 241, 0.5);
    padding: 14px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

.detail-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
}

/* Features styling */
.vehicle-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 15px 0;
}

.feature-badge {
    background: rgba(243, 156, 18, 0.1);
    color: var(--secondary);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.vehicle-actions {
    display: flex;
    justify-content: center;
}

.vehicle-actions .btn {
    width: 100%;
    max-width: 200px;
}

/* Grid auto-rows for consistent card heights */
.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    max-width: 1200px;
    margin: 0 auto;
    grid-auto-rows: 1fr; /* Ensures all cards have same height */
}

/* Ensure all cards have same height */
.vehicle-card {
    height: 100%;
}

.featured-vehicles{
    margin-top: 30px;
}

.feature-badge {
    background: rgba(243, 156, 18, 0.1);
    color: var(--secondary);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===== FOOTER ===== */
footer {
    margin-top: 20px;
    background: var(--primary);
    color: var(--light);
    padding: 60px 40px 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.footer-column h3 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--secondary);
}

.footer-column p {
    opacity: 0.8;
    margin-bottom: 20px;
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--light);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links a:hover {
    color: var(--secondary);
    transform: translateX(5px);
}

.footer-links i {
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .hideOnMobile{ 
        display: none; 
    }

    .bottom-bar .contact p{
        font-size: 11px;
    }

    .bottom-bar .contact{
        padding: 10px;
    }

    .grid{
        display: grid;
        grid-template-columns: 1fr auto;
        column-gap: 1rem;               /* optional spacing */
        align-items: center; 
        width: 100%;
    }

    .grid-logo{
        
        grid-row: 1;
        grid-column: 1;
    }

    .grid-menu{
        grid-row: 1;
        grid-column: 2;
        justify-self: end; 
    }

    .sidebar{
        height: 100vh;
    }

    .sidebar-menu{
        display: inline-block;
    }

    .top-bar {
        flex-direction: column;
        gap: 10px;
        padding: 15px 20px;
    }
    
    .contact {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .main-nav {
        flex-direction: column;
        padding: 20px;
    }
    
    .navitems {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero{
        height: 60vh;
    }

    .hero h2 {
        font-size: 2.8rem;
    }

    .hero p{
        font-size: 1.1rem;
    }
    
    .navitems {
        gap: 20px;
    }
    
    .clearing-content {
        flex-direction: column;
    }
    
    .clearing-steps {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .hideOnMobile{ 
        display: none; 
    }

    .sidebar-menu{
        display: flex;
    }

    .top-bar {
        flex-direction: column;
        gap: 10px;
        padding: 15px 20px;
    }
    
    .contact {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .main-nav {
        flex-direction: column;
    }
    
    .navitems {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero {
        padding: 0 20px;
        text-align: center;
    }
    
    .hero-content {
        margin: 0 auto;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero h2 {
        font-size: 2.3rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .clearing-steps {
        grid-template-columns: 1fr;
    }
    
    .vehicles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .vehicle-details {
        grid-template-columns: repeat(3, 1fr);
    }
}