/*
 * Styles for the Zentrum YouTube gallery
 *
 * The grid uses flexbox to arrange the cards responsively. Each video card
 * displays the thumbnail along with its title and a short description. The
 * modal itself relies on Bootstrap styling; only minor adjustments are made
 * here.
 */

.zentrum-youtube-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.zentrum-video-card {
  flex: 1 1 280px;
  max-width: 280px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.page-content.page-cms h4 {
    text-align: left;
}

.zentrum-video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.zentrum-video-card img.zentrum-video-thumb {
  width: 100%;
  height: auto;
  display: block;
}

.zentrum-video-info {
  padding: 10px;
}

.zentrum-video-info h4 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.2;
  color: #333;
  /* Ensure titles never get underlined even if theme applies underline to links */
  text-decoration: none !important;
}

/* Ensure that hovering over titles/descriptions does not reintroduce an underline */
.zentrum-video-info h4:hover,
.zentrum-video-info p:hover {
  text-decoration: none !important;
}

.zentrum-video-info p {
  margin: 0;
  font-size: 14px;
  color: #666;
  /* Prevent underlining of descriptions */
  text-decoration: none !important;
}

/* Remove underline and inherit colors for clickable cards */
.zentrum-video-card a {
  text-decoration: none !important;
  color: inherit;
  display: block;
}

/* Also remove underline on hover and override theme defaults */
.zentrum-video-card a:hover,
.zentrum-video-link,
.zentrum-video-link:hover {
  text-decoration: none !important;
  color: inherit;
}

/* Enlarge the modal and its contents */
#zentrumYoutubeModal .modal-dialog {
  max-width: 90%;
  width: 90%;
}

#zentrumYoutubeModal .modal-body {
  padding: 0;
}

#zentrumYoutubeModal .ratio {
  width: 100%;
  height: 80vh; /* make the video take up most of the viewport height */
}

#zentrumYoutubeModal .ratio iframe {
  width: 100%;
  height: 100%;
}

/* Ensure the modal iframe takes up available space within the ratio helper */
#zentrumYoutubeFrame {
  width: 100%;
  height: 100%;
}