* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f7e8;
    color: #2d4a22;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
header {
    background: #3b6e2e;
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    text-align: center;
}
nav {
    background: #2c5e1e;
    padding: 10px;
    border-radius: 0 0 12px 12px;
    margin-top: -10px;
    margin-bottom: 20px;
}
nav a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    padding: 5px 10px;
    border-radius: 20px;
}
nav a.active, nav a:hover {
    background: #f4c542;
    color: #2d4a22;
}
main {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}
th {
    background: #3b6e2e;
    color: white;
}
.almarhum {
    background-color: #ffe0e0;
}
.hidup {
    background-color: #e0ffe0;
}
.nomor {
    font-family: monospace;
    font-weight: bold;
    background: #f4f4f4;
}
.filter-form {
    background: #f4f4f4;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.filter-form input, .filter-form select, .filter-form button {
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}
button, .tombol {
    background: #3b6e2e;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
button:hover, .tombol:hover {
    background: #2c5e1e;
}
.detail-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.foto-box {
    text-align: center;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    min-width: 200px;
}
.foto-box img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 10px;
}
.info-box {
    flex: 1;
    background: #fef9e6;
    padding: 15px;
    border-radius: 10px;
}
.info-box p {
    margin: 8px 0;
}
.generasi-group {
    margin-bottom: 20px;
}
.generasi-group h3 {
    background: #ddd;
    padding: 5px 10px;
    border-radius: 5px;
}
ul {
    list-style: none;
    padding-left: 20px;
}
li {
    margin: 5px 0;
}
footer {
    text-align: center;
    padding: 15px;
    font-size: 0.9em;
    color: #5a7a4e;
}
form label {
    display: inline-block;
    width: 180px;
    margin-top: 10px;
}
form input, form select, form textarea {
    width: 300px;
    padding: 6px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}
@media (max-width: 700px) {
    form label { width: 100%; }
    form input, form select, form textarea { width: 100%; }
    .filter-form { flex-direction: column; align-items: stretch; }
}
/* Tombol kembali ke menu utama */
.tombol-kembali {
    margin: 15px 0;
    text-align: left;
}
.btn-home {
    display: inline-block;
    background-color: #3b6e2e;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}
.btn-home:hover {
    background-color: #2c5e1e;
    text-decoration: none;
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
    /* Header & Navigasi */
    header h1 {
        font-size: 1.5rem;
    }
    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
        padding: 10px 5px;
    }
    nav a {
        display: inline-block;
        margin: 3px;
        padding: 6px 12px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    /* Container & main */
    .container {
        padding: 10px;
    }
    main {
        padding: 15px;
    }
    /* Tabel: scroll horizontal jika terlalu lebar */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    /* Form login dan form lainnya */
    form label {
        display: block;
        width: 100%;
        margin-top: 12px;
    }
    form input, form select, form textarea {
        width: 100%;
        box-sizing: border-box;
    }
    form button {
        width: 100%;
        margin-top: 15px;
    }
    /* Tombol kembali */
    .tombol-kembali {
        text-align: center;
    }
    .btn-home, .btn-admin {
        display: block;
        text-align: center;
    }
    /* Filter form */
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-form input, .filter-form select, .filter-form button {
        width: 100%;
        margin-bottom: 8px;
    }
    /* Detail anggota */
    .detail-container {
        flex-direction: column;
    }
    .foto-box {
        text-align: center;
    }
    /* Galeri acara */
    .galeri img {
        width: 100%;
        height: auto;
    }
}

/* Untuk layar sangat kecil (handphone) */
@media (max-width: 480px) {
    nav a {
        font-size: 0.75rem;
        padding: 5px 8px;
    }
    header h1 {
        font-size: 1.2rem;
    }
    th, td {
        padding: 6px;
        font-size: 0.8rem;
    }
}