/* =========================
   DESIGN TOKENS & VARIABLES
   ========================= */
:root {
  /* Colors - Calm, Spiritual Light Theme */
  --bg: #fafafa;
  --panel: #ffffff;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --accent: #16a34a;        /* Vibrant green for growth/faith */
  --accent-light: #22c55e;
  --accent2: #4f46e5;       /* Deep indigo for depth */
  --overlay: rgba(0, 0, 0, 0.4);
  --danger: #dc2626;

  /* Layout & Effects */
  --radius: 20px;
  --radius-sm: 14px;
  --radius-pill: 999px;
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --gap: 24px;
  --container: 1200px;
}

/* =========================
   BASE & RESET
   ========================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* =========================
   UTILITIES
   ========================= */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.meta { color: var(--muted); font-size: 14px; }
.tag {
  padding: 6px 12px;
  background: #ecfdf5;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius-pill);
}

/* =========================
   NAVIGATION (Modern Sticky Header)
   ========================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(20px);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
}
.brand .logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.brand:hover .logo { transform: scale(1.08); }
.nav a {
  color: var(--text);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: var(--transition);
}
.nav a:hover, .nav a.active {
  background: rgba(79, 70, 229, 0.1);
  color: var(--accent2);
}

/* =========================
   HERO SECTION (Modern Immersive)
   ========================= */
.hero {
  position: relative;
  height: 80vh;
  min-height: 500px;
  background: linear-gradient(var(--overlay), var(--overlay)), url('/static/hero-bible.jpg') center/cover no-repeat; /* Add your hero image */
  color: white;
  display: flex;
  align-items: center;
  text-align: center;
}
.hero-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  margin: 0 0 16px;
  line-height: 1.1;
}
.hero-title .accent { color: var(--accent-light); }
.hero-sub {
  font-size: 1.3rem;
  opacity: 0.95;
  max-width: 60ch;
  margin: 0 auto 32px;
}
.hero .btn { background: var(--accent); color: white; }

/* =========================
   CAROUSEL - Horizontal Sliding (Featured Sermons)
   ========================= */
.carousel {
  position: relative;
  max-width: 1000px;
  margin: 40px auto;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}
.carousel-item {
  min-width: 100%;
  position: relative;
}
.carousel-item img {
  width: 100%;
  height: 450px;
  object-fit: cover;
}
.carousel-item .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 24px 24px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.8));
  color: white;
}
.carousel-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 16px;
}
.carousel-btn {
  background: rgba(255,255,255,0.3);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  color: white;
  cursor: pointer;
  transition: var(--transition);
}
.carousel-btn:hover { background: white; color: var(--text); }

/* =========================
   CAROUSEL - Opacity Fade (Huduma Yetu Section & Similar)
   ========================= */
.carousel.fade {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.carousel.fade .carousel-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

.carousel.fade .carousel-item.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel.fade .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel.fade .carousel-item .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.8));
  color: white;
  font-size: 0.95rem;
  text-align: center;
}

/* =========================
   SERMON CARDS (Modern Grid with Play Icons)
   ========================= */
.sermon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--gap);
}
.sermon-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.sermon-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-lg);
}
.sermon-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.sermon-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.sermon-title {
  font-size: 1.4rem;
  margin: 0 0 8px;
  font-weight: 700;
}
.sermon-meta {
  color: var(--muted);
  margin-bottom: 12px;
}
.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--accent);
  opacity: 0;
  transition: var(--transition);
}
.sermon-card:hover .play-icon { opacity: 1; }

/* =========================
   BUTTONS & FORMS (Refined)
   ========================= */
.btn {
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
}
.btn.primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* =========================
   GRID & CARD UTILITIES
   ========================= */
.grid {
  display: grid;
  gap: var(--gap);
}
.grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow);
}

/* =========================
   FOOTER (Clean & Modern)
   ========================= */
footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 60px 24px 40px;
  text-align: center;
}
footer a { color: #cbd5e1; text-decoration: none; }
footer a:hover { color: white; }

/* Additional spiritual touch – subtle text styles */
blockquote {
  font-style: italic;
  font-size: 1.4rem;
  color: var(--accent2);
  border-left: 4px solid var(--accent);
  padding-left: 24px;
  margin: 40px 0;
}

/* Add more refinements as needed – this gives a fresh, 2025-modern church/Bible site feel! */