/*
 * Coin Rental Website - Main Stylesheet
 * Production-ready styles with Bootstrap 5 integration
 * Author: Generated with GitHub Copilot
 * Version: 1.0.0
 */

/* ===== CSS Custom Properties (Variables) ===== */
:root {
  /* Brand Colors */
  --primary-color: #0066cc;
  --primary-dark: #004d99;
  --primary-light: #3399ff;
  --accent-color: #ff6b35;
  --accent-dark: #e55a2b;
  --accent-light: #ff8659;

  /* Neutral Colors */
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --text-muted: #95a5a6;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-light: #f1f3f5;
  --border-color: #dee2e6;
  --border-light: #e9ecef;

  /* Semantic Colors */
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #17a2b8;

  /* Spacing & Layout */
  --border-radius: 8px;
  --border-radius-sm: 4px;
  --border-radius-lg: 12px;
  --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --box-shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
  --box-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);

  /* Typography */
  --font-family-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  --font-size-base: 1rem;
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --line-height-base: 1.6;

  /* Transitions */
  --transition-base: all 0.3s ease;
  --transition-fast: all 0.15s ease;
}

/* ===== Base Styles ===== */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ===== Typography Enhancements ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.75rem;
}
h4 {
  font-size: 1.5rem;
}
h5 {
  font-size: 1.25rem;
}
h6 {
  font-size: 1.1rem;
}

p {
  margin-bottom: 1rem;
  color: #000;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ===== Button Styles ===== */
.btn {
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: var(--transition-base);
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: var(--font-size-base);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--box-shadow);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-hover);
  color: white;
}

.btn-accent {
  background-color: var(--accent-color);
  color: white;
  box-shadow: var(--box-shadow);
}

.btn-accent:hover {
  background-color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-hover);
  color: white;
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background-color: transparent;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: var(--font-size-sm);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: var(--font-size-lg);
}

/* ===== Header & Navigation ===== */
.navbar {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--box-shadow);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: var(--transition-base);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color) !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand svg {
  width: 32px;
  height: 32px;
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--text-primary) !important;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem !important;
  border-radius: var(--border-radius);
  transition: var(--transition-fast);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  background-color: var(--bg-light);
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.search-bar-header {
  width: 300px;
  position: relative;
}

.search-bar-header input {
  border-radius: 25px;
  border: 2px solid var(--border-light);
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  width: 100%;
  transition: var(--transition-fast);
}

.search-bar-header input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.search-bar-header button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Hero Section ===== */
.hero-section {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  min-height: 70vh;
  display: flex;
  align-items: center;
  color: white;
  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 xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><path d="M0,400 Q300,200 600,400 T1200,400 V800 H0 Z" fill="rgba(255,255,255,0.1)"/></svg>')
    no-repeat bottom center;
  background-size: cover;
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* ===== Search Widget ===== */
.search-widget {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--box-shadow-lg);
  margin-top: 2rem;
  position: relative;
  z-index: 3;
}

.search-widget .form-control {
  border: 2px solid var(--border-light);
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  font-size: var(--font-size-base);
  transition: var(--transition-fast);
}

.search-widget .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.search-widget .form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* ===== Card Components ===== */
.card {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow);
  transition: var(--transition-base);
  overflow: hidden;
  background: white;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--box-shadow-hover);
}

.card-img-top {
  height: 200px;
  object-fit: cover;
  transition: var(--transition-base);
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.card-text {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* ===== Vehicle Cards ===== */
.vehicle-card {
  position: relative;
}

.vehicle-card .badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  background-color: var(--accent-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: 600;
}

.vehicle-specs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.vehicle-spec {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.vehicle-spec svg {
  width: 16px;
  height: 16px;
}

.price-display {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

.rating-stars {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.rating-stars .star {
  color: #ffc107;
  font-size: 1rem;
}

.rating-stars .star.empty {
  color: var(--border-color);
}

/* ===== Filter Panel ===== */
.filter-panel {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
  margin-bottom: 2rem;
}

.filter-section {
  margin-bottom: 1.5rem;
}

.filter-section:last-child {
  margin-bottom: 0;
}

.filter-title {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.price-range-slider {
  width: 100%;
  margin: 1rem 0;
}

/* ===== Footer ===== */
.footer {
  background-color: var(--text-primary);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer h5 {
  color: white;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer ul li a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer ul li a:hover {
  color: white;
  text-decoration: none;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: var(--transition-fast);
}

.social-icon:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* ===== Form Styles ===== */
.form-control {
  border: 2px solid var(--border-light);
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  font-size: var(--font-size-base);
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.is-invalid {
  border-color: var(--danger-color);
}

.invalid-feedback {
  color: var(--danger-color);
  font-size: var(--font-size-sm);
  margin-top: 0.25rem;
}

/* ===== Modal Styles ===== */
.modal-content {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-lg);
}

.modal-header {
  border-bottom: 1px solid var(--border-light);
  padding: 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--border-light);
  padding: 1.5rem;
}

/* ===== Alert Styles ===== */
.alert {
  border: none;
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
}

.alert-success {
  background-color: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
  border-left: 4px solid var(--success-color);
}

.alert-warning {
  background-color: rgba(255, 193, 7, 0.1);
  color: var(--warning-color);
  border-left: 4px solid var(--warning-color);
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.1);
  color: var(--danger-color);
  border-left: 4px solid var(--danger-color);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  background-color: var(--bg-light);
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
}

.breadcrumb-item a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--primary-color);
}

.breadcrumb-item.active {
  color: var(--text-primary);
}

/* ===== Loading States ===== */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border-light);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Utility Classes ===== */
.text-primary-custom {
  color: var(--primary-color) !important;
}

.text-accent {
  color: var(--accent-color) !important;
}

.bg-light-custom {
  background-color: var(--bg-light) !important;
}

.border-primary-custom {
  border-color: var(--primary-color) !important;
}

.shadow-custom {
  box-shadow: var(--box-shadow) !important;
}

.shadow-hover:hover {
  box-shadow: var(--box-shadow-hover) !important;
}

.transition-all {
  transition: var(--transition-base) !important;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .search-widget {
    padding: 1.5rem;
  }

  .search-bar-header {
    width: 100%;
    margin-bottom: 1rem;
  }

  .vehicle-specs {
    justify-content: center;
  }

  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2rem;
  }

  .search-widget {
    padding: 1rem;
    margin-top: 1rem;
  }

  .card-body {
    padding: 1rem;
  }

  .filter-panel {
    padding: 1rem;
  }
}

/* ===== Accessibility ===== */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

/* Focus indicators */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

button:focus,
.btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

/* ===== Print Styles ===== */
@media print {
  .navbar,
  .footer,
  .btn,
  .search-widget {
    display: none !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
  }
}

/* ===== Animation Classes ===== */
.fade-in {
  animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== Custom Component Styles ===== */
.progress-bar-custom {
  background-color: var(--primary-color);
  height: 6px;
  border-radius: 3px;
  transition: var(--transition-base);
}

.toast-custom {
  background-color: white;
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--box-shadow-lg);
  border-radius: var(--border-radius);
}

.pagination .page-link {
  color: #000;
  border: 1px solid var(--border-light);
  padding: 0.75rem 1rem;
  margin: 0 0.25rem;
  border-radius: var(--border-radius);
}

.pagination .page-link:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}
