/*
 * Custom styles for City Cars landing page
 * The design follows a modern, mobile‑first approach with responsive layouts.
 * Colors and fonts are inspired by the official CityCars website【813857092957770†L68-L82】, which uses
 * a combination of deep blue (#006db7) and warm orange (#f5991e) accents【813857092957770†L100-L112】.
 */

/* CSS Reset and basic typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: #ffffff;
  color: #333333;
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  /* center images like the logo by default */
  margin-inline: auto;
}

a {
  text-decoration: none;
}

/* Color variables */
:root {
  --primary-color: #006db7; /* main blue hue from CityCars site【813857092957770†L100-L112】 */
  --secondary-color: #f5991e; /* warm accent tone for highlights【813857092957770†L73-L76】 */
  --text-color: #333333;
  --background-color: #f9f9f9;
}

/* Utility classes */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.primary-btn {
  background-color: var(--primary-color);
  color: #ffffff;
}

.primary-btn:hover {
  background-color: #004f86;
}

.secondary-btn {
  background-color: var(--secondary-color);
  color: #ffffff;
}

.secondary-btn:hover {
  background-color: #d47f0a;
}

/* Hero Section */
.hero-section {
  background-color: var(--background-color);
  padding-top: 1rem;
  padding-bottom: 3rem;
}

.hero-section .logo {
  text-align: center;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #555555;
  text-align: center;
  margin-bottom: 2rem;
}

/* Offer Cards */
.offers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.offer-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  flex: 1 1 300px;
  max-width: 350px;
  display: flex;
  flex-direction: column;
}

.offer-card .card-img {
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--background-color);
}

.offer-card .card-img img {
  width: 100%;
  height: 100%;
  /* Use contain to ensure the full car appears without cropping */
  object-fit: contain;
}

.offer-card .card-content {
  padding: 1rem 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.offer-card .car-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.offer-card .installment {
  font-size: 1rem;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.offer-card .benefits {
  list-style: none;
  margin-bottom: 1rem;
}

.offer-card .benefits li {
  position: relative;
  padding-inline-start: 1.5rem;
  margin-bottom: 0.5rem;
  color: #555555;
  font-size: 0.95rem;
}

.offer-card .benefits li::before {
  content: "\2714";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  color: var(--secondary-color);
  font-size: 1rem;
}

.offer-card .btn {
  margin-top: auto;
  text-align: center;
}

/* Features Section */
.features-section {
  background-color: var(--background-color);
  padding: 3rem 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 2rem;
  text-align: center;
}

.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: center;
}

.features-image {
  flex: 1 1 300px;
  max-width: 400px;
}

.features-content {
  flex: 1 1 300px;
  max-width: 600px;
}

.features-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.features-content li {
  font-size: 1rem;
  color: #555555;
  margin-bottom: 0.75rem;
  padding-inline-start: 1.5rem;
  position: relative;
}

.features-content li::before {
  content: "\2022";
  position: absolute;
  inset-inline-start: 0;
  top: 0.1rem;
  font-size: 1.2rem;
  color: var(--secondary-color);
}

/* Steps Section */
.steps-section {
  background-color: #ffffff;
  padding: 3rem 0;
}

.steps-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.step {
  background-color: var(--background-color);
  border-radius: 10px;
  padding: 1.5rem;
  flex: 1 1 200px;
  max-width: 300px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.step-number {
  background-color: var(--secondary-color);
  color: #ffffff;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50%;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.step h3 {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.95rem;
  color: #555555;
}

/* Offer Banner */
.offer-banner {
  background-color: var(--primary-color);
  color: #ffffff;
  text-align: center;
  padding: 2.5rem 0;
}

.offer-banner h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.offer-banner p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

/* FAQ Section */
.faq-section {
  background-color: var(--background-color);
  padding: 3rem 0;
}

.faq {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 1rem;
  background-color: #ffffff;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: right;
  background-color: #ffffff;
  color: var(--primary-color);
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #fdfdfd;
  padding: 0 1rem;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  padding: 1rem;
}

.faq-answer p {
  font-size: 0.95rem;
  color: #555555;
}

/* CTA Section */
.cta-section {
  background-color: var(--secondary-color);
  color: #ffffff;
  text-align: center;
  padding: 2.5rem 0;
}

.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.cta-section p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

/* Footer */
.footer {
  background-color: #0e4d85;
  color: #ffffff;
  text-align: center;
  padding: 1.5rem 0;
}

.footer-logo {
  width: 120px;
  margin: 0 auto 0.5rem;
}

.footer p {
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 991px) {
  .hero-title {
    font-size: 2rem;
  }
  .offers-grid {
    flex-direction: column;
    align-items: center;
  }
  .features-grid,
  .steps-grid {
    flex-direction: column;
    align-items: center;
  }
  .features-image,
  .features-content,
  .step {
    max-width: none;
    flex: 1 1 100%;
  }
}

/* Adjust car images on small screens to ensure the entire car photo remains visible */
@media (max-width: 767px) {
  .offer-card .card-img {
    height: auto !important;
    overflow: visible !important;
    display: block !important; /* بدل flex عشان ميبقاش فيه قص/تموضع غريب */
    background-color: var(--background-color);
  }

  .offer-card .card-img img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain; /* هنا هتبقى فعّالة مع width/height */
  }
}
