/* google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Lora:ital,wght@0,400..700;1,400..700&family=Manufacturing+Consent&family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Oswald:wght@200..700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Raleway:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

/* Reset + General */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", sans-serif;
  background-color: #f9f9f9;
}

ul {
  list-style: none;
}

.new-section {
  min-height: 100vh;
  width: 100%;
}

/* GLOBAL STYLES */
.light-theme {
  background-color: #f8f9fa;
  color: #222;
}

.dark-theme {
  background-color: #121212;
  color: #fff;
}

.container {
  width: 90%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 4rem 0;
}

.section-heading {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

.section-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}

.section-flex.reverse {
  flex-direction: row-reverse;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-stagger > * {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Main navbar wrapper */
.navbar-wrapper {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 1); /* faded white */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 999;
}

/* Container with max width */
.navbar-container {
  max-width: 1366px;
  min-height: 100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 25px;
  gap: 20px;
  flex-wrap: wrap;
}

/* Logo */
.logo img {
  display: block;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 15px;
  list-style: none;
}

.social-links a {
  color: navy;
  font-size: 1.1rem;
  transition: 0.3s;
}

.social-links a:hover {
  color: orange;
}

/* Nav Links */
.nav-links {
  display: flex;
  gap: 25px;
  list-style: none;
  flex: 1;
  justify-content: center;
  position: relative;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background-color: red;
  left: 0;
  bottom: -4px;
  transition: 0.3s ease;
}

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

/* Dropdowns */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: white;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  display: none;
  flex-direction: column;
  border-radius: 6px;
  padding: 10px 0;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 999;
}

.dropdown-menu li {
  padding: 10px 20px;
}

.dropdown-menu li a {
  color: #333;
  display: block;
}

.dropdown:hover .dropdown-menu {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* Use ::before for pointer/triangle */
.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 25px;
  border-width: 0 10px 10px 10px;
  border-style: solid;
  border-color: transparent transparent white transparent;
}

/* Search Box */
.searchBox {
  display: flex;
  align-items: center;
  gap: 5px;
}

.searchBox input {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 20px 0 0 20px;
  outline: none;
  font-size: 0.9rem;
}

.searchBox button {
  padding: 6px 10px;
  background: navy;
  color: white;
  border: none;
  border-radius: 0 20px 20px 0;
  cursor: pointer;
  transition: background 0.3s;
}

.searchBox button:hover {
  background: orange;
}

/* MINISTRIES HERO SECTION */
/* Alternating background color */
.alt-light-bg {
  background: #f9f9f9;
  color: #111;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

/* Hero content styles */
.ministries-hero-content {
  max-width: 800px;
}

.ministries-hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  position: relative;
  text-transform: uppercase;
}

.ministries-hero-content p {
  font-size: 1.2rem;
  line-height: 1.6;
}

/* Bounce icon */
.bounce-icon {
  font-size: 3rem;
  color: #d63b3b;
  animation: bounce 1.8s infinite;
  margin-bottom: 1rem;
}

/* Bounce animation */
@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-14px);
  }
  60% {
    transform: translateY(-8px);
  }
}

/* Fade-in animation */
.fade-in-section {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* MINISTRIES OVERVIEW SECTION */
.ministries-overview-section {
  padding: 80px 20px;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  position: relative;
}

.ministries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.ministry-card {
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.ministry-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(45deg);
  transition: all 0.5s ease;
  z-index: 0;
}

.ministry-card:hover::before {
  top: 0;
  left: 0;
}

.ministry-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.ministry-card i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: navy;
  animation: bounce 2s infinite;
}

.ministry-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  z-index: 1;
  position: relative;
}

.ministry-card p {
  font-size: 1rem;
  z-index: 1;
  position: relative;
}

.light-bg {
  background: #f9f9f9;
}

.dark-bg {
  background: #f1f5ff;
}

