/* Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Base Styles */
body {
  font-family: 'Inter', sans-serif;
  color: #333;
  background-color: #f7fafc;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.nav-link {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  color: #ffffff;
  border-radius: 0.375rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
  position: relative;
}

.nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background: currentColor;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: #ffffff;
  font-weight: 600;
}

@media (min-width: 768px) {
  .nav-link {
    width: auto;
    padding: 0.5rem 1rem;
  }
  .nav-link:hover {
    background-color: transparent;
  }
}

.dark .nav-link {
  color: #ffffff;
}

.dark .nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

.dark .nav-link.active {
  color: #ffffff;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url('img/pexels-shelaghmurphy-1666816.jpg');
  background-size: cover;
  background-position: center;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
}

/* Section Headings */
.section-heading {
  border-bottom: 2px solid #4f46e5;
  display: inline-block;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
  font-size: 2.25rem;
  font-weight: bold;
}

/* Navigation Links */
.nav-link:hover {
  color: #4f46e5;
}

#nav-menu {
  z-index: 40;
  transition: all 0.3s ease;
}

/* Primary Buttons */
.btn-primary {
  background-color: #4f46e5;
  color: white;
  transition: background-color 0.3s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #4338ca;
}

/* Ministry Cards */
.ministry-card {
  transition: transform 0.3s, box-shadow 0.3s;
}

.ministry-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Service Cards Animation */
.service-card {
  opacity: 0;
  transform: translateY(20px);
  animation: boomIn 0.8s ease-out forwards;
}

.service-card:nth-child(1) {
  animation-delay: 0.2s;
}

.service-card:nth-child(2) {
  animation-delay: 0.4s;
}

