/* Video Archive Page Styles */
/* Extends the main styles.css with video-specific styling */

/* Video Archive Section */
.video-archive-section {
  background-color: #f8f8f8;
  padding: 40px 20px;
  min-height: 70vh;
  border-radius: 15px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Individual Video Section */
.video-section {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Video Thumbnail */
.video-thumbnail {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: #0c3c60;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* Special styling for church logo thumbnails */
.video-thumbnail img[src="images/logo.png"] {
  object-fit: contain;
  padding: 20px;
  background-color: #0c3c60;
  max-width: 80%;
  max-height: 80%;
  width: auto;
  height: auto;
  border-radius: 12px;
}

.video-link:hover .video-thumbnail img {
  transform: scale(1.05);
}

/* Play Overlay */
.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 3em;
  opacity: 0.8;
  transition: opacity 0.3s ease, transform 0.3s ease;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.video-link:hover .play-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

/* Fallback for missing images */
.video-thumbnail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0c3c60;
  opacity: 0.1;
}

/* Video Description */
.video-description {
  padding: 20px;
}

.video-description h3 {
  color: #0c3c60;
  font-size: 1.3em;
  margin: 0 0 10px 0;
  font-weight: 600;
  line-height: 1.4;
}

.video-date {
  color: #8b0000;
  font-weight: 600;
  margin: 0 0 10px 0;
  font-size: 0.95em;
}

.video-summary {
  color: #333;
  line-height: 1.6;
  margin: 0;
  font-size: 0.95em;
}

/* Video Link Styling */
.video-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.video-link:hover {
  text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 10px;
  }
  
  .video-archive-section {
    padding: 30px 15px;
  }
  
  .video-thumbnail {
    height: 180px;
  }
  
  .play-overlay {
    font-size: 2.5em;
  }
  
  .video-description {
    padding: 15px;
  }
  
  .video-description h3 {
    font-size: 1.2em;
  }
}

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .video-thumbnail {
    height: 160px;
  }
  
  .play-overlay {
    font-size: 2em;
  }
  
  .video-description {
    padding: 12px;
  }
  
  .video-description h3 {
    font-size: 1.1em;
  }
  
  .video-date,
  .video-summary {
    font-size: 0.9em;
  }
}

/* Loading States */
.video-thumbnail img {
  transition: opacity 0.3s ease;
}

.video-thumbnail img:not([src]),
.video-thumbnail img[src=""] {
  opacity: 0;
}

/* Accessibility Improvements */
.video-link:focus {
  outline: 2px solid #0c3c60;
  outline-offset: 2px;
}

.video-link:focus .video-section {
  transform: translateY(-2px);
}

/* Print Styles */
@media print {
  .video-archive-section {
    background-color: white !important;
  }
  
  .video-section {
    box-shadow: none !important;
    border: 1px solid #ddd;
  }
  
  .play-overlay {
    display: none;
  }
}

/* Disabled State Styles */
.video-link.disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.video-link.disabled:hover {
  text-decoration: none;
}

.video-link.disabled:hover .video-thumbnail img {
  transform: none;
}

.video-section:has(.video-link.disabled) {
  transform: none;
}

.video-section:has(.video-link.disabled):hover {
  transform: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.play-overlay.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.video-status {
  font-style: italic;
  color: #666;
  margin-top: 8px;
  font-size: 0.9em;
}

/* Speaker/location subtitle under a class title — smaller so it stays on one line */
.video-speaker {
  display: block;
  font-size: 0.78em;
  font-weight: 500;
  margin-top: 3px;
}