/* ====== STYLE UMUM ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: #f8fdf8;
  color: #333;
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* ====== NAVBAR ====== */
header {
  background-color: rgb(194, 0, 0); 
  color: #fff;
  padding: 10px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px; 
}

.logo img {
  width: 50px;
  height: 50px;
  object-fit: cover;
}

.logo div {
  display: flex;
  flex-direction: column;
}

.logo h1 {
  font-size: 1.5rem;
  color: #fff;
  margin: 0; 
  line-height: 1.2;
}

.logo p {
  font-size: 0.9rem;
  color: #e0e0e0;
  margin: 0;
  font-weight: 400; 
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
  padding: 6px 12px;
  border-radius: 5px;
}

nav ul li a:hover {
  background-color: rgba(255, 255, 255, 0.2); 
}

nav ul li a.active {
  background-color: #fff;
  color: #E53935; 
}


.menu-toggle {
  display: none; 
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    background-color: #E53935;
    position: absolute;
    top: 70px; 
    left: 0;
    width: 100%;
    padding: 10px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  nav ul.active {
    display: flex;
  }
  
  
  .menu-toggle {
    display: block; 
  }

  nav ul li {
    width: 100%;
  }
  
  nav ul li a {
    display: block;
    text-align: center;
    padding: 15px;
  }
  

  nav ul li a:hover,
  nav ul li a.active {
    background-color: #fff;
    color: rgb(194, 0, 0);
  }
}

/* ====== DEMOGRAFI PENDUDUK ====== */
.demografi {
  padding: 60px 0;
  background-color: #fff; 
}

.demografi-header {

  align-items: center;
  margin-bottom: 50px;
}

.demografi-header-teks h2 {
  font-size: 30px;
  font-weight: 800;
  color: #b30000;
  margin-bottom: 10px;
  text-align: center;
}

.demografi-header-teks p {
  font-size: 1rem;
  color: #555;
  line-height: 1.7;
  text-align: center;
}

.demografi-subjudul h2{
    font-size: 30px;
  font-weight: 800;
  color: #b30000;
  margin-bottom: 10px;
  text-align: center;
}
.demografi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; 
  gap: 20px; 
}

.demografi-box {
  display: flex; 
  text-align: center;
  gap: 20px; 
  padding: 25px;
  background-color: #fff;
  border: 1px solid #f0f0f0; 
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.demografi-box:hover {
  transform: translateY(-5px); 
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.demografi-icon img {
  width: 80px; 
  height: 80px;
  object-fit: contain;
}

.data-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #777;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.data-nilai {
  font-size: 1.8rem;
  font-weight: 600;
  color: #333; 
  margin: 0;
}

.data-angka {
  font-weight: 700;
  color: #E53935; 
  margin-right: 8px; 
}


@media (max-width: 992px) {
  .demografi-header {
    grid-template-columns: 1fr; 
    text-align: center;
  }
  .demografi-header-img img {
    margin: 20px auto 0 auto; 
  }
}

@media (max-width: 768px) {
  .demografi-grid {
    grid-template-columns: 1fr; 
  }
  .demografi-box {
    flex-direction: column; 
    text-align: center;
  }
}

.jumlah-rumah {
  margin: 25px auto;
  justify-content: center;
  width: 400px; 
}
/* ====== PIRAMIDA PENDUDUK ====== */
.piramida-chart-container {
  position: relative; 
  height: 400px; 
  width: 100%;
  max-width: 900px; 
  margin: 20px auto; 
  padding: 15px; 
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid #f0f0f0;
}


@media (max-width: 768px) {
  .piramida-chart-container {
    height: 600px; 
    margin: 15px auto;
    padding: 10px;
  }
}

/* ====== DUSUN CHART ====== */
.dusun-chart {
  padding: 30px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  margin-top: 40px; 
  margin-bottom: 60px; 
}

.dusun-judul {
  margin-bottom: 30px;
}

.dusun-judul h2 {
  font-size: 30px;
  font-weight: 800;
  color: #b30000;
  margin-bottom: 10px;
  text-align: center;
}

.dusun-grid {
  display: grid;
  grid-template-columns: 2fr 1fr; 
  gap: 40px;
  align-items: center;
}

.chart-pie-container {
  position: relative; 
  width: 100%;
  max-width: 450px; 
  margin: auto;
  height: 350px; 
}


.chart-legend h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 15px;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
}

.chart-legend ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.chart-legend li {
  font-size: 1rem;
  color: #555;
  margin-bottom: 10px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .chart-pie-container {
    height: 400px; 
  }
}

/* ====== BERDASARKAN PERKAWINAN ====== */
.perkawinan {
  padding: 40px 0 60px 0;
  background-color: #f8fdf8;
}

