
:root {
  --primary: #1a1a2e;
  --primary-light: #16213e;
  --accent: #e94560;
  --accent-hover: #d13a54;
  --text: #333;
  --text-light: #666;
  --text-inverse: #fff;
  --bg: #fff;
  --bg-warm: #f8f9fa;
  --bg-dark: #1a1a2e;
  --border: #e5e5e5;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --nav-height: 72px;
  --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--accent); color: #fff; padding: 8px 16px;
  z-index: 100; text-decoration: none; font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
  transition: top 0.3s;
}
.skip-link:focus { top: 0; }

.nav-modern {
  position: sticky; top: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
  height: var(--nav-height);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-modern {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }

.nav-links a[aria-current="page"] { color: var(--accent); font-weight: 600; }

.give-btn {
  background: var(--accent);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
}
.give-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.give-btn::after { display: none !important; }

.mobile-menu-btn {
  display: none;
  background: none; border: none;
  font-size: 24px; cursor: pointer;
  color: var(--primary);
}

.hero-modern {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background: url('/assets/images/hero-bg.jpg') center/cover no-repeat;
}

.logo-modern {
  height: 40px;
  width: auto;
  display: block;
}

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(26,26,46,0.85) 0%, rgba(22,33,62,0.75) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 24px;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-content h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-content p {
  font-size: clamp(16px, 2vw, 20px);
  opacity: 0.9;
  margin-bottom: 36px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.hero-info {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
  font-size: 15px;
  opacity: 0.85;
}

.hero-info span {
  display: inline-flex;
}

.hero-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}

.section {
  padding: 80px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-dark {
  background: var(--bg-dark);
  color: #fff;
}

.section-warm {
  background: var(--bg-warm);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary);
}

/* FIX: Section headers on dark backgrounds MUST be white */
.section-dark .section-header h2 { color: #fff; }
.section-dark .section-header p { color: rgba(255,255,255,0.85); }

.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
  text-align: center;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.service-card .time {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
  line-height: 1;
}

.service-card .day {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.service-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary);
}

.service-card p {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.6;
}

.ministry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.ministry-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}

.ministry-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.ministry-card-content {
  padding: 28px;
  text-align: center;
}

.ministry-card-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary);
}

.ministry-card-content p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 12px;
}

.ministry-card-content a:not(.btn) {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.ministry-card-content a:not(.btn):hover { text-decoration: underline; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.contact-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
}

.contact-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--primary);
}

.contact-card p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 8px;
}

.contact-card a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.contact-card a:hover { text-decoration: underline; }

.footer-modern {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.6);
  padding: 48px 24px 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.footer-address,
.footer-phone,
.footer-email {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  margin-top: 8px;
}

.footer-email a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

.footer-email a:hover {
  color: #fff;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.5);
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li { margin-bottom: 10px; }

.footer-col a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.page-content h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--primary);
}

.page-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 40px 0 16px;
  color: var(--primary);
}

.page-content p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 16px;
}

.page-content a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.page-content a:hover { text-decoration: underline; }

.placeholder {
  background: var(--bg-warm);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  color: var(--text-light);
  font-style: italic;
}

.section-dark .placeholder {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
}

.sermon-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.sermon-cta {
  text-align: center;
}

.sermon-player-card {
  max-width: 640px;
  width: 100%;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.sermon-player-card img {
  width: 100%;
  height: auto;
  display: block;
}

.sermon-player-info {
  padding: 24px;
  text-align: center;
}

.sermon-player-info .date {
  font-size: 14px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.sermon-player-info h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary);
}

.sermon-player-info .speaker {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.sermon-player-info audio {
  width: 100%;
  max-width: 400px;
  margin-bottom: 12px;
}

.sermon-list-modern {
  display: grid;
  gap: 20px;
}

.sermon-list-modern {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sermon-item-modern {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.sermon-item-modern:hover {
  box-shadow: var(--shadow-hover);
}

.sermon-item-date {
  text-align: center;
  flex-shrink: 0;
  width: 56px;
}

.sermon-item-date .day-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.sermon-item-date .month {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
}

.sermon-item-info {
  flex: 1;
  min-width: 0;
}

.sermon-item-info h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sermon-item-info h3 a {
  color: inherit;
  text-decoration: none;
}

.sermon-item-info h3 a:hover {
  color: var(--accent);
}

.sermon-item-info .meta {
  font-size: 13px;
  color: var(--text-light);
}

.sermon-item-info .description {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 6px;
  line-height: 1.5;
}

.sermon-item-action {
  flex-shrink: 0;
}

.sermon-item-action audio {
  width: 260px;
  height: 36px;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .hero-content h1 { font-size: 36px; }
  .section { padding: 60px 20px; }
  .sermon-item-modern {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .sermon-item-date {
    display: flex;
    align-items: baseline;
    gap: 6px;
    width: auto;
  }
  .sermon-item-info {
    width: 100%;
  }
  .sermon-item-info h3 {
    white-space: normal;
  }
  .sermon-item-action audio { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e0e0e0;
    --text-light: #999;
    --bg: #0f0f1a;
    --bg-warm: #16162a;
    --border: #2a2a3e;
  }
  body { background: var(--bg); }
  .service-card, .ministry-card, .contact-card, .sermon-item-modern {
    background: #1a1a2e;
    border-color: #2a2a3e;
  }
  .nav-modern {
    background: rgba(15,15,26,0.95);
    border-color: #2a2a3e;
  }
  .brand-modern { color: #fff; }
  .nav-links a { color: #ccc; }
  /* FIX: Headings must be light on dark backgrounds */
  .service-card h3,
  .ministry-card-content h3,
  .contact-card h3,
  .sermon-item-info h3,
  .page-content h1,
  .page-content h2,
  .section-header h2 {
    color: #fff;
  }
  .section-header p {
    color: rgba(255,255,255,0.85);
  }
  .service-card p,
  .ministry-card-content p,
  .contact-card p,
  .page-content p {
    color: #bbb;
  }
  .page-content a {
    color: #ff6b81;
  }
  .btn-primary,
  .btn-outline {
    color: #fff !important;
  }
  .hero-info { opacity: 0.8; }
  .sermon-player-card {
    background: #1a1a2e;
    border-color: #2a2a3e;
  }
  .sermon-player-info h3 {
    color: #fff;
  }
  .sermon-player-info .date,
  .sermon-player-info .speaker {
    color: #bbb;
  }
  .sermon-item-info .description {
    color: #bbb;
  }
}
