/* =========================================================
   Desa Nambangan — Shared Stylesheet
   ========================================================= */

:root {
  /* Hijau — warna utama identitas desa */
  --green-900: #1B3A22;
  --green-700: #2F6B3C;
  --green-500: #4C8A56;
  --green-100: #E6F0E4;

  /* Aksen kategori potensi */
  --blue-500: #3B82C4;
  --blue-100: #E4F0F9;
  --gold-500: #D4A94A;
  --gold-100: #FBF2E0;
  --purple-500: #8B6FC2;
  --purple-100: #F0EBF9;
  --green-accent-100: #E7F3E4;

  /* Netral */
  --cream: #F7F8F5;
  --white: #FFFFFF;
  --ink: #1F2A22;
  --gray-500: #6B7280;
  --border: #E5E7EB;

  --radius-card: 16px;
  --radius-btn: 999px;

  --font-heading: "Plus Jakarta Sans", "Poppins", sans-serif;
  --font-body: "Inter", sans-serif;

  --shadow-card: 0 2px 10px rgba(27, 58, 34, 0.06);
  --shadow-card-hover: 0 8px 24px rgba(27, 58, 34, 0.12);
}

/* ---------- Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--green-900);
  line-height: 1.25;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 64px 0;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 28px;
}

@media (max-width: 640px) {
  section {
    padding: 40px 0;
  }
  .section-title {
    font-size: 1.4rem;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--green-700);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--green-900);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--white);
  color: var(--green-700);
  border: 1.5px solid var(--green-700);
}

.btn-outline:hover {
  background: var(--green-100);
}

.btn-small {
  padding: 9px 18px;
  font-size: 0.85rem;
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--green-900);
  letter-spacing: 0.2px;
}

.navbar-brand .logo-emblem {
  width: 34px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.navbar-brand .logo-emblem img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.navbar-brand span {
  line-height: 1.15;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 36px;
}

.navbar-menu a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--green-700);
  border-color: var(--green-700);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}

.navbar-toggle span {
  width: 24px;
  height: 2px;
  background: var(--green-900);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 900px) {
  .navbar-menu {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .navbar-menu.open {
    max-height: 300px;
  }

  .navbar-menu a {
    width: 100%;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent;
  }

  .navbar-menu a.active,
  .navbar-menu a:hover {
    border-color: transparent;
    border-left-color: var(--green-700);
    background: var(--green-100);
  }

  .navbar-actions .btn-primary span.btn-label {
    display: none;
  }

  .navbar-toggle {
    display: flex;
  }
}

.navbar-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}
.navbar-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: var(--white);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 25, 15, 0.35) 0%, rgba(10, 25, 15, 0.55) 55%, rgba(8, 20, 12, 0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 48px 0 40px;
  width: 100%;
}

.hero-breadcrumb {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 14px;
}

.hero-breadcrumb a:hover {
  text-decoration: underline;
}

.hero h1 {
  color: var(--white);
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.hero p {
  max-width: 560px;
  font-size: 1rem;
  opacity: 0.92;
}

.hero-sm {
  min-height: 220px;
}

/* Placeholder hero background until real photos are provided — swap
   the inline background-image on .hero with an actual photo URL later. */
.hero-placeholder {
  background-image: linear-gradient(135deg, var(--green-700) 0%, var(--green-900) 100%);
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 1.7rem;
  }
  .hero {
    min-height: 260px;
  }
}

/* ---------- Image placeholder ---------- */
.img-placeholder {
  background: var(--green-100);
  border: 1px dashed var(--green-500);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-card);
  min-height: 160px;
  padding: 12px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

/* ---------- Stat cards ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
}

.stat-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  border-radius: 10px;
  background: var(--green-100);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--green-900);
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 4px;
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Tentang Desa ---------- */
.tentang-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  align-items: center;
}

.tentang-grid .img-placeholder {
  min-height: 260px;
}

.tentang-grid img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius-card);
}

.tentang-text p {
  color: var(--gray-500);
  margin-bottom: 20px;
}

@media (max-width: 800px) {
  .tentang-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Map card ---------- */
.map-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 24px;
  align-items: start;
}

.map-embed {
  border-radius: var(--radius-card);
  overflow: hidden;
  min-height: 320px;
}

.map-embed .img-placeholder {
  min-height: 320px;
}

.map-info {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
}

.map-info li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.map-info li:last-of-type {
  border-bottom: none;
}

.map-info .map-dir {
  color: var(--gray-500);
}

.map-info .btn {
  margin-top: 16px;
  width: 100%;
  justify-content: center;
}

@media (max-width: 800px) {
  .map-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  position: relative;
}

.gallery-item img,
.gallery-item .img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.gallery-item .gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  background: linear-gradient(0deg, rgba(0,0,0,0.6), transparent);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
}

