.org-chart-container {
  font-family: 'Vazirmatn', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 50px 25px;
  text-align: center;
  min-height: 400px;
  direction: rtl;
}

.chart-main-title {
  font-size: 28px;
  color: #184A5A;
  margin-bottom: 40px;
  font-weight: 700;
}

.org-chart-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
}

.org-level {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.level-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 30px;
  color: #184A5A;
  background: white;
  padding: 10px 30px;
  border-radius: 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: relative;
  z-index: 2;
}

.level-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  max-width: 1200px;
}

.org-card {
  background: linear-gradient(135deg, #184A5A 0%, #2d6a7e 100%);
  color: #fff;
  border-radius: 20px;
  padding: 20px;
  width: 200px;
  min-height: 180px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.org-card:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 6px 25px rgba(0,0,0,0.3);
}

/* استایل‌های تصویر */
.card-avatar {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border: 3px solid rgba(255,255,255,0.3);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* شکل‌های مختلف تصویر */
.card-avatar.shape-circle,
.card-avatar.shape-circle img {
  border-radius: 50%;
}

.card-avatar.shape-square,
.card-avatar.shape-square img {
  border-radius: 0;
}

.card-avatar.shape-rounded,
.card-avatar.shape-rounded img {
  border-radius: 15px;
}

.card-avatar.shape-rectangle {
  width: 80px;
  height: 60px;
  border-radius: 10px;
}

.card-avatar.shape-rectangle img {
  border-radius: 10px;
}

.org-card:hover .card-avatar {
  transform: scale(1.1);
  border-color: rgba(255,255,255,0.6);
}

.card-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.card-position {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.9);
  margin: 0;
}

/* خطوط اتصال بین سطوح */
.org-level:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 60px;
  background: linear-gradient(to bottom, #184A5A 0%, transparent 100%);
  z-index: 1;
}

/* انیمیشن تاخیری برای کارت‌ها */
.org-card:nth-child(1) { animation-delay: 0.1s; }
.org-card:nth-child(2) { animation-delay: 0.2s; }
.org-card:nth-child(3) { animation-delay: 0.3s; }
.org-card:nth-child(4) { animation-delay: 0.4s; }
.org-card:nth-child(5) { animation-delay: 0.5s; }
.org-card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive */
@media (max-width: 768px) {
  .org-chart-container {
    padding: 30px 15px;
  }

  .chart-main-title {
    font-size: 22px;
    margin-bottom: 25px;
  }

  .level-title {
    font-size: 18px;
    padding: 8px 20px;
    margin-bottom: 20px;
  }

  .org-card {
    width: 160px;
    min-height: 150px;
    padding: 15px;
  }

  .card-avatar {
    width: 50px;
    height: 50px;
  }

  .card-avatar.shape-rectangle {
    width: 65px;
    height: 50px;
  }

  .card-name {
    font-size: 14px;
  }

  .card-position {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .org-card {
    width: 140px;
    min-height: 130px;
  }

  .level-cards {
    gap: 10px;
  }

  .card-avatar {
    width: 45px;
    height: 45px;
  }

  .card-avatar.shape-rectangle {
    width: 60px;
    height: 45px;
  }
}
