/* Departments List Page Styles */
.departments-header {
  text-align: center;
  margin-bottom: 3rem;
}

.departments-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #C41E32;
  font-weight: 700;
}

.departments-subtitle {
  font-size: 1.1rem;
  color: #6b6b6b;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Departments Grid */
.departments-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

/* Department Card */
.department-card {
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  border-top: 5px solid #C41E32;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  background-size: cover !important;
  background-position: 50% !important;
  background-repeat: no-repeat !important;
  display: flex;
  flex-direction: column;
  gap: 25px;
  text-align: center;
}

.department-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.department-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #C41E32, #e74c3c);
}

/* Department Header */
.department-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.department-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: #111;
  margin: 0;
  line-height: 1.3;
  flex: 1;
}

.employee-count {
  background: rgba(196, 30, 50, 0.12);
  color: #C41E32;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  width: 22%;
}

/* Department Description */
.department-description {
  margin-bottom: 1.5rem;
}

.department-description p {
  color: #6b6b6b;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* Department Actions */
.department-actions {
  margin-top: auto;
}

.view-employees-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #C41E32;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: 2px solid #C41E32;
}

.view-employees-btn:hover {
  background: #a01828;
  border-color: #a01828;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(196, 30, 50, 0.3);
}
a.view-employees-btn:hover {
  color: white;
}

.btn-arrow {
  transition: transform 0.3s ease;
  font-size: 1.1rem;
}

.view-employees-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* No Departments State */
.no-departments {
  text-align: center;
  padding: 4rem 2rem;
  color: #6b6b6b;
  font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .departments-list-section {
    padding: 1.5rem 1rem;
  }

  .departments-header h1 {
    font-size: 2rem;
  }

  .departments-subtitle {
    font-size: 1rem;
  }

  .departments-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .department-card {
    padding: 1.5rem;
  }

  .department-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .department-name {
    font-size: 1.2rem;
  }

  .employee-count {
    align-self: flex-start;
  }
}

@media (max-width: 480px) {
  .departments-header h1 {
    font-size: 1.8rem;
  }

  .department-card {
    padding: 1.2rem;
  }

  .department-name {
    font-size: 1.1rem;
  }

  .view-employees-btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
  }
}

/* Animation for cards appearing */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.department-card {
  animation: fadeInUp 0.6s ease forwards;
}

.department-card:nth-child(1) { animation-delay: 0.1s; }
.department-card:nth-child(2) { animation-delay: 0.2s; }
.department-card:nth-child(3) { animation-delay: 0.3s; }
.department-card:nth-child(4) { animation-delay: 0.4s; }
.department-card:nth-child(5) { animation-delay: 0.5s; }
.department-card:nth-child(6) { animation-delay: 0.6s; }
