

/* 专家列表页面 */
.doctors-list-page {
  min-height: 100vh;
  background-color: #f8f9fa;
  padding: 0 0 40px;
}

.page-title {
  font-size: 2.5rem;
  color: #1a5a8a;
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  margin-top: 0;
  padding-top: 20px;
}

.page-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, #1a5a8a, #2c7fb8);
  margin: 15px auto 0;
  border-radius: 2px;
}

/* 专家网格 */
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  padding: 0 20px;
}

.doctors-grid a {
  text-decoration: none;
  color: inherit;
}

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

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

.doctor-image {
  height: 280px;
  overflow: hidden;
  position: relative;
}

.doctor-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: all 0.3s ease;
  opacity: 1;
}

.doctor-image img.img-loaded {
  opacity: 1;
}

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

.doctor-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  padding: 20px;
  color: white;
  transform: translateY(100%);
  transition: all 0.3s ease;
}

/* Recovered pages do not need to hide images while waiting for a load callback. */
.doctors-list-page .doctor-image img {
  opacity: 1;
}

/* Doctor detail layout was bundled separately from the list page in the recovered build. */
.doctor-detail-page .doctor-detail {
  background: #fff;
  border-radius: 10px;
  margin-bottom: 40px;
  padding: 40px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.doctor-detail-page .doctor-header {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #eee;
}

.doctor-detail-page .doctor-header .doctor-image {
  flex: 0 0 200px;
  width: 200px;
  height: 260px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  background: #f0f0f0;
}

.doctor-detail-page .doctor-header .doctor-image img {
  width: 100%;
  height: 100%;
  opacity: 1;
  object-fit: cover;
  display: block;
}

.doctor-detail-page .doctor-header .doctor-info {
  flex: 1;
}

.doctor-detail-page .doctor-header .doctor-name {
  color: #1a5a8a;
  margin-bottom: 10px;
  font-size: 1.8rem;
}

.doctor-detail-page .doctor-header .doctor-position {
  color: #666;
  margin-bottom: 15px;
}

.doctor-detail-page .doctor-header .doctor-intro {
  color: #555;
  line-height: 1.8;
}

@media (max-width: 768px) {
  .doctor-detail-page .doctor-detail { padding: 20px; }
  .doctor-detail-page .doctor-header { flex-direction: column; align-items: center; text-align: center; }
  .doctor-detail-page .doctor-header .doctor-image { flex-basis: 200px; width: 160px; height: 200px; }
}

.doctor-card:hover .doctor-overlay {
  transform: translateY(0);
}

.doctor-overlay p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.doctor-info {
  padding: 20px;
}

.doctor-name {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: #1a5a8a;
}

.doctor-specialty {
  color: #666;
  font-size: 0.95rem;
}

/* 骨架屏样式 */
.skeleton-doctor {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

.skeleton-info {
  padding: 20px;
}

.skeleton-name {
  height: 24px;
  width: 60%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
  margin: 0 auto 10px;
}

.skeleton-position {
  height: 16px;
  width: 40%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
  margin: 0 auto;
}

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

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

.retry-btn {
  margin-top: 20px;
  padding: 10px 30px;
  background-color: #1a5a8a;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.retry-btn:hover {
  background-color: #2c7fb8;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 50px;
}

.page-btn {
  padding: 10px 25px;
  background-color: #1a5a8a;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
  background-color: #2c7fb8;
  transform: translateY(-2px);
}

.page-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.page-info {
  color: #666;
  font-size: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .doctors-list-page {
    padding: 0 0 20px;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .doctors-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
  
  .doctor-image {
    height: 250px;
  }
}
