/* RESET & ROOT CONTAINER */
  * { box-sizing: border-box; }
  .infografis-body {
    font-family: 'Poppins', sans-serif;
    margin: 0; padding: 0;
    background: #e3e3e3;
    color: #002147;
    scroll-behavior: smooth;
  }
  .infografis-body a { color: inherit; text-decoration: none; }
  h1,h2,h3,p { margin: 0; }

  /* HEADER */
  .infografis-header {
    padding: 3rem 2rem 2rem 2rem;
    max-width: 1200px; margin: auto;
  }
  .infografis-header h1 {
    font-weight: 700;
    font-size: 2.6rem;
    letter-spacing: 1.2px;
    color: #002147;
  }

  /* NAVIGATION */
  nav.infografis-nav {
    max-width: 1200px;
    margin: 0 auto 2rem;
    border-bottom: 1px solid #dee2e6;
    background: #fff;
    box-shadow: 0 0 8px rgb(0 0 0 / 0.05);
    user-select: none;
  }
  nav.infografis-nav ul {
    display: flex;
    justify-content: flex-start;
    list-style: none;
    margin: 0;
    padding: 0 1rem;
    overflow-x: auto;
  }
  nav.infografis-nav ul li {
    flex-shrink: 0; padding: 0; margin-right: 2rem;
    border-bottom: 4px solid transparent;
    transition: 0.3s ease;
    display: flex; align-items: center; height: 56px;
  }
  nav.infografis-nav ul li a {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0 0 6px 0;
    font-weight: 600; font-size: 1rem;
    color: #546e5b;
    white-space: nowrap;
  }
  nav.infografis-nav ul li.active { border-bottom-color: #216b51; }
  nav.infografis-nav ul li.active a { color: #216b51; }
  nav.infografis-nav ul li a:hover { color: #264d3a; }

  /* MAIN CONTENT */
  main.infografis-content {
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 0 1rem;
    color: #002147;
  }

  /* TABS */
  section.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in;
  }
  section.tab-content.active {
    display: block;
  }
  @keyframes fadeIn { from {opacity:0;} to {opacity:1;} }

  /* HEADINGS */
  h2.section-title {
    font-weight: 700;
    font-size: 1.9rem;
    margin-bottom: 0.5rem;
    color: #002147;
  }
  p.section-subtitle {
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.5;
    max-width: 760px;
    margin-bottom: 2rem;
    color: #1a1919;
  }

  /* CARDS CONTAINER */
  .cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
    gap: 1rem 2rem;
    margin-bottom: 3rem;
  }
  /* Cards */
  .card {
    background: #fbfcfb;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 3px 8px rgb(0 0 0 / 0.08);
    text-align: center;
    color: #002147;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    min-height: 150px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 26px rgb(0 0 0 / 0.15);
  }
  .card img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #03a9b8;
    padding: 12px;
    object-fit: contain;
    transition: transform 0.3s ease;
  }
  .card:hover img {
    transform: scale(1.1);
  }
  .card h3 {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #002147;
  }
  .card p {
    font-size: 1.4rem;
    font-weight: 700;
  }

  /* Cards container horizontal for Perkawinan and Agama */
  .cards-container-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem 2rem;
    margin-bottom: 3rem;
  }
  .cards-container-horizontal .card {
    min-height: 180px;
    font-size: 1rem;
  }

  /* INFO BOXES */
  .info-box {
    max-width: 100%;
    margin-bottom: 1rem;
    padding: 1rem 1.5rem;
    background-color: #d3efdb;
    border-radius: 8px;
    font-size: 1rem;
    color: #002147;
    box-shadow: 0 2px 12px rgb(0 0 0 / 0.05);
    line-height: 1.4;
  }
  .info-box.red {
    background-color: #f9d4ce;
    color: #9f433b;
    margin-bottom: 2rem;
  }

  /* CHART CONTAINER */
  .chart-container {
    background: #fff;
    padding: 1rem 1.2rem;
    border-radius: 16px;
    box-shadow: 0 0 13px rgb(0 0 0 / 0.07);
    margin-bottom: 3rem;
    position: relative;
    min-height: 360px;
  }
  canvas {
    width: 100% !important;
    height: 300px !important;
  }
  .legend {
    margin-top: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
  }

  /* WORK */
  .work-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 3rem;
    color: #002147;
  }
  .work-table {
    flex-basis: 40%;
    border-collapse: collapse;
    max-height: 350px;
    overflow-y: auto;
    display: block;
    width: 100%;
    font-size: 0.9rem;
  }
  .work-table::-webkit-scrollbar {
    width: 5px;
  }
  .work-table::-webkit-scrollbar-track {
    background: #f1f1f1;
  }
  .work-table::-webkit-scrollbar-thumb {
    background-color: #002147;
    border-radius: 3px;
  }
  .work-table thead th {
    position: sticky;
    top: 0;
    background: #002147;
    color: #fff;
    padding: 0.4rem 1rem;
    text-align: left;
    font-weight: 600;
  }
  .work-table tbody tr {
    border-bottom: 1px solid #cddfc9;
  }
  .work-table td {
    padding: 0.25rem 1rem;
  }
  .work-cards {
    flex-basis: 55%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
  }
  .work-card {
    padding: 1.2rem 0;
    background: #d3efdb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
    font-weight: 700;
    font-size: 1.4rem;
    color: #002147;
    text-align: center;
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
  }
  .work-card small {
    font-weight: 400;
    font-size: 1rem;
    color: #002147;
  }

  /* DOWNLOAD BUTTONS */
  .download-buttons {
    margin-top: auto;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .download-buttons button {
    cursor: pointer;
    background: #002147;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
  }
  .download-buttons button:hover {
    background-color: #1469ca;
  }

  /* RESPONSIVE */
  @media (max-width: 900px) {
    nav.infografis-nav ul li { margin-right: 1rem; }
    nav.infografis-nav ul li a { font-size: 0.85rem; }
    .work-container {
      flex-direction: column;
    }
    .work-table, .work-cards {
      flex-basis: 100%;
    }
    .infografis-header {
      padding: 2rem 1rem 1.5rem 1rem;
    }
    main.infografis-content {
      padding: 0 1rem;
    }
  }
