/* =====================================================
   PNTV Africa – Videos, Podcasts, Programmes & Schedule
   Brand Navy: #05305A
   Medium font sizes + fully responsive
   ===================================================== */

/* ---------- Shared Page Layout ---------- */
.videos-page,
.videos-category-page,
.video-detail-page,
.podcasts-page,
.podcast-detail-page,
.programmes-page,
.programme-detail-page,
.schedule-page {
  padding: 0.75rem 0 2.5rem;
}

.page-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #E2E8F0;
}

.page-title {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.page-description {
  font-size: 0.95rem;
  color: #64748B;
  max-width: 580px;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

/* ---------- Video Grid (Index + Category) ---------- */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .video-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

/* Video Card (used by render_video_card) */
.video-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #05305A;
  box-shadow: 0 2px 10px rgba(5, 48, 90, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(5, 48, 90, 0.12);
  border-color: #032843;
}

.video-thumb-link {
  display: block;
  position: relative;
  overflow: hidden;
}

.video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.video-card:hover .video-thumb {
  transform: scale(1.04);
}

.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(5, 48, 90, 0.9);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.video-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  padding: 0.9rem 1rem 1.1rem;
  margin: 0;
  color: #0F172A;
}

.video-title a {
  color: #0F172A;
  text-decoration: none;
}

.video-title a:hover {
  color: #05305A;
}

/* ---------- Video Detail Page ---------- */
.video-player-wrapper {
  margin-bottom: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 20px rgba(5, 48, 90, 0.15);
  /* Ensure the wrapper itself has the right shape */
  aspect-ratio: 16 / 9;
  width: 100%;
  position: relative;
}

/* Direct video file */
.video-player-wrapper > video,
.video-player-wrapper .video-native {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain; /* letterbox instead of crop */
  background: #000;
  border: none;
}

/* Embed wrappers (from render_video_player) */
.video-player-wrapper .video-embed-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}
.video-player-wrapper .video-embed-wrap.video-embed-16x9 {
  aspect-ratio: auto; /* let parent control size */
}

/* YouTube / Vimeo iframe */
.video-player-wrapper iframe,
.video-player-wrapper .video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Fallback for older browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 16 / 9) {
  .video-player-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 9/16 */
    height: 0;
  }
  .video-player-wrapper > * {
    position: absolute;
    inset: 0;
  }
}

.video-info {
  margin-bottom: 1.75rem;
}

.video-detail-title {
  font-size: clamp(1.35rem, 2.8vw, 1.7rem);
  font-weight: 800;
  color: #0F172A;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.video-description {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.video-description p{
  color: #000000;
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.85rem;
  color: #64748B;
}

.video-meta time,
.video-views,
.video-duration {
  display: inline-flex;
  align-items: center;
}

.video-transcript {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  margin-top: 1.5rem;
}

.video-transcript h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #05305A;
  margin-bottom: 0.75rem;
}

.video-transcript p {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.65;
}

/* ---------- Video Card Placeholder (when no thumbnail) ---------- */
.video-thumb-placeholder {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #05305A, #0A4A7A);
  position: relative;
  overflow: hidden;
}

.video-thumb-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.08) 0%, transparent 60%);
}

.video-thumb-placeholder .play-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  font-size: 1.5rem;
  padding-left: 4px;
  transition: transform 0.25s ease, background 0.25s ease;
}

.video-card:hover .video-thumb-placeholder .play-icon {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.25);
}

/* ---------- Podcast Grid ---------- */
.podcast-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .podcast-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .podcast-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .podcast-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

/* Podcast Card */
.podcast-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #05305A;
  box-shadow: 0 2px 10px rgba(5, 48, 90, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.podcast-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(5, 48, 90, 0.12);
}

.podcast-cover-link {
  display: block;
  overflow: hidden;
}

.podcast-cover {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.podcast-card:hover .podcast-cover {
  transform: scale(1.04);
}

.podcast-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  padding: 0.9rem 1rem 1.1rem;
  margin: 0;
  color: #0F172A;
}

.podcast-title a {
  color: #0F172A;
  text-decoration: none;
}

.podcast-title a:hover {
  color: #05305A;
}

/* ---------- Podcast Detail Page ---------- */
.podcast-player-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  align-items: center;
}

@media (min-width: 700px) {
  .podcast-player-wrapper {
    flex-direction: row;
    align-items: flex-start;
  }
}

