/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: sans-serif; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 5px; }

/* Header & Burger */
header { background: #2c3e50; color: white; padding: 15px 0; position: sticky; top: 0; z-index: 100; }
.navbar { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: bold; }
nav a { color: white; text-decoration: none; margin-left: 20px; }

.burger { cursor: pointer; display: none; }
.burger span { display: block; width: 25px; height: 3px; background: white; margin: 5px; transition: 0.3s; }

/* Table Section */
.filter-section { margin: 30px 0; }
.filter-section input { padding: 10px; width: 250px; border: 1px solid #ddd; border-radius: 4px; }
.btn-search { padding: 10px 20px; background: #3498db; color: white; border: none; cursor: pointer; border-radius: 4px; }

.table-container { background: white; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); overflow: hidden; }
.responsive-table { width: 100%; border-collapse: collapse; }
.responsive-table th, .responsive-table td { padding: 12px; text-align: left; border-bottom: 1px solid #000; }
.responsive-table th { background: #000; font-size: 0.9rem; }
.th, td {
  border: 1px solid black; /* Apply borders to cells as well */
}

/* Container untuk membungkus tabel agar bisa di-scroll */
        .table-wrapper {
            max-height: 400px; /* Tentukan tinggi maksimal tabel */
            overflow-y: auto;  /* Aktifkan scroll vertikal */
            border: 1px solid #ddd;
            margin: 20px;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            font-family: Arial, sans-serif;
        }

        /* KUNCI UTAMA: Membuat Header Lengket (Sticky) */
        thead th {
            position: sticky;
            top: 0; /* Menempel di paling atas container */
            font-size: 14px;
            background-color: #fff; /* Warna wajib ada agar tidak transparan */
            
            padding: 12px;
            z-index: 10; /* Agar header selalu di atas baris body */
            box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.4); /* Opsional: bayangan tipis */
        }

        tbody td {
            padding: 10px;
            border-bottom: 1px solid #ddd;
            text-align: left;
        }

        tr:nth-child(even) {
            background-color: #f9f9f9;
            
/* Footer Grid */
footer { background: #1a1a1a; color: #ccc; padding: 40px 0; margin-top: 50px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.footer-item h4 { color: white; margin-bottom: 15px; }
.footer-item a { color: #888; text-decoration: none; font-size: 0.9rem; }

/* RESPONSIVE SMARTPHONE (Mobile) */
@media screen and (max-width: 480px) {
    /* Burger Menu Show */
    .burger { display: block; }
    nav { 
        position: fixed; right: -100%; top: 60px; background: #2c3e50; 
        width: 70%; height: 100%; flex-direction: column; transition: 0.4s; padding: 20px;
    }
    nav.active { right: 0; }
    nav a { margin: 15px 0; font-size: 1.2rem; display: block; }

    /* Table to Cards */
    .responsive-table thead { display: none; }
    .responsive-table tr { display: block; margin-bottom: 20px; border: 1px solid #ddd; padding: 10px; border-radius: 8px; }
    .responsive-table td { display: flex; justify-content: space-between; padding: 8px 5px; border-bottom: 1px dotted #ccc; }
    .responsive-table td::before { content: attr(data-label); font-weight: bold; color: #2c3e50; }

    /* Footer Responsive */
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .filter-section input { width: 100%; margin-bottom: 10px; }
}

@media screen and (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
}