@media (max-width: 700px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.gallery-5 {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 900px) {
  .gallery-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 600px) {
  .gallery-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.gallery-header .section-title {
  margin-bottom: 0;
}

/* ---------- Potensi Unggulan cards ---------- */
.potensi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.potensi-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.potensi-card .potensi-img {
  height: 130px;
  position: relative;
}

.potensi-card .potensi-img img,
.potensi-card .potensi-img .img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: 0;
}

.potensi-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.potensi-card .potensi-body {
  padding: 16px 18px 20px;
}

.potensi-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.potensi-card p {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.potensi-card .lihat-detail {
  font-weight: 700;
  font-size: 0.85rem;
}

.badge-pertanian { background: var(--green-500); }
.detail-pertanian, .lihat-detail.c-pertanian { color: var(--green-700); }

.badge-perikanan { background: var(--blue-500); }
.lihat-detail.c-perikanan { color: var(--blue-500); }

@media (max-width: 520px) {
  .potensi-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Tabs (Detail Potensi) ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  background: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-500);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tab-btn.active {
  background: var(--green-700);
  color: var(--white);
  border-color: var(--green-700);
}

.detail-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.detail-panel .detail-img {
  border-radius: var(--radius-card);
  overflow: hidden;
  min-height: 280px;
}

.detail-panel .detail-img img,
.detail-panel .detail-img .img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.detail-info h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.detail-info > p {
  color: var(--gray-500);
  margin-bottom: 22px;
}

.detail-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-stat {
  display: flex;
  align-items: center;
  gap: 14px;
}

.detail-stat .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--green-100);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detail-stat .label {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.detail-stat .value {
  font-weight: 700;
  color: var(--green-900);
}

@media (max-width: 800px) {
  .detail-panel {
    grid-template-columns: 1fr;
  }
}

/* ---------- Tantangan & Peluang ---------- */
.tantangan-peluang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.tantangan-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
}

.tantangan-card .tantangan-label {
  color: var(--green-900);
  font-weight: 700;
  margin-bottom: 16px;
}

.tantangan-card li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--gray-500);
}

.tantangan-card li::before {
  content: "!";
  color: var(--gold-500);
  font-weight: 800;
  flex-shrink: 0;
}

.peluang-card {
  background: var(--green-100);
  border-radius: var(--radius-card);
  padding: 32px;
}

.peluang-card .peluang-label {
  color: var(--green-700);
  font-weight: 700;
  margin-bottom: 16px;
}

.peluang-card li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.peluang-card li::before {
  content: "✓";
  color: var(--green-700);
  font-weight: 800;
  flex-shrink: 0;
}

@media (max-width: 800px) {
  .tantangan-peluang-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: var(--green-900);
  color: var(--white);
  padding: 40px 0;
}

.cta-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-banner h3 {
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 700;
}

.cta-banner .btn-primary {
  background: var(--green-500);
}

.cta-banner .btn-primary:hover {
  background: var(--green-100);
  color: var(--green-900);
}

@media (max-width: 600px) {
  .cta-banner .container {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--green-900);
  color: rgba(255, 255, 255, 0.85);
  padding: 56px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 800;
  margin-bottom: 14px;
}

.footer-brand .logo-emblem {
  width: 30px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer-brand .logo-emblem img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
}

.footer h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.footer li {
  margin-bottom: 10px;
}

.footer li a {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.15s ease;
}

.footer li a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px 0;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 500px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Kontak page ---------- */
.kontak-grid {
  max-width: 640px;
  margin: 0 auto;
}

.kontak-grid .section-title {
  text-align: center;
}

.kontak-info-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}

.kontak-info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.kontak-info-item .icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--green-100);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kontak-info-item .label {
  font-weight: 700;
  color: var(--green-900);
  margin-bottom: 4px;
}

.kontak-info-item .value {
  color: var(--gray-500);
  font-size: 0.92rem;
}

.kontak-map {
  border-radius: var(--radius-card);
  overflow: hidden;
  min-height: 280px;
  margin-top: 24px;
}

.kontak-map .img-placeholder,
.kontak-map iframe {
  min-height: 280px;
  width: 100%;
}

/* ---------- Beranda ---------- */
.beranda-hero {
  min-height: 480px;
  display: flex;
  align-items: center;
}

.beranda-hero .hero-content {
  padding: 0;
}

.beranda-hero h1 {
  font-size: 2.7rem;
}

.beranda-hero p {
  max-width: 600px;
  font-size: 1.05rem;
  margin-bottom: 24px;
}

.beranda-hero .hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .beranda-hero h1 {
    font-size: 2rem;
  }
}

.tentang-ringkas {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.tentang-ringkas p {
  color: var(--gray-500);
  margin: 16px 0 24px;
}

.section-alt {
  background: var(--cream);
}
