/* Portal PPID — tema hijau tua & emas */
:root {
  --primary: #1b5e20;
  --primary-light: #4c8c4a;
  --primary-dark: #0d3b10;
  --gold: #c8a951;
  --gold-light: #f6e7b8;
  --text: #333;
  --muted: #6c757d;
  --bg-light: #f6f8f6;
  --header-h: 80px;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: #fff;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Poppins', sans-serif; }

a { color: var(--primary); text-decoration: none; transition: .3s; }
a:hover { color: var(--gold); }

section { padding: 70px 0; }
.section-bg { background: var(--bg-light); }

.section-title { text-align: center; padding-bottom: 30px; }
.section-title h2 {
  font-size: 30px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0;
}
.section-title p { color: var(--muted); max-width: 720px; margin: 0 auto; }
.title-separator {
  width: 60px; height: 4px;
  background: var(--gold);
  margin: 15px auto 25px;
  border-radius: 2px;
}

/* Tombol */
.btn-primary-ppid, .btn-gold, .btn-outline-ppid, .btn-whatsapp {
  border-radius: 50px;
  padding: 10px 26px;
  font-weight: 600;
  transition: .3s;
}
.btn-sm.btn-primary-ppid, .btn-sm.btn-outline-ppid { padding: 5px 14px; }
.btn-primary-ppid { background: var(--primary); color: #fff; border: 2px solid var(--primary); }
.btn-primary-ppid:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-outline-ppid { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline-ppid:hover, .btn-outline-ppid[aria-expanded="true"] { background: var(--primary); color: #fff; }
.btn-gold { background: var(--gold); color: var(--primary-dark); border: 2px solid var(--gold); }
.btn-gold:hover { background: #fff; color: var(--primary-dark); border-color: #fff; }

/* Header & navbar */
.header {
  min-height: var(--header-h);
  background: rgba(27, 94, 32, .96);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 15px rgba(0, 0, 0, .1);
  transition: .4s;
  z-index: 997;
}
.header.header-scrolled { background: var(--primary-dark); }
.header .navbar { padding: 12px 0; }
.header .logo img { max-height: 50px; margin-right: 10px; }
.header .logo-mark {
  width: 46px; height: 46px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--primary-dark);
  font-size: 22px; margin-right: 10px;
}
.header .logo-text {
  font-family: 'Poppins', sans-serif;
  color: #fff;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
}
.header .logo-text small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--gold-light);
}

.navbar-dark .navbar-nav .nav-link {
  color: #fff;
  font-weight: 500;
  font-size: 15px;
  padding: 10px 14px;
  white-space: nowrap;
}
.header .logo-text { white-space: nowrap; }
/* Layar laptop kecil: rapatkan menu agar tetap satu baris */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .navbar-dark .navbar-nav .nav-link { font-size: 14px; padding: 10px 8px; }
  .header .logo-text { font-size: 19px; }
}
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .show > .nav-link { color: var(--gold); }

.navbar .dropdown-menu {
  border: 0;
  border-radius: 8px;
  padding: 8px 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .15);
  border-top: 3px solid var(--gold);
}
.navbar .dropdown-item {
  font-size: 14px;
  padding: 8px 20px;
  color: var(--text);
  white-space: normal;
}
.navbar .dropdown-item:hover,
.navbar .dropdown-item.active,
.navbar .dropdown-item:active { background: var(--bg-light); color: var(--primary); }

/* Sub-menu bertingkat */
.dropdown-submenu { position: relative; }
.dropdown-submenu > .dropdown-toggle::after {
  float: right; margin-top: .5em;
  transform: rotate(-90deg);
}

@media (min-width: 992px) {
  .navbar .dropdown-menu { min-width: 240px; }
  .navbar .nav-item.dropdown:hover > .dropdown-menu { display: block; margin-top: 0; }
  .dropdown-submenu > .dropdown-menu {
    top: -11px; left: 100%;
    margin-left: 2px;
  }
  .dropdown-submenu:hover > .dropdown-menu { display: block; }
  /* Menu di sisi kanan: sub-menu dibuka ke kiri agar tidak keluar layar */
  .navbar-nav > .nav-item:nth-last-child(-n+3) > .dropdown-menu { right: 0; left: auto; }
  .navbar-nav > .nav-item:nth-last-child(-n+3) .dropdown-submenu > .dropdown-menu { left: auto; right: 100%; margin: 0 2px 0 0; }
}

