/* =========================================
STRUKTUR DASAR (STICKY FOOTER & FULL SCREEN)
========================================= */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 80px; /* Jarak agar konten tidak tertutup header */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #e4e4e4;
}

/* =========================================
HEADER & NAVIGASI
========================================= */
header {
    background-color: #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px; /* Padding kiri-kanan disesuaikan agar tombol login ada jarak aman */
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-container img {
    height: 50px;
    object-fit: contain;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 1;
    justify-content: flex-end;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 25px;
}

nav ul li {
    position: relative;
}

nav a {
    text-decoration: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    padding: 10px 0;
    display: block;
    white-space: nowrap;
}

nav a:hover {
    color: #d4af37;
}

/* =========================================
MENU DROPDOWN ELEGAN & FORMAL
========================================= */
.dropdown {
    position: relative;
    padding: 10px 0;
}

.dropdown-menu {
    visibility: hidden;
    opacity: 0;
    transform: translateY(15px);
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff; 
    min-width: 240px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 6px; 
    border: 1px solid #e2e8f0;
    border-top: 3px solid #1e293b;
    padding: 8px 0;
    z-index: 10000;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

.dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    display: flex;
    flex-direction: column;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    color: #475569;
    padding: 12px 20px;
    display: block;
    text-decoration: none;
    text-transform: capitalize;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent; 
    transition: all 0.25s ease;
}

.dropdown-menu a:hover {
    background-color: #f8fafc;
    color: #1e293b;
    border-left: 3px solid #d4af37;
    padding-left: 26px;
}

/* ===========================
TOMBOL LOGIN & ADMIN
=========================== */
.btn-login {
    margin-left: 10px;
    margin-right: 5px; /* Memberikan jarak pengaman dari tepi kanan layar */
    background: #d4af37;
    color: #ffffff !important;
    padding: 8px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    white-space: nowrap;
}

.btn-login:hover {
    background: #b39122;
    color: #b8b8b8 !important;
}

.btn-blue {
    display: inline-block;
    padding: 8px 15px;
    background: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}
.btn-blue:hover { background: #2980b9; }

.btn-orange {
    display: inline-block;
    padding: 8px 15px;
    background: #e67e22;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}
.btn-orange:hover { background: #ca0707; }

/* =========================================
LOGIN CONTAINER
========================================= */
.login-container {
    width: 320px;
    margin: 100px auto;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    text-align: center;
}
.login-container h2 { margin-bottom: 20px; color: #003366; }
.login-container input { width: 90%; padding: 10px; margin: 8px 0; border: 1px solid #ccc; border-radius: 5px; }
.login-container button { background: #003366; color: #fff; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; transition: 0.3s; }
.login-container button:hover { background: #d4af37; color: #000; }

/* =========================================
KONTEN UTAMA
========================================= */
main {
    flex: 1;
    padding: 20px;
    text-align: center;
}

.text-justify { text-align: justify; line-height: 1.6; }

h2 { position: relative; display: inline-block; }
h2::after {
    content: "";
    display: block;
    width: 50%;
    height: 3px;
    background-color: #cca629;
    margin: 5px auto 0;
    animation: slideIn 1s ease forwards;
}

@keyframes slideIn {
    from { width: 0; }
    to { width: 50%; }
}

/* =========================================
TABEL, GALERI, FORM, DASHBOARD
========================================= */
table { width: 100%; border-collapse: collapse; margin-top: 20px; background-color: #fff; }
table th { background-color: #003366; color: white; padding: 10px; text-align: center; }
table td { border: 1px solid #ccc; padding: 10px; text-align: center; }
table tr:nth-child(even) { background-color: #f2f2f2; }
table tr:hover { background-color: #e6f0ff; }

.galeri { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 20px; justify-content: center; }
.galeri-item { background-color: #fff; border: 1px solid #ccc; border-radius: 5px; width: 250px; padding: 10px; text-align: center; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: transform 0.3s; }
.galeri-item:hover { transform: scale(1.05); }

.form-upload { background-color: #fff; padding: 20px; border: 1px solid #ccc; border-radius: 8px; max-width: 500px; margin: 20px auto; }
button, input[type="submit"] { background-color: #003366; color: white; border: none; padding: 10px 15px; border-radius: 5px; cursor: pointer; }
button:hover, input[type="submit"]:hover { background-color: #d4af37; color: #000; }

.dashboard { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 20px; }
.card { background: #fff; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.2); padding: 20px; text-align: center; width: 200px; }
.card i { font-size: 40px; color: #003366; margin-bottom: 10px; }
.card a { display: block; margin-top: 10px; color: #ffffff; font-weight: bold; text-decoration: none; }

/* =========================================
SAMBUTAN PIMPINAN
========================================= */
.sambutan-section {
    background-color: #ffffff;
    padding: 40px 20px;
    margin: 20px auto;
    max-width: 1000px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 4px solid #003366;
}
.sambutan-container { display: flex; flex-wrap: wrap; align-items: center; gap: 30px; }
.sambutan-image { flex: 1; min-width: 250px; text-align: center; }
.sambutan-image img { width: 100%; max-width: 300px; border-radius: 8px; border: 3px solid #d4af37; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.sambutan-content { flex: 2; min-width: 300px; text-align: justify; line-height: 1.6; color: #444; }
.sambutan-content h2 { color: #003366; margin-top: 0; text-align: left; }
.sambutan-content h2::after { margin: 5px 0 0 0; width: 60px; }
.sambutan-signature { margin-top: 20px; text-align: right; }
.sambutan-signature strong { color: #003366; font-size: 16px; display: block; }
.sambutan-signature span { font-size: 14px; color: #777; }

/* =========================================
FOOTER
========================================= */
footer {
    background-color: #003366;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto;
    position: relative !important; 
    bottom: auto !important;
    clear: both;
}

.iklan-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    margin-bottom: 15px;
}

/* =========================================
TOMBOL HAMBURGER (Sembunyi di mode PC)
========================================= */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease-in-out;
}

/* =========================================
RESPONSIVE (Layar HP)
========================================= */
@media (max-width: 768px) {
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
    }

    .logo-container {
        margin-bottom: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-container {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: #1e293b;
        padding: 10px 0 20px 0;
        margin-left: 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }

    .nav-container.active {
        display: flex;
    }

    nav { width: 100%; }

    nav ul {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    nav ul li {
        width: 100%;
        text-align: center;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        background-color: #2c3e50;
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        display: none; 
    }
    
    .dropdown:hover .dropdown-menu {
        display: flex;
    }

    .dropdown-menu a {
        color: white;
        padding-left: 0;
        text-align: center;
    }

    .dropdown-menu a:hover {
        background-color: transparent;
        padding-left: 0;
        border-left: none;
        color: #d4af37;
    }

    .btn-login {
        margin: 15px auto;
        display: inline-block;
    }

    .iklan-container {
        flex-direction: column;
        gap: 20px;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .sambutan-container { flex-direction: column; }
    .sambutan-content h2 { text-align: center; }
    .sambutan-content h2::after { margin: 5px auto 0; }
    .sambutan-signature { text-align: center; }

    .grid-container, .document-list {
        flex-direction: column;
        align-items: center;
    }
    .card, .doc-card {
        width: 95% !important;
    }
    .hide-on-mobile {
        display: none;
    }
}