:root {
  --primary: #2196f3;
  --secondary: #ffd600;
  --accent: #ff9800;
  --bg: #f5f7fa;
  --surface: #fff;
  --text: #1a2233;
  --muted: #7b8a99;
  --shadow: 0 4px 24px rgba(33, 150, 243, 0.10);
  --radius-lg: 1.2em;
  --radius-md: 0.7em;
  --radius-sm: 0.4em;
  --transition: 0.25s cubic-bezier(.4,0,.2,1);
  --font-main: 'Inter', 'Segoe UI', Arial, sans-serif;
  --font-title: 'Montserrat', 'Segoe UI', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #64b5f6;
    --secondary: #ffe082;
    --accent: #ffb74d;
    --bg: #121a24;
    --surface: #1a2233;
    --text: #f5f7fa;
    --muted: #b0bec5;
    --shadow: 0 4px 24px rgba(33, 150, 243, 0.18);
  }
}

/* Accessibility: Focus states */
:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* Base styles */
html {
  box-sizing: border-box;
  font-size: 16px;
  scroll-behavior: smooth;
}
*, *::before, *::after { box-sizing: inherit; }

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  line-height: 1.7;
  letter-spacing: 0.01em;
  transition: background var(--transition), color var(--transition);
}

/* Container */
.container {
  width: min(96%, 1200px);
  margin-inline: auto;
  padding: 2rem 0;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  color: var(--primary);
  padding: 1.2em 2em;
  box-shadow: var(--shadow);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  min-height: 64px;
  transition: background var(--transition), box-shadow var(--transition);
  position: relative;
  z-index: 10;
}

.logo {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.5em, 2.5vw, 2.2em);
  letter-spacing: 0.08em;
  color: var(--primary);
  user-select: none;
  min-width: 120px;
}

nav {
  position: relative;
}

.menu {
  display: flex;
  gap: 1.5em;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  transition: max-height 0.3s;
}

.menu li a {
  text-decoration: none;
  color: var(--primary);
  padding: 0.6em 1.4em;
  border-radius: var(--radius-md);
  font-size: 1em;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: transparent;
  border: none;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  position: relative;
  display: block;
}
.menu li a:hover, .menu li a:focus-visible {
  background: var(--accent);
  color: var(--surface);
  box-shadow: 0 2px 8px rgba(255,152,0,0.10);
}

/* Hamburger menu for mobile */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2em;
  cursor: pointer;
  color: var(--primary);
  padding: 0.3em;
  margin-left: 1em;
  transition: color var(--transition);
}

/* Responsive Navigation */
@media (max-width: 700px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.7em 0.3em;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    min-height: unset;
  }
  .logo { font-size: clamp(1em, 5vw, 1.3em); margin-bottom: 0.5em; }
  nav {
    width: 100%;
  }
/* Mobile menu default state */
.menu {
  display: none; /* Hidden by default */
  flex-direction: column;
  align-items: stretch;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  box-shadow: 0 1px 6px rgba(33, 150, 243, 0.06);
  z-index: 100;
  padding: 0.8em 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0; /* Hidden visually */
}

/* Mobile menu when open */
.menu.open {
  display: flex; /* Make it visible */
  max-height: 500px; /* Allow it to expand */
  overflow: visible;
  opacity: 1; /* Fully visible */
}
  .menu li a {
    color: var(--primary);
    background: none;
    padding: 1.2em 1.5em;
    font-size: 1.1em;
    border-radius: var(--radius-md);
    width: 100%;
    text-align: left;
  }
  .menu-toggle { display: block; }
}

/* Ensure menu is always visible on desktop */
@media (min-width: 701px) {
  .menu {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: none;
    box-shadow: none;
    max-height: none;
    overflow: visible;
    padding: 0;
  }
}

