/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #0a0a0a;
  --secondary-color: #ffffff;
  --accent-color: gold;
  --accent-secondary: #2563eb;
  --text-dark: #1a1a1a;
  --text-light: #6b7280;
  --text-muted: #9ca3af;
  --background-light: #f8fafc;
  --background-dark: #111827;
  --border-color: #e5e7eb;
  --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0 25px 50px rgba(0, 0, 0, 0.25);
  --border-radius: 12px;
  --border-radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-accent: linear-gradient(135deg, #ffbf00 0%, gold 100%);
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--secondary-color);
  overflow-x: hidden;
  font-weight: 400;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1000;
  transition: var(--transition);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-logo h2 {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  position: relative;
  transition: var(--transition);
  font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: var(--transition);
  border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--primary-color);
  margin: 3px 0;
  transition: var(--transition);
  border-radius: 1px;
}

/* Page Management */
.page {
  display: none;
  min-height: 100vh;
}

.page.active {
  display: block;
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%);
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  color: white;
}

.hero-text {
  max-width: 600px;
}

.hero-subtitle {
  display: inline-block;
  background: var(--gradient-accent);
  color: white;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

.hero-content h1 {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-content p {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2.5rem;
  line-height: 1.6;
  font-weight: 300;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-button {
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  text-transform: none;
  letter-spacing: 0;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cta-button.primary {
  background: var(--gradient-accent);
  color: white;
  box-shadow: var(--shadow-medium);
}

.cta-button.primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-heavy);
}

.cta-button.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.cta-button.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Stats Section */
.stats-section {
  background: var(--background-dark);
  color: white;
  padding: 4rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 1.5rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  font-size: 1rem;
  opacity: 0.8;
  font-weight: 300;
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-subtitle {
  display: inline-block;
  background: var(--gradient-accent);
  color: white;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.section-header h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary-color);
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Featured Section */
.featured-section {
  background: var(--background-light);
  padding: 6rem 0;
}

/* Services Section */
.services-section {
  padding: 6rem 0;
  background: white;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: white;
  padding: 2.5rem 2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-light);
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-heavy);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.service-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.service-card p {
  color: var(--text-light);
  line-height: 1.6;
}

/* Catalog Sections */
.catalog-hero {
  background: var(--background-dark);
  color: white;
  padding: 8rem 0 4rem;
  text-align: center;
}

.catalog-header h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.catalog-header p {
  font-size: 1.25rem;
  opacity: 0.9;
  font-weight: 300;
}

.catalog-section {
  padding: 4rem 0;
  background: var(--background-light);
}

.catalog-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: white;
  border: 2px solid var(--border-color);
  color: var(--text-dark);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

.catalog-categories {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.category-section {
  background: white;
  padding: 3rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-light);
}

.category-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.flag {
  font-size: 2.5rem;
}

/* Cars Grid */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2rem;
}

.car-card {
  background: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.car-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-heavy);
}

.car-image {
  position: relative;
  overflow: hidden;
  height: 280px;
}

.car-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.car-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.car-card:hover .car-overlay {
  opacity: 1;
}

.car-card:hover .car-image img {
  transform: scale(1.1);
}

.car-country {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.country-flag {
  font-size: 1rem;
}

.view-details-btn {
  background: var(--gradient-accent);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
}

.view-details-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-medium);
}

.car-info {
  padding: 2rem;
}

.car-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.car-year {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.car-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

/* Car Details */
.car-details {
  padding: 2rem 0 4rem;
  background: var(--background-light);
  min-height: 100vh;
  padding-top: 120px;
}

.back-button {
  background: white;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.back-button:hover {
  background: var(--accent-color);
  color: white;
}

.car-details-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
  background: white;
  padding: 3rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-light);
}

.car-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.main-image {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.main-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.thumbnail-gallery {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.thumbnail {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition);
  border: 2px solid transparent;
}

.thumbnail:hover,
.thumbnail.active {
  opacity: 1;
  border-color: var(--accent-color);
  transform: scale(1.05);
}

.car-availability {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--background-light);
  padding: 0.75rem 1.25rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  width: fit-content;
}

.availability-flag {
  font-size: 1.25rem;
}

.availability-text {
  font-weight: 500;
  color: var(--text-dark);
  font-size: 0.9rem;
}

.car-info-detailed h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  letter-spacing: -0.02em;
}

.car-year-detailed {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.car-price-detailed {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
}

.car-description {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 2.5rem;
}

.contact-button {
  background: var(--gradient-accent);
  color: white;
  border: none;
  padding: 1.25rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

.contact-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* Specifications */
.car-specifications {
  background: white;
  padding: 3rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-light);
}

.car-specifications h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.spec-item {
  background: var(--background-light);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.spec-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

.spec-label {
  display: block;
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.spec-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Contact Sections */
.contact-hero {
  background: var(--background-dark);
  color: white;
  padding: 8rem 0 4rem;
  text-align: center;
}

.contact-header h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.contact-header p {
  font-size: 1.25rem;
  opacity: 0.9;
  font-weight: 300;
}

.contact-section {
  padding: 4rem 0;
  background: var(--background-light);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-locations {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.location-card {
  background: white;
  padding: 2.5rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
}

.location-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item h4 {
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.85rem;
}

.contact-item p {
  color: var(--text-light);
  font-weight: 500;
}

.contact-form {
  background: white;
  padding: 3rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
}

.contact-form h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  background: white;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.submit-button {
  background: var(--gradient-accent);
  color: white;
  border: none;
  padding: 1.25rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Footer */
.footer {
  background: var(--background-dark);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 1.5rem;
  color: var(--accent-color);
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 400;
}

.footer-section a:hover {
  color: var(--accent-color);
}

.footer-section p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  font-weight: 300;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-content h1 {
    font-size: 3rem;
  }
  
  .car-details-header {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow-medium);
    padding: 2rem 0;
    gap: 1.5rem;
  }

  .nav-menu.active {
    left: 0;
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .cars-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .catalog-header h1 {
    font-size: 2.5rem;
  }

  .contact-header h1 {
    font-size: 2.5rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .nav-container {
    padding: 1rem;
  }

  .container {
    padding: 0 1rem;
  }

  .thumbnail-gallery {
    flex-wrap: wrap;
  }

  .thumbnail {
    width: 60px;
    height: 45px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .catalog-filters {
    flex-direction: column;
    align-items: center;
  }

  .category-section {
    padding: 2rem 1.5rem;
  }

  .car-details {
    padding-top: 100px;
  }

  .car-details-header {
    padding: 2rem;
  }

  .car-specifications {
    padding: 2rem;
  }

  .contact-form {
    padding: 2rem;
  }

  .location-card {
    padding: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .car-info-detailed h1 {
    font-size: 2rem;
  }

  .car-price-detailed {
    font-size: 2rem;
  }

  .specs-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    padding: 2rem 1.5rem;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.car-card {
  animation: fadeInUp 0.6s ease-out;
}

.service-card {
  animation: fadeInUp 0.6s ease-out;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus States */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background-light);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #e55a2b;
}