@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: #f7f7f7;
  color: #222;
}

/* ===== NAVBAR ===== */
.navbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 60px;
  background-color: #1f6000;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  width: 60px;
  height: 60px;
}

.logo .text h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.logo .text p {
  font-size: 13px;
  color: #d0ffd0;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
  color: #f3ffaf;
}

nav ul li a.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  height: 2px;
  width: 100%;
  background-color: #f3ffaf;
  border-radius: 2px;
}

/* ===== LOGIN BUTTON ===== */
.login-btn {
  background-color: #f3ffaf;
  color: #1f6000;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.3s;
}

.login-btn i {
  font-size: 18px;
}

.login-btn:hover {
  background-color: #d9f2d5;
  color: #0e3d00;
}

/* ===== HERO INFOGRAFIS ===== */
.hero-infografis {
  margin-top: 80px;
  padding: 80px 60px;
  background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  min-height: 400px;
}

.hero-content h1 {
  font-size: 48px;
  font-weight: 700;
  color: #c62828;
  line-height: 1.2;
  margin-bottom: 15px;
}

.hero-content p {
  font-size: 16px;
  color: #555;
  max-width: 500px;
  line-height: 1.6;
}

.hero-illustration {
  flex-shrink: 0;
  width: 350px;
  height: 280px;
  background: linear-gradient(135deg, #ffb3ba, #bae1ff);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.chart-visual {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
}

/* ===== TAB SECTION ===== */
.tab-section {
  background: #fff;
  padding: 20px 60px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 90px;
  z-index: 50;
}

.tab-container {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: 2px solid #e0e0e0;
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  transition: all 0.3s;
}

.tab-btn i {
  font-size: 18px;
}

.tab-btn:hover {
  background: #f5f5f5;
  border-color: #1f6000;
}

.tab-btn.active {
  background: #1f6000;
  border-color: #1f6000;
  color: white;
}

/* ===== CONTENT WRAPPER ===== */
.content-wrapper {
  padding: 60px;
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== DEMOGRAFI SECTION ===== */
.demografi-section h2 {
  font-size: 36px;
  color: #c62828;
  margin-bottom: 15px;
  text-align: center;
}

.subtitle {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px;
  color: #555;
  line-height: 1.8;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.stat-card {
  background: #fff;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.stat-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #1f6000, #2e7d0e);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  flex-shrink: 0;
}

.stat-info h3 {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: #c62828;
}

.stat-number span {
  font-size: 18px;
  color: #666;
  font-weight: 400;
}

/* ===== KELOMPOK UMUR SECTION ===== */
.kelompok-umur-section {
  background: #fff;
  padding: 40px;
  border-radius: 20px;
}

.kelompok-umur-section h2 {
  font-size: 36px;
  color: #c62828;
  margin-bottom: 40px;
  text-align: center;
}

.chart-container {
  max-width: 1000px;
  margin: 0 auto;
}

.age-chart {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 15px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 0 50px;
}

.gender-label {
  font-weight: 700;
  font-size: 16px;
  color: #666;
}

.gender-label.left {
  color: #4CAF50;
}

.gender-label.right {
  color: #FF7043;
}

.age-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.age-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.age-label {
  width: 60px;
  text-align: right;
  font-weight: 600;
  font-size: 13px;
  color: #666;
}

.bar-wrapper {
  flex: 1;
  display: flex;
  gap: 2px;
  align-items: center;
  position: relative;
}

.bar {
  height: 24px;
  border-radius: 4px;
  position: relative;
  transition: width 0.8s ease;
}

.bar.male {
  background: #4CAF50;
  margin-right: auto;
}

.bar.female {
  background: #FF7043;
  margin-left: auto;
}

.bar::after {
  content: attr(data-value);
  position: absolute;
  right: -25px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  color: #666;
}

.bar.female::after {
  right: auto;
  left: -25px;
}

/* ===== JAGA SECTION ===== */
.jaga-section {
  background: #fff;
  padding: 40px;
  border-radius: 20px;
}

.jaga-section h2 {
  font-size: 36px;
  color: #c62828;
  margin-bottom: 40px;
  text-align: center;
}

.jaga-section h3 {
  font-size: 28px;
  color: #c62828;
  margin-top: 60px;
  margin-bottom: 40px;
  text-align: center;
}

.jaga-chart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.jaga-legend {
  min-width: 250px;
}

.jaga-legend h3 {
  font-size: 20px;
  color: #333;
  margin-bottom: 20px;
  text-align: left;
  margin-top: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  font-size: 16px;
}

.legend-color {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  flex-shrink: 0;
}

/* ===== JAGA GRID ===== */
.jaga-section-detail {
  margin-top: 40px;
}

.jaga-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.jaga-card {
  background: linear-gradient(135deg, #e8f5e9, #ffffff);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s;
}

.jaga-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.jaga-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 3px solid #1f6000;
}

.jaga-header i {
  font-size: 36px;
  color: #1f6000;
}

.jaga-header h4 {
  font-size: 24px;
  color: #1f6000;
  font-weight: 700;
}

.jaga-stats {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.jaga-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(255,255,255,0.7);
  border-radius: 10px;
}

.jaga-stat .label {
  font-weight: 600;
  color: #555;
}

.jaga-stat .value {
  font-weight: 700;
  color: #1f6000;
  font-size: 18px;
}

.jaga-total {
  text-align: center;
  padding: 15px;
  background: #1f6000;
  color: white;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 600;
  margin-top: 15px;
}

.jaga-total strong {
  font-size: 22px;
}

/* ===== PEKERJAAN SECTION ===== */
.pekerjaan-section {
  background: #fff;
  padding: 40px;
  border-radius: 20px;
}

.pekerjaan-section h2 {
  font-size: 36px;
  color: #c62828;
  margin-bottom: 40px;
  text-align: center;
}

.pekerjaan-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.pekerjaan-table table {
  width: 100%;
  border-collapse: collapse;
  background: #f9f9f9;
  border-radius: 15px;
  overflow: hidden;
}

.pekerjaan-table thead {
  background: linear-gradient(135deg, #1f6000, #2e7d0e);
  color: white;
}

.pekerjaan-table th {
  padding: 18px;
  text-align: left;
  font-weight: 700;
  font-size: 16px;
}

.pekerjaan-table td {
  padding: 15px 18px;
  border-bottom: 1px solid #e0e0e0;
}

.pekerjaan-table tbody tr:hover {
  background: #f0f0f0;
}

.pekerjaan-table td strong {
  font-size: 18px;
  color: #1f6000;
  font-weight: 700;
}

.pekerjaan-visual {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pekerjaan-highlight {
  flex: 1;
}

.highlight-card {
  background: linear-gradient(135deg, #e8f5e9, #ffffff);
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s;
}

.highlight-card:hover {
  transform: scale(1.05);
}

.highlight-card i {
  font-size: 48px;
  color: #1f6000;
  margin-bottom: 15px;
}

.highlight-card h4 {
  font-size: 16px;
  color: #666;
  margin-bottom: 10px;
}

.big-number {
  font-size: 42px;
  font-weight: 700;
  color: #c62828;
  margin: 10px 0;
}

.percentage {
  font-size: 20px;
  color: #1f6000;
  font-weight: 600;
}

/* ===== AGAMA SECTION ===== */
.agama-section {
  background: #fff;
  padding: 40px;
  border-radius: 20px;
}

.agama-section h2 {
  font-size: 36px;
  color: #c62828;
  margin-bottom: 40px;
  text-align: center;
}

.agama-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.agama-card {
  background: linear-gradient(135deg, #e8f5e9, #ffffff);
  padding: 35px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.agama-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.agama-card.minor {
  opacity: 0.7;
}

.agama-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: white;
}

.agama-icon.islam {
  background: linear-gradient(135deg, #00897B, #26A69A);
}

.agama-icon.katolik {
  background: linear-gradient(135deg, #5E35B1, #7E57C2);
}

.agama-icon.kristen {
  background: linear-gradient(135deg, #1976D2, #42A5F5);
}

.agama-icon.lainnya {
  background: linear-gradient(135deg, #757575, #9E9E9E);
}

.agama-icon.hindu {
  background: linear-gradient(135deg, #F57C00, #FF9800);
}

.agama-icon.buddha {
  background: linear-gradient(135deg, #FBC02D, #FDD835);
}

.agama-icon.konghucu {
  background: linear-gradient(135deg, #C62828, #E53935);
}

.agama-card h4 {
  font-size: 18px;
  color: #333;
  margin-bottom: 12px;
  font-weight: 700;
}

.agama-number {
  font-size: 42px;
  font-weight: 700;
  color: #c62828;
  margin: 10px 0;
}

.agama-label {
  font-size: 16px;
  color: #666;
}

/* ===== FOOTER ===== */
.footer {
  background: #1f6000;
  color: white;
  padding: 40px 60px;
  margin-top: 60px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}

.logo-footer {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-footer img {
  width: 60px;
  height: 60px;
}

.contact h3 {
  margin-bottom: 8px;
}

.contact p {
  font-size: 14px;
}

.copyright {
  text-align: center;
  margin-top: 30px;
  font-size: 14px;
  opacity: 0.8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 15px 30px;
    flex-wrap: wrap;
  }

  nav ul {
    gap: 15px;
    font-size: 13px;
  }

  .hero-infografis {
    flex-direction: column;
    padding: 60px 30px;
  }

  .hero-content h1 {
    font-size: 32px;
  }

  .hero-illustration {
    width: 100%;
    max-width: 350px;
  }

  .content-wrapper {
    padding: 30px;
  }

  .tab-section {
    padding: 15px 20px;
    top: 80px;
  }

  .tab-btn {
    font-size: 13px;
    padding: 10px 18px;
  }

  .pekerjaan-container {
    grid-template-columns: 1fr;
  }

  .jaga-chart {
    flex-direction: column;
    gap: 30px;
  }

  .pie-chart {
    width: 100%;
    max-width: 350px;
    height: 350px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .agama-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .jaga-grid {
    grid-template-columns: 1fr;
  }
}