/* ===== CSS Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #1a1a2e;
  --bg-card: #16213e;
  --bg-card-hover: #1b2a4a;
  --gold: #c9a84c;
  --gold-light: #e0c872;
  --cream: #f5f0e8;
  --cream-muted: #b8b0a2;
  --dark-overlay: rgba(26, 26, 46, 0.85);
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Lato', sans-serif;
  background-color: var(--bg-primary);
  color: var(--cream);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a:hover {
  color: var(--gold-light);
}

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

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.2;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
  transition: background var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
}

.nav-logo span {
  color: var(--cream);
  font-weight: 400;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--cream-muted);
  font-size: 0.95rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

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

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  background: none;
  border: none;
  padding: 5px;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--cream);
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 26, 46, 0.7) 0%,
    rgba(26, 26, 46, 0.5) 50%,
    rgba(26, 26, 46, 0.95) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 1rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.hero h1 .accent {
  color: var(--gold);
  display: block;
}

.hero .tagline {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--cream-muted);
  margin-bottom: 2rem;
  font-style: italic;
}

.btn {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all var(--transition);
  cursor: pointer;
  background: transparent;
}

.btn:hover {
  background: var(--gold);
  color: var(--bg-primary);
}

.btn-filled {
  background: var(--gold);
  color: var(--bg-primary);
}

.btn-filled:hover {
  background: var(--gold-light);
  color: var(--bg-primary);
}

/* ===== Page Header (non-home pages) ===== */
.page-header {
  position: relative;
  padding: 10rem 0 4rem;
  text-align: center;
  overflow: hidden;
}

.page-header-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.page-header-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 26, 46, 0.8) 0%,
    rgba(26, 26, 46, 0.95) 100%
  );
}

.page-header h1 {
  position: relative;
  z-index: 2;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--cream);
}

.page-header p {
  position: relative;
  z-index: 2;
  color: var(--cream-muted);
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

/* ===== Section Styles ===== */
.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
  color: var(--cream);
}

.section-subtitle {
  text-align: center;
  color: var(--cream-muted);
  max-width: 600px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
}

.gold-line {
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 1rem auto 2rem;
}

/* ===== Car Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.car-card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid rgba(201, 168, 76, 0.1);
}

.car-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(201, 168, 76, 0.3);
}

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

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

.car-card-body h3 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
  color: var(--cream);
}

.car-card-body .year {
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.car-card-body p {
  color: var(--cream-muted);
  margin-top: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.car-card-body .specs {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(201, 168, 76, 0.15);
}

.car-card-body .spec-item {
  font-size: 0.8rem;
  color: var(--cream-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.car-card-body .spec-item strong {
  color: var(--gold);
  display: block;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
}

/* ===== Intro Section ===== */
.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.intro-text h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.intro-text p {
  color: var(--cream-muted);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.intro-img {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(201, 168, 76, 0.2);
}

.intro-img img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-group-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--cream-muted);
  margin-right: 0.5rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(201, 168, 76, 0.3);
  background: transparent;
  color: var(--cream-muted);
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 30px;
  transition: all var(--transition);
  letter-spacing: 0.5px;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--gold);
  color: var(--bg-primary);
  border-color: var(--gold);
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--gold), rgba(201, 168, 76, 0.2));
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 1.5rem 2.5rem;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
  padding-right: 3rem;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
  padding-left: 3rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 2rem;
  width: 14px;
  height: 14px;
  background: var(--gold);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  z-index: 1;
}

.timeline-item:nth-child(odd)::before {
  right: -7px;
}

.timeline-item:nth-child(even)::before {
  left: -7px;
}

.timeline-year {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--gold);
  font-weight: 700;
}

.timeline-title {
  font-size: 1.2rem;
  color: var(--cream);
  margin: 0.3rem 0;
  font-family: 'Playfair Display', serif;
}

.timeline-desc {
  color: var(--cream-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.timeline-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 0.75rem;
  border: 1px solid rgba(201, 168, 76, 0.15);
}

/* ===== Model Detail Cards ===== */
.model-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2.5rem;
  border: 1px solid rgba(201, 168, 76, 0.1);
  transition: box-shadow var(--transition);
}

.model-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.model-card:nth-child(even) {
  direction: rtl;
}

.model-card:nth-child(even) > * {
  direction: ltr;
}

.model-card-img {
  width: 100%;
  height: 100%;
  min-height: 350px;
  object-fit: cover;
}

.model-card-info {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.model-card-info .manufacturer {
  color: var(--gold);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
}

.model-card-info h3 {
  font-size: 1.8rem;
  margin: 0.3rem 0 1rem;
  color: var(--cream);
}

.model-card-info p {
  color: var(--cream-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.model-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.model-spec {
  padding: 0.75rem;
  background: rgba(201, 168, 76, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(201, 168, 76, 0.1);
}

.model-spec .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cream-muted);
}

.model-spec .value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin-top: 2px;
}

/* ===== Contact Page ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--cream-muted);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 8px;
  color: var(--cream);
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form-group textarea {
  min-height: 160px;
  resize: vertical;
}

.form-group select option {
  background: var(--bg-card);
  color: var(--cream);
}

.contact-sidebar {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2.5rem;
  border: 1px solid rgba(201, 168, 76, 0.1);
  height: fit-content;
}

.contact-sidebar h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--gold);
}

.contact-sidebar p {
  color: var(--cream-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.contact-sidebar .info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--cream-muted);
  font-size: 0.95rem;
}

.contact-sidebar .info-item .icon {
  color: var(--gold);
  font-size: 1.2rem;
  width: 20px;
  text-align: center;
}

/* ===== Footer ===== */
.footer {
  background: rgba(22, 33, 62, 0.5);
  border-top: 1px solid rgba(201, 168, 76, 0.1);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

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

.footer-brand h3 {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: var(--cream-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer h4 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--cream);
  margin-bottom: 1rem;
}

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

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--cream-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(201, 168, 76, 0.1);
  color: var(--cream-muted);
  font-size: 0.85rem;
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .intro-img {
    order: -1;
  }

  .model-card {
    grid-template-columns: 1fr;
  }

  .model-card:nth-child(even) {
    direction: ltr;
  }

  .model-card-img {
    min-height: 250px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(26, 26, 46, 0.98);
    padding: 1.5rem;
    gap: 0;
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(201, 168, 76, 0.07);
  }

  .hamburger {
    display: flex;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    padding-left: 3.5rem !important;
    padding-right: 1rem !important;
  }

  .timeline-item::before {
    left: 13px !important;
    right: auto !important;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .model-specs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .section {
    padding: 3rem 0;
  }

  .page-header {
    padding: 8rem 0 3rem;
  }
}