.perkawinan-judul {
  margin-bottom: 30px;
}

.perkawinan-judul h2 {
  font-size: 30px;
  font-weight: 800;
  color: #b30000;
  margin-bottom: 10px;
  text-align: center;
}

.perkawinan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.perkawinan-box {
  background-color: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
}

.perkawinan-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.perkawinan-box img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 15px;
}

.perkawinan-label {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  color: #555;
  margin-bottom: 5px;
}

.perkawinan-data {
  font-size: 2.2rem;
  font-weight: 700;
  color: #E53935;
  margin: 0;
}

/* ====== BERDASARKAN AGAMA ====== */
.agama {
  padding: 40px 0 60px 0;
  background-color: #f8fdf8;
}

.agama-judul {
  margin-bottom: 30px;
}

.agama-judul h2 {
  font-size: 30px;
  font-weight: 800;
  color: #b30000;
  margin-bottom: 50px;
  text-align: center;
}

.agama-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.agama-box {
  background-color: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s ease;
}

.agama-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.agama-icon {
  width: 70px;
  height: 70px;
  object-fit: contain;
  flex-shrink: 0;
}

.agama-label {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  color: #555;
  margin-bottom: 2px;
}

.agama-data {
  font-size: 2.2rem;
  font-weight: 700;
  color: #E53935;
  margin: 0;
}


.chart-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

@media (max-width: 768px) {
  .chart-bar-container {
    height: 400px; 
    padding: 10px;
    margin-bottom: auto;
    margin-top: auto;
  }
}
/* ====== BERDASARKAN PENDIDIKAN ====== */

.chart-bar-container {
  position: relative;
  height: 450px; 
  width: 100%;
  max-width: 900px; 
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid #f0f0f0;
}
.chart-bar-container h2{
    font-size: 30px;
  font-weight: 800;
  color: #b30000;
  text-align: center;
}
/* ====== BAGIAN DIAGRAM UMUR ====== */
.umur-chart.container {
  width: 95%;
  max-width: 900px;
  margin: 40px auto;
  background: #fff;
  border-radius: 20px;
  padding: 30px 25px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.umur-judul {
  font-size: 30px;
  font-weight: 800;
  color: #b30000;
  margin-bottom: 50px;
}

.stats-title {
  font-size: 40px;
  font-weight: 800;
  color: #b30000;
  margin-top: 40px;
}

.chart-bar-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 500px;
  margin: auto;
}

@media (max-width: 768px) {
  .chart-bar-container {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    margin-top: auto;
  }
}

@media (max-width: 480px) {
  .chart-bar-container {
    height: 380px;
    margin-top: auto;
  }
}

/* ====== BERDASARKAN PEKERJAAN ====== */
.stats-container {
  max-width: 1200px;
  margin: 0 auto;
}

.stats-title {
  font-size: 30px;
  font-weight: 800;
  color: #b30000;
  margin-top: 40px;
  text-align: center;
}

.stats-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.job-list {
  flex: 1;
  min-width: 300px;
  background-color: #FFFFFF;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px #a94343bc;
}

.job-list-header {
  display: flex;
  justify-content: space-between;
  background-color: #c7c7c7;
  color: #894343;
  font-weight: 600;
  padding: 14px 20px;
}

.job-list-item {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #F0F0F0;
  font-size: 0.95rem;
  color: #7a2121;
}

.job-list-item:last-child {
  border-bottom: none;
}

.job-grid {
  flex: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}


@media (max-width: 768px) {
  .piramida-chart-container {
    height: 500px; 
    padding: 10px;
  }

  .chart-bar-container {
    height: 450px; 
    padding: 10px;
  }
}

/* ===============================
  FOOTER 
=============================== */
.footer {
  background-color: rgb(194, 0, 0); 
  color: #FFFFFF;           
  padding: 40px 20px;      
}

.footer-container {
  max-width: 1100px; 
  margin: 0 auto;    
}

.footer-top {
  display: flex;
  flex-direction: column; 
  gap: 30px;             
}

.footer-column h4 {
  font-size: 1.2rem;       
  font-weight: 700;      
  margin: 0 0 15px 0;    
}

.footer-column p {
  font-size: 0.95rem;      
  line-height: 1.6;      
  margin: 0;
}

.footer-column a {
  color: #FFFFFF;
  text-decoration: none; 
}

.footer-column a:hover {
  text-decoration: underline; 
}

.footer-divider {
  border: none; 
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  margin: 30px 0; 
}

.footer-bottom {
  text-align: center; 
  font-size: 0.9rem;
}

.footer-bottom p {
  margin: 0;
}

@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;     
    justify-content: space-between; 
    gap: 40px;                
  }

  .footer-column {
    flex: 1; 
  }
}