/* Reset and Body */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: #f7fafd;
}

/* Navigation */
nav.main-nav {
  background: #1978a5;
  padding: 12px 20px;
  text-align: center;
}
nav.main-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
}

/* Title */
.gallery-title {
  text-align: center;
  margin: 30px 0 20px 0;
  font-size: 2rem;
  font-weight: 600;
  color: #1978a5;
}

/* Instagram-style Responsive Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  max-width: 1100px;
  margin: 0 auto 50px auto;
  padding: 0 10px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  box-shadow: 0 2px 10px #cbe5fd60;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Download Button */
.download-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(25, 120, 165, 0.85);
  color: white;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 13px;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-item:hover .download-btn {
  opacity: 1;
}

/* Footer */
.main-footer {
  background: #232323;
  color: #e0e0e0;
  padding: 36px 0 0 0;
  font-size: 16px;
  letter-spacing: 0.1px;
}

.footer-cols {
  display: flex;
  justify-content: center;
  gap: 40px;
  max-width: 1200px;
  margin: auto;
  padding: 0 24px 16px 24px;
  flex-wrap: wrap;
}

.footer-col {
  flex: 1 1 170px;
  min-width: 180px;
  margin-bottom: 24px;
  padding-left: 10px;
  justify-content: left;
}

.footer-col h3 {
  margin: 0 0 15px 0;
  font-size: 1.08rem;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ddd;
}

.footer-col a {
  color: #b7e3ff;
  text-decoration: none;
  font-size: 16px;
}

.footer-col a:hover {
  text-decoration: underline;
}

.footer-bar {
  background: #191919;
  color: #aaa;
  text-align: center;
  font-size: 15px;
  padding: 14px 0 14px 0;
  margin-top: 10px;
  letter-spacing: 0.5px;
}


/* 🔹 Responsive Design */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 6px;
  }
  .gallery-title {
    font-size: 1.6rem;
  }
}
@media (max-width: 500px) {
  nav.main-nav {
    font-size: 15px;
    padding: 10px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .download-btn {
    font-size: 11px;
    padding: 4px 6px;
  }
  .footer-cols {
    flex-direction: column;
    text-align: left;
    padding: 0 16px;
  }
  .footer-col {
    width: 100%;
  }
  .gallery-title {
    font-size: 1.4rem;
  }
}
/* Responsive */
@media (max-width: 1050px) {
  .hero-welcome {
    flex-direction: column;
    gap: 20px;
    padding: 24px;
  }
  .hero-image, .welcome-box {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .clergy-section {
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 20px 0;
  }
  .clergy-card {
    max-width: 350px;
  }
  .footer-cols {
    flex-direction: column;
    gap: 6px;
    padding: 0 3px 7px 3px;
  }
  .footer-col {
    margin-bottom: 4px;
    padding: 3px 0;
  }
}


@media (max-width: 500px) {
  .about-section h2,
  .clergy-role,
  .footer-col h3 { font-size: 1.1rem; }
  .about-section p,
  .clergy-name { font-size: 1rem; }
}


@media (max-width: 480px) {

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;           /* smaller gap */
  max-width: 900px;
  margin: auto;
  padding: 0 8px 10px 8px;
}
.footer-col {
  flex: 1 1 170px;
  min-width: 180px;
  margin-bottom: 8px;  /* reduced */
  padding: 6px 0;      /* reduced */
}


@media (max-width: 900px) {
  .footer-cols {
    flex-direction: column;
    align-items: flex-start; /* Stack columns, do not stretch vertically */
    gap: 0;
    padding: 0 8px 8px 8px;
    max-width: 100vw;
  }
  .footer-col {
    max-width: 100%;
    /* Remove flex: 1 or min-height for mobile */
    flex: unset;
    min-width: 0;
    margin-bottom: 16px;
    padding: 6px 0;
  }
}
