/* =====================================================
   Emmanuel Iranian Church — style.css
   Color palette: soft blue (#4A7FA5), warm gray (#6B7280),
   warm white (#FAFAF8), gold accent (#C9A84C)
   ===================================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;700&family=Inter:wght@300;400;500;600&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  --blue: #4A7FA5;
  --blue-dark: #345C7A;
  --blue-light: #EBF2F8;
  --gold: #C9A84C;
  --gray: #6B7280;
  --gray-light: #F3F4F6;
  --dark: #1F2937;
  --white: #FAFAF8;
  --font-head: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --transition: 0.35s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--white);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--dark);
}

a {
  text-decoration: none;
  color: var(--blue);
  transition: color var(--transition);
}

a:hover {
  color: var(--blue-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------- Utility ---------- */
.text-blue {
  color: var(--blue) !important;
}

.text-gold {
  color: var(--gold) !important;
}

.bg-blue {
  background: var(--blue) !important;
}

.bg-blue-light {
  background: var(--blue-light) !important;
}

.section-pad {
  padding: 80px 0;
}

.section-pad-sm {
  padding: 50px 0;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.4rem;
}

.section-sub {
  color: var(--gray);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

.divider {
  width: 52px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin: 0.6rem auto 1.4rem;
}

/* ---------- Navbar ---------- */
.navbar {
  transition: background var(--transition), box-shadow var(--transition);
  padding: 18px 0;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.97) !important;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.10);
  padding: 12px 0;
}

.navbar-brand {
  font-family: var(--font-head);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--white) !important;
  letter-spacing: 0.02em;
}

.navbar.scrolled .navbar-brand {
  color: var(--blue-dark) !important;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}

.navbar.scrolled .navbar-toggler {
  border-color: var(--blue);
}

.nav-link {
  color: rgba(255, 255, 255, 0.88) !important;
  font-weight: 500;
  padding: 6px 14px !important;
  border-radius: 6px;
  transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.15);
}

.navbar.scrolled .nav-link {
  color: var(--gray) !important;
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
  color: var(--blue-dark) !important;
  background: var(--blue-light);
}

.navbar-toggler-icon {
  filter: invert(1);
}

.navbar.scrolled .navbar-toggler-icon {
  filter: none;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(26, 50, 72, 0.78) 0%, rgba(74, 127, 165, 0.55) 100%),
    url('https://images.unsplash.com/photo-1438232992991-995b671e5b4a?w=1600&q=80') center center / cover no-repeat fixed;
  display: flex;
  align-items: center;
  text-align: center;
  color: #fff;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: linear-gradient(to top, var(--white), transparent);
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
  line-height: 1.15;
}

.hero p.lead {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  max-width: 560px;
  margin: 0 auto 2rem;
  opacity: 0.92;
}

.btn-gold {
  background: var(--gold);
  color: var(--dark);
  border: none;
  border-radius: 50px;
  padding: 12px 32px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  box-shadow: 0 4px 18px rgba(201, 168, 76, 0.35);
}

.btn-gold:hover {
  background: #b8952e;
  color: var(--dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 168, 76, 0.45);
}

.btn-outline-white {
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: #fff;
  border-radius: 50px;
  padding: 12px 32px;
  font-weight: 600;
  font-size: 0.95rem;
  background: transparent;
  transition: all var(--transition);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: #fff;
  transform: translateY(-2px);
}

.btn-primary-church {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 12px 32px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.btn-primary-church:hover {
  background: var(--blue-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 127, 165, 0.4);
}

/* ---------- Service Times ---------- */
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 28px;
  text-align: center;
  border-top: 4px solid var(--blue);
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.13);
}

.service-card .icon {
  font-size: 2.2rem;
  color: var(--blue);
  margin-bottom: 1rem;
}

.service-card h5 {
  font-family: var(--font-head);
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.service-card .time {
  color: var(--gold);
  font-weight: 600;
  font-size: 1.05rem;
}

.service-card small {
  color: var(--gray);
}

/* ---------- General Cards ---------- */
.card {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.13);
}

.card-img-top {
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: 22px;
}

.card-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
}

.card-text {
  color: var(--gray);
  font-size: 0.92rem;
}

.badge-date {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- About Preview ---------- */
.about-preview {
  background: var(--blue-light);
}

.about-preview img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: #fff;
  padding: 72px 0;
  text-align: center;
}

.cta-banner h2 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.cta-banner p {
  opacity: 0.88;
  max-width: 500px;
  margin: 0.8rem auto 2rem;
}

/* ---------- Footer ---------- */
footer {
  background: var(--dark);
  color: #d1d5db;
  padding: 60px 0 28px;
}

footer h6 {
  color: #fff;
  font-family: var(--font-head);
  font-size: 1rem;
  margin-bottom: 1rem;
}

footer p,
footer address {
  font-size: 0.9rem;
  line-height: 1.8;
}

footer a {
  color: #9ca3af;
  transition: color var(--transition);
}

footer a:hover {
  color: var(--gold);
}

.footer-brand {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: #fff;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #d1d5db;
  margin-right: 8px;
  font-size: 1rem;
  transition: all var(--transition);
}

.social-links a:hover {
  background: var(--gold);
  color: var(--dark);
  transform: translateY(-3px);
}

.footer-hr {
  border-color: rgba(255, 255, 255, 0.1);
  margin: 40px 0 20px;
}

.footer-bottom {
  font-size: 0.82rem;
  color: #6b7280;
  text-align: center;
}

/* ---------- Page Header ---------- */
.page-header {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue)),
    url('https://images.unsplash.com/photo-1438232992991-995b671e5b4a?w=1600&q=80') center / cover no-repeat;
  background-blend-mode: multiply;
  color: #fff;
  padding: 110px 0 60px;
  text-align: center;
}

