/* 健康科普 */
.health-tabs {
  margin-top: 30px;
}

.tab-buttons {
  display: flex;
  margin-bottom: 20px;
  justify-content: center;
}

.tab-button {
  padding: 10px 20px;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.tab-button.active {
  border-bottom-color: #1a5a8a;
  color: #1a5a8a;
  font-weight: bold;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.article-item {
  background-color: white;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  width: 100%;
  text-decoration: none;
}

.article-img {
  height: 206px;
  width: 100%;
  background-color: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  overflow: hidden;
}

.article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-info {
  padding: 15px;
}

.article-info h3 {
  color: #1a5a8a;
  margin-bottom: 10px;
  font-size: 1rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.video-item:hover {
  transform: translateY(-5px);
}

.video-thumb {
  position: relative;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: linear-gradient(135deg, #1a5a8a 0%, #2c7fb8 50%, #3a9ad9 100%);
  border-radius: 8px;
}

.video-thumb:hover .play-overlay {
  opacity: 1;
}

.video-thumb video::-webkit-media-controls {
  display: flex !important;
}

.video-thumb video::-webkit-media-controls-play-button,
.video-thumb video::-webkit-media-controls-current-time-display,
.video-thumb video::-webkit-media-controls-time-remaining-display,
.video-thumb video::-webkit-media-controls-mute-button,
.video-thumb video::-webkit-media-controls-volume-slider,
.video-thumb video::-webkit-media-controls-toggle-closed-captions-button,
.video-thumb video::-webkit-media-controls-overflow-button {
  display: none !important;
}

.video-thumb video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-thumb .play-overlay.is-playing,
.video-thumb:hover .play-overlay.is-playing {
  opacity: 0 !important;
  pointer-events: none !important;
}

.video-thumb:hover .play-overlay:not(.is-playing) {
  opacity: 1;
}

.play-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(26, 90, 138, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-icon i {
  font-size: 24px;
  color: white;
  margin-left: 4px;
}

/* 视频加载中 */
.video-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 5;
}

.video-loading .loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
}

/* 视频封面图 */
.video-poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.video-info {
  padding: 20px;
}

.video-info h3 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: #1a5a8a;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .article-grid {
    grid-template-columns: 1fr;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .tab-button {
    padding: 8px 15px;
    font-size: 14px;
  }
}

/* 加载状态 */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #666;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f0f0f0;
  border-top: 4px solid #1a5a8a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 错误状态 */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background-color: #fff5f5;
  border-radius: 10px;
  margin: 20px 0;
}

.error-icon {
  font-size: 3rem;
  color: #dc3545;
  margin-bottom: 20px;
}

.error-state p {
  color: #dc3545;
  font-size: 1.1rem;
  margin-bottom: 20px;
  text-align: center;
}

.retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 30px;
  background-color: #1a5a8a;
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.retry-btn:hover {
  background-color: #2c7fb8;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(44, 127, 184, 0.3);
}

.retry-btn i {
  margin-right: 5px;
}

/* 无数据状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #999;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #ccc;
}

.empty-state p {
  font-size: 1.1rem;
}