:root {
  --bg: #f0f0f0;
  --primary: #0066cc;
  --dark: #333333;
  --muted: #666666;
  --card: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--dark);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: var(--card);
  border-bottom: 2px solid #cccccc;
  position: relative;
  z-index: 1000;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 0 1rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
}

.logo {
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

main {
  flex: 1;
}

.hero {
  padding: 4rem 0 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.hero p {
  color: var(--muted);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 20px;
  border-radius: 5px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  display: inline-block;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-secondary {
  background: white;
  color: var(--dark);
  border: 2px solid #cccccc;
}

.btn:hover {
  opacity: 0.9;
}

.section {
  padding: 3rem 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-header h2 {
  margin: 0;
  font-size: 1.9rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card);
  border: 1px solid #dddddd;
  padding: 20px;
}

.car-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  margin-bottom: 15px;
  border: 1px solid #dddddd;
}

.car-card h3 {
  margin: 0 0 0.4rem;
}

.car-card p {
  margin: 0.15rem 0;
  color: var(--muted);
}

.price {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 0.75rem;
}

.badge {
  display: inline-block;
  background: #e6f2ff;
  color: var(--primary);
  padding: 5px 10px;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  align-items: center;
}

.about img {
  width: 100%;
  border: 1px solid #dddddd;
}

.about-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.about-list li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.about-list span {
  color: var(--primary);
  font-weight: 600;
}

.reservation-form {
  background: var(--card);
  border: 1px solid #dddddd;
  padding: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

label {
  font-weight: 500;
}

input,
select,
textarea {
  padding: 10px;
  border: 1px solid #cccccc;
  font: inherit;
  background: white;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-info {
  display: grid;
  gap: 1rem;
}

.contact-card {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background: #e6f2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--primary);
}

footer {
  background: #333333;
  color: white;
  padding: 30px 0;
  margin-top: 40px;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

footer a {
  color: white;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
  z-index: 1001;
  position: relative;
}

.nav-links {
  transition: transform 0.3s ease;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Scroll to Top Button */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 1000;
  transition: opacity 0.3s;
}

.scroll-top:hover {
  opacity: 0.8;
}

.scroll-top.visible {
  display: flex;
}

/* Form Validation */
.form-group {
  position: relative;
}

.error-message {
  color: #ff3333;
  font-size: 0.85rem;
  margin-top: 5px;
  display: none;
}

.error-message.show {
  display: block;
}

input.error,
select.error,
textarea.error {
  border-color: #ff3333;
}

input.success,
select.success,
textarea.success {
  border-color: #33ff33;
}

.success-message {
  background: #33ff33;
  color: #006600;
  padding: 15px;
  border-radius: 5px;
  margin-top: 20px;
  display: none;
}

.success-message.show {
  display: block;
}

/* FAQ Accordion */
.faq-item {
  margin-bottom: 1rem;
  border: 1px solid #dddddd;
  border-radius: 5px;
  overflow: hidden;
}

.faq-question {
  padding: 20px;
  background: var(--card);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  transition: background 0.3s;
}

.faq-question:hover {
  background: #f5f5f5;
}

.faq-icon {
  transition: transform 0.3s;
  font-size: 1.2rem;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 20px;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 20px;
}

/* Car Filter */
.filter-section {
  background: var(--card);
  padding: 25px;
  margin-bottom: 2rem;
  border: 1px solid #dddddd;
  border-radius: 5px;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

.filter-result {
  margin-top: 15px;
  font-weight: 600;
  color: var(--primary);
}

/* Price Calculator */
.calculator {
  background: var(--card);
  padding: 25px;
  border: 1px solid #dddddd;
  border-radius: 5px;
  margin-bottom: 2rem;
}

.calculator-result {
  margin-top: 20px;
  padding: 20px;
  background: #e6f2ff;
  border-radius: 5px;
  text-align: center;
  display: none;
}

.calculator-result.show {
  display: block;
}

.calculator-result h3 {
  font-size: 2rem;
  color: var(--primary);
  margin: 10px 0;
}

.discount-info {
  color: #33ff33;
  font-weight: 600;
}

/* Image Slider */
.slider-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  z-index: 1;
}

.slider {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  width: 100%;
}

.slider-track {
  display: flex;
  transition: transform 0.5s ease;
  touch-action: pan-y pinch-zoom;
}

.slider-slide {
  min-width: 100%;
}

.slider-slide img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.slider-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  z-index: 10;
  touch-action: manipulation;
}

.slider-controls:hover {
  background: rgba(0,0,0,0.7);
}

.slider-prev {
  left: 10px;
}

.slider-next {
  right: 10px;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cccccc;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

.slider-dot.active {
  background: var(--primary);
}

/* Favorite Button */
.favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,0.9);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 10;
}

.favorite-btn:hover {
  transform: scale(1.1);
}

.favorite-btn.active {
  color: #ffd700;
}

.car-card {
  position: relative;
}

/* Scroll 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);
}

.slide-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: var(--card);
  padding: 30px;
  border-radius: 10px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
}

.modal-close:hover {
  color: var(--dark);
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

/* Favorites Counter */
.favorites-counter {
  background: var(--primary);
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.85rem;
  margin-left: 10px;
}

@media (max-width: 640px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    flex-direction: column;
    padding: 1rem;
    border-top: 1px solid #dddddd;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1002;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav {
    position: relative;
  }

  .hero {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 0;
  }

  .hero > .slide-left {
    order: 2;
    width: 100%;
  }

  .hero > .slider-container {
    order: 1;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 1rem;
    display: block;
    position: relative;
  }
  
  .slider {
    width: 100%;
    overflow: hidden;
    position: relative;
    display: block;
  }
  
  .slider-track {
    width: 100%;
    display: flex;
  }
  
  .slider-slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
  }

  .hero-actions {
    width: 100%;
  }

  .btn {
    flex: 1;
    text-align: center;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .slider-slide img {
    height: 250px;
    width: 100%;
    display: block;
  }

  .slider-controls {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .slider-prev {
    left: 5px;
  }

  .slider-next {
    right: 5px;
  }
}