/* Hero Section */
.hero {
  background: linear-gradient(120deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--surface);
  padding: clamp(3rem, 10vw, 6rem) 1.5rem 2.5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: fadeIn 1s;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://www.transparenttextures.com/patterns/cubes.png');
  opacity: 0.08;
  pointer-events: none;
}
.hero-inner h1 {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
  font-family: var(--font-title);
  animation: slideUp 0.8s;
}
.hero-inner p {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  margin-bottom: 1.5rem;
  color: var(--secondary);
  animation: fadeIn 1.2s;
}
.hero .highlight {
  color: var(--secondary);
  font-weight: bold;
}
.cta-btn, .btn-primary, .btn-secondary, .btn {
  display: inline-block;
  padding: 0.9em 2em;
  border-radius: 2em;
  border: none;
  background: var(--secondary);
  color: var(--primary);
  font-weight: bold;
  font-size: 1.1rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(33,150,243,0.08);
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  margin-top: 0.5rem;
}
.cta-btn, .btn-primary {
  background: var(--accent);
  color: var(--surface);
}
.cta-btn:hover, .btn-primary:hover, .cta-btn:focus-visible, .btn-primary:focus-visible {
  background: var(--primary);
  color: var(--secondary);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 4px 24px rgba(33,150,243,0.13);
}
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-secondary:hover, .btn-secondary:focus-visible {
  background: var(--accent);
  color: var(--surface);
}

/* Highlights Section */
.highlights .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  animation: fadeIn 1.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
}
.card img {
  width: 100%;
  aspect-ratio: 16/9;
  height: auto;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  object-fit: cover;
  transition: transform var(--transition);
}
.card:hover, .card:focus-within {
  box-shadow: 0 8px 32px rgba(33,150,243,0.13);
  transform: translateY(-4px) scale(1.03);
}
.card:hover img, .card:focus-within img {
  transform: scale(1.04);
}
.card h3 {
  margin: 0.5rem 0 0.3rem 0;
  font-size: 1.3rem;
  color: var(--primary);
}
.card p {
  font-size: 1rem;
  color: var(--muted);
}

/* Features Section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  text-align: center;
  margin-top: 2rem;
}
.feature {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem 1rem;
  transition: box-shadow var(--transition), transform var(--transition);
  animation: fadeIn 1.3s;
}
.feature img {
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 6px rgba(33,150,243,0.08));
}
.feature h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.feature:hover, .feature:focus-within {
  box-shadow: 0 8px 32px rgba(33,150,243,0.13);
  transform: translateY(-4px) scale(1.03);
}

/* Teaser Section */
.teaser {
  background: linear-gradient(90deg, var(--surface) 60%, var(--secondary) 100%);
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 2.5rem 0;
  padding: 2rem 1rem;
  animation: fadeIn 1.4s;
}

/* Countdown Section */
.countdown {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin: 2.5rem 0;
  padding: 2rem 1rem;
  text-align: center;
  animation: fadeIn 1.2s;
}
.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.5rem;
  font-size: 1.5rem;
  font-family: 'Roboto Mono', monospace, var(--font-main);
}
.countdown-segment {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 0.7em 1.2em;
  box-shadow: 0 1px 4px rgba(33,150,243,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
  animation: popIn 0.5s;
}
.countdown-segment span:first-child {
  font-size: 2.1rem;
  font-weight: bold;
  color: var(--primary);
  transition: color 0.2s;
}
.countdown-segment span:last-child {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.2em;
}

/* Stats Section */
.stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin: 2.5rem 0;
  flex-wrap: wrap;
}
.stats div, .homepage .stat {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  min-width: 180px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  border: 1.5px solid var(--accent);
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}
.stats div:hover, .homepage .stat:hover, .stats div:focus-within, .homepage .stat:focus-within {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 32px rgba(33,150,243,0.13);
  border-color: var(--secondary);
}
.stat-number {
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--primary);
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-title);
}

/* Testimonials Section */
.testimonials {
  padding: 3rem 1.5rem;
  background: var(--surface);
}
.testimonial-cards {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.testimonial-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  width: min(350px, 90vw);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.testimonial-card p {
  font-style: italic;
  color: var(--muted);
}
.testimonial-card h4 {
  margin-top: 1rem;
  font-weight: bold;
  color: var(--primary);
}

/* Footer */
footer {
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  text-align: center;
  font-size: 1em;
  margin-top: 2em;
  background: var(--surface);
  color: var(--primary);
  transition: background var(--transition);
  padding: 1.2em 0;
}
footer a {
  color: var(--primary);
  text-decoration: underline;
  transition: color var(--transition), background var(--transition);
}
footer a:hover, footer a:focus-visible {
  color: var(--surface);
  background: var(--primary);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.5em;
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px);}
  to { opacity: 1; transform: translateY(0);}
}
@keyframes popIn {
  0% { transform: scale(0.7); opacity: 0; }
  80% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}

