/* Light and Dark Mode Theme System */

:root {
  /* Light theme colors */
  --background-color: #ffffff;
  --surface-color: #f8f9fa;
  --primary-color: #2c7bbf;
  --primary-hover: #1e5a8a;
  --text-color: #333333;
  --text-secondary: #666666;
  --text-muted: #888888;
  --border-color: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --hero-bg: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  --card-bg: #ffffff;
  --hover-bg: #f8f9fa;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --error-color: #dc3545;
  
  /* Theme transition */
  --theme-transition: all 0.3s ease;
}

[data-theme="dark"] {
  /* Dark theme colors */
  --background-color: #1a1a1a;
  --surface-color: #2d2d2d;
  --primary-color: #4a9eff;
  --primary-hover: #2980ff;
  --text-color: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #999999;
  --border-color: #404040;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --hero-bg: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
  --card-bg: #2d2d2d;
  --hover-bg: #3d3d3d;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --error-color: #f44336;
}

/* Apply theme colors to elements */
body {
  background-color: var(--background-color);
  color: var(--text-color);
  transition: var(--theme-transition);
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--theme-transition);
  color: var(--text-color);
  margin-right: 1rem;
}

.theme-toggle:hover {
  background-color: var(--hover-bg);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.theme-toggle i {
  font-size: 1.2rem;
  transition: var(--theme-transition);
}

[data-theme="dark"] .theme-toggle i.fa-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle::after {
  content: "\f186";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1.2rem;
}

/* Cards and surfaces */
.card,
.step-card,
.value-card,
.testimonial-card,
.pickup-card,
.condition-item,
.vehicle-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px var(--shadow-color);
  transition: var(--theme-transition);
}

.card:hover,
.step-card:hover,
.value-card:hover,
.condition-item:hover,
.vehicle-item:hover {
  background-color: var(--hover-bg);
  box-shadow: 0 4px 8px var(--shadow-color);
}

/* Headers and navigation */
.modern-header {
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
}

.nav-menu a {
  color: var(--text-color);
  transition: var(--theme-transition);
}

.nav-menu a:hover {
  color: var(--primary-color);
}

/* Sections */
.enhanced-section {
  background-color: var(--surface-color);
}

/* Footer */
footer {
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
  color: var(--text-color);
}

footer a {
  color: var(--text-secondary);
  transition: var(--theme-transition);
}

footer a:hover {
  color: var(--primary-color);
}

/* Buttons */
.btn {
  transition: var(--theme-transition);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Form elements */
input,
textarea,
select {
  background-color: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  transition: var(--theme-transition);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(44, 123, 191, 0.2);
}

/* Text colors */
.text-muted {
  color: var(--text-muted) !important;
}

.text-secondary {
  color: var(--text-secondary) !important;
}

/* Responsive theme toggle */
@media (max-width: 768px) {
  .theme-toggle {
    width: 40px;
    height: 40px;
    margin-right: 0.5rem;
  }
  
  .theme-toggle i {
    font-size: 1rem;
  }
}