@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Vollkorn:ital,wght@0,400;0,600;0,700;0,900;1,400;1,700&display=swap');

:root {
  --primary: #4175FC;
  --primary-dark: #084AF3;
  --accent: #E5C158;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --bg-main: #F8FAFC;
  --bg-alt: #F1F5F9;
  --card-bg: rgba(255, 255, 255, 0.85);
  --header-bg: rgba(255, 255, 255, 0.75);
  --border-color: rgba(226, 232, 240, 0.8);
  --radius-sm: 10px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --transition: all 250ms cubic-bezier(0.23, 1, 0.32, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --shadow-md: 0 12px 24px -4px rgba(0,0,0,0.06), 0 8px 16px -4px rgba(0,0,0,0.04);
  --shadow-lg: 0 24px 48px -12px rgba(0,0,0,0.08), 0 16px 32px -12px rgba(0,0,0,0.06);
}

/* Dark mode class triggered by JS */
.dark-theme {
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --bg-main: #0B0F19;
  --bg-alt: #111827;
  --card-bg: rgba(17, 24, 39, 0.85);
  --header-bg: rgba(11, 15, 25, 0.75);
  --border-color: rgba(51, 65, 85, 0.5);
  --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.2);
  --shadow-md: 0 12px 24px -4px rgba(0,0,0,0.3);
  --shadow-lg: 0 24px 48px -12px rgba(0,0,0,0.4);
}

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

body {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 300ms var(--ease-out), color 300ms var(--ease-out);
}

a {
  text-decoration: none; /* Removed underlines */
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Vollkorn', serif;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

a, button, .card, .btn-cta, .dropdown-link {
  transition: var(--transition);
}

a:active, button:active, .card:active, .btn-cta:active {
  transform: scale(0.97);
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 48px;
  width: auto;
  border-radius: var(--radius-sm);
}

.logo-text h1 {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1;
}

.logo-text p {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 1px;
  margin-top: 2px;
}

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

.nav-item {
  position: relative;
}

.nav-link {
  color: var(--text-main);
  font-weight: 500;
  font-size: 15px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--border-color);
}

/* Dropdown Menu */
.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--card-bg);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  min-width: 240px;
  opacity: 0;
  pointer-events: none;
  transform-origin: top center;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}

.nav-item:hover .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-link {
  display: block;
  padding: 10px 16px;
  color: var(--text-main);
  font-weight: 500;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.dropdown-link:hover {
  background: var(--primary);
  color: white;
  padding-left: 20px;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--border-color);
  color: var(--text-main);
  border: none;
  font-size: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.theme-toggle-btn:hover {
  background: var(--primary);
  color: white;
}

/* CTA button */
.btn-cta {
  background: var(--primary);
  color: white;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 6px 20px rgba(65, 117, 252, 0.25);
  border: none;
}

.btn-cta:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(65, 117, 252, 0.35);
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--text-main);
  cursor: pointer;
}

/* Main layouts */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

/* Hero Section */
.hero-section {
  position: relative;
  height: 80vh;
  min-height: 520px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100%;
  min-width: 177.77%;
  transform: translate(-50%, -50%);
  opacity: 0.7;
  z-index: 1;
  pointer-events: none;
}

/* Glassmorphism Cards */
.pastor-card {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  background: var(--card-bg);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-md);
  margin-bottom: 80px;
  align-items: center;
}

.pastor-img {
  width: 100%;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.pastor-info h2 {
  font-size: 36px;
  margin-bottom: 20px;
  color: var(--primary);
}

.pastor-info p {
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.8;
}

/* Four Cards in a row layout */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 80px;
}

@media (min-width: 1100px) {
  .grid-cards {
    grid-template-columns: repeat(4, 1fr); /* Forces 4 cards in one row on desktop */
  }
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.card-content {
  padding: 24px;
}

.card-content h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

.card-content p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

/* Video Cards and Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 36px;
}

.video-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-info {
  padding: 24px;
}

.video-info h4 {
  font-size: 20px;
  margin-bottom: 8px;
}

.video-info p {
  color: var(--text-muted);
  font-size: 15px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 15, 25, 0.45);
  backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms var(--ease-out);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--card-bg);
  backdrop-filter: blur(30px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 580px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 250ms var(--ease-drawer), opacity 250ms var(--ease-drawer);
}

.modal-overlay.active .modal-box {
  transform: scale(1);
  opacity: 1;
}

.modal-header {
  padding: 28px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close {
  background: var(--border-color);
  border: none;
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 28px;
  font-size: 16px;
  line-height: 1.8;
}

/* Footer Style */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-color);
  padding: 80px 24px 40px 24px;
  margin-top: 120px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 48px;
  margin-bottom: 48px;
}

.footer-column h3 {
  font-size: 18px;
  margin-bottom: 24px;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.footer-column li {
  margin-bottom: 14px;
}

.footer-column a {
  color: var(--text-muted);
}

.footer-column a:hover {
  color: var(--primary);
  padding-left: 6px;
}

.social-links {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--border-color);
  color: var(--text-main);
}

.social-svg {
  width: 20px;
  height: 20px;
}

.social-icon:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-4px);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

/* Stagger Entry Animation */
.stagger-item {
  opacity: 0;
  transform: translateY(12px);
  animation: slideUpIn 500ms var(--ease-out) forwards;
}

.stagger-item:nth-child(1) { animation-delay: 40ms; }
.stagger-item:nth-child(2) { animation-delay: 80ms; }
.stagger-item:nth-child(3) { animation-delay: 120ms; }
.stagger-item:nth-child(4) { animation-delay: 160ms; }
.stagger-item:nth-child(5) { animation-delay: 200ms; }

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

/* Touch targets fine pointer gate */
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-8px);
  }
}

/* Responsive Styles */
@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 36px;
    gap: 24px;
    align-items: stretch;
    box-shadow: var(--shadow-lg);
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none;
    transition: transform 300ms var(--ease-drawer), opacity 300ms var(--ease-drawer);
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  
  .nav-item:hover .dropdown {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
    border: none;
    padding-left: 20px;
  }
  
  .pastor-card {
    grid-template-columns: 1fr;
    padding: 30px;
  }
}