.page-header h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.5rem;
}

.page-header p {
  opacity: 0.88;
  font-size: 1.1rem;
}

.breadcrumb-item a {
  color: rgba(255, 255, 255, 0.75);
}

.breadcrumb-item.active {
  color: #fff;
}

.breadcrumb-item+.breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- About Page ---------- */
.belief-card {
  background: var(--white);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  transition: transform var(--transition);
}

.belief-card:hover {
  transform: translateX(4px);
}

.belief-card h6 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.belief-card p {
  color: var(--gray);
  font-size: 0.9rem;
  margin: 0;
}

.pastor-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.pastor-card img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}

.leader-card {
  text-align: center;
  padding: 28px 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.leader-card:hover {
  transform: translateY(-5px);
}

.leader-card img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 14px;
  border: 3px solid var(--blue-light);
}

.leader-card h6 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.leader-card span {
  color: var(--blue);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ---------- Sermons Page ---------- */
.sermon-card .card-img-top {
  height: 190px;
}

.sermon-card .meta {
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 8px;
}

.sermon-card .meta span {
  margin-right: 12px;
}

/* ---------- Events Page ---------- */
.event-item {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 22px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.event-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12);
}

.event-date-badge {
  flex-shrink: 0;
  width: 64px;
  text-align: center;
  background: var(--blue);
  color: #fff;
  border-radius: 10px;
  padding: 10px 6px;
}

.event-date-badge .day {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}

.event-date-badge .month {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.event-body h5 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.event-body p {
  color: var(--gray);
  font-size: 0.91rem;
  margin: 0 0 10px;
}

.event-meta span {
  font-size: 0.83rem;
  color: var(--blue);
  margin-right: 14px;
}

/* ---------- Donate Page ---------- */
.give-option {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 32px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  background: var(--white);
  border-top: 4px solid var(--blue-light);
}

.give-option:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
  border-top-color: var(--gold);
}

.give-option .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--blue);
}

.give-option h4 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
}

.give-option p {
  color: var(--gray);
  font-size: 0.93rem;
  margin-bottom: 1.4rem;
}

.secure-notice {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 0.9rem;
  color: #166534;
}

/* ---------- Contact Page ---------- */
.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
}

.info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
}

.info-item .icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.info-item .text h6 {
  font-family: var(--font-head);
  margin-bottom: 2px;
}

.info-item .text p {
  color: var(--gray);
  font-size: 0.9rem;
  margin: 0;
}

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.form-control,
.form-select {
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(74, 127, 165, 0.18);
}

.form-label {
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--dark);
}

/* ---------- Scroll Animations ---------- */
.fade-in-up {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Back to top ---------- */
#back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 999;
}

#back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

#back-to-top:hover {
  background: var(--blue-dark);
  transform: translateY(-3px);
}

/* ---------- Honeypot (hidden) ---------- */
.hp-field {
  display: none !important;
}

/* ---------- Responsive Tweaks ---------- */
@media (max-width: 768px) {
  .section-pad {
    padding: 56px 0;
  }

  .hero {
    background-attachment: scroll;
  }

  .event-item {
    flex-direction: column;
    gap: 14px;
  }

  .contact-card {
    padding: 24px;
  }

  .give-option {
    padding: 30px 22px;
  }
}

@media (max-width: 576px) {
  .hero h1 {
    font-size: 2.1rem;
  }

  .cta-banner {
    padding: 48px 0;
  }
}

/* ---------- Photo Gallery — About Page ---------- */
/* Carousel */
.gallery-carousel .carousel-item img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: var(--radius);
}

.gallery-carousel .carousel-caption {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
  border-radius: 0 0 var(--radius) var(--radius);
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px 18px;
  text-align: left;
}

.gallery-carousel .carousel-control-prev,
.gallery-carousel .carousel-control-next {
  width: 48px;
  height: 48px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  margin: 0 12px;
}

.gallery-carousel .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}

.gallery-carousel .carousel-indicators .active {
  background: var(--gold);
}

/* Interior photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.photo-grid-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  aspect-ratio: 4/3;
}

.photo-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.photo-grid-item:hover img {
  transform: scale(1.07);
}

.photo-grid-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 50, 72, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.photo-grid-item:hover .photo-grid-overlay {
  background: rgba(26, 50, 72, 0.42);
}

.photo-grid-overlay i {
  color: #fff;
  font-size: 1.8rem;
  opacity: 0;
  transform: scale(0.7);
  transition: all var(--transition);
}

.photo-grid-item:hover .photo-grid-overlay i {
  opacity: 1;
  transform: scale(1);
}

/* Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 8px 60px rgba(0, 0, 0, 0.6);
  animation: lb-in 0.3s ease;
}

@keyframes lb-in {
  from {
    opacity: 0;
    transform: scale(0.93);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  opacity: 0.8;
  transition: opacity var(--transition);
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* ---------- Home Page Photo Strip ---------- */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  height: 240px;
  overflow: hidden;
}

.photo-strip-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.photo-strip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.photo-strip-item:hover img {
  transform: scale(1.08);
}

.photo-strip-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(26, 50, 72, 0);
  transition: background var(--transition);
}

.photo-strip-item:hover::after {
  background: rgba(26, 50, 72, 0.25);
}

@media (max-width: 768px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-carousel .carousel-item img {
    height: 280px;
  }

  .photo-strip {
    grid-template-columns: repeat(2, 1fr);
    height: 200px;
  }
}

@media (max-width: 480px) {
  .photo-strip {
    grid-template-columns: 1fr 1fr;
    height: 160px;
  }
}