/* Page Header (reusing from about.css for consistency) */
.page-header {
  padding: 5rem 0;
  background-image: url('../images/sermons.webp'); /* A fitting image like an open bible */
  background-size: cover;
  background-position: center;
  position: relative;
  text-align: center;
  color: var(--white);
}
.page-header-overlay {
  content: '';
  position: absolute; top:0; left:0; right:0; bottom:0;
  background: rgba(44, 62, 80, 0.7); /* --primary-color with opacity */
  z-index: 1;
}
.page-header .container {
  position: relative;
  z-index: 2;
}
.page-header h1 {
  color: var(--white);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
}
.page-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  opacity: 0.9;
}

/* For section titles, reusing from home.css */
.text-center { text-align: center; }
.section-subtitle { text-align: center; max-width: 600px; margin: -0.5rem auto 2.5rem auto; color: #666; }

/* Main Gallery Section */
.sermons-gallery-section {
  padding: 4rem 0;
  background: var(--light-gray);
}

/* Sermon Grid */
.sermon-grid {
  display: grid;
  /* Responsive grid with a minimum item width of 300px */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Individual Sermon Card */
.sermon-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.07);
  overflow: hidden; /* Important for border-radius on image */
  color: var(--text-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer; /* Indicates the card is clickable */
}
.sermon-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}
.sermon-card:hover .play-icon-overlay {
  opacity: 1;
}

/* Sermon Thumbnail */
.sermon-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #e0e0e0;
}
.sermon-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.play-icon-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Sermon Info (Text content) */
.sermon-info {
  padding: 1rem 1.25rem;
  flex-grow: 1; /* Allows info to fill space if cards have uneven text */
  display: flex;
  flex-direction: column;
}
.sermon-title {
  color: var(--primary-color);
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  flex-grow: 1; /* Pushes meta to the bottom */
  line-height: 1.4;
}
.sermon-meta {
  font-size: 0.85rem;
  color: #777;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap; /* In case it gets too small */
  gap: 0.5rem;
  border-top: 1px solid #eee;
  padding-top: 0.75rem;
  margin-top: auto; /* Aligns to bottom */
}
.sermon-meta span {
  display: flex;
  align-items: center;
}
.sermon-meta i {
  margin-right: 0.5rem;
  color: var(--accent-color);
  width: 16px;
  text-align: center;
}

/* "View All" Button CTA */
.view-all-cta {
  text-align: center;
  margin-top: 3rem;
}
