/* --- General Animations --- */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, visibility;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: none;
}

/* --- Hero Section Animation --- */
/* This container ensures the image doesn't overflow when it scales up */
.hero-container {
  overflow: hidden;
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-overlay {
  background: linear-gradient(rgba(12, 43, 78, 0.8), rgba(12, 43, 78, 0.5));
  position: absolute;
  inset: 0;
  z-index: 10; /* Ensures overlay stays on top of the moving image */
}

/* The moving image class */
.hero-image-anim {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Scale is needed so edges don't show when moving */
  transform: scale(1.15);
  /* 30s duration, smooth easing, infinite loop, moving back and forth */
  animation: horizontalPan 10s ease-in-out infinite alternate;
}

@keyframes horizontalPan {
  0% {
    transform: scale(1.15) translateX(-40px); /* Move Left */
  }
  100% {
    transform: scale(1.15) translateX(40px); /* Move Right */
  }
}

/* --- Modal Styles --- */
#eventModal {
  transition: opacity 0.3s ease-in-out;
}

#modalContent {
  transition: transform 0.3s ease-in-out;
}

.modal-open {
  overflow: hidden;
}

/* --- Pastoral Card Hover Effect --- */
/* (You can use this if you link this CSS to pastoral.html too) */
.pastor-card {
  transition: all 0.4s ease;
}
.pastor-card:hover {
  transform: translateY(-10px);
}

/* --- INLINE IMAGE SLIDER --- */
.slider-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 1rem; /* Rounded corners for the slider */
}

.slider-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  object-fit: cover;
}

.slider-slide.active {
  opacity: 1;
  z-index: 10;
}

/* Slider Buttons */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
  border: none;
}

.slider-btn:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.slider-prev {
  left: 15px;
}
.slider-next {
  right: 15px;
}

/* Dots/Indicators */
.slider-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  background: white;
  transform: scale(1.2);
}
/* --- General Animations --- */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, visibility;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: none;
}

/* --- Hero Section Animation --- */
/* This container ensures the image doesn't overflow when it scales up */
.hero-container {
  overflow: hidden;
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-overlay {
  background: linear-gradient(rgba(12, 43, 78, 0.8), rgba(12, 43, 78, 0.5));
  position: absolute;
  inset: 0;
  z-index: 10; /* Ensures overlay stays on top of the moving image */
}

/* The moving image class */
.hero-image-anim {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Scale is needed so edges don't show when moving */
  transform: scale(1.15);
  /* 20s duration for a slightly faster, noticeable pan */
  animation: horizontalPan 20s ease-in-out infinite alternate;
}

@keyframes horizontalPan {
  0% {
    transform: scale(1.15) translateX(-40px);
  }
  100% {
    transform: scale(1.15) translateX(40px);
  }
}

/* --- Modal Styles --- */
#eventModal {
  transition: opacity 0.3s ease-in-out;
}
#modalContent {
  transition: transform 0.3s ease-in-out;
}
.modal-open {
  overflow: hidden;
}

/* --- Slider Styles --- */
.slider-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 1rem; /* Rounded corners for the slider */
}

.slider-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  object-fit: cover;
}

.slider-slide.active {
  opacity: 1;
  z-index: 10;
}

/* Slider Buttons */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
  border: none;
}

.slider-btn:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.slider-prev {
  left: 15px;
}
.slider-next {
  right: 15px;
}

/* Slider Dots */
.slider-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  background: white;
  transform: scale(1.2);
}

/* --- Pastor Card Hover Effect --- */
.pastor-card {
  transition: all 0.4s ease;
}
.pastor-card:hover {
  transform: translateY(-10px);
}
