/* Set all body text to serif - increased specificity for production */
html body,
body.list,
body {
    font-family: Georgia, "Times New Roman", Times, serif !important;
}

/* Override all header tags to use a non-serif font */
h1, h2, h3, h4, h5, h6, header, footer {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* YouTube embed responsive - Force consistent centering for all environments */
.post-content .youtube-embed,
.youtube-embed,
article.post-single .post-content .youtube-embed,
main.main article.post-single .post-content .youtube-embed {
  position: relative !important;
  width: 100% !important;
  max-width: 560px !important;
  margin: 2rem auto !important;
  text-align: center !important;
  display: block !important;
}

.post-content .youtube-embed iframe,
.youtube-embed iframe,
article.post-single .post-content .youtube-embed iframe,
main.main article.post-single .post-content .youtube-embed iframe {
  width: 100% !important;
  height: 315px !important;
  border-radius: 8px !important;
  display: block !important;
  margin: 0 auto !important;
  max-width: 100% !important;
}

.youtube-link {
  text-align: center !important;
  margin-top: 1rem !important;
  font-size: 0.9rem !important;
}

.youtube-link a {
  color: var(--primary) !important;
  text-decoration: none !important;
}

/* Video thumbnails in list view - side by side layout only for videos section - Maximum specificity */
html body.list main.main .videos-list article.post-entry,
html body.list .main .videos-list .post-entry,
html body main.main .videos-list .post-entry,
body.list .videos-list .post-entry,
body .main .videos-list .post-entry,
.videos-list .post-entry,
.videos-list article.post-entry {
  display: inline-block !important;
  width: calc(50% - 1rem) !important;
  margin: 0 0.5rem 2rem 0.5rem !important;
  vertical-align: top !important;
  box-sizing: border-box !important;
  float: none !important;
}

.video-entry-cover,
.videos-list .video-entry-cover,
.videos-list .post-entry .video-entry-cover {
  max-width: 100% !important;
  margin: 0 0 1rem 0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  position: relative !important;
}

.video-entry-cover img,
.videos-list .video-entry-cover img,
.videos-list .post-entry .video-entry-cover img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16/9 !important;
  object-fit: cover !important;
  display: block !important;
}

@media (max-width: 768px) {
  html body.list main.main .videos-list article.post-entry,
  html body.list .main .videos-list .post-entry,
  html body main.main .videos-list .post-entry,
  body.list .videos-list .post-entry,
  body .main .videos-list .post-entry,
  .videos-list .post-entry,
  .videos-list article.post-entry {
    display: block !important;
    width: 100% !important;
    margin: 0 0 2rem 0 !important;
    float: none !important;
  }
}

/* Video overlay styling for videos in theme's entry-cover - Force consistent rendering */
.video-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0,0,0,0.1) !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease !important;
  z-index: 2 !important;
}

.entry-cover:hover .video-overlay,
.video-entry-cover:hover .video-overlay {
  opacity: 1 !important;
}

.video-overlay .play-button {
  background: rgba(0,0,0,0.8) !important;
  color: white !important;
  border-radius: 50% !important;
  width: 60px !important;
  height: 60px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.5rem !important;
  transition: background-color 0.3s ease !important;
  cursor: pointer !important;
  user-select: none !important;
}

.video-overlay .play-button:hover {
  background: rgba(0,0,0,0.9) !important;
}


/* Related posts styling for video pages */
.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-posts ul {
  list-style: none;
  padding: 0;
}

.related-posts li {
  margin: 0.5rem 0;
}

.lang-indicator {
  font-size: 0.8rem;
  color: var(--secondary);
  font-style: italic;
}