/* ==========================================
   MINISTRIES (SERMON ARCHIVE) STYLES
   ========================================== */

.ministries-hero {
  min-height: 95vh;
  display: flex;
  align-items: center;
  padding: 100px 0 60px 0; /* padding top to clear fixed navbar */
  background-color: var(--background);
}

.ministries-hero-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--grid-margin);
}

@media (max-width: 992px) {
  .ministries-hero-container {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    gap: 30px;
  }

  .ministries-hero-text {
    text-align: center;
  }
}

/* Left Column: Big Bold Text */
.ministries-hero-title {
  font-family: var(--font-headline);
  font-size: 52px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  .ministries-hero-title {
    font-size: 38px;
  }
}

/* Right Column: Hero Logo Wrapper */
.ministries-hero-image-wrapper {
  width: 100%;
  max-width: 440px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.95) 0%, rgba(248, 243, 242, 0.8) 100%);
  border: 1px solid rgba(140, 113, 111, 0.15);
  border-radius: var(--rounded-lg) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  justify-self: end;
}

@media (max-width: 992px) {
  .ministries-hero-image-wrapper {
    justify-self: center;
    max-width: 100%;
    height: 260px;
  }
}

.ministries-hero-image-wrapper img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(112, 2, 16, 0.12));
}

/* Gray Search Filter Bar */
.sermons-search-section {
  padding: 20px 0;
}

.gray-filter-bar {
  background-color: transparent;
  border: 1px solid var(--outline-variant);
  border-radius: var(--rounded-full); /* Curved edge */
  padding: 12px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  box-shadow: none;
  max-width: 650px;
  margin: 0 auto;
}

@media (max-width: 576px) {
  .gray-filter-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-radius: var(--rounded-full);
    padding: 8px 16px;
    gap: 12px;
    max-width: 100%;
  }

  .search-input-wrapper {
    gap: 8px;
    flex: 1;
    min-width: 0;
  }

  .search-icon {
    font-size: 13px;
  }

  #sermonSearchInput {
    font-size: 13px;
  }

  #sermonYearFilter {
    font-size: 12px;
    padding: 2px 4px;
  }
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-grow: 1;
}

.search-icon {
  color: var(--on-surface-variant);
  font-size: 16px;
}

#sermonSearchInput {
  width: 100%;
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--on-surface);
  outline: none;
  font-weight: 500;
}

#sermonSearchInput::placeholder {
  color: var(--outline);
  font-weight: 700;
  text-transform: uppercase;
}

.filter-dropdown-wrapper {
  display: flex;
  align-items: center;
}

#sermonYearFilter {
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  color: var(--on-surface-variant);
  cursor: pointer;
  outline: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
}

#sermonYearFilter option {
  background-color: var(--surface-container-lowest);
  color: var(--on-surface);
  font-weight: 500;
}

/* Sermons Grid Section */
.sermons-grid-section {
  padding: 40px 0 100px 0;
  background-color: var(--background);
}

.sermons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

@media (max-width: 992px) {
  .sermons-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .sermons-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Sermon Cards */
.sermon-card {
  display: flex;
  flex-direction: column;
  background-color: var(--surface-container-lowest);
  border: 1px solid rgba(140, 113, 111, 0.06);
  border-radius: 0 !important; /* STRAIGHT SHARP EDGES */
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(112, 2, 16, 0.01);
  transition: var(--transition-smooth);
}

.sermon-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(112, 2, 16, 0.05);
}

.sermon-card-img-box {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 0 !important; /* STRAIGHT SHARP EDGES */
}

.sermon-card-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 !important; /* STRAIGHT SHARP EDGES */
  transition: transform 0.5s ease;
}

.sermon-card:hover .sermon-card-img-box img {
  transform: scale(1.04);
}

.sermon-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.sermon-date {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--outline);
  letter-spacing: 0.02em;
}

.sermon-title {
  font-family: var(--font-headline);
  font-size: 18px;
  font-weight: 700;
  color: var(--on-surface);
  line-height: 1.35;
  flex-grow: 1;
}

.sermon-view-btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  text-transform: lowercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  align-self: flex-start;
  transition: var(--transition-smooth);
}

.sermon-view-btn:hover {
  color: var(--secondary);
}
