@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;600&display=swap');

/* =================== Global =================== */
body {
  margin: 0;
  font-family: "Vazirmatn", sans-serif;
  background: #f9f9f9;
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

/* =================== Top Bar =================== */
.top-bar-modern {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 40px;
  background: #004a99;
  color: white;
  position: relative;
}

.top-bar-modern img { width: 70px; }
.contact { font-weight: 600; }
.store-name {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  font-weight: 700;
  color: #ffda44;
}

/* =================== Navigation =================== */
.nav-links-modern {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  flex-wrap: wrap;
}

.nav-links-modern a {
  display: inline-flex;
  align-items: center;
  color: #004a99;
  text-decoration: none;
  margin: 10px 20px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s;
  position: relative;
}

.nav-links-modern a:hover {
  background: #e6f0ff;
  color: #002f5e;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 100;
  flex-direction: row;
  gap: 20px;
}
.dropdown:hover .dropdown-menu { display: flex; }

.brand { display: flex; flex-direction: column; }
.brand a {
  color: #004a99;
  padding: 5px 10px;
  text-decoration: none;
  font-weight: 500;
  border-radius: 5px;
}
.brand a:hover { background: #e6f0ff; }

.model-menu {
  display: none;
  flex-direction: column;
  margin-top: 5px;
  padding-right: 10px;
}
.brand:hover .model-menu { display: flex; }
.model-menu a {
  font-size: 14px;
  padding: 4px 8px;
  color: #002f5e;
}
.model-menu a:hover { background: #dbe9ff; }

/* =================== Slider =================== */
.slider {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 30px auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.slides {
  position: relative;
  width: 100%;
  height: 500px; /* ارتفاع ثابت برای همه عکس‌ها */
}

.slides img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* عکس بدون کشیدگی و فیکس‌شده */
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slides .active {
  opacity: 1;
  position: absolute;
}

/* دکمه‌های کنترل اسلایدر */
.slider-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 20px;
  pointer-events: none;
}

.slider-controls button {
  pointer-events: all;
  background: rgba(255,255,255,0.8);
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-controls button:hover {
  transform: scale(1.3);
  background: linear-gradient(135deg, #ffda44, #ff6f61);
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

/* نسخه موبایل */
@media (max-width: 768px) {
  .slides {
    height: 300px; /* کمترش برای موبایل */
  }
}


/* =================== Car Cards =================== */

/* =================== کانتینر کارت‌ها =================== */
.cars {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* دسکتاپ: 4 کارت کنار هم */
  gap: 15px;
  padding: 10px;
  box-sizing: border-box;
  width: 100%;           /* مطمئن می‌شه کانتینر اندازه صفحه باشه */
  overflow-x: hidden;    /* جلوگیری از اسکرول افقی */
}

/* کارت‌ها */
.car-card {
  background: white;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
  text-align: center;
  padding: 20px;
  transition: transform 0.4s, box-shadow 0.4s;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 430px; /* ارتفاع ثابت برای هماهنگی */
  overflow: hidden;
  box-sizing: border-box;
}

/* hover روی کل کارت */
.car-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* عکس‌ها */
.car-card img {
  width: 100%;
  height: 200px; /* ارتفاع دقیق برای همه برابر */
  object-fit: contain;
  border-radius: 12px;
  transition: transform 0.3s;
}

/* hover روی عکس */
.car-card img:hover {
  transform: scale(1.1);
}

/* عنوان */
.car-card h3 {
  margin: 15px 0 10px;
  font-weight: bold;
}

/* دکمه‌ها */
.car-card button {
  background: #004a99;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 10px;
  margin-top: auto; /* دکمه همیشه پایین کارت می‌مونه */
  cursor: pointer;
  transition: all 0.3s;
}

.car-card button:hover {
  background: #0066cc;
  transform: scale(1.05);
}

/* =================== نسخه موبایل: کارت‌ها برن پایین =================== */
@media (max-width: 768px) {
  .cars {
    grid-template-columns: 1fr; /* هر کارت یک ردیف کامل بگیره */
    gap: 15px;
    padding: 10px;
  }
  .car-card {
    padding: 12px;
    font-size: 14px;
    width: 100%; /* عرض کارت‌ها کامل صفحه */
    height: auto; /* ارتفاع منعطف */
  }
}


   /*footer*/ 
footer {
  background: #002f5e;
  color: white;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  padding: 50px 60px;
  margin-top: auto;
  box-sizing: border-box;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap:6px;
}

footer ul { 
  list-style: none; 
  padding: 0; 
}

footer ul li { 
  margin: 8px 0; 
}

footer a {
  color: #ddd;
  text-decoration: none;
  transition: color 0.3s;
}

footer a:hover { 
  color: white; 
}

footer p { 
  line-height: 1.5; 
  margin: 0; 
}

.contact-buttons {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-buttons a {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #25D366;
  color: white;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-buttons a.telegram {
  background-color: #0088cc;
}

.contact-buttons a:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 8px rgba(255, 255, 255, 0.2);
}


@media (max-width: 768px) {
  footer {
    grid-template-columns: 1fr;
    padding: 30px 20px;
  }

  .contact-buttons {
    justify-content: center;
  }
}

.phone-icon {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #004a99; /* رنگ دلخواه */
  color: white;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.phone-icon:hover {
  background-color: #0066cc;
  transform: scale(1.1);
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.contact-buttons a.instagram {
  background-color:rgb(225, 48, 108) ;
}


/* =================== Responsive =================== */
@media (max-width: 768px) {
  .top-bar-modern {
    flex-direction: column;
    text-align: center;
    padding: 10px 20px;
  }

  .store-name { position: relative; left: auto; transform: none; margin: 10px 0; }

  .nav-links-modern { flex-direction: column; }
  .nav-links-modern a { margin: 10px 0; }

  .dropdown-menu { position: relative; flex-direction: column; }
  .brand { margin-bottom: 10px; }
}