@media (max-width: 991.98px) {
  .header .navbar-collapse {
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding-bottom: 10px;
  }
  .navbar .dropdown-menu { box-shadow: none; background: rgba(255, 255, 255, .06); border-top: 0; }
  .navbar .dropdown-item { color: #fff; }
  .navbar .dropdown-item:hover, .navbar .dropdown-item.active { background: rgba(255, 255, 255, .1); color: var(--gold); }
  .dropdown-submenu > .dropdown-menu { margin-left: 14px; }
  .dropdown-submenu > .dropdown-toggle::after { transform: none; }
}

#main { padding-top: var(--header-h); }

/* Hero / slider */
.hero { padding: 0; }
.hero .carousel-item img { max-height: 620px; object-fit: cover; }
.hero .carousel-caption {
  background: linear-gradient(transparent, rgba(0, 0, 0, .55));
  left: 0; right: 0; bottom: 0;
  padding: 60px 15% 40px;
}
.hero .carousel-caption h2 { font-weight: 700; }
.hero .carousel-indicators [data-bs-target] { width: 28px; height: 4px; border-radius: 2px; }
.hero-default {
  padding: 110px 0 120px;
  color: #fff;
  background:
    radial-gradient(circle at 15% 20%, rgba(200, 169, 81, .25), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(200, 169, 81, .18), transparent 45%),
    linear-gradient(135deg, var(--primary-dark), var(--primary) 60%, var(--primary-light));
}
.hero-default h1 { font-size: clamp(28px, 4vw, 46px); font-weight: 800; margin: 18px 0 10px; }
.hero-default p { font-size: 20px; color: var(--gold-light); margin-bottom: 24px; }
.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 50px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 14px;
  letter-spacing: .5px;
}

/* Tautan layanan */
.quick-links { padding: 40px 0; }
.quick-link-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
  height: 100%;
  min-height: 140px;
  padding: 20px 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
  border-bottom: 3px solid transparent;
  text-align: center;
}
.quick-link-card:hover { transform: translateY(-5px); border-bottom-color: var(--gold); box-shadow: 0 10px 24px rgba(0, 0, 0, .1); }
.quick-link-card img { max-height: 48px; max-width: 100%; object-fit: contain; }
.quick-link-card i { font-size: 38px; color: var(--primary); }
.quick-link-card span { font-weight: 700; font-size: 14px; text-transform: uppercase; color: var(--primary); }

/* Kotak konten */
.content-box {
  background: #fff;
  border-radius: 14px;
  padding: 40px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, .06);
}
.about .lead-text { font-size: 17px; line-height: 1.8; color: #555; margin-bottom: 26px; }
.content-heading { color: var(--primary); font-weight: 700; margin-bottom: 20px; }
.dynamic-content { line-height: 1.85; font-size: 16px; }
.dynamic-content img { max-width: 100%; height: auto; border-radius: 8px; }
.dynamic-content table { width: 100%; margin-bottom: 1rem; border-collapse: collapse; }
.dynamic-content table td, .dynamic-content table th { border: 1px solid #dee2e6; padding: 8px 10px; }
.dynamic-content h2, .dynamic-content h3, .dynamic-content h4 { color: var(--primary); margin-top: 1.4rem; }
.dynamic-content ul, .dynamic-content ol { padding-left: 1.4rem; }
.dynamic-content blockquote { border-left: 4px solid var(--gold); padding: 6px 16px; color: #555; background: var(--bg-light); }

/* Page hero */
.page-hero {
  padding: 60px 0 40px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  position: relative;
}
.page-hero::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 4px; background: var(--gold);
}
.page-hero h1 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; margin-bottom: 10px; }
.page-hero .breadcrumb { margin: 0; font-size: 14px; }
.page-hero .breadcrumb a { color: var(--gold-light); }
.page-hero .breadcrumb-item.active, .page-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, .75); }
.page-content { padding: 50px 0 70px; background: var(--bg-light); }

