/* 수면 영상 갤러리 스타일 */

/* 갤러리 그리드 레이아웃 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 20px 0;
}

@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    padding: 16px 0;
  }
}

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* 비디오 카드 */
.video-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.video-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* 썸네일 */
.video-card__thumbnail {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 비율 */
  background: #000;
  overflow: hidden;
}

.video-card__thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card__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);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.video-card:hover .video-card__overlay {
  opacity: 1;
}

.video-card__overlay i {
  font-size: 48px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* 카드 내용 */
.video-card__content {
  padding: 16px;
}

.video-card__title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #333;
}

.video-card__title.is-visited {
  color: #999;
}

.video-card__title i {
  margin-right: 4px;
  font-size: 12px;
  color: #666;
}

.video-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  color: #666;
}

.video-card__category a {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}

.video-card__category a:hover {
  text-decoration: underline;
}

.video-card__stats {
  display: flex;
  gap: 12px;
  align-items: center;
}

.video-card__stats i {
  margin-right: 4px;
}

.video-card__date {
  font-size: 12px;
  color: #999;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 빈 상태 */
.video-grid__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

/* YouTube 임베드 스타일 */
.video-embed {
  margin: 24px 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-embed__container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 비율 */
  background: #000;
}

.video-embed__container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-embed__info {
  padding: 12px 16px;
  background: #f5f5f5;
  border-top: 1px solid #e0e0e0;
}

.video-embed__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d32f2f;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.video-embed__link:hover {
  color: #b71c1c;
}

.video-embed__link i {
  font-size: 20px;
}

/* 기존 리스트 뷰 (YouTube 정보가 없는 경우) */
.layout__topics__topic {
  /* 기존 스타일 유지 */
}

