/* ================================================================
   HOME PAGE (index.css)
   Same design tokens, navbar, footer as all other pages.
   ================================================================ */

/* ── 0. TOKENS ───────────────────────────────────────────────── */
:root {
  --ink:         #111111;
  --ink-soft:    #444444;
  --ink-muted:   #777777;
  --surface:     #ffffff;
  --surface-off: #f7f7f7;
  --surface-mid: #ececec;
  --border:      rgba(0,0,0,0.08);

  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   22px;

  --shadow-sm:   0 2px 8px  rgba(0,0,0,0.06);
  --shadow-md:   0 8px 24px rgba(0,0,0,0.09);
  --shadow-lg:   0 16px 48px rgba(0,0,0,0.13);

  --card-pad:    2.25rem;
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── 1. RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--surface);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── 2. NAVBAR ───────────────────────────────────────────────── */
.navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.8rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
}
.logo-link  { display: flex; align-items: center; text-decoration: none; }
.logo-container { display: flex; align-items: center; gap: 10px; }
.church-logo { height: 40px; width: auto; object-fit: contain; }
.logo-text  { font-size: 1.4rem; font-weight: 600; color: var(--ink); }

.nav-links  { list-style: none; display: flex; gap: 1.5rem; }
.nav-links li a {
  position: relative; text-decoration: none; color: #333;
  font-weight: 500; padding: 0.5rem 1rem; border-radius: var(--radius-sm);
  transition: color 0.3s ease; display: inline-block;
}
.nav-links li a::after {
  content: ""; position: absolute;
  left: 50%; bottom: 0; transform: translateX(-50%);
  width: 0; height: 2px; background: var(--ink); transition: width 0.3s ease;
}
.nav-links li a:hover { color: var(--ink); }
.nav-links li a:hover::after { width: 100%; }

.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.burger .line { width: 25px; height: 3px; background: #333; border-radius: 3px; transition: all 0.4s ease; }
.burger.active .line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.active .line:nth-child(2) { opacity: 0; }
.burger.active .line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 768px) {
  .burger { display: flex; }
  .nav-links {
    flex-direction: column; position: absolute;
    top: 70px; right: 2rem;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 1rem 0; width: 220px;
    box-shadow: var(--shadow-md); opacity: 0; transform: translateY(-20px);
    pointer-events: none; transition: all 0.3s ease;
  }
  .nav-links.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links li { width: 100%; }
  .nav-links li a { padding: 1rem 1.5rem; width: 100%; display: block; }
}

/* ── 3. HERO ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh; min-height: 560px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff; overflow: hidden;
}

.hero-image {
  position: absolute; inset: 0;
  background: url('../static/images/Dharmiktachurch.jpg') center/cover no-repeat;
  filter: blur(7px) brightness(0.7);
  transform: scale(1.06); /* prevents blur edge bleed */
  z-index: 0;
}

.hero-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.42);
  z-index: 1;
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 820px; padding: 2rem;
  animation: heroIn 1.2s var(--ease-out) both;
}

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

/* Typewriter spans */
.hero-content .welcome {
  display: block;
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  font-weight: 300; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.85); margin-bottom: 0.5rem;
}

.hero-content .church-name {
  display: block;
  font-size: clamp(2.2rem, 7vw, 4.2rem);
  font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase; color: #fff;
  line-height: 1.1;
}

/* Divider */
.divider {
  width: 80px; height: 2px;
  background: rgba(255,255,255,0.7);
  margin: 1.75rem auto;
  border-radius: 2px;
}

.hero .subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300; letter-spacing: 0.03em;
  color: rgba(255,255,255,0.88); margin-bottom: 0.75rem;
}

.hero .verse {
  font-style: italic; font-size: 0.95rem;
  color: rgba(255,255,255,0.65); margin-bottom: 2.25rem;
  font-weight: 300;
}