.podcast-cover-large {
  width: 100%;
  max-width: 260px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(5, 48, 90, 0.15);
  border: 1px solid #05305A;
}

.podcast-audio-wrapper {
  flex: 1;
  width: 100%;
}

.podcast-player {
  width: 100%;
  height: 48px;
  border-radius: 8px;
}

.podcast-info {
  margin-bottom: 1.5rem;
}

.podcast-title {
  font-size: clamp(1.35rem, 2.8vw, 1.7rem);
  font-weight: 800;
  color: #0F172A;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.podcast-episode {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #05305A;
  background: rgba(5, 48, 90, 0.08);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.85rem;
}

.podcast-description {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.podcast-show-notes {
  background: #F8FAFC;
  border-left: 4px solid #05305A;
  padding: 1rem 1.2rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 1.25rem;
}

.podcast-show-notes h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #05305A;
  margin-bottom: 0.5rem;
}

.podcast-show-notes p {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.6;
}

.podcast-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.85rem;
  color: #64748B;
}

.podcast-transcript {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  margin-top: 1.5rem;
}

.podcast-transcript h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #05305A;
  margin-bottom: 0.75rem;
}

.podcast-transcript p {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.65;
}

/* ---------- Programmes Grid ---------- */
.programmes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .programmes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .programmes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Programme Card (assumed structure from render_programme_card) */
.programme-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #05305A;
  box-shadow: 0 2px 10px rgba(5, 48, 90, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
}

.programme-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(5, 48, 90, 0.12);
}

/* ---------- Programme Detail ---------- */
.programme-hero {
  margin-bottom: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(5, 48, 90, 0.12);
}

.programme-hero-image {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
  display: block;
}

.programme-header {
  margin-bottom: 1.75rem;
}

.programme-title {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.programme-host {
  font-size: 0.95rem;
  color: #05305A;
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.programme-description {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.6;
}

.programme-current,
.programme-upcoming {
  background: #F0F7FF;
  border: 1px solid #BDD7F0;
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.25rem;
}

.programme-current h3,
.programme-upcoming h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #05305A;
  margin-bottom: 0.4rem;
}

.programme-airtime {
  font-size: 1rem;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 0.75rem;
}

.programme-schedule {
  margin-top: 1.75rem;
}

.programme-schedule h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #05305A;
  margin-bottom: 0.9rem;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(5, 48, 90, 0.06);
}

.schedule-table th {
  background: #05305A;
  color: #fff;
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
}

.schedule-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #E2E8F0;
  color: #334155;
}

.schedule-table tr:last-child td {
  border-bottom: none;
}

.schedule-table tr:hover td {
  background: #F8FAFC;
}

/* ---------- Schedule Page ---------- */
.current-programme {
  background: linear-gradient(135deg, #05305A, #0A4A7A);
  color: #fff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 4px 18px rgba(5, 48, 90, 0.2);
}

.current-programme h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
  margin-bottom: 0.4rem;
}

.current-programme-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
}

.programme-name {
  font-size: 1.2rem;
  font-weight: 700;
}

.programme-time {
  font-size: 0.95rem;
  opacity: 0.9;
}

