/* ==========================================================================
   Motors Web Application - Light Muted Pastel Green Theme
   Palette: Muted Sage Green (#3a6b4c), Soft Pastel Green (#f3f7f4), Crisp White (#ffffff), Forest Slate (#1e2923)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
    --bg-main: #f3f7f4;               /* Light soft pastel sage background */
    --bg-card: #ffffff;               /* Crisp white cards */
    --bg-card-hover: #ffffff;
    --bg-darker: #e5ece7;             /* Soft pastel green section background */
    --text-main: #1e2923;             /* High contrast readable forest dark text */
    --text-muted: #5a6e62;           /* Muted green-gray text */
    
    /* Muted Opaque Pastel Green Theme Palette */
    --primary: #3a6b4c;               /* Muted Pastel Sage Green */
    --primary-hover: #2d543b;
    --accent: #588b6a;                /* Soft Pastel Mint Green */
    --accent-hover: #457053;
    --gold: #d97706;                  /* Warm rating gold */
    --border-color: #d4e0d8;          /* Light pastel green border */
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(58, 107, 76, 0.2);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 12px rgba(30, 41, 35, 0.05);
    --shadow-md: 0 10px 30px rgba(30, 41, 35, 0.08);
    --shadow-glow: 0 8px 25px rgba(58, 107, 76, 0.25);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Container & Grid --- */
.container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 40px;
}

.text-gradient {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    font-weight: 800;
}

/* --- Header & Topbar --- */
.topbar {
    background-color: #181520;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    padding: 10px 0;
    color: #ffffff;
}

.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-info {
    display: flex;
    gap: 24px;
}

.topbar-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-info i {
    color: #88bd9a;
}

.topbar-social {
    display: flex;
    gap: 16px;
}

.topbar-social a:hover {
    color: #88bd9a;
}

.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.main-header.scrolled {
    padding: 4px 0;
    box-shadow: var(--shadow-md);
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.logo i {
    color: var(--primary);
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px -5px rgba(58, 107, 76, 0.45);
    background: var(--primary-hover);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #ffffff;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px -5px rgba(88, 139, 106, 0.45);
}

.btn-outline {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f0f6f2;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

/* --- Hero Section --- */
.hero-slider {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 50% 30%, rgba(58, 107, 76, 0.12), transparent 70%);
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    transform: scale(1.05);
    display: flex;
    align-items: center;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7) contrast(1.05);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(30,41,35,0.4) 0%, rgba(30,41,35,0.85) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 750px;
    padding-top: 40px;
    color: #ffffff;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 16px;
    border-radius: 50px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 20px;
    line-height: 1.1;
    color: #ffffff;
}

.hero-desc {
    font-size: 1.2rem;
    color: #e5ece7;
    margin-bottom: 32px;
}

.hero-specs-bar {
    display: flex;
    gap: 24px;
    margin-bottom: 36px;
    background: rgba(255, 255, 255, 0.92);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.hero-spec-item {
    display: flex;
    flex-direction: column;
}

.hero-spec-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hero-spec-value {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Slider Nav Arrows */
.slider-nav {
    position: absolute;
    bottom: 40px;
    right: 5%;
    z-index: 10;
    display: flex;
    gap: 12px;
}

.slider-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.slider-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

/* --- Quick Search Bar --- */
.quick-search-section {
    position: relative;
    z-index: 20;
    margin-top: -60px;
    margin-bottom: 80px;
}

.quick-search-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-md);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) 160px;
    gap: 20px;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control, .form-select {
    width: 100%;
    padding: 12px 16px;
    background: #f8faf8;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(58, 107, 76, 0.2);
}

/* --- Vehicle Cards & Grid --- */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 30px;
}

.vehicle-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.vehicle-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.vehicle-thumb {
    position: relative;
    height: 230px;
    overflow: hidden;
}

.vehicle-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.vehicle-card:hover .vehicle-thumb img {
    transform: scale(1.08);
}

.card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}

.price-tag {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.vehicle-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.vehicle-meta {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.vehicle-title {
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: var(--text-main);
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.spec-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.spec-box i {
    color: var(--primary);
    font-size: 1rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

/* --- Services / Features Section --- */
.services-section {
    padding: 100px 0;
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 36px 28px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.service-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    background: rgba(58, 107, 76, 0.12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 24px;
}

/* --- Loan Calculator --- */
.calculator-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    box-shadow: var(--shadow-md);
}

.calc-result-box {
    background: linear-gradient(135deg, rgba(58, 107, 76, 0.08) 0%, #f3f7f4 100%);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.calc-amount {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 12px 0;
}

/* Range Inputs */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 5px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(58, 107, 76, 0.5);
}

/* --- Footer --- */
.footer {
    background: #181520;
    color: #ffffff;
    padding-top: 80px;
    padding-bottom: 40px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-about p {
    color: #a8b8ad;
    margin: 20px 0;
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 1.1rem;
    margin-bottom: 24px;
    color: #ffffff;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #a8b8ad;
}

.footer-links a:hover {
    color: #88bd9a;
    padding-left: 6px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #a8b8ad;
    font-size: 0.9rem;
}

/* --- Modals & Overlays --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 41, 35, 0.7);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 550px;
    padding: 36px;
    position: relative;
    transform: scale(0.9);
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .header-wrapper { height: 70px; }
    .nav-menu { display: none; }
    .hero-title { font-size: 2.8rem; }
    .calculator-card { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .hero-title { font-size: 2.2rem; }
    .filter-grid { grid-template-columns: 1fr; }
    .vehicle-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}