.service-card:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes boomIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  50% {
    opacity: 0.7;
    transform: translateY(-5px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  animation-name: animatetop;
  animation-duration: 0.4s;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  font-weight: bold;
  color: #888;
  background: none;
  border: none;
  cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
  color: #000;
  text-decoration: none;
}

@keyframes animatetop {
  from {
    top: -300px;
    opacity: 0;
  }
  to {
    top: 0;
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    height: 60vh;
  }

  .section-heading {
    font-size: 1.875rem;
  }
}

@media (max-width: 640px) {
  .hero-section h1 {
    font-size: 1.875rem; /* Reduce from text-4xl to text-3xl */
  }

  .hero-section p {
    font-size: 1rem; /* Reduce from text-lg to text-base */
  }

  .hero-section a {
    padding: 0.75rem 1.5rem; /* Reduce button size */
    font-size: 0.875rem;
  }

  .section-heading {
    font-size: 1.5rem; /* Further reduce for very small screens */
  }

  #calendar-grid > div {
    padding: 0.25rem 0.125rem;
    font-size: 0.75rem;
  }

  .modal-content {
    margin: 2% auto;
    width: 95%;
  }

  input, textarea {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
  }

  input:focus, textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.p-2 { padding: 0.5rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.max-w-4xl { max-width: 56rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.bg-white { background-color: #fff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-blue-800 { background-color: #1e40af; }
.bg-blue-900 { background-color: #1e3a8a; }
.bg-blue-950 { background-color: #172554; }
.text-white { color: #fff; }
.text-gray-400 { color: #9ca3af; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-indigo-600 { color: #4f46e5; }
.text-yellow-400 { color: #fbbf24; }
.text-yellow-600 { color: #d97706; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.md\:text-4xl { font-size: 2.25rem; }
.md\:text-6xl { font-size: 3.75rem; }
.md\:py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.md\:flex { display: flex; }
.md\:flex-row { flex-direction: row; }
.md\:items-center { align-items: center; }
.md\:space-x-8 > * + * { margin-left: 2rem; }
.md\:space-y-0 > * + * { margin-top: 0; }
.md\:w-auto { width: auto; }
.md\:w-48 { width: 12rem; }
.md\:h-48 { height: 12rem; }
.md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.md\:text-left { text-align: left; }
.md\:text-2xl { font-size: 1.5rem; }
.md\:text-4xl { font-size: 2.25rem; }
.md\:text-6xl { font-size: 3.75rem; }
.sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.aspect-video { aspect-ratio: 16 / 9; }
.overflow-hidden { overflow: hidden; }
.object-cover { object-fit: cover; }
.hover\:bg-indigo-100:hover { background-color: #e0e7ff; }
.cursor-pointer { cursor: pointer; }
.transition-colors { transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, text-decoration-color 0.15s ease-in-out, fill 0.15s ease-in-out, stroke 0.15s ease-in-out, opacity 0.15s ease-in-out, box-shadow 0.15s ease-in-out, transform 0.15s ease-in-out; }
.duration-300 { transition-duration: 0.3s; }

html, body {
  overflow-x: hidden;      /* Prevent scrolling */
  max-width: 100%;         /* Lock to viewport */
}

img, iframe, video {
  max-width: 100%;         /* Constrain media */
  height: auto;
  display: block;
}

#nav-menu, .modal, .hero-section {
  max-width: 100%;         /* Prevent overflow on these big sections */
}
.modal-content {
  max-width: 95%;          /* Ensure modal fits within viewport */
  box-sizing: border-box;  /* Include padding in width */
}

/* Video Card Styles */
.video-card {
  transition: transform 0.3s, box-shadow 0.3s;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.video-card iframe {
  border: none;
/* What to Expect Section Dark Mode */
.dark #what-to-expect {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* What to Expect Section Animations */
@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-5px) rotate(1deg); }
  66% { transform: translateY(5px) rotate(-1deg); }
}

.animate-float {
  animation: float-slow 6s ease-in-out infinite;
}

/* Enhanced What to Expect cards */
#what-to-expect .group:hover {
  transform: translateY(-4px) scale(1.02);
}

#what-to-expect .group:hover .bg-blue-100,
#what-to-expect .group:hover .dark\:bg-blue-900 {
  transform: scale(1.1);
}

#what-to-expect .group:hover .bg-indigo-100,
#what-to-expect .group:hover .dark\:bg-indigo-900 {
  transform: scale(1.1);
}
/* Dark Mode Styles */
.dark .section-heading {
  background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dark .section-heading::after {
  background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
}

.dark .btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.dark .btn-primary:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #2563eb 100%);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.dark .ministry-card {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

.dark .ministry-card:hover {
  background: linear-gradient(135deg, #374151 0%, #312e81 100%);
}

.dark .video-card {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

.dark .video-card:hover {
  background: linear-gradient(135deg, #374151 0%, #312e81 100%);
}

.dark .modal-content {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

/* Dark mode section backgrounds */
.dark #welcome-message {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.dark #about {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.dark #ministries {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.dark #events {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.dark #contact {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Enhanced hover effects and glowing gradients */
.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
  transform: translateY(-2px);
}

.ministry-card {
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.ministry-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
}

.ministry-card:hover i {
  color: #4f46e5;
  transform: scale(1.1);
  filter: drop-shadow(0 0 10px rgba(79, 70, 229, 0.3));
}

.service-card {
  transition: all 0.5s ease;
}

.service-card:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Glowing text effects */
.section-heading {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-radius: 2px;
}

/* Enhanced navigation hover */
.nav-link {
  position: relative;
  transition: all 0.3s ease;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  transition: width 0.3s ease;
}

.nav-link:hover::before {
  width: 100%;
}

/* Floating animation for decorative elements */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

/* Gradient backgrounds for sections */
#welcome-message {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  position: relative;
  overflow: hidden;
}

#welcome-message::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.05) 0%, transparent 70%);
  animation: float 6s ease-in-out infinite;
}

#about {
  background: linear-gradient(135deg, #fefefe 0%, #f8fafc 100%);
}

#ministries {
  background: linear-gradient(135deg, #f8fafc 0%, #f0f9ff 100%);
}

#events {
  background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
}

#give {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
  position: relative;
}

#give::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.1;
}

#contact {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

/* Enhanced form styling */
input:focus, textarea:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  outline: none;
}

/* Video card enhancements */
.video-card {
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
}

/* Calendar enhancements */
#calendar-grid > div:hover {
  background-color: #e0e7ff;
  transform: scale(1.05);
  transition: all 0.2s ease;
}

/* Modal enhancements */
.modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* Dark mode custom classes */
.dark .dark-bg-gray-900 { background-color: #111827; }
.dark .dark-bg-gray-800 { background-color: #1f2937; }
.dark .dark-text-white { color: #ffffff; }
.dark .dark-text-gray-400 { color: #9ca3af; }
.dark .dark-hover-text-gray-100:hover { color: #f3f4f6; }
.dark .dark-hover-bg-gray-700:hover { background-color: #374151; }
.dark .dark-text-gray-200 { color: #e5e7eb; }
.dark .dark-hover-text-indigo-400:hover { color: #818cf8; }
.dark .dark-hover-bg-gray-700:hover { background-color: #374151; }
.dark .dark-text-gray-300 { color: #d1d5db; }
.dark .dark-bg-gray-700 { background-color: #374151; }
.dark .dark-text-gray-400 { color: #9ca3af; }
.dark .dark-bg-blue-900 { background-color: #1e3a8a; }
.dark .dark-bg-indigo-900 { background-color: #312e81; }
.dark .dark-bg-blue-800 { background-color: #1e40af; }
.dark .dark-text-gray-500 { color: #6b7280; }
.dark .dark-border-gray-600 { border-color: #4b5563; }
.dark .dark-text-blue-400 { color: #60a5fa; }
.dark .dark-text-indigo-500 { color: #6366f1; }
.dark .dark-text-blue-600 { color: #2563eb; }
.dark .dark-bg-blue-100 { background-color: #dbeafe; }
.dark .dark-bg-indigo-100 { background-color: #e0e7ff; }
.dark .dark-bg-blue-800 { background-color: #1e40af; }
.dark .dark-bg-indigo-800 { background-color: #312e81; }
.dark .dark-hover-text-gray-300:hover { color: #d1d5db; }
.dark .dark-border-gray-700 { border-color: #374151; }
}
