/* 
   Church Homepage Custom Layout Stylesheet 
   Matching Reference Design Aesthetics
*/

:root {
  --church-gold: #9c7c38;
  --church-gold-hover: #7e632b;
  --church-gold-light: #f9f6f0;
  --church-text-dark: #1a202c;
  --church-text-muted: #64748b;
  --church-text-light: #8e9aaf;
  --church-border: #e2e8f0;
  --church-bg-light: #f8fafc;
  --church-font-serif: "Noto Serif TC", "Songti TC", "Georgia", serif;
  --church-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Base resets & typography for front page */
.church-front-page {
  font-family: var(--church-font-sans);
  color: var(--church-text-dark);
  background-color: #ffffff;
  line-height: 1.6;
}

.church-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- TOP BAR --- */
.church-topbar {
  background-color: #fcfbf9;
  border-bottom: 1px solid #f0ebe1;
  font-size: 13px;
  color: var(--church-text-muted);
  padding: 8px 0;
}
.church-topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.church-topbar-slogan {
  letter-spacing: 0.5px;
}
.church-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.church-topbar-links a {
  color: var(--church-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.church-topbar-links a:hover {
  color: var(--church-gold);
}
.church-social-icons {
  display: flex;
  gap: 12px;
  align-items: center;
}
.church-social-icons a {
  color: #718096;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.church-social-icons a:hover {
  color: var(--church-gold);
}

/* --- MAIN HEADER NAV --- */
.church-main-header {
  border-bottom: 1px solid var(--church-border);
  padding: 20px 0 0 0;
  background-color: #ffffff;
}
.church-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  flex-wrap: wrap;
  gap: 15px;
}
.church-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.church-logo-cross {
  color: var(--church-gold);
  font-size: 32px;
  font-family: var(--church-font-serif);
  line-height: 1;
}
.church-logo-text {
  font-family: var(--church-font-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--church-text-dark);
  letter-spacing: 1px;
}

.church-nav-wrap {
  overflow-x: auto;
  max-width: 100%;
}
.church-nav {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}
.church-nav li a {
  text-decoration: none;
  color: #334155;
  font-weight: 500;
  font-size: 16px;
  padding: 8px 4px 14px 4px;
  display: inline-block;
  position: relative;
  transition: color 0.2s;
}
.church-nav li a:hover,
.church-nav li.active a,
.church-nav li.current-menu-item a {
  color: var(--church-gold);
}
.church-nav li.active a::after,
.church-nav li.current-menu-item a::after,
.church-nav li a:hover::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--church-gold);
  border-radius: 2px;
}

/* --- SECTION HEADERS --- */
.church-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 8px;
}
.church-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.church-section-title {
  font-family: var(--church-font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--church-text-dark);
  margin: 0;
}
.church-section-title-line {
  width: 36px;
  height: 2px;
  background-color: var(--church-gold);
}
.church-more-link {
  color: var(--church-gold);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s;
}
.church-more-link:hover {
  opacity: 0.8;
}

/* --- HERO SECTION --- */
.church-hero-section {
  padding: 30px 0;
}
.church-hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
@media (max-width: 992px) {
  .church-hero-grid {
    grid-template-columns: 1fr;
  }
}