/* Responsive Design */

/* Tablet */
@media (max-width: 1024px) {
  .container { padding: 1.2rem 0.7rem; }
  header { padding: 0.7em 1em; }
  .logo { font-size: clamp(1.2em, 2vw, 1.7em); }
  .menu li a { font-size: 0.95em; }
  .stats { gap: 1rem; }
  .hero-inner h1 { font-size: 2rem; }
}

/* Mobile */
@media (max-width: 700px) {
  main { padding: 0.7rem 0.2rem; }
  .hero-inner h1 { font-size: 1.2rem; }
  .stats {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  .highlights .card-grid,
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .testimonial-cards {
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
  }
}

/* Extra Small Devices */
@media (max-width: 480px) {
  .container { padding: 0.5rem 0.2rem; }
  .hero { padding: 2rem 0.5rem; }
  .card, .feature, .teaser, .countdown, .testimonial-card { padding: 1rem 0.5rem; }
  .stats div, .homepage .stat { padding: 1rem 0.5rem; }
}

/* Large screens */
@media (min-width: 1600px) {
  .logo { font-size: 2em; }
  .menu li a { font-size: 1.2em; }
  header { padding: 1em 3em; }
}

/* Modern Footer */
.footer-modern {
    background: linear-gradient(135deg, #e0f7fa 0%, #fffde7 100%);
    color: #222;
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    border-top: 4px solid #ffb300;
    font-family: 'Segoe UI', Arial, sans-serif;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.07);
    position: relative;
    z-index: 10;
    opacity: 0;
    animation: fadeInFooter 1.2s ease 0.2s forwards;
}
.footer-modern .contact address {
    font-style: normal;
    color: #1976d2;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}
.footer-modern .email-link {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}
.footer-modern .email-link svg {
    margin-right: 0.5em;
    color: #ffb300;
    transition: color 0.3s;
}
.footer-modern .email-link a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}
.footer-modern .email-link a:hover,
.footer-modern .email-link a:focus {
    color: #ff7043;
    text-decoration: underline;
}
.footer-modern nav {
    margin-bottom: 1.2rem;
}
.footer-modern .footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.footer-modern .footer-links li a {
    color: #222;
    background: #e3f2fd;
    padding: 0.5em 1em;
    border-radius: 22px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(33,150,243,0.05);
}
.footer-modern .footer-links li a:hover,
.footer-modern .footer-links li a:focus {
    background: #ffb300;
    color: #fff;
    box-shadow: 0 4px 16px rgba(255,193,7,0.12);
}
.footer-modern .back-to-top {
    background: #fffde7;
    color: #ff7043;
    border: 1px solid #ffb300;
}
.footer-modern .back-to-top:hover,
.footer-modern .back-to-top:focus {
    background: #ff7043;
    color: #fffde7;
    border-color: #ff7043;
}
.footer-modern .copyright {
    text-align: center;
    color: #757575;
    font-size: 0.98rem;
    margin-top: 1.5rem;
    letter-spacing: 0.02em;
}

/* Responsive Footer */
@media (max-width: 900px) {
    .footer-modern {
        padding: 2rem 1rem 1rem 1rem;
    }
    .footer-modern .footer-links {
        gap: 1rem;
    }
}
@media (max-width: 600px) {
    .footer-modern {
        padding: 1.2rem 0.5rem 0.7rem 0.5rem;
        font-size: 0.98rem;
    }
    .footer-modern .contact address {
        font-size: 1rem;
        text-align: center;
    }
    .footer-modern .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 0.7rem;
    }
    .footer-modern .footer-links li a {
        width: 90vw;
        max-width: 320px;
        text-align: center;
    }
}

/* Simple fade-in animation */
@keyframes fadeInFooter {
    to { opacity: 1; }
}

/* Active menu link */
.menu li a.active, .menu li a[aria-current="page"] {
    border-bottom: 2px solid #0078d7;
    color: #0078d7;
    background: #e6f0fa;
}

.cars-section {
    padding: 2rem 0;
}

.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.car-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.car-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.car-card .details {
    padding: 1rem;
    text-align: center;
}

.car-card .details h3 {
    margin: 0.5rem 0;
    font-size: 1.2rem;
    color: var(--primary);
}

.car-card .details p {
    margin: 0.3rem 0;
    color: var(--muted);
}