/* 🎨 رنگ‌ها و متغیرها */
:root {
  --bg: #f9f9f9;
  --primary: #1d3c6a;
  --accent: #6b7b8c;
  --text: #333;
  --light: #ffffff;
  --border: #e0e0e0;
}

/* 🌐 تنظیمات کلی */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth; /* ✅ اسکرول نرم */
}

body {
  font-family: "IRANSans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
}

/* 🔝 نوار بالا */
.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--light);
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

body {
  padding-top: 80px; /* برای فضای هدر ثابت */
}

.nav-bar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 👥 گروه لوگو و زبان */
.left-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
  margin-left: 0.5rem;
  transition: transform 0.2s ease;
}

.brand-logo:hover {
  transform: scale(1.05);
}

.logo {
  font-weight: bold;
  font-size: 1.15rem;
  color: var(--primary);
}

/* 🌐 انتخاب زبان */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.lang-switch button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.lang-switch button:hover {
  color: #007b55;
}

.lang-switch .active {
  color: #007b55;
  text-decoration: underline;
}

/* لینک‌های منو */
.main-nav a {
  text-decoration: none;
  color: var(--text);
  margin: 0 0.7rem;
  font-weight: 500;
  transition: color 0.3s;
}

.main-nav a:hover {
  color: var(--accent);
}

/* 📱 منو همبرگری */
.menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--primary);
}

@media (max-width: 900px) {
  .menu-btn {
    display: block;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    background: #fff;
    position: absolute;
    top: 64px;
    right: 0;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-top: 1px solid var(--border);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid var(--border);
  }
}

/* 🌅 بخش معرفی (Hero) */
.hero {
  background: var(--light);
  padding: 4rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: right;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 1100px;
  width: 100%;
}

.hero-text {
  flex: 1 1 400px;
}

.hero-text h1 {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.hero-text p {
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-image-container {
  flex: 0 0 300px;
  text-align: center;
}

.hero-image {
  width: 100%;
  max-width: 260px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 15px rgba(0,0,0,0.1);
  animation: floatOnce 2.5s ease-in-out;
}

/* انیمیشن فقط یک‌بار */
@keyframes floatOnce {
  0% { transform: translateY(10px); opacity: 0; }
  50% { transform: translateY(-5px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

/* دکمه اصلی */
.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.8rem 1.6rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-primary:hover {
  background: #274d8c;
  transform: scale(1.05);
}

/* 🌊 موج جداکننده */
.wave-divider {
  width: 100%;
  height: 100px;
  background: var(--primary);
  clip-path: ellipse(70% 100% at 50% 100%);
}
.wave-divider.flip {
  clip-path: ellipse(70% 100% at 50% 0%);
}

/* 💡 خدمات */
.wave {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 4rem 1rem;
}

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

.service-card {
  background: #fff;
  color: var(--primary);
  border-radius: 8px;
  padding: 1.5rem;
  width: 280px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}

.service-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.service-card img {
  width: 60px;
  margin-bottom: 1rem;
}

/* 🧭 درباره ما */
.about {
  background: #f4f7fb;
  padding: 4rem 1rem;
  text-align: center;
}

.about p {
  max-width: 800px;
  margin: 0 auto;
  color: var(--accent);
}

/* 💬 نظرات مشتریان */
.testimonials {
  background: var(--light);
  text-align: center;
  padding: 4rem 1rem;
}

.testimonial-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.testimonial {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  width: 280px;
  padding: 1.5rem;
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.8s ease;
}

.testimonial.visible {
  opacity: 1;
  transform: scale(1);
}

.testimonial img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.testimonial h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.testimonial p {
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.testimonial span {
  font-size: 0.85rem;
  color: #777;
}

/* 📞 بخش تماس */
.contact {
  text-align: center;
  padding: 3rem 1rem 4rem;
  background: #fff;
}

.contact h2 {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.contact p {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 1.5rem;
}

/* 🧾 فرم مشاوره */
.consult-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: #fafafa;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 600px;
  margin: 0 auto;
}

.consult-form label {
  font-weight: 500;
  color: var(--primary);
  text-align: right;
}

.consult-form input,
.consult-form textarea {
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  font: inherit;
  width: 100%;
}

.consult-form input:focus,
.consult-form textarea:focus {
  outline: none;
  border-color: #999;
}

/* 🌐 شبکه‌های اجتماعی */
.subs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.subs a {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.subs a:hover {
  background: #007b55;
  color: #fff;
  border-color: #007b55;
}

/* ⚙️ فوتر */
footer {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

/* 📱 واکنش‌گرا */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
  }
  .hero-text h1 {
    font-size: 1.8rem;
  }
  .service-card, .testimonial {
    width: 90%;
  }
}
/* 🌅 بخش معرفی */
.hero {
  background: var(--light);
  padding: 5rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: right;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 1100px;
  width: 100%;
}

/* ✍️ متن سمت راست */
.hero-text {
  flex: 1 1 400px;
  animation: fadeInText 1.2s ease-out;
}

.hero-text h1 {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.hero-text p {
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

/* 🖼️ تصویر کنار متن (سمت چپ) */
.hero-image-container {
  flex: 0 0 400px; /* ✅ کمی بزرگ‌تر از قبل */
  text-align: center;
  perspective: 1000px; /* برای افکت چرخش */
}

.hero-image {
  width: 100%;
  max-width: 380px;
  height: auto;
  border-radius: 0; /* حذف گوشه‌گردی */
  box-shadow: none; /* بدون سایه */
  background: transparent;
  transform: rotateY(-8deg) translateY(20px);
  opacity: 0;
  animation: imageEntrance 1.6s ease-out forwards; /* ✅ انیمیشن مدرن */
}

/* 🎬 افکت ورود نرم و چرخش جزئی */
@keyframes imageEntrance {
  0% {
    opacity: 0;
    transform: rotateY(-12deg) translateY(40px);
  }
  60% {
    opacity: 1;
    transform: rotateY(-5deg) translateY(-4px);
  }
  100% {
    transform: rotateY(0deg) translateY(0);
    opacity: 1;
  }
}

/* ✨ افکت ورود ملایم متن */
@keyframes fadeInText {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 📱 واکنش‌گرا */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 1.8rem;
  }

  .hero-image-container {
    flex: 0 0 auto;
  }

  .hero-image {
    max-width: 260px;
    transform: rotateY(0deg) translateY(0);
  }
}
