/* General Styles */
:root {
  --primary-color: #263238; /* A dark, solemn blue/gray */
  --accent-color: #ffc107; /* A bright, reverent gold */
  --light-color: #f5f5f5;
  --text-color: #333;
  --text-on-dark: #fafafa;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  background-color: var(--light-color);
  color: var(--text-color);
  scroll-behavior: smooth;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

.section h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.5rem;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 10px;
}

.section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--accent-color);
  margin: 10px auto 0;
}

.dark-section {
  background-color: var(--primary-color);
  color: var(--text-on-dark);
}

.dark-section h2 {
  color: var(--accent-color);
}

/* Header & Navbar */
header {
  background-color: var(--primary-color);
  color: var(--text-on-dark);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-color);
}

.nav-links {
  list-style: none;
  display: flex;
}

.nav-links li {
  margin-left: 20px;
}

.nav-links a {
  color: var(--text-on-dark);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--accent-color);
}

/* Hero Section */
.hero-section {
  background-image: url('hero1.webp');
  background-size: cover;
  background-position: center;
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
}

.hero-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
  font-style: italic;
}

/* Calendar Section */
.calendar-container {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.calendar-container iframe {
  width: 100%;
  max-width: 800px;
  height: 600px;
  border: solid 1px #777;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Carousel styles (transform based) */
.carousel-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

/* viewport wrapper: hides overflow */
.carousel-track-viewport {
  overflow: hidden;
  width: 100%;
  border-radius: 8px;
}

/* the track — we'll translate this */
.carousel-track {
  display: flex;
  transition: transform 0.45s ease;
  will-change: transform;
}

/* each slide takes full width */
.carousel-slide {
  flex: 0 0 100%;
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* card inside slide */
.event-card {
  width: 100%;
  max-width: 760px;
  background-color: white;
  color: var(--text-color);
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.event-card h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* nav buttons */
.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  font-size: 1.1rem;
  color: var(--primary-color);
  transition: background 0.2s;
  z-index: 10;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}
.carousel-button:hover {
  background: rgba(255, 255, 255, 1);
}
.prev-button {
  left: -18px;
}
.next-button {
  right: -18px;
}

/* dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 14px;
  gap: 8px;
}

.carousel-dot {
  border: none;
  background-color: #bdbdbd;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0;
  cursor: pointer;
  padding: 0;
  transition: transform 0.18s, background-color 0.18s;
}
.carousel-dot:hover {
  transform: scale(1.15);
}
.carousel-dot.active {
  background-color: var(--accent-color);
  transform: scale(1.25);
}

/* Churches Section */
.church-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.church-region-group h3 {
  font-size: 1.8rem;
  color: var(--accent-color);
  margin-bottom: 5px;
}

.church-region-group p.meeting-schedule {
  font-style: italic;
  font-size: 0.9rem;
  margin-bottom: 20px;
  opacity: 0.8;
}

.church-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.church-card {
  background-color: #37474f;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.church-card h4 {
  color: var(--accent-color);
  margin-bottom: 5px;
}

.church-card p {
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.church-card .church-address {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: var(--text-on-dark);
  text-align: center;
  padding: 20px 0;
  font-size: 0.9rem;
}

footer a {
  color: var(--accent-color);
  text-decoration: none;
}

.social-links {
  list-style: none;
  display: flex;
  justify-content: center;
  margin: 10px;
}

.social-links a {
  color: var(--text-on-dark);
  margin: 0 10px;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.social-links a:hover {
  color: var(--accent-color);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 15px;
}

.carousel-dot {
  border: none;
  background-color: #888;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 5px;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.3s ease;
}

.carousel-dot.active {
  background-color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: center;
  }

  .logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--accent-color);
  }

  .nav-links {
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links li {
    margin: 5px 10px;
  }

  .hero-content h1 {
    font-size: 1.5rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .carousel-button {
    display: none;
  }

  /* --- New styles for dots on mobile --- */
  .carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 20px;
  }

  .carousel-dot {
    border: none;
    background-color: #888;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.3s ease;
  }

  .carousel-dot.active {
    background-color: var(--accent-color);
  }
}

/* ===== NEW PHOTO GALLERY & LIGHTBOX STYLES ===== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-auto-rows: 200px;
  grid-auto-flow: dense; /* Helps fill gaps */
  gap: 15px;
  margin-top: 40px;
}

.grid-item {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  display: block;
}

/* For creating an interesting grid layout */
.grid-item.wide {
  grid-column: span 2;
}

.grid-item.tall {
  grid-row: span 2;
}

/* Lightbox Modal */
.lightbox {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.4s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-content {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
}

#lightbox-image {
  max-width: 90vw;
  max-height: 85vh;
  animation: zoomIn 0.4s;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
  }
  to {
    transform: scale(1);
  }
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 2001;
}

.close-btn:hover,
.close-btn:focus {
  color: #bbb;
  text-decoration: none;
}

/* Lightbox Navigation */
.prev-slide,
.next-slide {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 20px;
  transition: 0.3s ease;
  user-select: none;
  background-color: rgba(0, 0, 0, 0.3);
}

.prev-slide {
  left: 0;
  border-radius: 0 3px 3px 0;
}

.next-slide {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev-slide:hover,
.next-slide:hover {
  background-color: rgba(0, 0, 0, 0.6);
}

/* Adjust grid for smaller screens */
@media (max-width: 768px) {
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-auto-rows: 150px;
  }
}
/* ===== END NEW STYLES ===== */
