@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@700&family=Open+Sans:ital,wght@0,500;1,500&display=swap');

:root {
    --primary-bg-color: #176B87;
    --primary-hover-color: #155b73;
    --secondary-bg-color: #f5a425;
    --secondary-hover-color: #d68f1c;
    --third-bg-color: #1b2224;
    --forth-bg-color: #212d30;
    --primary-tx-color: white;
    --secondary-tx-color: rgb(200, 200, 200);
    --primary-font-family : "Baloo 2";
    --secondary-font-family : "Open Sans";
}

body {
    margin: 0;
    font-family: var(--secondary-font-family);
    background: url('../img/Bg-Login.JPG') no-repeat center center fixed;
    background-size: cover;
}

/* H E A D E R */
/* N A V B A R */
menu {
    margin: 0;
    padding: 0;
}
.navbar {
    background-color: var(--primary-bg-color);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.navbar .logo a img {
    width: 150px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

nav ul li a {
    text-decoration: none;
    color: white;
    border-radius: 5px;
    padding: 10px;
    transition: background-color 0.3s ease;
}

nav ul li a:hover {
    background-color: var(--primary-hover-color);
    border-radius: 5px;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

.hamburger.active div:nth-child(1) {
    transform: rotate(45deg) translate(5.5px, 5.5px);
}

.hamburger.active div:nth-child(2) {
    opacity: 0;
}

.hamburger.active div:nth-child(3) {
    transform: rotate(-45deg) translate(5.5px, -5.5px);
}

@media (max-width: 768px) {
    body {
        background-size: 150%;
        background-position: top;
    }

    .hamburger {
        display: flex;
        background-color: transparent;
        padding: 10px 12px;
        border-radius: 5px;
        transition: 0s ease;
    }

    .hamburger:hover {
        background-color: var(--primary-hover-color);
        transition: .5s ease;
    }

    .hamburger:hover :active {
        background-color: var(--primary-hover-color);
    }

    /* Default menu styling (tersembunyi) */
    nav ul {
        display: none; /* Sembunyikan menu awalnya */
        position: absolute;
        top: 60px;
        right: 20px;
        background-color: var(--secondary-bg-color);
        flex-direction: column;
        text-align: right;
        padding: 10px;
        opacity: 0;
        transform: translateY(-20px); /* Geser menu sedikit ke atas */
        transition: opacity 0.3s ease, transform 0.3s ease; /* Animasi muncul */
        z-index: 1000;
    }

    nav ul li {
        margin: 10px;
    }

    /* Ketika menu aktif (muncul) */
    nav ul.active {
        display: flex; /* Tampilkan menu */
        opacity: 1;
        transform: translateY(0); /* Kembalikan posisi menu */
        border-radius: 10px;
        padding: 10px;
        width: auto;
    }
}

@media (max-width: 412px) {
    body {
        background-size: 270%;
        background-position: top;
    }
}

/* W E L C O M E */

.idx-container {
    width: 90%; /* Lebar default 90% untuk responsif */
    max-width: 600px; /* Batas maksimal lebar kontainer */
    margin: 50px auto; /* Pusatkan elemen dengan margin */
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.8); /* Tambahkan transparansi untuk kontras */
    border-radius: 10px; /* Tambahkan sudut melengkung */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Tambahkan bayangan */
    text-align: center;
}
.idx-container img {
    width: 20%;
    margin-bottom: 20px;
}

.idx-container h1 {
    font-family: var(--primary-font-family);
    text-transform: uppercase;
    font-size: 50px;
    color: #333;
    margin: 0;
}

.idx-container p {
    font-size: 18px;
    color: #555;
    margin: 0;
}

.btn-container {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-log {
    background-color: var(--primary-bg-color);
}

.btn-log:hover {
    background-color: var(--primary-hover-color);
}

.btn-form {
    background-color: #f5a425;
}

.btn-form:hover {
    background-color: var(--secondary-hover-color); /* Warna lebih gelap saat hover */
}

.btn-container a {
    text-decoration: none;
    color: white;
    padding: 10px 20px;
    margin: 0 10px;
    border-radius: 5px;
    font-size: 16px;
}


@media (max-width: 768px) {
    body {
        background-attachment: scroll; /* Ubah attachment pada layar kecil */
    }

    .idx-container {
        width: 70%;
    }

    .idx-container h1 {
        font-size: 35px;
    }

    .idx-container p {
        font-size: 16px;
    }

    .btn-container a {
        font-size: 14px;
        padding: 8px 16px;
    }
}

@media (max-width: 412px) {
    .idx-container {
        width: 60%;
        margin: 80px auto;
    }

    .idx-container h1 {
        font-size: 26px;
    }

    .idx-container p {
        font-size: 10px;
    }

    .idx-container img {
        width: 35%;
    }
}

/* F O R M   -  P E N D A F T A R A N */
.body-form {
    margin: 0;
    font-family: var(--secondary-font-family);
    background: url('../img/Bg-Login.JPG') no-repeat center center fixed;
    background-size: cover;
}

.idx-container-form {
    width: 90%; /* Lebar default 90% untuk responsif */
    max-width: 600px; /* Batas maksimal lebar kontainer */
    margin: 50px auto; /* Pusatkan elemen dengan margin */
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.8); /* Tambahkan transparansi untuk kontras */
    border-radius: 10px; /* Tambahkan sudut melengkung */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Tambahkan bayangan */
    text-align: center;
}
.idx-container-form img {
    width: 20%;
    margin-bottom: 20px;
}
.idx-container-form h1 {
    font-family: var(--primary-font-family);
    text-transform: uppercase;
    color: #333;
    margin: 0;
}

.idx-container-form p {
    font-size: 18px;
    color: #555;
    margin: 0;
}

.form-main-container {
    padding: 20px;
    border: 2px solid var(--primary-bg-color);
    border-radius: 10px;
    margin: 20px 0;
}

.form-main-container h3 {
    font-family: var(--primary-font-family);
    text-transform: uppercase;
}
.data-santri {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    text-align: left;
    padding: 30px 0;
}

.form-control option {
    padding: 10px;
}

.btn-submit {
    background-color: var(--primary-bg-color);
    padding: 10px 30px;
    border: 0;
    border-radius: 5px;
    color: white;
}

.btn-submit:hover {
    background-color: var(--primary-hover-color);
}

@media (max-width: 720px){

}

@media (max-width: 412px) {
    .body-form {
        margin: 0;
        font-family: var(--secondary-font-family);
        background: url('../img/Bg-Login.JPG') no-repeat center center fixed;
        background-size: cover;
    }

    .idx-container-form {
        width: 80%;
        margin: 20px auto;
        padding: 20px 10px 10px;
    }

    .idx-container-form h1 {
        font-size: 24px;
    }

    .idx-container-form p {
        font-size: 13px;
    }

    .data-santri {
        display: flex;
        flex-direction: column;
        padding: 30px 0;
    }
}

/* A D M I N   L O G I N */
.admin-container {
    width: 60%;
    margin: auto
}
.log-container {
    display: flex;
    flex-direction: column;
    padding-top: 30px;
    gap: 1rem;
}

.log-container input {
    padding: 5px;
    border: 0;
    border-radius: 3px;
    text-align: center;
    font-size: 15px;
}

.btn-admin {
    background-color: var(--primary-bg-color);
    color: white;
    border: 0;
    border-radius: 3px;
    margin: 10px 0;
    padding: 10px;
    cursor: pointer;
}

.btn-admin:hover {
    background-color: var(--primary-hover-color);
    cursor: pointer;
    transition: .5s ease;
}

/* A D M I N   D A S H B O A R D */
.body-admin {
    margin: 0;
    font-family: var(--secondary-font-family);
    background: url('../img/Bg-Login.JPG') no-repeat center center fixed;
    background-size: cover;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tx-admin h1 {
    background-color: var(--forth-bg-color);
    font-family: var(--primary-font-family);
    font-size: 50px;
    margin: 0;
    padding: 20px 0;
    color: white;
    text-align: center;
}

.search-bar {
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-bar input {
    padding: 10px;
    width: 300px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-bar button {
    padding: 7px;
    margin-left: 10px;
    border: none;
    background-color: var(--primary-bg-color);
    border-radius: 20%;
    cursor: pointer;
    transition: background 0.3s;
}

.search-bar button img {
    filter: invert(100%) sepia(7%) saturate(475%) hue-rotate(191deg) brightness(117%) contrast(100%);
}

.search-bar button:hover {
    background-color: var(--primary-hover-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    table-layout: auto;
}

table th, table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

table th {
    background-color: var(--primary-bg-color);
    color: #fff;
}

table tr:nth-child(even) {
    background-color: #f2f2f2;
}

table tr:hover {
    background-color: #f1f1f1;
}
.table-container {
    overflow-x: auto;
    margin: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.table-container table thead tr th {
    text-align: center;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

th {
    background-color: #f4f4f4;
}

.btn {
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.edit-btn {
    background-color: #28a745;
    border: 0;
    border-radius: 4px;
    margin: 5px;
    padding-top: 15px;
    color: #fff;
}

.edit-btn img {
    margin: 0;
    filter: invert(100%) sepia(7%) saturate(475%) hue-rotate(191deg) brightness(117%) contrast(100%);
}

.delete-btn {
    background-color: #dc3545;
    border: 0;
    border-radius: 4px;
}

.delete-btn img {
    filter: invert(100%) sepia(7%) saturate(475%) hue-rotate(191deg) brightness(117%) contrast(100%);
}

.export-btn {
    background-color: #28a745;
    color: #fff;
    display: inline-block;
    margin: 20px 0;
}

.btn:hover {
    opacity: 0.8;
}

.actions .btn-export {
    text-decoration: none;
    background-color: #28a745;
    border-radius: 5px;
    padding: 10px 30px;
    margin: 20px 20px;
    float: left;
}

.actions .btn-export img {
    filter: invert(100%) sepia(7%) saturate(475%) hue-rotate(191deg) brightness(117%) contrast(100%);
}

.actions .btn-export:hover {
    background-color: #218c3a;
    transition: .5s ease;
}

.actions .main-actions .btn-add {
    text-decoration: none;
    background-color: var(--secondary-bg-color);
    border-radius: 5px;
    padding: 10px 30px;
    margin: 20px 5px;
    float: right;
}

.actions .main-actions .btn-add img {
    filter: invert(100%) sepia(7%) saturate(475%) hue-rotate(191deg) brightness(117%) contrast(100%);
    
}

.actions .btn-add:hover {
    background-color: var(--secondary-hover-color);
    transition: .5s ease;
}

.actions .btn-logout {
    text-decoration: none;
    background-color: #dc3545;
    padding: 10px 30px;
    margin: 20px 20px;
    border-radius: 5px;
    transition: background 0.3s;
}

.actions .main-actions .btn-logout img {
    filter: invert(100%) sepia(7%) saturate(475%) hue-rotate(191deg) brightness(117%) contrast(100%);
}

.actions .btn-logout:hover {
    background-color: #ba2e3c;
}

.main-actions {
    display: flex;
    float: right;
}

@media (max-width: 412px) {
    .container {
        width: 80%;
        margin: 50px auto;
    }

    .tx-admin h1 {
        font-size: 30px;
    }
    .search-bar input {
        width: 150px;
    }

    .actions {
        justify-content: space-between;
    }

    .actions .btn-export {
        padding: 10px;
    }

    .main-actions {
        justify-content: space-between;
    }

    .actions .btn-add {
        padding: 10px;
    }
    .actions .btn-logout {
        padding: 10px;
    }
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 400px;
    margin: auto;
}
.modal-buttons {
    margin-top: 20px;
}
.modal-buttons button {
    margin: 0 10px;
}