/* RESET DASAR */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #ffffff;
  color: #333;
  line-height: 1.6;
}

/* === INFRASTRUKTUR UTAMA: HEADER INFODESA === */
.infografis-wrapper {
  display: block; /* <== ini penting */
  padding: 90px 40px;
  background-image: url(../images/BG.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid #ddd;
}

.infografis-text {
  flex: 1 1 45%;
}

.infografis-text h2 {
  font-size: 35px;
  color: navy;
  margin: 12px;
  font-weight: bold;
  text-align: center;
}

.infografis-text p {
  font-size: 15px;
  color: #34495e;
  margin: 0;
  line-height: 1.6;
  text-align: justify;
}

.infografis-menu {
  flex: 1 1 50%;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
  padding-top: 0;
  margin-top: 0;
}

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  font-weight: bold;
  transition: color 0.3s;
}

.menu-item i {
  font-size: 24px;
  margin-bottom: 5px;
}

.menu-item:hover,
.menu-item.active {
  color: goldenrod
}

.menu-item.active::after {
  content: "";
  height: 2px;
  width: 100%;
  background-color: #d60000;
  margin-top: 4px;
}

.statistik-section {
  padding: 40px;
  background-color: #f9f9f9;
}

.statistik-section h2 {
  color: navy;
  text-align: center;
  font-weight: bold;
  font-size: 30px;
  margin-bottom: 30px;
}

.statistik-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.statistik-box {
  background: white;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  max-height: 200px; /* contoh tinggi maksimum */
  overflow: hidden;
}

.statistik-box img {
  width: 64px;
  margin-bottom: 15px;
}

.label {
  font-size: 14px;
  color: navy;
  font-weight: 600;
  margin-bottom: 5px;
}

.angka {
  font-size: 24px;
  color: #e60000;
  font-weight: bold;
}

.angka span {
  color: #555;
  font-size: 18px;
}

.infografis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.infografis-header h2 {
  font-size: 32px;
  font-weight: bold;
  color: #f7b500;
  margin: 0;
}

.row-infografis {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
  margin-top: 30px;
  box-sizing: border-box;
}

/* Kiri: Grafik | Kanan: Tabel */
.data-tabel {
  flex: 1 1 calc(50% - 10px); /* 10px dari gap 20px */
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Container grafik dan tabel */
.chart-container,
.table-container {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

/* Grafik */
canvas {
  width: 100% !important;
  height: 400px !important;
}

/* Tabel */
table {
  width: 100%;
  border-collapse: collapse;
  height: 100%;
}

th, td {
  padding: 10px;
  text-align: center;
  border: 1px solid navy;
}

th {
  background-color: rgb(187, 134, 0);
  color: black;
}

tbody tr:nth-child(even) {
  background-color: #f4f4f4;
}

/* Responsif */
@media (max-width: 768px) {
  .row-infografis {
    flex-direction: column;
  }

  .data-tabel {
    flex: 1 1 100%;
  }

  .chart-container,
  .table-container {
    margin-top: 20px;
  }
}

#penduduk-pekerjaan {
  padding: 40px 20px;
  background-image: url(../images/BG.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  font-family: Arial, sans-serif;
}

#penduduk-pekerjaan .container {
  max-width: 1000px;
  margin: auto;
}

#penduduk-pekerjaan h2 {
  text-align: center;
  margin-bottom: 20px;
  color: navy;
  font-weight: bold;
}

.tabel-pekerjaan {
  width: 100%;
  border-collapse: collapse;
}

.tabel-pekerjaan th, 
.tabel-pekerjaan td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

.tabel-pekerjaan th {
  background-color: #34495e;
  color: white;
}

.tabel-pekerjaan tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.tabel-pekerjaan td:nth-child(2) {
  text-align: left;
}

.sumber {
  text-align: center;
  font-size: 12px;
  margin-top: 15px;
  color: #666;
}

#penduduk-agama {
  padding: 40px 20px;
  font-family: Arial, sans-serif;
}

