:root {
  --green: #2f8f2f;
  --green-dark: #1f6f1f;

  --bg-page: #f8fafc; /* putih soft */
  --card: #ffffff;

  --text: #1f2937;
  --muted: #6b7280;

  --shadow: 0 14px 35px rgba(0, 0, 0, 0.12);
  --radius: 22px;
}

/* ===== PAGE ===== */
.profil-page {
  background: var(--bg-page);
  padding: 36px 16px 56px;
}

.profil-container {
  max-width: 1100px;
  margin: 0 auto;
}

/* ===== BOX BESAR: LOGO + ARTI LAMBANG ===== */
.profil-lambang-box {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;

  display: grid;
  grid-template-columns: 360px 1px 1fr;
  gap: 24px;
  align-items: center;
}

/* KIRI: LOGO */
.profil-lambang-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.profil-lambang-left img {
  width: 190px;
  height: 190px;
  object-fit: contain;
  margin-bottom: 18px;
}

.profil-lambang-left h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  color: var(--green-dark);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* GARIS PEMISAH (VERTIKAL) */
.profil-divider {
  width: 1px;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
}

/* KANAN: ARTI LAMBANG */
.profil-lambang-right h2 {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 900;
  color: var(--green-dark);
}

/* Section umum / khusus */
.profil-box-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.profil-box-section h4 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 900;
  color: var(--green);
}

.profil-box-section ol {
  margin: 0;
  padding-left: 18px;
  line-height: 1.75;
  font-weight: 600;
  color: var(--text);
}

.profil-box-section li {
  margin: 7px 0;
}

/* ====== CARD UMUM ====== */
.kd-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px 38px;
  box-shadow: var(--shadow);
}

.kd-center {
  text-align: center;
}

/* Judul besar ala Kersik (Visi/Misi/Map) */
.kd-heading {
  color: var(--green);
  font-size: 46px;
  line-height: 1.1;
  margin: 0 0 18px;
  font-weight: 900;
  letter-spacing: 0.3px;
}

/* Judul untuk Sejarah/Latar biar gak segede Visi/Misi */
.kd-small {
  font-size: 40px;
}

.kd-quote {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.9;
  font-weight: 700;
}

.kd-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.9;
  color: var(--text);
  font-weight: 700;
}

.kd-list li {
  margin: 7px 0;
}

/* ====== SEJARAH & LATAR BELAKANG ====== */
.profil-sjlb {
  margin-top: 28px;
  display: grid;
  gap: 28px;
}

.sj-subtitle {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 800;
}

.sj-text {
  margin: 0;
  color: var(--text);
  line-height: 1.9;
  font-weight: 600;
}

/* potong ringkasan jadi beberapa baris */
.sj-snippet {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sj-dots {
  opacity: 0.8;
}

/* wrapper details (hanya toggle) */
.sj-inline {
  margin-top: 10px;
}

/* hilangkan marker default summary */
.sj-inline > summary {
  list-style: none;
}
.sj-inline > summary::-webkit-details-marker {
  display: none;
}

/* Link Selengkapnya / Sembunyikan */
.sj-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-weight: 900;
  font-size: 15px;
  color: var(--green-dark);
  background: transparent;
  border: 0;
  padding: 0;
  width: fit-content;
}

.sj-more:hover {
  text-decoration: underline;
}

/* panah */
.sj-more::after {
  content: "▾";
  font-size: 16px;
  opacity: 0.85;
  transition: transform 0.2s ease;
}

/* konten lanjutan */
.sj-continue {
  display: none;
  margin-top: 10px;
  gap: 10px;
}

/* saat open: tampilkan lanjutan */
.sj-inline[open] .sj-continue {
  display: grid;
}

/* saat open: ringkasan jadi full + titik ... hilang */
.kd-card:has(.sj-inline[open]) .sj-snippet {
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
}
.kd-card:has(.sj-inline[open]) .sj-dots {
  display: none;
}

/* ✅ saat open: tombol Selengkapnya hilang */
.sj-inline[open] summary.sj-open {
  display: none;
}

/* tombol Sembunyikan hanya muncul saat open */
.sj-close {
  display: none;
}
.sj-inline[open] .sj-close {
  display: inline-flex;
}

/* panah untuk Sembunyikan mengarah ke atas */
.sj-inline[open] .sj-close::after {
  transform: rotate(180deg);
}

/* list */
.sj-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.85;
  font-weight: 650;
  color: var(--text);
}

/* ===== VISI & MISI ala Desa Kersik ===== */
.profil-vm {
  margin-top: 30px;
  display: grid;
  gap: 28px;
}

.misi-subtitle {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 700;
}

.misi-ringkas {
  margin-bottom: 18px;
}

/* ===== MISI TOGGLE BUTTON ===== */
.misi-toggle {
  margin-top: 18px;
}

.misi-toggle summary {
  list-style: none;
}
.misi-toggle summary::-webkit-details-marker {
  display: none;
}

/* tombol (putih teks hijau, sama seperti sejarah) */
.misi-btn {
  cursor: pointer;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  padding: 12px 14px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  font-weight: 900;
  color: var(--green-dark);
  transition: 0.2s ease;
}

.misi-btn:hover {
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(47, 143, 47, 0.06);
}

.misi-btn::after {
  content: "▾";
  font-size: 18px;
  opacity: 0.9;
  transition: transform 0.2s ease;
}

.misi-toggle[open] .misi-btn::after {
  transform: rotate(180deg);
}

.misi-detail {
  margin-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 14px;
}

/* ====== ACCORDION DETAIL A-H ====== */
.acc-item {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  margin: 10px 0;
  overflow: hidden;
}

.acc-title {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 900;
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.acc-title::-webkit-details-marker {
  display: none;
}

.acc-title::after {
  content: "▾";
  font-size: 16px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.acc-item[open] .acc-title::after {
  transform: rotate(180deg);
}

.acc-body {
  padding: 0 16px 16px;
  color: var(--text);
  line-height: 1.8;
  font-weight: 600;
}

.acc-body p {
  margin: 10px 0;
  color: var(--muted);
  font-weight: 700;
}

.acc-body ol {
  margin: 0;
  padding-left: 18px;
}

.acc-body ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

/* ====== MAP SECTION ====== */
.map-section {
  margin-top: 50px;
  margin-bottom: 60px;
}

.map-heading {
  margin: 0 0 16px;
  color: var(--green);
  font-size: 46px;
  font-weight: 900;
}

.map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: stretch;
}

/* Card kiri */
.map-info {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 26px;
}

.map-info h3 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
}

.map-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.map-label {
  font-weight: 900;
  color: var(--text);
  margin-bottom: 4px;
}

.map-value {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.6;
}

.map-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.map-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.map-label-strong,
.map-value-strong {
  font-weight: 900;
  color: var(--text);
}

/* Card kanan: preview peta */
.map-view {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  height: 380px;
}

.map-preview {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.map-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  display: block;
}

.map-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 14px;
  pointer-events: none;
}

.map-chip {
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 999px;
}

.map-preview:hover img {
  transform: scale(1.01);
  transition: transform 0.2s ease;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .profil-lambang-box {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .profil-divider {
    width: 100%;
    height: 1px;
  }

  .profil-lambang-left img {
    width: 140px;
    height: 140px;
  }

  .map-grid {
    grid-template-columns: 1fr;
  }

  .map-heading {
    font-size: 36px;
  }

  .map-view {
    height: 320px;
  }

  .map-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .kd-card {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .kd-heading {
    font-size: 36px;
  }

  .kd-small {
    font-size: 32px;
  }

  .profil-lambang-left img {
    width: 120px;
    height: 120px;
  }
}
