/* ==========================================================================
   1. RESET & PENGATURAN DASAR
   ========================================================================== */
* {
    font-family: 'Verdana', sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scrollbar-width: none;
    -ms-overflow-style: none;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    background-color: #120A0F !important;
    background-size: 24px 24px, 100% 100% !important;
    background-attachment: fixed !important;
    color: #FFFDF9;
    font-family: sans-serif;
    margin: 0;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    animation: globalFadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   2. LATAR BELAKANG UTAMA
   ========================================================================== */
.web {
    background: linear-gradient(135deg, #3A0F14 0%, #20080B 50%, #0F0406 100%);
    min-height: 100vh;
    flex: 1;
}

/* ==========================================================================
   3. NAVBAR / KOTAK LENGKET
   ========================================================================== */
.kotaklengket {
    background: linear-gradient(90deg, #e1b141 0%, #d29e2d 100%);
    width: 100%;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    font-size: 15px;
    border-bottom: 3px solid #1C080B;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-brand img {
    width: 80px;
    height: auto;
}

.daerah {
    color: #1C080B;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 1px;
}

.budaya {
    width: 45px;
    height: 55px;
    object-fit: contain;
    filter: drop-shadow(0px 3px 6px rgba(133, 86, 25, 0.4));
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.kamus, .homepage, .about, .login, .login-nav-btn {
    color: #1C080B;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.kamus:hover, .homepage:hover, .about:hover, .login:hover, .login-nav-btn:hover {
    background-color: rgba(28, 8, 11, 0.15);
    color: #3A0F14;
    text-decoration: underline;
}

#openLoginBtn {
    text-decoration: none;
    color: #1C080B;
}

/* ==========================================================================
   4. BACKGROUND IMAGE BANNER
   ========================================================================== */
.image-banner {
    background-image: url('img/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 650px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #FFF;
    font-size: 38px;
    position: relative;
    padding-top: 75px;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 4, 6, 0.5), rgba(58, 15, 20, 0.85));
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
}

.banner-content h1 {
    color: #F5D061;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.85);
    font-weight: 800;
    letter-spacing: 2px;
}

.banner-subtitle {
    margin-top: 15px;
    font-size: 18px;
    color: #F4E8D1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.85);
}

/* ==========================================================================
   5. PENCARIAN
   ========================================================================== */
.search-section-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
}

.search-container {
    width: 100%;
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 30px;
    background: rgba(15, 4, 6, 0.6);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.search-box-wrap {
    display: flex;
    gap: 12px;
}

.search-input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background-color: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

.search-input:focus {
    border-color: #F5D061;
}

.search-input::placeholder {
    color: #A09698;
}

.search-btn {
    background: linear-gradient(135deg, #F5D061 0%, #D4AF37 100%);
    color: #1C080B;
    border: none;
    border-radius: 6px;
    padding: 14px 30px;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.search-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* ==========================================================================
   6. MODAL / HALAMAN LOGIN KONSISTEN
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

.modal-content, .login-card {
    background-color: #20080B;
    color: #FFFDF9;
    padding: 35px;
    border-radius: 10px;
    border: 1px solid #D4AF37;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
    position: relative;
    box-sizing: border-box;
}

.modal-content h2, .login-card h2 {
    margin-top: 0;
    color: #F5D061;
    text-align: center;
    margin-bottom: 20px;
}

#loginForm, #formLogin {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    margin-bottom: 6px;
    font-size: 14px;
    color: #F5D061;
}

.form-group input {
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #D4AF37;
    background-color: #120A0F;
    color: #FFFDF9;
    font-size: 14px;
    outline: none;
}

.form-group input:focus {
    border-color: #F5D061;
}

.submit-btn {
    padding: 12px;
    background: linear-gradient(135deg, #F5D061 0%, #D4AF37 100%);
    color: #120A0B;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.3s;
    margin-top: 5px;
}

.submit-btn:hover {
    opacity: 0.9;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #F5D061;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #FFFDF9;
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    color: #F5D061;
    text-decoration: underline;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.footer-wrapper {
    width: 100%;
    max-width: 100vw;
    position: relative;
    margin-top: 70px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.footer-box-full {
    background: linear-gradient(135deg, #20080B 0%, #3A0F14 100%);
    color: #FFFDF9;
    width: 100%;
    padding: 50px 40px;
    border-top: 4px solid #D4AF37;
    border-bottom: 4px solid #D4AF37;
    box-sizing: border-box;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.4);
}

.footer-grid-bottom {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-column {
    flex: 1;
    min-width: 280px;
}

.footer-column h2 {
    margin-top: 0;
    font-size: 18px;
    text-transform: uppercase;
    color: #F5D061;
    border-bottom: 2px solid #D4AF37;
    padding-bottom: 8px;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.footer-column p, .footer-column li {
    font-size: 14px;
    line-height: 1.7;
    color: #F4E8D1;
}

.footer-list {
    padding-left: 20px;
    margin: 10px 0;
}

.footer-list li {
    margin-bottom: 6px;
}

.footer-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.footer-brand .brand1 {
    height: auto;
    width: 90px;
    margin: 0;
}
 
.footer-brand .brand2 {
    height: auto;
    width: 170px; 
    margin: 0;
}

/* ==========================================================================
   8. KOTAK DROPDOWN PROFIL (HOVER & CLICK MENU)
   ========================================================================== */
#authArea {
    display: inline-flex; 
    align-items: center;
}

.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-btn {
    background-color: #F5D061;
    color: #1C080B;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    user-select: none;
}

.profile-btn:hover {
    background-color: #D4AF37;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #20080B;
    min-width: 200px;
    border: 1px solid #D4AF37;
    border-radius: 6px;
    box-shadow: 0px 8px 20px rgba(0,0,0,0.6);
    z-index: 999;
    flex-direction: column;
    margin-top: 5px;
    overflow: hidden;
}

.profile-dropdown:hover .dropdown-content {
    display: flex;
}

.dropdown-content .user-email-info {
    color: #F5D061;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: bold;
    background-color: rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    word-break: break-all;
}

.dropdown-content a {
    color: #FFFDF9;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    transition: background 0.2s, color 0.2s;
}

.dropdown-content a:hover {
    background-color: #3A0F14;
    color: #F5D061;
}

.dropdown-content a#logoutBtn {
    color: #ff8080;
    border-bottom: none;
}

.dropdown-content a#logoutBtn:hover {
    background-color: rgba(255, 107, 107, 0.2);
    color: #ff4d4d;
}

.upload-nav-btn {
    color: #1C080B;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.upload-nav-btn:hover {
    background-color: rgba(28, 8, 11, 0.15);
    color: #3A0F14;
    text-decoration: underline;
}

.btn-detail-keren {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(245, 208, 97, 0.15) 0%, rgba(212, 175, 55, 0.25) 100%);
    color: #F5D061 !important;
    border: 1px solid #D4AF37;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-detail-keren:hover {
    background: linear-gradient(135deg, #F5D061 0%, #D4AF37 100%);
    color: #1C080B !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.4);
}

/* ==========================================================================
   9. ANIMASI MELAYANG (FLOATING)
   ========================================================================== */
@keyframes floatingBox {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}

img.budaya, .logo-container img, .footer-brand img {
    animation: floatingBox 3.5s ease-in-out infinite;
}

.info-card, 
.keunggulan-grid > div, 
.alur-section, 
.search-container {
    animation: floatingBox 4s ease-in-out infinite;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.info-card:nth-child(1) { animation-delay: 0s; }
.info-card:nth-child(2) { animation-delay: 0.8s; }
.info-card:nth-child(3) { animation-delay: 1.6s; }

.keunggulan-grid > div:nth-child(1) { animation-delay: 0.2s; }
.keunggulan-grid > div:nth-child(2) { animation-delay: 0.7s; }
.keunggulan-grid > div:nth-child(3) { animation-delay: 1.2s; }
.keunggulan-grid > div:nth-child(4) { animation-delay: 1.7s; }

.alur-section { animation-delay: 0.5s; }
.search-container { animation-delay: 1s; }

.info-card:hover, 
.keunggulan-grid > div:hover, 
.alur-section:hover, 
.search-container:hover {
    animation-play-state: paused;
    transform: translateY(-4px);
    border-color: #F5D061;
    box-shadow: 0 8px 25px rgba(245, 208, 97, 0.25);
}

/* ==========================================================================
   10. PENGATURAN RESPONSIF & NAVBAR KECIL KHUSUS LAYAR HP (MAX 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* Perkecil tinggi dan padding navbar agar hemat ruang di layar HP */
    .kotaklengket {
        height: auto !important;
        min-height: 52px !important;
        padding: 6px 10px !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 6px;
    }

    .nav-brand {
        gap: 6px !important;
    }

    .nav-brand img, .budaya {
        width: 28px !important;
        height: 34px !important;
    }

    .daerah {
        font-size: 13px !important;
        letter-spacing: 0.3px !important;
    }

    .nav-links {
        gap: 4px !important;
        flex-wrap: nowrap !important;
    }

    .kamus, .homepage, .about, .login, .login-nav-btn {
        font-size: 10px !important;
        padding: 4px 5px !important;
    }

    #authArea {
        margin-left: 2px !important;
    }

    .profile-btn {
        padding: 4px 8px !important;
        font-size: 10px !important;
        gap: 4px !important;
    }

    .dropdown-content {
        min-width: 170px !important;
        right: 0 !important;
    }

    /* Sesuaikan jarak atas body & banner karena navbar sudah diperkecil */
    body {
        padding-top: 55px !important;
    }

    .image-banner {
        min-height: 380px !important;
        padding-top: 60px !important;
    }

    .banner-content h1 {
        font-size: 28px !important;
        line-height: 1.25;
    }

    .banner-subtitle {
        font-size: 13px !important;
        padding: 0 15px;
    }

    /* Penyesuaian layout grid dan padding di HP */
    .search-section-wrapper, .keunggulan-section, .alur-section {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .search-box-wrap {
        flex-direction: column !important;
    }

    .search-btn {
        width: 100% !important;
    }

    .footer-box-full {
        padding: 35px 20px !important;
    }

    .footer-column {
        min-width: 100% !important;
    }
}