/* ======================================================
   🌿 GBI HMJ Custom Stylesheet
   Versi 9.9 - JPCC-Inspired + Interactive Map + Card Animation + Ministry Grid (Fix Image Auto Height)
   ====================================================== */

/* ---------- FONT IMPORT ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@500;600;700;800&display=swap');

/* ---------- ROOT VARIABLES ---------- */
:root {
  --primary-700: #0f3a64;
  --primary-800: #0b2f55;
  --primary-900: #071e38;
  --accent-gold: #f8d46b;
  --light-bg: #f8f9fb;
  --text-dark: #1c1f23;
  --text-muted: #6c757d;
  --white: #ffffff;
  --shadow: rgba(0, 0, 0, 0.1);
  --transition-fast: 0.25s ease;
  --transition-medium: 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- GLOBAL RESET ---------- */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--white);
  color: var(--text-dark);
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

main {
  flex: 1;
}

a {
  color: var(--primary-700);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-gold);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =====================================================
   🧭 NAVBAR
   ===================================================== */
.navbar {
  box-shadow: 0 2px 10px var(--shadow);
  background-color: var(--white);
  transition: all 0.3s ease;
  z-index: 100;
}

.navbar-brand img.logo-navbar {
  height: 42px !important;
  width: auto !important;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.navbar-brand:hover img.logo-navbar {
  transform: scale(1.05);
}

.navbar-nav .nav-link {
  color: var(--text-dark);
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-700);
}

.navbar-nav .nav-link.active {
  color: var(--primary-700);
  font-weight: 600;
}

.navbar-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  width: 40%;
  height: 2px;
  background: var(--accent-gold);
  border-radius: 3px;
  margin: auto;
}

.navbar .btn-primary {
  background-color: var(--primary-700);
  border: none;
  transition: all 0.3s ease;
}

.navbar .btn-primary:hover {
  background-color: var(--primary-800);
  transform: translateY(-2px);
}

/* =====================================================
   🎬 HERO SECTION
   ===================================================== */
.hero {
  position: relative;
  height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
}

.hero-bg,
.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(15, 58, 100, 0.7));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 700px;
  padding: 0 16px;
  animation: fadeUp 1.2s ease;
}

/* --- Hero Font Poppins --- */
.hero-content h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  letter-spacing: 0.5px;
  color: #ffffff;
  text-shadow: 0 3px 8px rgba(0,0,0,0.25);
}

.hero-content p {
  font-size: 1.1rem;
  color: #e4e6eb;
  margin-bottom: 22px;
}

