:root {
  /* Tema hitam-putih elegan */
  --primary-500: #fff; /* putih untuk aksen / CTA */
  --primary-600: #e5e5e5;
  --bw-background: #111; /* hitam gelap */
  --bw-text: #f9f9f9;    /* putih terang */
  --bw-text-muted: #aaa; /* abu untuk teks sekunder */
  --bw-border: #333;     /* abu gelap untuk border */
  --bw-hover: #222;      /* hover abu */
}

/* Body dan background */
body {
  background-color: var(--bw-background);
  color: var(--bw-text);
}

/* Navbar */
.navbar-light .navbar-nav .nav-link {
  color: var(--bw-text);
}
.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
  background-color: var(--bw-hover);
  color: var(--primary-500);
}
/* Geser toggler ke kanan di tampilan mobile */
.navbar-toggler {
  margin-left: auto; /* dorong ke kanan */
}

/* Ubah warna toggler icon jadi putih */
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255,255,255,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Biar border toggler juga putih */
.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.8);
}
/* Default Desktop */
.hero {
  display: flex;
  align-items: center;
}

html {
  scroll-behavior: smooth; /* biar halus */
  scroll-padding-top: 80px; /* sesuaikan tinggi navbar kamu */
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

#preloader .preloader-inner {
  --logo-size: 120px; /* ubah angka ini buat zoom in/out logo */
  position: relative;
  width: var(--logo-size);
  height: var(--logo-size);
}

#preloader .preloader-inner img {
  width: 100%;
  height: auto;
  display: block;
  z-index: 2;
  position: relative;
}

#preloader .preloader-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--logo-size) * 1.5);
  height: calc(var(--logo-size) * 1.5);
  transform: translate(-50%, -50%);
  border: 5px solid #f7b500;
  border-radius: 50%;
  border-top-color: transparent;
  animation: preloader-spin 1.2s linear infinite;
}

@keyframes preloader-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}


/* Mobile */
@media (max-width: 768px) {
  .hero {
    align-items: flex-start !important;
    padding-top: 2rem;
    padding-bottom: 2rem;
    flex-direction: column; /* stack ke bawah */
  }

  .hero .hero-image {
    width: 100%;
    margin-bottom: 1rem;
  }

  .hero .hero-image iframe {
    width: 100%;
    height: auto; /* biar ikutin ratio 16:9 */
  }

  .hero h1 {
    font-size: 1.8rem; /* kecilin dikit biar gak kepotong */
    line-height: 1.3;
  }

  .hero p {
    font-size: 1rem;
  }
}

/* ===== HERO VIDEO FIXED STYLE ===== */

/* Container utama */
.hero-video {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* Rasio 16:9 */
  border-radius: 12px;
  overflow: hidden;
  background: #000; /* biar ada background hitam kalau loading */
}

/* Video/iframe di dalam */
.hero-video iframe,
.hero-video video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;  /* full container, no crop */
  border: none;
  border-radius: 12px;
  object-fit: cover; /* pastikan video isi penuh tanpa crop aneh */
}

/* ===== Responsif Desktop ===== */
@media (min-width: 1024px) {
  .hero-video {
    max-width: 80%;   /* biar ada space kanan kiri */
    margin: 0 auto;   /* center align */
  }
}

/* ===== Fix Safari iPhone agar tidak terpotong ===== */
@supports (-webkit-touch-callout: none) {
  .hero-video iframe,
  .hero-video video {
    height: 100% !important;
  }
}
/* Tambahin spacing di mobile biar ga nabrak header */
@media (max-width: 767px) {
  .hero-video {
    margin-top: 70px; /* sesuaikan tinggi header lo */
  }
}

/* Tombol CTA */
.btn-primary {
  background-color: var(--primary-500);
  border-color: var(--primary-500);
  color: #000;
}
.btn-primary:hover {
  background-color: transparent;
  color: var(--primary-500);
  border: 1px solid var(--primary-500);
}

/* Highlight text */
.text-yellow {
  background: none;
  color: #ffc814;
}

/* Popular badge */
.popular-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
}

/* Logo */
.logo-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden; /* penting biar logo nggak keluar lingkaran */
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.6); /* perbesar lagi sampai putihnya hilang */
}

/* About Section Features */
.feature-icon {
  width: 48px;
  height: 48px;
  background-color: var(--bw-hover);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-500);
  font-size: 1.5rem;
}

/* Testimonials */
.testimonial-card {
  background: #1a1a1a;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.5);
}
.testimonial-avatar {
  width: 60px;
  height: 60px;
  border: 3px solid var(--bw-border);
  padding: 2px;
}

/* Sections */
#program,
#gallery,
#team,
#contact,
#donation {
  background-color: var(--bw-background);
}