/* Bouncing Icon */
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* Fade In */
.fade-in-section {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 1s ease,
    transform 1s ease;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.ministry-cta-section {
  margin-top: 60px;
  text-align: center;
}

.cta-toggle-btn {
  padding: 14px 32px;
  font-size: 1.2rem;
  background: navy;
  color: #fff;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
  position: relative;
}

.cta-toggle-btn:hover {
  background: darkred;
}

.ministry-form {
  max-width: 600px;
  margin: 0 auto;
  background: #fefefe;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  display: grid;
  gap: 1rem;
}

.ministry-form.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ministry-form label {
  text-align: left;
  font-weight: 600;
  font-size: 1rem;
}

.ministry-form select,
.ministry-form textarea {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  resize: vertical;
}

.submit-btn {
  padding: 12px 24px;
  background: darkgreen;
  color: #fff;
  border: none;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.submit-btn:hover {
  background: seagreen;
}

/* FAQ SECTION */
.ministries-faq-section {
  background-color: #f9f9f9;
  padding: 5rem 1rem;
  /* min-height: 70vh; */
  text-align: center;
  /* border: 1px solid black; */
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  position: relative;
}

.faq-container {
  max-width: 800px;
  margin: auto;
  display: grid;
  gap: 1.5rem;
}

.faq-item {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: background 0.3s ease;
}

.faq-question {
  background: none;
  border: none;
  width: 100%;
  padding: 1.2rem;
  text-align: left;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-question::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: navy;
  transition: width 0.3s ease;
}

.faq-question:hover::before {
  width: 100%;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.2rem;
  background: #fafafa;
  transition:
    max-height 0.5s ease,
    padding 0.5s ease;
}

.faq-answer p {
  margin: 1rem 0;
  color: #333;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 1.2rem;
}

.bounce-icon {
  animation: bounce 1.8s infinite;
  color: darkorange;
  font-size: 1.3rem;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.cta-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: auto;
}

.cta-form input,
.cta-form textarea,
.cta-form select {
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 100%;
}

.cta-form button {
  background: navy;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
}

.cta-form button:hover {
  background: darkorange;
}

.cta-form-wrapper {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  max-height: 0;
  overflow: hidden;
  padding: 0;
}

.cta-form-wrapper.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
  max-height: 400px; /* Large enough to show the form */
  padding: 2rem 0;
}

/* MINISTRY GALLERY SECTION */
.ministry-gallery-section {
  background: #f9f9f9;
  padding: 80px 20px;
  min-height: 70vh;
  text-align: center;
}

.gallery-title {
  font-size: 2.5rem;
  color: #222;
  margin-bottom: 10px;
  position: relative;
}

.gallery-intro {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 40px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 0 20px;
}

.gallery-item {
  overflow: hidden;
  position: relative;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition:
    transform 0.5s ease,
    filter 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
  filter: brightness(1.1) contrast(1.1);
}

.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 1s ease,
    transform 1s ease;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* -------------- */
/* ------------- */
/* ----FOOTER---- */
/* ---------------- */
/* ------------------ */
.site-footer {
  background: #0a0a33;
  color: #f0f0f0;
  padding: 60px 20px 30px;
  font-family: "Lora", serif;
}

.footer-container {
  max-width: 1300px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 40px;
}

.footer-column h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: orange;
}

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

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

.footer-column ul li a {
  color: #f0f0f0;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.footer-column ul li a:hover {
  color: orange;
}

.footer-logo img {
  width: 100px;
  margin-bottom: 20px;
}

.footer-logo p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-socials {
  margin-top: 15px;
}

.footer-socials a {
  display: inline-block;
  margin-right: 10px;
  font-size: 1.2rem;
  color: #f0f0f0;
  transition: color 0.3s ease;
}

.footer-socials a:hover {
  color: orange;
}

.footer-bottom {
  border-top: 1px solid #444;
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  font-size: 0.9rem;
  color: #aaa;
}

/* ========== Mobile Navbar ========== */
@media (max-width: 1200px) {
  /* Make social icons smaller */
  .social-links a {
    font-size: 0.9rem;
  }

  /* Hide search box on mobile */
  .searchBox {
    display: none;
  }

  /* Hide nav links by default */
  .nav-links {
    display: none;
    flex-direction: column;
    background: white;
    position: absolute;
    top: 100px;
    left: 0;
    width: 100%;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 998;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
  }

  .nav-links.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Hamburger Button */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 18px;
    cursor: pointer;
  }

  .hamburger span {
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: 0.3s;
  }

  /* Animate hamburger to "X" when active */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(7px);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
  }

  /* Dropdown menus should stack full width */
  .dropdown-menu {
    position: static;
    display: none;
    opacity: 1;
    transform: none;
    box-shadow: none;
    padding: 0;
  }

  .dropdown-menu li {
    padding: 12px 20px;
    border-top: 1px solid #eee;
  }

  /* Show when active */
  .dropdown.active .dropdown-menu {
    display: block;
  }

  .dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .dropdown.open .dropdown-menu {
    max-height: 500px; /* large enough to fit content */
  }
}

/* ================================
   RESPONSIVENESS FOR MINISTRIES PAGE
   ================================ */

/* Tablets */
@media (max-width: 1024px) {
  .ministries-hero-content {
    padding: 3rem 2rem;
    text-align: center;
  }

  .ministries-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .faq-container {
    width: 90%;
    margin: 0 auto;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .ministries-hero-content h1 {
    font-size: 2rem;
  }

  .ministries-hero-content p {
    font-size: 1rem;
  }

  .ministries-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .ministry-card {
    padding: 1.5rem;
    text-align: center;
  }

  .ministry-cta-section {
    padding: 2rem 1rem;
  }

  .ministry-form {
    width: 100%;
  }

  .faq-container {
    width: 100%;
  }

  .faq-question {
    font-size: 1rem;
    padding: 1rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .footer-socials {
    justify-content: center;
  }
}

mark.search-highlight {
  background: rgba(255, 243, 128, 0.95); /* soft yellow */
  color: #111;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
  transition: background 1s ease;
}

/* wrapper used to replace original text nodes */
.search-wrapper {
  /* no extra styles needed, but kept for clarity */
}

@media (max-width: 900px) {
  .navbar-container {
    min-height: 75px;
    padding: 10px 18px;
    gap: 0;
    flex-wrap: nowrap;
  }

  .logo {
    flex: 1;
  }

  .logo img {
    width: 110px;
  }

  .social-links,
  .searchBox {
    display: none;
  }

  .hamburger {
    display: flex;
    flex-shrink: 0;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 75px;
    left: 0;
    width: 100%;
  }

  .nav-links.active {
    display: flex;
  }
}
