/* Modern Car Rental Platform Styles */
:root {
  --primary-color: #1a1a1a;
  --secondary-color: #2d3748;
  --accent-color: #4299e1;
  --success-color: #48bb78;
  --warning-color: #ed8936;
  --light-bg: #f7fafc;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--primary-color);
  line-height: 1.6;
  background-color: #ffffff;
}

/* Smooth fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.slide-in {
  animation: slideInFromLeft 0.6s ease-out forwards;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.95;
  font-weight: 300;
}

/* Info Banner */
.info-banner {
  background: linear-gradient(to right, #edf2f7, #e2e8f0);
  border-left: 4px solid var(--accent-color);
  padding: 1rem 0;
  animation: slideInFromLeft 0.6s ease-out;
}

.info-banner-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.info-banner i {
  color: var(--accent-color);
  font-size: 1.25rem;
}

/* Filters Section */
.filters-section {
  background: white;
  padding: 2rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  animation: fadeIn 0.6s ease-out 0.2s backwards;
}

.filter-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control,
.form-select {
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  transition: var(--transition);
  font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
  outline: none;
}

.btn-search {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-search:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Car Cards */
.cars-grid {
  padding: 3rem 0;
}

.car-card {
  opacity: 0;
  animation: fadeIn 0.6s ease-out forwards;
  animation-delay: calc(var(--card-index, 0) * 0.1s);
}

.car-card .card {
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--card-shadow);
  height: 100%;
  background: white;
}

.car-card .card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
}

.car-image-wrapper {
  position: relative;
  overflow: hidden;
  height: 240px;
  background: var(--light-bg);
}

.car-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.car-card .card:hover .car-image-wrapper img {
  transform: scale(1.05);
}

.car-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: white;
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.availability-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.badge-warning {
  background: var(--warning-color);
  color: white;
}

.badge-info {
  background: var(--accent-color);
  color: white;
}

.photo-counter {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 1.5rem;
}

.car-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

/* Added car meta styles for brand and type display */
.car-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.car-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--secondary-color);
  background: var(--light-bg);
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  transition: var(--transition);
}

.car-meta-item i {
  color: var(--accent-color);
  font-size: 0.875rem;
}

.car-meta-item:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

.car-brand {
  color: #718096;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.car-description {
  color: #4a5568;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.pricing-section {
  background: var(--light-bg);
  padding: 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1.25rem;
}

.price-main {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.price-secondary {
  font-size: 0.95rem;
  color: #718096;
}

.btn-book {
  width: 100%;
  background: var(--success-color);
  color: white;
  border: none;
  padding: 0.875rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-book:hover {
  background: #38a169;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.btn-unavailable {
  width: 100%;
  background: #cbd5e0;
  color: #4a5568;
  border: none;
  padding: 0.875rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: not-allowed;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  animation: fadeIn 0.6s ease-out;
}

.empty-state i {
  font-size: 4rem;
  color: #cbd5e0;
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: #718096;
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: var(--transition);
}

.car-card:hover .carousel-control-prev,
.car-card:hover .carousel-control-next {
  opacity: 1;
}

.carousel-control-prev {
  left: 1rem;
}

.carousel-control-next {
  right: 1rem;
}

/* Lightbox Modal */
.modal-content {
  border-radius: 1rem;
  overflow: hidden;
}

.modal-body img {
  border-radius: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .filters-section {
    position: relative;
  }

  .car-image-wrapper {
    height: 200px;
  }
}

/* Loading Animation */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Logo Styling */
.brand-logo {
  max-height: 60px;
  width: auto;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Contact Info */
.contact-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 1rem;
}

.contact-info i {
  opacity: 0.9;
}

/* Stagger animation for cards */
.car-card:nth-child(1) {
  --card-index: 0;
}
.car-card:nth-child(2) {
  --card-index: 1;
}
.car-card:nth-child(3) {
  --card-index: 2;
}
.car-card:nth-child(4) {
  --card-index: 3;
}
.car-card:nth-child(5) {
  --card-index: 4;
}
.car-card:nth-child(6) {
  --card-index: 5;
}
.car-card:nth-child(7) {
  --card-index: 6;
}
.car-card:nth-child(8) {
  --card-index: 7;
}
.car-card:nth-child(9) {
  --card-index: 8;
}