/* CTA button — white outline in hero, same pill shape site-wide */
.hero .cta-button {
  display: inline-block;
  padding: 0.9rem 2.4rem;
  background: transparent; color: #fff;
  border: 2px solid rgba(255,255,255,0.85);
  border-radius: 50px; font-weight: 600; font-size: 0.95rem;
  text-decoration: none; letter-spacing: 0.05em;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.hero .cta-button:hover {
  background: #fff; color: var(--ink);
  transform: translateY(-3px); box-shadow: var(--shadow-md);
}

/* Scroll indicator */
.scroll-indicator { margin-top: 2.5rem; display: flex; justify-content: center; }
.scroll-indicator span {
  display: block; width: 18px; height: 18px;
  border-bottom: 2px solid rgba(255,255,255,0.7);
  border-right: 2px solid rgba(255,255,255,0.7);
  transform: rotate(45deg);
  animation: scrollAnim 2s infinite; opacity: 0.7;
}

@keyframes scrollAnim {
  0%   { opacity: 0; transform: rotate(45deg) translate(-14px,-14px); }
  50%  { opacity: 1; }
  100% { opacity: 0; transform: rotate(45deg) translate(14px,14px); }
}

/* ── 4. SECTION SHARED HELPERS ───────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700; color: var(--ink); line-height: 1.2;
  position: relative; display: inline-block;
  padding-bottom: 1rem; margin-bottom: 0;
}

.section-header h2::after {
  content: ''; position: absolute;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 48px; height: 3px;
  background: var(--ink); border-radius: 2px;
}

.section-subtitle {
  font-size: 1rem; color: var(--ink-muted); margin-top: 1rem;
  font-weight: 300; line-height: 1.7;
}

/* ── 5. JOIN US / SUPPORT SECTION ────────────────────────────── */
.support {
  padding: 6rem 2rem;
  background: var(--surface-off);
  text-align: center;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
  max-width: 1100px;
  margin: 0 auto;
}

.support-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: var(--card-pad);
  text-align: center;
  transition: box-shadow 0.3s ease, transform 0.3s var(--ease-out);
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.6s var(--ease-out) forwards;
  animation-delay: var(--delay, 0s);
}

.support-card:hover { box-shadow: var(--shadow-md); transform: translateY(-6px); }

.support-card i {
  font-size: 2.2rem; color: var(--ink);
  width: 64px; height: 64px;
  background: var(--surface-off); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.4rem;
  border: 1px solid var(--border);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.support-card:hover i {
  background: var(--ink); color: #fff; transform: translateY(-3px);
}

.support-card h3 {
  font-size: 1.15rem; font-weight: 700; color: var(--ink);
  margin-bottom: 0.75rem;
}

.support-card p {
  font-size: 0.95rem; color: var(--ink-soft); line-height: 1.75;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ── 6. PASTORS SECTION ──────────────────────────────────────── */
.pastors {
  padding: 6rem 2rem;
  background: linear-gradient(155deg, #141414 0%, #1e1c18 55%, #141414 100%);
  text-align: center;
  position: relative; overflow: hidden;
}

/* Subtle SVG-less decorative rings */
.pastors::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 50%, rgba(210,175,110,0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 50%, rgba(210,175,110,0.05) 0%, transparent 40%);
  pointer-events: none;
}

.pastors .section-header h2 { color: #fff; }
.pastors .section-header h2::after { background: rgba(255,255,255,0.7); }

.pastors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.75rem;
  max-width: 1000px;
  margin: 0 auto;
}

.pastor-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.75rem;
  display: flex; flex-direction: column; align-items: center;
  transition: background 0.3s ease, border-color 0.3s ease,
              box-shadow 0.3s ease, transform 0.35s var(--ease-out);
}

.pastor-card:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  transform: translateY(-8px);
}

.pastor-image-container {
  width: 140px; height: 140px; border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.2);
  margin-bottom: 1.5rem;
  filter: grayscale(60%) brightness(0.9);
  transition: filter 0.4s ease, border-color 0.4s ease;
}

.pastor-card:hover .pastor-image-container {
  filter: grayscale(0) brightness(1.05);
  border-color: rgba(210,175,110,0.6);
}

.pastor-photo { width: 100%; height: 100%; object-fit: cover; display: block; }

.pastor-info { text-align: center; }
.pastor-info h3 {
  font-size: 1.1rem; font-weight: 700; color: #fff;
  margin-bottom: 0.35rem; line-height: 1.3;
}
.post {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(210,175,110,0.85);
}

/* ── 7. SENIOR PASTOR MESSAGE ────────────────────────────────── */
.senior-message-modern {
  max-width: 1100px; margin: 0 auto;
  padding: 5rem 2rem;
}

