/* General reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Styling untuk body dan html */
html, body {
    height: 100%;
    font-family: 'Arial', sans-serif;
    display: flex;
    flex-direction: column;
}

body {
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    overflow-x: hidden; /* Menghindari overflow horizontal */
}

/* Header styling */
header {
    background-color: #ffffff;
    border-bottom: 2px solid #ffcc00;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
}

.title {
    flex-grow: 1; /* Membuat title mengambil ruang yang tersisa */
    text-align: center;
}

.title h1 {
    font-size: 24px;
    color: #007b5e;
    font-weight: bold;
}


.logo img {
    height: 60px;
    width: auto;
    border-radius: 5px;
}


/* Navbar */
nav ul {
    display: flex;
    justify-content: center;
    background-color: #007b5e;
    padding: 10px;
    list-style: none;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 16px;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #ffcc00;
}

.menu-toggle {
    font-size: 28px;
    cursor: pointer;
    display: none; /* Awalnya disembunyikan, muncul hanya di layar kecil */
}

/* Sidebar untuk perangkat kecil */
.sidebar {
    height: 100%;
    width: 0; /* Awalnya tertutup */
    position: fixed;
    top: 0;
    z-index: 1000; /* Pastikan sidebar berada di atas elemen lain */
    left: 0;
    background-color: rgba(0, 123, 94, 0.9); /* Warna hijau dengan transparansi */
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
    display: none; /* Sidebar akan muncul hanya di layar kecil */
}

.sidebar a {
    padding: 10px 15px;
    text-decoration: none;
    font-size: 18px;
    color: white;
    display: block;
    transition: 0.3s;
}

.sidebar a:hover {
    background-color: #ffcc00;
    color: black;
}

.sidebar .closebtn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 36px;
    color: white;
    cursor: pointer;
}

/* Main content styling */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}
.table-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h2 {
    font-size: 28px;
    color: #007b5e;
    margin-bottom: 20px;
    text-align: center;
}
h3 {
    font-size: 20px;
    color: #007b5e;
    margin-bottom: 20px;
    text-align: center;
}
/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}

thead {
    background: rgba(0, 123, 94, 0.8);
}

thead th {
    color: white;
    padding: 15px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

tbody {
    background-color: #ffffff;
}

tbody tr {
    transition: background-color 0.3s ease, transform 0.2s ease;
}

tbody td {
    padding: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

tbody tr:nth-child(even) {
    background-color: rgba(240, 240, 240, 0.8);
}

tbody tr:hover {
    background-color: rgba(0, 123, 94, 0.2);
    transform: translateY(-2px);
}

/* Link styling */
a {
    color: #007b5e;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

a:hover {
    color: #005f46; /* Warna saat hover */
    text-decoration: underline;
}
/* Footer styling */
footer {
    background-color: #007b5e;
    color: white;
    text-align: left;
    padding: 10px 0;
    width: 100%;
    margin-top: auto;
}

footer p {
    font-size: 14px;
    margin: 0;
}

@media (min-width: 769px) {
    .title {
        text-align: center; /* Geser ke kiri pada layar besar */
        margin-right: 200px; /* Beri margin hanya di layar besar */
    }
}

@media (max-width: 768px) {
    .navbar {
        display: none; /* Navbar hilang di perangkat kecil */
    }
    .sidebar {
        display: block; /* Sidebar muncul di layar kecil */
        width: 0; /* Sidebar tertutup pada awalnya */
    }
    
    .logo img {
        height: 30px; /* Mengatur tinggi logo untuk perangkat kecil */
        width: auto; /* Membiarkan lebar otomatis untuk mempertahankan proporsi */
    }

    .title {
        flex-grow: 1; /* Membuat title mengambil ruang yang tersisa */
        text-align: center;
    }
    
    .title h1 {
        font-size: 18px; /* Mengurangi ukuran font judul di layar kecil */
        color: #007b5e;
        font-weight: bold;
    }
    
    .menu-toggle {
        display: block; /* Tombol menu muncul di perangkat kecil */
    }
    h2 {
        font-size: 20px;
    }

    nav ul {
        flex-direction: column;
        padding: 0;
    }

    nav ul li {
        margin: 10px 0;
    }

    .container {
        width: 90%;
        max-width: 1200px;
        margin: 20px auto;
        padding: 20px;
        background-color: #fff;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    .table-responsive {
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch; 
    }
    
    table {
        width: 100%;
        min-width: 600px; 
        border-collapse: collapse;
        margin-bottom: 20px;
        border-radius: 8px; /* Sudut melengkung untuk tabel */
        overflow: hidden;
        text-align: center;
    }
    
    thead {
        background: rgba(0, 123, 94, 0.8); 
    }
    
    thead th {
        color: white;
        padding: 15px;
        font-weight: bold;
        text-transform: uppercase; 
        letter-spacing: 1px; 
        text-align: center;
    }
    
    tbody {
        background-color: #ffffff; 
    }
    
    tbody tr {
        transition: background-color 0.3s ease, transform 0.2s ease; 
    }
    
    tbody td {
        padding: 12px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1); 
    }
    
    tbody tr:nth-child(even) {
        background-color: rgba(240, 240, 240, 0.8); 
    }
    
    tbody tr:hover {
        background-color: rgba(0, 123, 94, 0.2); 
        transform: translateY(-2px); 
    }   
    
    footer {
        background-color: #007b5e; /* Warna footer */
        color: white; /* Warna teks footer */
        text-align: left; /* Rata kiri untuk teks footer */
        padding: 10px 0; /* Padding atas dan bawah untuk footer */
        width: 100%; /* Lebar footer 100% */
        margin-top: auto; /* Mengisi ruang kosong di atas footer */
    }
    
    footer p {
        font-size: 14px; /* Ukuran font untuk teks footer */
        margin: 0; /* Menghilangkan margin untuk footer */
        text-align: center; /* Pusatkan teks footer */
    }
}
