/* ========================================
   VIDEO ARCHIVE STYLES
======================================== */

/* Archive Container */
.video-archive-container {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px;
}

/* Archive Header */
.video-archive-header {
  margin-bottom: 32px;
  text-align: center;
}

.video-archive-title {
  margin: 0 0 12px 0;
  font-size: 2rem;
  font-weight: 700;
  color: #1a2a3a;
}

.video-archive-description {
  margin: 0 0 20px 0;
  font-size: 1rem;
  color: #4a5568;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* Video Cards Grid */
.video-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: start;
  margin-bottom: 48px;
}

/* Video Card Wrapper */
.video-card-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Video Archive Card (Thumbnail) */
.video-archive-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
  background-color: #000;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* Play Button */
.video-archive-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border: 0;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.video-archive-card:hover .video-archive-card__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

/* Video Card Title */
.video-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: #1a2a3a;
}

.video-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.video-card__title a:hover {
  color: #dd230f;
}

/* Video Card Excerpt */
.video-card__excerpt {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #4a5568;
}

/* No Videos Message */
.no-videos {
  text-align: center;
  padding: 60px 20px;
}

.no-videos p {
  font-size: 1.125rem;
  color: #4a5568;
}

/* Pagination */
.video-pagination {
  margin-top: 48px;
  text-align: center;
}

.video-pagination .nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.video-pagination .page-numbers {
  display: inline-block;
  padding: 8px 12px;
  min-width: 40px;
  text-align: center;
  background: #fff;
  color: #1a2a3a;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.video-pagination .page-numbers:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
}

.video-pagination .page-numbers.current {
  background: #dd230f;
  color: #fff;
  border-color: #dd230f;
}

.video-pagination .prev,
.video-pagination .next {
  font-weight: 600;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .video-archive-container {
    margin: 16px auto;
  }

  .video-archive-title {
    font-size: 1.75rem;
  }

  .video-archive-description {
    font-size: 0.9375rem;
  }

  .video-cards-grid {
    gap: 20px;
    margin-bottom: 32px;
  }

  .video-archive-card__play {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .video-archive-title {
    font-size: 1.5rem;
  }

  .video-cards-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .video-archive-card__play {
    width: 44px;
    height: 44px;
  }

  .video-pagination .page-numbers {
    padding: 6px 10px;
    min-width: 36px;
    font-size: 0.875rem;
  }
}

/* ========================================
   SINGLE VIDEO STYLES
======================================== */

/* Single Video Container */
.single-video-container {
  max-width: 900px;
  margin: 32px auto;
  padding: 0 16px;
}

/* Single Video Header */
.single-video-header {
  margin-bottom: 24px;
}

.single-video-title {
  margin: 0 0 8px 0;
  font-size: 2rem;
  font-weight: 700;
  color: #1a2a3a;
  line-height: 1.3;
}

/* Single Video Player */
.single-video-player {
  margin-bottom: 32px;
}

.single-video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

/* Single Video Thumbnail (fallback if no embed) */
.single-video-thumbnail {
  margin-bottom: 32px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.single-video-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

/* Single Video Content */
.single-video-content {
  margin-bottom: 32px;
  font-size: 1rem;
  line-height: 1.7;
  color: #2d3748;
}

.single-video-content p {
  margin: 0 0 16px 0;
}

.single-video-content h2,
.single-video-content h3 {
  margin: 24px 0 12px 0;
  color: #1a2a3a;
}

.single-video-content a {
  color: #dd230f;
  text-decoration: none;
  transition: color 0.2s ease;
}

.single-video-content a:hover {
  color: #cd3423;
  text-decoration: underline;
}

/* Subscribe + Share toolbar (template-parts/video-engage-toolbar.php).
   Base styles live in video-card.css (loaded globally); this only tunes
   vertical rhythm inside the single-video layout: pull it toward the
   player above and keep a full gap before content/question below. */
.single-video-container .ctf-engage-toolbar {
  margin: -12px 0 32px;
}

/* Single Video Zoho Question
   One question below the video; every option is an <a> link to a Zoho
   survey with the answer pre-filled (template-parts/video-zoho-question.php).
   Visually matches the .survey-choice / .petition-choice card language
   but link-based, so options get a full-width tappable button treatment. */
.single-video-question {
  margin-bottom: 32px;
  padding: 24px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

/* Title is an <h2> for document-outline / SEO reasons — reset the heading
   defaults so it sizes like the other question titles on the site. */
.single-video-question-title {
  margin: 0 0 16px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a2a3a;
  line-height: 1.4;
}

.single-video-question-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.single-video-question-option,
.single-video-question-option:visited {
  display: block;
  /* 44px+ tap target (12+12 padding + 1.4 line-height ≈ 47px). */
  min-height: 44px;
  box-sizing: border-box;
  padding: 12px 18px;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  color: #1a2a3a;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  /* Long answer text (e.g. full sentences) must wrap, never overflow. */
  overflow-wrap: break-word;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.single-video-question-option:hover {
  border-color: #dd230f;
  color: #dd230f;
  background: #fff7f6;
}

.single-video-question-option:active {
  background: #ffece9;
  border-color: #b71c0c;
}

.single-video-question-option:focus-visible {
  outline: none;
  /* Neutral cool-gray keyboard focus ring — same convention as
     .survey-choice focus in survey-template.css. */
  box-shadow: 0 0 0 4px #94a3b8;
}

/* Editor-only misconfiguration notice (never rendered for visitors). */
.single-video-question--warning {
  background: #fffbea;
  border-color: #f0c040;
  color: #6b5310;
  font-size: 0.95rem;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .single-video-question {
    padding: 16px;
  }

  .single-video-question-title {
    font-size: 1.1rem;
  }

  .single-video-question-option {
    text-align: center;
  }
}

/* Responsive - Single Video */
@media (max-width: 768px) {
  .single-video-container {
    margin: 24px auto;
  }

  .single-video-title {
    font-size: 1.75rem;
  }

  .single-video-content {
    font-size: 0.9375rem;
  }
}

@media (max-width: 480px) {
  .single-video-title {
    font-size: 1.5rem;
  }

  .single-video-embed {
    border-radius: 6px;
  }
}