.hero-content .btn {
  font-weight: 600;
  border-radius: 50px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   🕊 ABOUT (Tema, Visi, Misi)
   ===================================================== */
.about-section {
  padding: 90px 20px;
  background: var(--light-bg);
  text-align: center;
}

.theme-highlight {
  background: #ffffff;
  color: var(--primary-900);
  text-align: center;
  padding: 80px 50px;
  border-radius: 20px;
  max-width: 950px;
  margin: 0 auto 90px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.theme-highlight:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.theme-highlight h2 {
  font-weight: 900;
  font-size: 2.8rem;
  margin-bottom: 25px;
  text-transform: uppercase;
  color: var(--primary-800);
  letter-spacing: 1px;
}

.theme-highlight p {
  font-size: 1.8rem;
  font-style: italic;
  color: #b30000;
  font-weight: 600;
  line-height: 1.6;
  margin: 0;
}

.about-card {
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  padding: 40px 30px;
  transition: all 0.3s ease;
  height: 100%;
}

.about-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.about-card h3 {
  font-weight: 700;
  color: var(--primary-800);
  margin-bottom: 18px;
  font-size: 1.4rem;
}

.about-card p {
  color: #444;
  font-size: 1.05rem;
  line-height: 1.8;
  margin: 0;
}

/* =====================================================
   🙌 MINISTRY SECTION (3 Columns Grid + Fix Image)
   ===================================================== */
.ministries-page {
  background-color: #f9fafc;
}

.ministries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.ministry-card {
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: all var(--transition-medium);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ministry-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* ✅ FIXED IMAGE HEIGHT & NO CROP */
.ministry-img-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  background: #f6f8fa;
  border-radius: 16px 16px 0 0;
  height: 260px; /* Semua card sama tinggi */
  overflow: hidden;
}

.ministry-img {
  max-height: 100%;
  width: auto;
  object-fit: contain; /* tampil utuh tanpa crop */
  transition: transform 0.5s ease;
}

.ministry-card:hover .ministry-img {
  transform: scale(1.05);
}

.ministry-card .card-body {
  padding: 20px;
  text-align: left;
}

.ministry-card h5 {
  font-weight: 600;
  color: var(--primary-800);
  margin-bottom: 10px;
}

.ministry-card p {
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

/* =====================================================
   📍 CONTACT SECTION (INTUITIVE)
   ===================================================== */
.contact-section {
  background: #f9fbfd;
  padding-top: 80px;
  padding-bottom: 80px;
  text-align: center;
}

.contact-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  padding: 40px 30px;
  transition: all 0.3s ease;
  height: 100%;
  cursor: pointer;
}

.contact-card:hover {
  background: #f0f4ff;
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-700);
  color: white;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.contact-card h5 {
  color: var(--primary-800);
  font-weight: 700;
}

.contact-card p {
  margin: 0;
  font-size: 0.95rem;
  color: #333;
}

/* =====================================================
   🗺️ MAPS SECTION (LEAFLET)
   ===================================================== */
#mapSection {
  width: 100%;
  background: #ffffff;
  padding-bottom: 80px;
  margin-top: -20px;
}

#gbiMap {
  height: 480px;
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* =====================================================
   🖤 FOOTER
   ===================================================== */
.footer-dark {
  background-color: #111;
  color: #fff;
  font-size: 14px;
  margin-top: auto;
  width: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.footer-dark .footer-contact {
  background-color: #151515;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  padding: 50px 0;
}

.footer-dark .footer-contact h2 {
  font-size: 1.9rem;
  font-weight: 700;
}

.footer-dark .footer-contact p {
  color: #d1d1d1;
  font-size: 0.95rem;
  max-width: 600px;
  margin: 0 auto 20px;
}

.footer-dark .footer-contact .btn {
  border: 1.5px solid #fff;
  color: #fff;
  border-radius: 4px;
  transition: all 0.3s ease;
  padding: 10px 18px;
}

.footer-dark .footer-contact .btn:hover {
  background: #fff;
  color: #000;
}

.footer-dark .footer-main {
  background-color: #111;
  padding: 40px 0 30px;
}

.footer-dark a {
  color: #dcdcdc;
  transition: color 0.3s ease;
}

.footer-dark a:hover {
  color: var(--accent-gold);
}

.footer-social {
  font-size: 20px;
  color: #d1d5db;
  transition: all 0.3s ease;
}

.footer-social:hover {
  color: var(--accent-gold);
  transform: translateY(-3px) scale(1.1);
}

/* =====================================================
   🔝 SCROLL TO TOP FIXED
   ===================================================== */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-700);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px);
  transition: all 0.4s ease;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.scroll-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background-color: var(--primary-800);
  transform: translateY(-5px);
}

/* =====================================================
   📱 RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 768px) {
  .hero {
    height: 55vh;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .theme-highlight p {
    font-size: 1.4rem;
  }

  .contact-card {
    padding: 30px 20px;
  }

  .icon-wrap {
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
  }

  #gbiMap {
    height: 360px;
    width: 100%;
    border-radius: 10px;
  }

  .ministries-grid {
    grid-template-columns: 1fr;
  }

  .footer-dark {
    text-align: center;
  }

  .scroll-top {
    width: 42px;
    height: 42px;
    bottom: 20px;
    right: 20px;
  }
}