/* Dokumen */
.page-documents { margin-top: 36px; padding-top: 30px; border-top: 1px dashed #d6dcd6; }
.page-documents h4 { color: var(--primary); font-size: 20px; font-weight: 700; }
.document-item {
  border: 1px solid #e3e8e3;
  border-radius: 10px;
  margin-bottom: 14px;
  overflow: hidden;
}
.document-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 14px 18px;
  background: #fff;
}
.document-icon { font-size: 28px; color: #c62828; }
.document-item h6 { font-weight: 600; }
.pdf-viewer { border-top: 1px solid #e3e8e3; background: #525659; }
.pdf-viewer iframe { display: block; width: 100%; height: 75vh; min-height: 480px; border: 0; }

/* Tim */
.member {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 5px 25px rgba(0, 0, 0, .07);
  text-align: center;
  height: 100%;
  transition: .3s;
}
.member:hover { transform: translateY(-6px); }
.member-img { aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-light); }
.member-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.member-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 110px; color: #c9d3c9;
  background: linear-gradient(160deg, #eef3ee, #dfe8df);
}
.member-info { padding: 20px 16px; }
.member-info h4 { font-size: 17px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.member-info span { display: block; font-size: 14px; color: var(--muted); }
.ppid-role {
  display: inline-block;
  margin: 12px 0 0;
  padding: 4px 14px;
  border-radius: 50px;
  background: var(--gold-light);
  color: #7a5d10;
  font-size: 13px;
  font-weight: 600;
}

/* Berita */
.news-section { padding: 60px 0 70px; }
.news-search { max-width: 560px; margin: 0 auto; }
.news-search .form-control { border-radius: 50px 0 0 50px; padding-left: 20px; }
.news-search .btn { border-radius: 0 50px 50px 0; }
.news-card {
  height: 100%;
  display: flex; flex-direction: column;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 5px 25px rgba(0, 0, 0, .07);
  transition: .3s;
}
.news-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0, 0, 0, .1); }
.news-card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-light); }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.news-card:hover .news-card-img img { transform: scale(1.05); }
.news-card-placeholder, .news-mini-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--gold); font-size: 46px;
}
.news-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.news-meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.news-meta i { color: var(--gold); }
.news-card h3 { font-size: 18px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.news-card h3 a { color: var(--text); }
.news-card h3 a:hover { color: var(--primary); }
.news-card p { font-size: 14px; color: #555; flex: 1; }
.news-more { font-size: 14px; font-weight: 600; }
.news-hero-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: rgba(255, 255, 255, .85); }
.news-hero-meta i { color: var(--gold); margin-right: 4px; }
.news-share { display: flex; align-items: center; gap: 14px; margin-top: 32px; padding-top: 20px; border-top: 1px dashed #d6dcd6; }
.news-share a, .news-share .btn-link { font-size: 20px; color: var(--primary); text-decoration: none; }
.news-share a:hover, .news-share .btn-link:hover { color: var(--gold); }
.news-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.news-nav a { display: block; font-weight: 600; line-height: 1.4; margin-top: 4px; }
.news-sidebar { padding: 26px; position: sticky; top: calc(var(--header-h) + 20px); }
.news-sidebar h4 { font-size: 18px; font-weight: 700; color: var(--primary); padding-bottom: 12px; margin-bottom: 16px; border-bottom: 3px solid var(--gold); display: inline-block; }
.news-mini { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eef1ee; color: var(--text); }
.news-mini:last-of-type { border-bottom: 0; }
.news-mini img, .news-mini-placeholder { width: 76px; height: 56px; flex-shrink: 0; border-radius: 8px; object-fit: cover; font-size: 22px; }
.news-mini strong { display: block; font-size: 14px; line-height: 1.35; }
.news-mini small { color: var(--muted); }
.news-mini:hover strong { color: var(--primary); }
@media (max-width: 767.98px) {
  .news-nav { grid-template-columns: 1fr; }
  .news-nav .text-end { text-align: left !important; }
}

/* WhatsApp */
.whatsapp-section { padding: 50px 0; }
.whatsapp-box {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 30px 36px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}
.whatsapp-box h3 { font-size: 22px; font-weight: 700; }
.whatsapp-box p { margin: 0; opacity: .9; }
.whatsapp-icon {
  width: 70px; height: 70px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .15); font-size: 36px;
}
.btn-whatsapp { background: #25d366; color: #fff; border: 0; }
.btn-whatsapp:hover { background: #1ebe5b; color: #fff; }

.map-section iframe { display: block; width: 100%; height: 380px; border: 0; }

/* Galeri */
.gallery-item { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.gallery-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
  padding: 20px;
  background: linear-gradient(transparent 40%, rgba(13, 59, 16, .85));
  color: #fff;
}
.gallery-overlay i { font-size: 22px; color: var(--gold); opacity: 0; transition: .3s; }
.gallery-overlay h5 { font-size: 16px; margin: 4px 0 0; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item:hover .gallery-overlay i { opacity: 1; }
.pagination .page-link { color: var(--primary); }
.pagination .active > .page-link { background: var(--primary); border-color: var(--primary); }

/* Footer */
.footer { background: var(--primary-dark); color: rgba(255, 255, 255, .85); font-size: 14px; }
.footer-top { padding: 60px 0 30px; }
.footer .logo img { max-height: 44px; margin-right: 10px; }
.footer .logo span { font-family: 'Poppins', sans-serif; font-size: 24px; font-weight: 700; color: #fff; }
.footer-contact li { display: flex; gap: 10px; margin-bottom: 8px; }
.footer-contact i { color: var(--gold); }
.footer a { color: rgba(255, 255, 255, .85); }
.footer a:hover { color: var(--gold); }
.footer h4 { font-size: 16px; font-weight: 700; color: #fff; padding-bottom: 12px; position: relative; }
.footer h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 36px; height: 2px; background: var(--gold); }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { padding: 6px 0; display: flex; align-items: center; gap: 6px; }
.footer-links li i { font-size: 11px; color: var(--gold); }
.social-links a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; margin-right: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  font-size: 17px;
}
.social-links a:hover { background: var(--gold); color: var(--primary-dark); }
.copyright { text-align: center; padding: 22px 0; border-top: 1px solid rgba(255, 255, 255, .12); }

/* Kembali ke atas */
.back-to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 996;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold); color: var(--primary-dark);
  font-size: 28px;
  visibility: hidden; opacity: 0;
  transition: .4s;
}
.back-to-top.active { visibility: visible; opacity: 1; }
.back-to-top:hover { background: var(--primary); color: #fff; }

@media (max-width: 767.98px) {
  section { padding: 50px 0; }
  .content-box { padding: 24px 18px; }
  .whatsapp-box { padding: 24px; text-align: center; justify-content: center; }
  .document-head { flex-direction: column; align-items: flex-start; }
  .pdf-viewer iframe { height: 60vh; min-height: 360px; }
}
