/* =========================
   PROPOVEDI (Sermons) – video page styles
   Uses the same theme variables from style.css
========================= */

/* ---------- playlist player ---------- */
.video-player-wrap {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto 36px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}

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

/* ---------- now playing info ---------- */
.now-playing {
  text-align: center;
  margin-bottom: 32px;
}

.now-playing h2 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--title);
  margin: 0 0 4px;
}

.now-playing p {
  font-size: 14px;
  color: #8a7b6a;
}

/* ---------- video grid ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.video-card {
  background: var(--stone-lighter);
  border: 1px solid rgba(176,144,128,0.22);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}

.video-card:hover {
  box-shadow: 0 6px 22px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.video-card.active {
  border-color: var(--gold-accent);
  box-shadow: 0 0 0 2px var(--gold-accent), 0 6px 22px rgba(0,0,0,0.12);
}

.video-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.video-card:hover .video-thumb img {
  opacity: 0.85;
}

.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  pointer-events: none;
}

.video-card:hover .video-play-icon {
  background: rgba(192,80,77,0.85);
}

.video-play-icon::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}

.video-card-body {
  padding: 14px 16px;
}

.video-card-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--title);
  margin: 0 0 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card-body .video-date {
  font-size: 12px;
  color: #8a7b6a;
}

.video-card-body .video-index {
  font-size: 11px;
  color: #aaa;
  float: right;
  margin-top: 2px;
}

/* ---------- playlist link ---------- */
.playlist-link {
  text-align: center;
  margin-bottom: 32px;
}

.playlist-link a {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  color: var(--gold-accent);
  text-decoration: none;
  transition: color 0.2s;
}

.playlist-link a:hover {
  color: var(--title);
}

/* ---------- loading / error ---------- */
.videos-loading,
.videos-error {
  text-align: center;
  padding: 40px 0;
  font-size: 15px;
}

.videos-loading { color: #999; }
.videos-error   { color: #c0504d; }

/* ---------- responsive ---------- */
@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .video-player-wrap {
    border-radius: 0;
    margin-left: -20px;
    margin-right: -20px;
    max-width: none;
    width: calc(100% + 40px);
  }

  .now-playing h2 {
    font-size: 17px;
  }
}

