/* =========================================
   MEDIA PAGE STYLES
========================================= */

/* --- PAGE BANNER --- */
.page-banner {
  height: 40vh;
  min-height: 300px;
  /* Background image suggesting news/broadcasting/events */
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
              url('https://images.unsplash.com/photo-1495020686659-d4956878332b?auto=format&fit=crop&w=1200&q=80');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding-top: 60px; /* Offset for fixed header */
}

.banner-content h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.banner-content p {
  font-size: 1.2rem;
  color: #e5f3ec;
}

/* --- COMMON LAYOUT --- */
.media-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  color: var(--green-dark);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.divider-line {
  width: 60px;
  height: 4px;
  background: var(--green-main);
  margin: 0 auto;
  border-radius: 2px;
}

/* --- LATEST NEWS SECTION --- */
#latest-news {
  background: var(--white);
  padding: 5rem 0;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* News Card Styling */
.news-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid var(--border);
  transition: 0.3s;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
  border-color: #eee;
}

.news-image {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
  transform: scale(1.05); /* Subtle zoom on hover */
}

.date-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--green-main);
  color: #fff;
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.news-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1; /* Pushes footer to bottom if content is short */
}

.news-content h3 {
  font-size: 1.2rem;
  color: var(--green-dark);
  margin-bottom: 0.8rem;
  line-height: 1.4;
}

.news-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.read-more {
  margin-top: auto;
  color: var(--green-main);
  font-weight: 600;
  font-size: 0.9rem;
  transition: 0.2s;
}

.read-more:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

/* --- VIDEO GALLERY SECTION --- */
#video-gallery {
  background: #f8fcf9;
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* The Link wrapper acting as the card */
.video-card-link {
  display: block;
  text-decoration: none;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
  border-color: #ddd;
}

/* Thumbnail Container */
.video-thumbnail {
  position: relative;
  width: 100%;
  height: 200px;
  background: #000;
  overflow: hidden;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.video-card-link:hover .video-thumbnail img {
  opacity: 0.7; /* Darken image to make Play button pop */
}

/* The Play Button Overlay */
.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 55px;
  height: 55px;
  background: rgba(204, 0, 0, 0.9); /* YouTube Red */
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding-left: 4px; /* Optical center adjustment for the triangle */
}

.video-card-link:hover .play-icon {
  transform: translate(-50%, -50%) scale(1.15);
  background: #ff0000;
}

.video-caption {
  padding: 1.2rem 1.5rem;
  border-top: 1px solid #eee;
}

.video-caption h4 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-main);
  font-weight: 600;
  line-height: 1.4;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .news-grid, 
  .video-grid {
    grid-template-columns: 1fr; /* Stack vertically on mobile */
  }
  
  .banner-content h1 {
    font-size: 2.5rem;
  }
}