/* 就医环境 */
.departments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.department-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: 251px;
}

.department-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.department-image {
  height: 100%;
  overflow: hidden;
}

.department-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.department-card:hover .department-image img {
  transform: scale(1.1);
}

.department-card:hover .department-image img.img-loaded {
  transform: scale(1.1);
}

/* 骨架屏样式 */
.skeleton-card {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

.skeleton-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 错误状态 */
.department-error {
  grid-column: 1 / -1;
  padding: 20px;
  background-color: #fff3f3;
  border-radius: 8px;
  color: #dc3545;
  text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .department-card {
    height: 200px;
  }
}