.schedule-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .schedule-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .schedule-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1400px) {
  .schedule-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.schedule-day {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 2px 8px rgba(5, 48, 90, 0.05);
}

.schedule-day.today {
  border-color: #05305A;
  box-shadow: 0 4px 16px rgba(5, 48, 90, 0.12);
}

.day-title {
  font-size: 1rem;
  font-weight: 700;
  color: #05305A;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #05305A;
}

.schedule-day.today .day-title {
  color: #032843;
}

.schedule-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.schedule-items li {
  padding: 0.55rem 0;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.schedule-items li:last-child {
  border-bottom: none;
}

.schedule-programme {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0F172A;
  text-decoration: none;
}

.schedule-programme:hover {
  color: #05305A;
}

.schedule-time {
  font-size: 0.8rem;
  color: #64748B;
}

.no-schedule {
  font-size: 0.85rem;
  color: #94A3B8;
  font-style: italic;
}

/* ---------- Buttons (shared) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: #05305A;
  color: #fff;
}

.btn-primary:hover {
  background: #032843;
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: #05305A;
  border: 1.5px solid #05305A;
}

.btn-secondary:hover {
  background: #05305A;
  color: #fff;
}

.btn-sm {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
}

/* ---------- Empty State (shared) ---------- */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: #F8FAFC;
  border-radius: 12px;
}

.empty-state a {
  display: inline-block;
  margin-top: 1rem;
  background: linear-gradient(135deg, #FF8C1A, #FFCA26);
  color: #021F3A;
  font-weight: 700;
  padding: 0.65rem 1.3rem;
  border-radius: 8px;
  text-decoration: none;
}

/* ---------- Pagination (shared – keep consistent) ---------- */
.pagination,
.pagination-nav,
ul.page-numbers,
.page-numbers,
nav.pagination,
.pagination ul {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.35rem !important;
  margin: 1.5rem auto 0.5rem !important;
  padding: 0 !important;
  list-style: none !important;
  width: 100% !important;
}

.pagination a,
.pagination span,
.page-numbers a,
.page-numbers span,
.page-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 36px !important;
  height: 36px !important;
  padding: 0 0.65rem !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  color: #0F172A !important;
  background: #fff !important;
  border: 1px solid #E2E8F0 !important;
  text-decoration: none !important;
}

.pagination a:hover,
.page-numbers a:hover {
  background: #05305A !important;
  color: #fff !important;
  border-color: #05305A !important;
}

.pagination .current,
.page-numbers .current,
.pagination span.current {
  background: #05305A !important;
  color: #fff !important;
  border-color: #05305A !important;
}

/* ---------- Small screens polish ---------- */
@media (max-width: 480px) {
  .video-title,
  .podcast-title {
    font-size: 0.9rem;
  }

  .page-title {
    font-size: 1.4rem;
  }

  .programme-hero-image {
    aspect-ratio: 16/9;
  }
}


/* =====================================================
   WATCH LIVE PAGE
   ===================================================== */
.watch-live-page {
  padding: 0.75rem 0 2.5rem;
}

/* Player container */
.live-player-wrapper {
  margin-bottom: 1.75rem;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 6px 24px rgba(5, 48, 90, 0.18);
  border: 1px solid #05305A;
}

.live-player {
  position: relative;
  width: 100%;
  background: #000;
}

.live-player video,
#livePlayer {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
  border: none;
  outline: none;
}

/* Fallback when stream is offline */
.live-fallback {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.live-fallback-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  position: absolute;
  inset: 0;
}

.live-fallback-message {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 1.5rem;
  background: rgba(5, 48, 90, 0.85);
  border-radius: 10px;
  max-width: 340px;
}

.live-fallback-message p {
  margin: 0.25rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
}

.live-fallback-message p:first-child {
  font-size: 1.05rem;
  font-weight: 700;
}

/* Now Playing & Up Next blocks */
.live-programme-info,
.live-upcoming {
  background: #F0F7FF;
  border: 1px solid #BDD7F0;
  border-left: 4px solid #05305A;
  border-radius: 0 10px 10px 0;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.15rem;
}

.live-programme-info h3,
.live-upcoming h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #05305A;
  margin-bottom: 0.45rem;
}

.live-programme-info .programme-info,
.live-upcoming .programme-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  align-items: baseline;
}

.live-programme-info .programme-name,
.live-upcoming .programme-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0F172A;
}

.live-programme-info .programme-time,
.live-upcoming .programme-time {
  font-size: 0.9rem;
  color: #64748B;
  font-weight: 500;
}

/* Highlight “Now Playing” a bit more */
.live-programme-info {
  background: linear-gradient(135deg, #05305A, #0A4A7A);
  border: none;
  border-left: none;
  border-radius: 10px;
  color: #fff;
  box-shadow: 0 4px 16px rgba(5, 48, 90, 0.2);
}

.live-programme-info h3 {
  color: rgba(255, 255, 255, 0.85);
}

.live-programme-info .programme-name {
  color: #fff;
}

.live-programme-info .programme-time {
  color: rgba(255, 255, 255, 0.85);
}

/* Action buttons */
.live-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.live-links .btn {
  min-width: 160px;
  text-align: center;
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .live-fallback-message {
    max-width: 90%;
    padding: 1.1rem;
  }

  .live-programme-info .programme-name,
  .live-upcoming .programme-name {
    font-size: 0.95rem;
  }

  .live-links {
    flex-direction: column;
  }

  .live-links .btn {
    width: 100%;
  }
}