.card {
  background-color: #1a1a1a;
  border: 1px solid var(--bw-border);
  color: var(--bw-text);
}
.card-title { color: var(--bw-text); }
.card-text { color: var(--bw-text-muted); }

/* Team Section Images */
.team-card {
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  cursor: pointer;
}

.team-img-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

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

.team-info {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.65);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 15px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.team-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.team-role {
  font-style: italic;
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.team-desc {
  font-size: 0.9rem;
  line-height: 1.4;
}

.team-card:hover .team-img {
  transform: scale(1.1);
}

.team-card:hover .team-info {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile friendly: overlay tetap terlihat di layar sentuh */
@media (hover: none) {
  .team-info {
    opacity: 1;
    transform: translateY(0);
    background: rgba(0,0,0,0.55);
  }
}


/* Footer */
.footer {
  background: #000;
  color: var(--bw-text);
  position: relative;
}
.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(135deg, #555, #999);
}
.footer-links li a {
  color: #888;
  transition: color 0.3s ease;
}
.footer-links li a:hover {
  color: #fff !important;
}

/* Social icons */
.social-icon {
  width: 40px;
  height: 40px;
  background-color: #222;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s ease;
  font-size: 1.125rem;
}
.social-icon:hover {
  background-color: #444;
  transform: translateY(-2px);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #fff, #aaa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Hover utility */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.5);
}

/* Loading spinner */
/* Kontainer card contact */
#contact .card {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Default ukuran teks */
#contact .card p,
#contact .card a {
  font-size: 0.95rem; /* sedikit lebih kecil dari body normal */
  line-height: 1.4;
}

/* Responsif untuk mobile */
@media (max-width: 576px) {
  #contact .card p,
  #contact .card a {
    font-size: 0.8rem;   /* kecil di layar kecil */
    line-height: 1.3;
  }

  #contact .card h3 {
    font-size: 1rem;     /* judul contact lebih proporsional */
  }

  #contact .btn {
    font-size: 0.85rem;  /* tombol WA juga ikut lebih kecil */
    padding: 0.5rem 1rem;
  }
}

/* Loading spinner */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--bw-border);
  border-top: 4px solid var(--primary-500);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
/* Override warna Bootstrap supaya match tema monokrom */
.text-dark,
.text-dark-600 {
  color: var(--bw-text) !important;
}
.text-primary {
  color: var(--primary-500) !important; /* Putih */
}
.bg-light,
.bg-white {
  background-color: var(--bw-background) !important;
}
.btn-outline-primary {
  color: var(--primary-500) !important;
  border-color: var(--primary-500) !important;
}
.btn-outline-primary:hover {
  background-color: var(--primary-500) !important;
  color: #000 !important;
}

/*product card sryle*/
.product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3; /* ubah 1 / 1 kalau mau kotak */
  overflow: hidden;
  border-radius: 0.75rem;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Styling Modal Produk ===== */
#productDetailModal .modal-content {
  border-radius: 1rem;
  overflow: hidden;
}

#productDetailModal .modal-body {
  padding: 1rem 1.25rem;
  max-height: 75vh;
  overflow-y: auto;
}

/* Gambar di carousel */
#productDetailModal .carousel img {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 0.5rem;
}

/* Deskripsi */
#modalProductDescription {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
  text-align: justify;
}

/* Tombol */
#productDetailModal .d-flex.gap-2 a,
#productDetailModal .d-flex.gap-2 button {
  font-size: 0.9rem;
  padding: 0.6rem 0.8rem;
}

/* ===== Mobile Fix ===== */
@media (max-width: 576px) {
  #productDetailModal .modal-dialog {
    margin: 0.5rem;        /* biar modal nggak terlalu mepet pinggir */
    max-width: 100%;       /* full width */
  }

  #productDetailModal .modal-body {
    max-height: 65vh;      /* lebih pendek biar muat di layar kecil */
    padding: 1rem;         /* rapatkan padding */
  }

  #productDetailModal .carousel img {
    max-height: 200px;     /* kecilin gambar biar nggak makan layar penuh */
  }

  #modalProductDescription {
    font-size: 0.85rem;    /* kecilin teks */
  }

  #productDetailModal .d-flex.gap-2 {
    flex-direction: column;  /* tombol jadi stack vertikal */
  }

  #productDetailModal .d-flex.gap-2 a,
  #productDetailModal .d-flex.gap-2 button {
    width: 100%;           /* tombol full width */
  }
}


.popular-badge {
  position: absolute;
  top: 10px;          /* pojok kanan atas */
  right: 10px;

  background: linear-gradient(135deg, #ffb400, #ff8800);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;

  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  white-space: nowrap;        /* cegah teks turun */
  display: inline-block;      /* ukurannya pas dengan teks */
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  z-index: 20;
}

.map-embed {
  border: 0;
}