.senior-message-modern .section-header h2 { color: var(--ink); }
.senior-message-modern .english-heading {
  font-size: 1.1rem; font-weight: 400; color: var(--ink-muted);
  margin-top: 0.5rem;
}

.senior-message-modern .message-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3.5rem; align-items: flex-start;
  margin-top: 0;
}

.senior-message-modern .message-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.senior-message-modern .message-photo img {
  width: 100%; height: auto; display: block;
  transition: transform 0.4s ease;
}
.senior-message-modern .message-photo:hover img { transform: scale(1.02); }

.senior-message-modern .message-text { }

/* Excerpt quote */
.senior-message-modern .excerpt {
  font-size: 1.1rem; line-height: 1.85;
  color: var(--ink-soft); margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  border-left: 3px solid var(--ink);
}

/* Full message injected by JS */
.senior-message-modern .full-message {
  font-size: 0.97rem; line-height: 1.85; color: var(--ink-soft);
  display: none; animation: fadeSlide 0.4s var(--ease-out);
}

.senior-message-modern .full-message p { margin-bottom: 1.1rem; }

.senior-message-modern .full-message ol {
  margin: 1.5rem 0; padding-left: 1.5rem;
}
.senior-message-modern .full-message ol li { margin-bottom: 0.9rem; }

.senior-message-modern .full-message blockquote {
  background: var(--surface-off);
  border-left: 3px solid var(--ink);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.25rem 1.5rem; margin: 1.5rem 0;
  font-style: italic; font-size: 0.95rem; color: var(--ink-soft);
}
.senior-message-modern .full-message blockquote footer {
  display: block; margin-top: 0.75rem;
  font-style: normal; font-weight: 600; color: var(--ink); font-size: 0.88rem;
}

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

/* Read more button — same pill as site */
.senior-message-modern .read-more-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin: 1.25rem 0;
  padding: 0.65rem 1.6rem;
  background: transparent; color: var(--ink);
  border: 1px solid var(--border); border-radius: 50px;
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease,
              border-color 0.25s ease, transform 0.25s ease;
  font-family: 'Poppins', sans-serif;
}
.senior-message-modern .read-more-btn:hover {
  background: var(--ink); color: #fff;
  border-color: var(--ink); transform: translateY(-1px);
}

.senior-message-modern .signature {
  font-weight: 600; font-size: 1rem; color: var(--ink);
  margin-top: 1.5rem; display: inline-block;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ── 8. MISSION & VISION ─────────────────────────────────────── */
.mission-vision {
  padding: 6rem 2rem;
  background: var(--surface-off);
  text-align: center;
}

.mission-vision-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
  max-width: 800px;
  margin: 0 auto;
}

.mission-card,
.vision-card {
  text-decoration: none;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: var(--card-pad);
  display: flex; flex-direction: column; align-items: center;
  text-align: center; color: var(--ink);
  transition: box-shadow 0.3s ease, transform 0.3s var(--ease-out), border-color 0.3s ease;
}
.mission-card:hover,
.vision-card:hover {
  box-shadow: var(--shadow-md); transform: translateY(-5px);
  border-color: rgba(0,0,0,0.14);
}

.mission-card i, .vision-card i {
  font-size: 1.8rem; color: var(--ink);
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--surface-off); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  transition: background 0.3s ease, color 0.3s ease;
}
.mission-card:hover i, .vision-card:hover i {
  background: var(--ink); color: #fff;
}

.mission-card h3, .vision-card h3 {
  font-size: 1.2rem; font-weight: 700; color: var(--ink);
  margin-bottom: 0.75rem;
}
.mission-card p, .vision-card p {
  font-size: 0.95rem; color: var(--ink-soft); line-height: 1.75;
}

/* ── 9. EVENTS PREVIEW SECTION ───────────────────────────────── */
.events-section {
  padding: 6rem 2rem;
  background: var(--surface);
  text-align: center;
}

.events-section .section-header { margin-bottom: 2.5rem; }

/* Grid of event cards */
.event-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto 2.5rem;
}

/* Event card */
.event {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow 0.3s ease, transform 0.3s var(--ease-out);
  position: relative;
  text-align: left;
}
.event:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

/* Big event — wider accent */
.event.big-event {
  border-top: 3px solid var(--ink);
}
.event.small-event {
  border-top: 3px solid var(--surface-mid);
}