/* Main Hero Feature Box */
.church-hero-main {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  height: 440px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  background-color: #1a202c;
}
.church-hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.church-hero-main:hover .church-hero-bg {
  transform: scale(1.03);
}
.church-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 20%, rgba(0,0,0,0.85) 90%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  color: #ffffff;
}
.church-badge {
  display: inline-block;
  background-color: var(--church-gold);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  align-self: flex-start;
}
.church-hero-title {
  font-family: var(--church-font-serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 10px 0;
  color: #ffffff;
  text-decoration: none;
}
.church-hero-title a {
  color: #ffffff;
  text-decoration: none;
}
.church-hero-title a:hover {
  text-decoration: underline;
}
.church-hero-excerpt {
  font-size: 14px;
  color: #e2e8f0;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 90%;
  line-height: 1.5;
}

/* Hero Right Sidebar List */
.church-hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: space-between;
}
.church-sidebar-card {
  display: flex;
  gap: 14px;
  align-items: center;
  background-color: #ffffff;
  padding: 10px;
  border-radius: 6px;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
}
.church-sidebar-card:hover {
  background-color: var(--church-gold-light);
  transform: translateX(4px);
}
.church-sidebar-img-wrap {
  width: 120px;
  height: 80px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.church-sidebar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.church-sidebar-info {
  flex-grow: 1;
}
.church-sidebar-title {
  font-family: var(--church-font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--church-text-dark);
  margin: 0 0 4px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.church-sidebar-excerpt {
  font-size: 12px;
  color: var(--church-text-muted);
  margin: 0 0 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.church-date {
  font-size: 12px;
  color: var(--church-text-light);
}

/* --- SECTION 2: LATEST ARTICLES --- */
.church-latest-section {
  padding: 30px 0;
}
.church-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 768px) {
  .church-grid-3 {
    grid-template-columns: 1fr;
  }
}

.church-post-card {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.church-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.07);
}
.church-card-thumb {
  width: 100%;
  height: 190px;
  overflow: hidden;
  position: relative;
}
.church-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.church-post-card:hover .church-card-thumb img {
  transform: scale(1.05);
}
.church-card-content {
  padding: 16px 4px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.church-card-title {
  font-family: var(--church-font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--church-text-dark);
  margin: 0 0 8px 0;
  line-height: 1.4;
}
.church-card-title a {
  color: var(--church-text-dark);
  text-decoration: none;
  transition: color 0.2s;
}
.church-card-title a:hover {
  color: var(--church-gold);
}
.church-card-excerpt {
  font-size: 13px;
  color: var(--church-text-muted);
  margin: 0 0 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

/* --- SECTION 3: 2-COLUMN MEDIA SECTION --- */
.church-media-section {
  padding: 30px 0 50px 0;
}
.church-media-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}
@media (max-width: 992px) {
  .church-media-grid {
    grid-template-columns: 1fr;
  }
}

/* Video Sermons Grid */
.church-video-card {
  display: flex;
  flex-direction: column;
}
.church-video-thumb {
  position: relative;
  width: 100%;
  height: 150px;
  border-radius: 6px;
  overflow: hidden;
  background-color: #1a202c;
}
.church-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.church-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.church-video-card:hover .church-play-overlay {
  background: rgba(0,0,0,0.4);
}
.church-play-btn {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--church-text-dark);
  font-size: 16px;
  padding-left: 3px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}
.church-video-card:hover .church-play-btn {
  transform: scale(1.1);
  background: var(--church-gold);
  color: #ffffff;
}
.church-duration-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.8);
  color: #ffffff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
}
.church-video-meta {
  margin-top: 10px;
}
.church-video-title {
  font-family: var(--church-font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--church-text-dark);
  margin: 0 0 4px 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.church-video-speaker {
  font-size: 12px;
  color: var(--church-text-muted);
}

/* Audio Messages Sidebar List */
.church-audio-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.church-audio-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: #fdfbf7;
  border-radius: 8px;
  border: 1px solid #f2ece1;
  transition: border-color 0.2s;
}
.church-audio-item:hover {
  border-color: var(--church-gold);
}
.church-audio-thumb {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.church-audio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.church-audio-info {
  flex-grow: 1;
}
.church-audio-title {
  font-family: var(--church-font-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--church-text-dark);
  margin: 0 0 3px 0;
}
.church-audio-meta {
  font-size: 12px;
  color: var(--church-text-muted);
  margin-bottom: 6px;
}
.church-audio-player-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.church-audio-play-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--church-text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  padding-left: 2px;
  color: var(--church-text-dark);
}
.church-audio-track {
  flex-grow: 1;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.church-audio-progress {
  width: 35%;
  height: 100%;
  background: var(--church-gold);
  border-radius: 2px;
}
.church-audio-duration {
  font-size: 11px;
  color: var(--church-text-light);
}