#penduduk-agama h2 {
  text-align: center;
  font-size: 18px;
  margin-bottom: 10px;
}

#penduduk-agama .deskripsi {
  font-size: 14px;
  text-align: justify;
  margin-bottom: 20px;
}

#penduduk-agama .undefined {
  font-weight: bold;
  color: red;
}

.agama-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.col {
  flex: 1;
}

.graf {
  min-width: 300px;
}

.tabel {
  min-width: 250px;
}

.tabel-agama {
  width: 100%;
  border-collapse: collapse;
}

.tabel-agama th, 
.tabel-agama td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

.tabel-agama th {
  background-color: #009688;
  color: white;
}

.tabel-agama td:nth-child(2) {
  text-align: left;
}

.sumber {
  text-align: center;
  font-size: 12px;
  margin-top: 15px;
  color: #666;
}


/*Bansos*/
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.bansos-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-image: url(../images/BG.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.bansos-title {
    font-size: 36px;
    font-weight: bold;
    color: #34495e;
    text-align: center;
    margin-bottom: 40px;
}

.bansos-card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.bansos-card {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    width: 220px;
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

.bansos-card:hover {
    transform: translateY(-10px);
}

.bansos-number {
    font-size: 48px;
    font-weight: bold;
    color: #212121;
    margin-bottom: 10px;
}

.bansos-description {
    font-size: 16px;
    color: #757575;
    text-transform: capitalize;
}

@media (max-width: 768px) {
    .bansos-card-container {
        justify-content: center;
    }

    .bansos-card {
        width: 100%;
        max-width: 300px;
    }
}


/* === INFODESA IDM SECTION (SUDAH FULLSCREEN DAN RESPONSIF) === */
.infografis-idm {
  width: 100%;
  padding: 90px 20px;
  background-color: #f5f6fa;

}

.infografis-idm .container {
  max-width: 100%;
  margin: 0 auto;
}

.idm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.idm-header h3 {
  margin: 0;
  font-size: 35px;
  font-weight: bold;
  color:#2f3640
}

.infografis-idm p {
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 600px;
  text-align: justify;
  color: #4b4b4b;
  line-height: 1.6;
}

.idm-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
  width: 100%;
}

.info-box {
  background-color: #f5f5f5;
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.info-box .label {
  font-size: 14px;
  color: #666;
  font-weight: 600;
  margin-bottom: 8px;
}

.info-box .value {
  font-size: 28px;
  font-weight: bold;
  color: #2d2d2d;
}


/* === Statistik Section === */

.idm-statistik-section {
  padding: 40px 20px;
  background-color: #f9f9f9;
}

.idm-statistik-section h2 {
  color: #e60000;
  font-size: 24px;
  margin-bottom: 30px;
}

.statistik-box {
  background: white;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  height: 450px;
}

.statistik-box canvas {
  width: 100% !important;
  height: 100% !important;
}

.idm-tabel-section {
    padding: 20px;
    background-color: #ffffff;
  }

  .idm-tabel-section h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
  }

  .table-responsive {
    overflow-x: auto;
  }

  table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
  }

  thead th {
    background-color:#18233a;
    text-align: center;
    font-weight: bold;
    color: white;
  }

  th, td {
    border: 1px solid #ccc;
    padding: 8px 10px;
    vertical-align: top;
  }

  td {
    background-color: #fff;
  }

  td[colspan="12"] {
    background-color: #f9f9f9;
    font-weight: bold;
    text-align: right;
    padding: 12px;
  }

  /* SDGs Section Styling */
.sdgs-section {
  padding: 90px 20px;
  background: #fff;
}

.sdgs-section p {
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 600px;
  text-align: justify;
  color: #4b4b4b;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.sdgs-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
}

.sdgs-text {
  flex: 1;
  min-width: 300px;
}

.sdgs-title {
  color: #2f3640;
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 20px;
}

.sdgs-text p {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 30px;
}

