:root {
  --black: #0b0b0b;
  --dark: #151515;
  --gray: #9a9a9a;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  text-transform: uppercase;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 150px; /* Ensures fixed header doesn't cover section titles */
}

body {
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden; /* Prevents horizontal scroll on mobile */
}

/* Global Image Reset for Mobile Safety */
img {
  max-width: 100%;
  height: auto;
}

/* NAV (Bootstrap Overrides) */
.glass-nav {
  background: rgba(2, 2, 2, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-transparent {
  background: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(5px);
  border-bottom-color: transparent;
}

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  margin-left: 1rem;
}

.navbar-nav .nav-link:hover {
  color: var(--white);
}

.navbar-nav .nav-link.active {
  color: var(--white);
  font-weight: 700;
}

.logo {
  height: 80px;
}

/* NAV SOCIALS */
.nav-socials {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.nav-socials a {
  margin-left: 0;
  font-size: 1.1rem;
  color: var(--white);
  text-decoration: none;
}

/* VIDEO HERO */
.hero-video {
  position: relative;
  width: 100%;
  height: 80vh;
  overflow: hidden;
  background: black url('../img/poster.jpg') no-repeat center center/cover;
}

.hero-bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.7),
    rgba(0,0,0,0.2),
    rgba(0,0,0,0)
  );

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.hero-content {
  text-align: center;
  max-width: 800px;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.primary {
  background: var(--white);
  color: var(--black);
}

.primary:hover {
  transform: translateY(-2px);
}

.outline {
  background: transparent;
  border: 1px solid var(--white);
  color: var(--white);
  margin-left: 1rem;
}

.outline:hover {
  background: var(--white);
  color: var(--black);
}

.nav-btn {
  padding: 0.5rem 1.5rem;
  margin-left: 1rem;
  font-size: 0.9rem;
}

/* SECTIONS */
.section {
  padding: 6rem 1rem;
  margin: auto;
  text-align: center;
}

.section.dark {
  background: var(--dark);
}

.section h2, .section h3 {
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}

/* EVENTS */
.event-card {
  background: var(--dark);
  padding: 1.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid rgba(255,255,255,0.05);
  transition: transform 0.3s;
}

.event-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,0.2);
}

.event-date {
  background: var(--white);
  color: var(--black);
  padding: 0.8rem;
  border-radius: 0.5rem;
  text-align: center;
  min-width: 70px;
}

.event-date .day {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.event-date .month {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.event-details {
  text-align: left;
}

.event-details h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.event-details p {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 0.5rem;
}

.event-time {
  font-size: 0.85rem;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* SERVICE CARDS (Renamed from .card to avoid Bootstrap conflict) */
.service-card {
  padding: 2rem;
  background: rgba(31, 31, 31, 0.6);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 255, 255, 0.2);
}

.service-card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.service-card h4 {
  font-size: 1.25rem;
  font-weight: 700;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.5;
}

/* SERVICE INFO */
.service-info {
  margin-bottom: 3rem;
}

.service-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.1);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.service-location {
  color: var(--gray);
  font-size: 0.9rem;
}

/* GALLERY */
#galleryGrid img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 1rem;
  filter: grayscale(100%);
  transition: all 0.4s;
  cursor: pointer;
}

#galleryGrid img:hover {
  filter: grayscale(0%);
  transform: scale(1.05);
}

@media (max-width: 768px) {
  #galleryGrid img {
    height: 180px;
  }
}

/* LIGHTBOX */
.lightbox {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 2000; /* On top of everything */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  animation: zoomIn 0.3s ease;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  z-index: 2001;
}

.lightbox-close:hover {
  color: var(--gray);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 2.5rem;
  cursor: pointer;
  padding: 1rem;
  z-index: 2002;
  transition: color 0.3s, transform 0.3s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--white);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

@keyframes zoomIn {
  from {transform: scale(0.9); opacity: 0;}
  to {transform: scale(1); opacity: 1;}
}

/* FORM */
form {
  display: grid;
  gap: 1rem;
  max-width: 500px;
  margin: auto;
}

input, textarea {
  padding: 0.8rem;
  background: #1c1c1c;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--white);
  border-radius: 0.5rem;
  transition: border-color 0.3s;
  font-size: 16px; /* Prevents zoom on iOS */
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--white);
}

/* CONTACT SOCIALS */
.contact-socials {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.contact-socials a {
  font-size: 2rem;
  color: var(--white);
  transition: transform 0.3s, color 0.3s;
}

.contact-socials a:hover {
  color: var(--gray);
  transform: translateY(-5px);
}

/* MAP */
.map-wrapper {
  position: relative;
  margin-top: 3rem;
}

.map-container {
  width: 100%;
  height: 350px;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  filter: grayscale(100%) invert(92%) contrast(83%); /* Dark mode map style */
}

.map-overlay-btn {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* FOOTER */
.footer {
  padding: 4rem 1rem;
  background: #050505;
  color: var(--gray);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-heading {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

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

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--white);
}

/* ANIMATION */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sermon-cta-card {
  background: linear-gradient(135deg, rgba(30,30,30,0.8) 0%, rgba(20,20,20,0.9) 100%);
  padding: 4rem 2rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  transition: transform 0.3s ease;
}

.sermon-cta-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,0.2);
}

.youtube-icon-large {
  font-size: 5rem;
  color: #ff0000;
  filter: drop-shadow(0 0 20px rgba(255, 0, 0, 0.3));
}

.big-btn {
  padding: 1rem 3rem;
  font-size: 1.2rem;
  background: #ff0000;
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}

.big-btn:hover {
  background: #cc0000;
  transform: scale(1.05);
  color: white;
}

/* VISION & MISSION */
.vision-mission-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  text-align: left;
}

.vm-card {
  background: rgba(31, 31, 31, 0.6);
  padding: 2.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, border-color 0.3s;
}

.vm-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
}

.vm-card h3 {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.vm-card p {
  color: var(--gray);
  line-height: 1.7;
}

/* TEAM SECTION */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.team-member {
  background: var(--dark);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, border-color 0.3s;
}

.team-member:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
}

.team-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: top;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.team-member:hover .team-img {
  filter: grayscale(0%);
}

.team-info {
  padding: 1.5rem;
  text-align: center;
}

.team-info h4 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.team-info .role {
  color: var(--gray);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(10, 10, 10, 0.98);
    padding: 1.5rem;
    border-radius: 1rem;
    margin-top: 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    text-align: center;
  }

  .navbar-nav .nav-link {
    margin-left: 0;
    padding: 1rem 0; /* Larger touch target */
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .nav-socials {
    justify-content: center;
    margin-top: 1.5rem;
    width: 100%;
  }

  #adminNavBtn {
    margin-left: 0 !important;
    margin-top: 1rem;
    display: inline-block;
  }

  .nav-btn {
    margin-left: 0;
    margin-top: 1rem;
    display: inline-block;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 100px;
  }

  .section {
    padding: 3rem 1rem; /* Better content density on mobile */
  }

  .logo {
    height: 60px; /* Smaller logo on mobile to save screen space */
  }

  .hero-content h1 {
    font-size: 2rem;
  }

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

  .big-btn {
    width: 100%;
  }

  .team-img {
    height: auto;
    aspect-ratio: 3/4;
  }

  #backToTop {
    bottom: 20px;
    right: 20px;
  }
}

/* BACK TO TOP BUTTON */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  padding: 0; /* Override .btn padding */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