/* Date band */
.event-date {
  background: var(--ink); color: #fff;
  padding: 1rem 1.4rem;
  display: flex; align-items: baseline; gap: 0.4rem;
}

.event-date .day {
  font-size: 2rem; font-weight: 200; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.event-date .month {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

/* Card body */
.event-content { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }

.event-title {
  font-size: 1rem; font-weight: 700; color: var(--ink);
  margin-bottom: 0.6rem; line-height: 1.3;
}

.event-details {
  display: flex; flex-direction: column; gap: 0.35rem;
  margin-bottom: 0.8rem;
}
.event-detail {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; color: var(--ink-muted);
}
.event-detail i { font-size: 0.72rem; }

.event-description {
  font-size: 0.9rem; font-weight: 300;
  color: var(--ink-soft); line-height: 1.75; flex: 1;
}

/* Status pill */
.event-status {
  position: absolute; top: 1rem; right: 1rem;
  padding: 0.22rem 0.75rem;
  background: var(--surface-off); border: 1px solid var(--border);
  border-radius: 20px; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted);
}
.event-status.upcoming { background: #f0faf5; color: #1a7a4a; border-color: rgba(26,122,74,0.18); }
.event-status.today    { background: #fff8e6; color: #8a6000; border-color: rgba(180,130,0,0.2); }

/* Loading spinner inside event container */
.loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--surface-mid);
  border-top-color: var(--ink); border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 3rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.no-events, .error-message {
  font-size: 0.95rem; color: var(--ink-muted);
  padding: 3rem 1rem; text-align: center;
  grid-column: 1 / -1;
}

/* See all events link */
.more-events {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.9rem; font-weight: 600; color: var(--ink);
  text-decoration: none;
  padding: 0.75rem 1.9rem;
  border: 1px solid var(--border); border-radius: 50px;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.more-events:hover {
  background: var(--ink); color: #fff;
  border-color: var(--ink); transform: translateY(-1px);
}

/* ── 10. FOOTER ──────────────────────────────────────────────── */
footer {
  background: var(--surface); color: #333;
  padding: 4rem 2rem 2rem; border-top: 1px solid var(--border);
  font-family: 'Poppins', sans-serif;
}
.footer-content {
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 2rem; max-width: 1200px; margin: auto;
}
.footer-section { flex: 1; min-width: 240px; padding-top: 1rem; border-top: 2px solid #ccc; }
.footer-section h3 { font-size: 1.15rem; margin-bottom: 1rem; font-weight: 600; color: var(--ink); }
.footer-section p,
.footer-section li { font-size: 0.95rem; color: #333; margin: 0.5rem 0; }
.footer-section a { color: #333; text-decoration: none; transition: color 0.3s ease; }
.footer-section a:hover { color: #0056b3; text-decoration: underline; }
.footer-section ul { list-style: none; }
.social-icons { display: flex; gap: 1rem; margin-top: 1rem; }
.social-icon { font-size: 1.4rem; color: #333; transition: color 0.3s ease, transform 0.3s ease; }
.social-icon:hover { color: #007bff; transform: translateY(-3px); }
.footer-bottom { margin-top: 2rem; text-align: center; color: var(--ink-muted); font-size: 0.9rem; }
.footer-bottom .divider { height: 1px; background: var(--border); margin-bottom: 1rem; }

@media (max-width: 768px) {
  .footer-content { flex-direction: column; align-items: center; text-align: center; }
  .social-icons { justify-content: center; }
}

/* ── 11. RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .senior-message-modern .message-content {
    grid-template-columns: 1fr;
  }
  .senior-message-modern .message-photo { max-width: 420px; margin: 0 auto; }
}

@media (max-width: 768px) {
  .support      { padding: 4.5rem 1.25rem; }
  .pastors      { padding: 4.5rem 1.25rem; }
  .mission-vision { padding: 4.5rem 1.25rem; }
  .events-section { padding: 4.5rem 1.25rem; }
  .senior-message-modern { padding: 4rem 1.25rem; }
  .event-container { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .support-grid,
  .pastors-grid,
  .mission-vision-content { grid-template-columns: 1fr; }

  .pastor-image-container { width: 120px; height: 120px; }
  .hero-content .church-name { font-size: 2rem; }
  .senior-message-modern .excerpt { font-size: 1rem; padding-left: 1rem; }
}

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