﻿/*
  Elite Motors - Core Design System
  This file contains the primary visual style and reusable component classes.
  Modify CSS variables in :root to quickly re-theme the entire site.
*/
:root {
  --bg: #0b0d10;
  --bg-soft: #13171c;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-solid: #171d25;
  --text: #eef1f4;
  --text-muted: #b7c0cb;
  --line: rgba(255, 255, 255, 0.16);
  --accent: #d3a460;
  --accent-strong: #f0c889;
  --danger: #ff5a5f;
  --success: #3fd18b;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at 20% 10%, #1b222c 0%, #0b0d10 50%, #090b0e 100%);
  color: var(--text);
  line-height: 1.6;
}

body.page-light {
  background: #f4f6f8;
  color: #12161b;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: 5rem 0;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 2.5rem;
}

body.page-light .section-subtitle {
  color: #45505f;
}

/* Loading screen: fades out after JS sets .is-loaded */
.loader {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  background: #07090c;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-ring {
  width: 64px;
  height: 64px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

/* Sticky navigation with glassmorphism effect */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: rgba(7, 9, 12, 0.7);
  border-bottom: 1px solid var(--line);
}

body.page-light .nav-wrap {
  background: rgba(250, 252, 255, 0.85);
  border-bottom-color: rgba(17, 22, 28, 0.1);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.95rem;
  position: relative;
  transition: color 0.25s ease;
}

body.page-light .nav-link {
  color: #4a5666;
}

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

body.page-light .nav-link:hover,
body.page-light .nav-link.active {
  color: #111820;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.4rem;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.mobile-toggle {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  width: 42px;
  height: 42px;
  display: none;
}

/* Reusable premium buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #111;
  box-shadow: 0 8px 24px rgba(211, 164, 96, 0.35);
}

.btn-outline {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

body.page-light .btn-outline {
  color: #12161b;
  border-color: rgba(18, 22, 27, 0.2);
}

.hero {
  min-height: 75vh;
  display: grid;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(6, 8, 11, 0.88), rgba(6, 8, 11, 0.4));
  z-index: 1;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 4.2rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero p {
  color: #d5dde7;
  margin-bottom: 1.8rem;
}

.grid {
  display: grid;
  gap: 1.2rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.glass-card {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
}

body.page-light .glass-card {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(16, 22, 30, 0.12);
  box-shadow: 0 14px 30px rgba(18, 26, 36, 0.1);
}

.card-media {
  border-radius: calc(var(--radius) - 5px);
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.card-media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.car-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.18rem;
}

.meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

body.page-light .meta {
  color: #5c6878;
}

.price-row {
  margin-top: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.banner {
  min-height: 360px;
  display: grid;
  place-items: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  position: relative;
}

.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 11, 0.65);
}

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

.stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-box {
  text-align: center;
  padding: 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

body.page-light .stat-box {
  background: #fff;
  border-color: rgba(18, 22, 30, 0.12);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

body.page-light .table th,
body.page-light .table td {
  border-bottom-color: rgba(18, 22, 30, 0.12);
}

.filters {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 1.3rem;
}

.input,
.select,
.textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: inherit;
  border-radius: 12px;
  min-height: 44px;
  padding: 0.6rem 0.8rem;
}

body.page-light .input,
body.page-light .select,
body.page-light .textarea {
  background: #fff;
  border-color: rgba(18, 22, 30, 0.16);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.38rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.error {
  font-size: 0.82rem;
  color: var(--danger);
  min-height: 1em;
}

.success-msg {
  color: var(--success);
  font-weight: 600;
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-trigger {
  width: 100%;
  text-align: left;
  background: none;
  color: inherit;
  border: 0;
  padding: 1rem 0;
  font-size: 1rem;
  cursor: pointer;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  color: var(--text-muted);
}

body.page-light .faq-content {
  color: #4a5564;
}

.slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.slide-track {
  display: flex;
  transition: transform 0.6s ease;
}

.slide {
  min-width: 100%;
  position: relative;
}

.slide img {
  width: 100%;
  height: 460px;
  object-fit: cover;
}

.slider-controls {
  position: absolute;
  inset: auto 1rem 1rem auto;
  display: flex;
  gap: 0.4rem;
}

.slider-controls button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  background: rgba(8, 10, 12, 0.45);
  cursor: pointer;
}

.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
}

body.page-light .footer {
  border-top-color: rgba(18, 22, 30, 0.15);
  color: #505b6b;
}

.footer-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 2fr 1fr 1fr;
}

.floating-cta {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1001;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