.sdgs-score {
  background: #f9f9f9;
  border-radius: 10px;
  padding: 20px;
  max-width: 250px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.centered-score {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
}

.sdgs-score p {
  font-size: 16px;
  margin: 0;
  color: #333;
  font-weight: 600;
}

.sdgs-score h1 {
  font-size: 48px;
  margin-top: 10px;
  font-weight: bold;
  color: #2d2d2d;
  text-align: center;
}

.sdgs-image {
  flex: 1;
  width: 300px;
  text-align: center;
}

.sdgs-image img {
  max-width: 100%;
  height: auto;
}

/* SDGs Card Styling */
.sdg-card-container {
  display: flex;
  flex-wrap: wrap;
  grid-template-columns: repeat(6, 1fr);  /* 6 kolom horizontal */
  gap: 20px;
  justify-items: center;
  padding: 20px 0;
  margin-top: -10px;
}

.sdg-card {
  background: #fff;
  background-color: #f5f5f5;
  border-radius: 8px;
  padding: 10px;
  width: 120px;               /* Ukuran kartu, bisa disesuaikan */
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.sdg-card img {
  width: 80px;                /* Mengatur ukuran gambar sesuai kebutuhan */
  height: auto;
  display: block;
  margin: 0 auto 10px auto;   /* Agar gambar berada di tengah dengan jarak bawah */
}

.sdg-card:hover {
  transform: translateY(-4px);
}

.sdg-icon {
  width: 100%;
  height: auto;
  margin-bottom: 8px;
}

.sdg-score {
  font-weight: 700;      /* tebal seragam */
  font-size: 18px;
  color: #333;
  margin: 0;
  line-height: 1.2;
  font-family: 'Poppins', sans-serif;
}


/* Modal Styling */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  overflow-y: auto;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  position: relative;
  background-color: #fff;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 20px;
  border-radius: 0;
  overflow-y: auto;
  box-shadow: none;
  animation: fadeIn 0.3s ease;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 32px;
  font-weight: bold;
  color: #888;
  cursor: pointer;
  z-index: 1001;
}

.close-btn:hover {
  color: #e74c3c;
}


table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

table, th, td {
  border: 1px solid #ddd;
}

th, td {
  padding: 12px;
  text-align: left;
  font-size: 14px;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Tabs Styling */
.tabs {
  display: flex;
  border-bottom: 2px solid #ddd;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  text-align: center;
  background: #f5f5f5;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: background 0.3s ease;
}

.tab-btn:hover {
  background: #e60000;
  color: white;
}

.tab-btn.active {
  background: #e60000;
  color: white;
  font-weight: bold;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 768px) {
  .modal-content {
    padding: 10px;
  }
}

/* === Responsif Layout === */
@media (max-width: 768px) {
  .infografis-wrapper {
    flex-direction: column;
    padding: 40px 20px;
  }

  .infografis-menu {
    justify-content: center;
    margin-top: 30px;
  }

  .statistik-section {
    padding: 30px 20px;
  }

  .statistik-box {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
  }

  .statistik-box canvas {
    width: 100% !important;
    height: auto !important;
  }
}

/* === Footer === */
.footer-desa {
  background-color: hsl(240, 89%, 7%);
  color: #fff;
  padding: 40px 20px 15px;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  line-height: 1.4;
}

.footer-desa h4 {
  font-size: 20px;
  margin: 0 0 8px;
  padding: 0;
}

.footer-desa p,
.footer-desa a,
.footer-desa li {
  margin: 3px 0;
  padding: 0;
  line-height: 1.4;
}

.footer-desa a {
  color: #fff;
  text-decoration: none;
}
.footer-desa a:hover {
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.footer-section {
  padding: 12px;
}

.footer-logo {
  width: 70px;
  margin-bottom: 12px;
}

.footer-socials a {
  display: inline-block;
  margin-right: 12px;
  font-size: 20px;
}

.footer-bottom {
  margin-top: 35px;
  text-align: center;
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  padding-top: 18px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-section {
    margin-bottom: 20px;
    padding: 8px;
  }

  .footer-socials {
    justify-content: center;
  }
}
