/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #eee;

    position: relative;

    z-index: 9999;
}

.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    color: #7a5a3a;
    margin: 0;
    font-size: 24px;
}

.logo img {
    width: 50px;
    margin-right: 10px;
}

nav a {
    margin-left: 20px;
    text-decoration: none;
    color: rgb(122, 90, 58);
    font-weight: bold;
}

/* Responsive Navbar (mobile) */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgb(122, 90, 58);
    font-size: 22px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.3s;
}

.nav-item {
    text-decoration: none;
    color: rgb(122, 90, 58);
    font-weight: bold;
    margin-left: 0 !important;
    transition: 0.2s;
}

.nav-item:focus {
    outline: none;
}

.nav-item:hover {
    background: rgba(0,0,0,0.05);
}

.dropdown-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgb(122, 90, 58);
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    font-family: inherit;
    font-size: 16px;
}

@media (max-width: 768px) {
    .nav-toggle {
        margin-left: 6px;
    }

    .navbar {
        padding: 12px 16px;
    }

    nav a {
        margin-left: 10px;
    }

    .dropdown-content {
        min-width: 200px;
    }

    .nav-links {
        top: 64px;
    }

    .nav-toggle {
        display: inline-flex;

        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
    }

    .nav-links {
        position: absolute;
        top: 70px;
        right: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;

        background: #eee;
        padding: 12px;
        border-radius: 12px;

        display: none;
        width: min(240px, calc(100vw - 32px));
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-item {
        width: 100%;
        padding: 10px 12px;
        border-radius: 10px;
    }

    .dropdown {
        width: 100%;
    }

    .dropdown-content {
        position: static;
        display: none;
        width: 100%;
        box-shadow: none;
        background: transparent;
        padding: 0;
        margin-top: 6px;
        border-radius: 0;
    }

    .dropdown.open .dropdown-content {
        display: block;
    }

    .dropdown-content a {
        background: #f0f0f0;
        margin: 6px 0 0;
        border-radius: 10px;
    }
}


/* DROPDOWN PROFIL */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #eee;
    min-width: 220px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-radius: 10px;
    padding: 10px;
    z-index: 10;
}

.dropdown-content a {
    display: block;
    margin: 0;
    padding: 10px 12px;
    color: rgb(122, 90, 58);
    font-weight: bold;
    border-radius: 8px;
}

.dropdown-content a:hover {
    background: #ffd54f;
}

.dropdown:hover .dropdown-content {
    display: block;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #f5f5f5;
}

/* =========================
   GALLERY SECTION
========================= */

.gallery-section {
    padding: 70px 40px;
}

/* Judul */
.gallery-title {
    text-align: center;
    margin-bottom: 50px;
}

.gallery-title h1 {
    font-size: 42px;
    color: #7a5a3a;
    margin-bottom: 10px;
}

.gallery-title p {
    color: gray;
}

/* =========================
   CONTAINER
========================= */

.gallery-container {
    display: grid;

    grid-template-columns: repeat(5, 1fr);

    gap: 20px;
}

/* =========================
   CARD
========================= */

.gallery-card {
    background: white;

    border-radius: 18px;

    overflow: hidden;

    box-shadow: 0 5px 15px rgba(0,0,0,0.08);

    transition: 0.3s;

    cursor: pointer;
}

/* Hover */
.gallery-card:hover {
    transform: translateY(-10px);
}

/* Gambar */
.gallery-card img {
    width: 100%;
    height: 180px;

    object-fit: cover;

    transition: 0.3s;
}

/* Hover gambar */
.gallery-card:hover img {
    transform: scale(1.05);

    filter: brightness(70%);
}

/* Info */
.gallery-info {
    padding: 15px;
}

.gallery-info h3 {
    margin: 0;
    color: #7a5a3a;
    text-align: center;
}

.gallery-info p {
    margin-top: 8px;
    color: gray;
    font-size: 14px;
    text-align: center;
}

/* =========================
   POPUP
========================= */

.gallery-popup {
    display: none;

    position: fixed;

    z-index: 999;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.8);

    justify-content: center;
    align-items: center;
}

/* Aktif */
.gallery-popup.active {
    display: flex;
}

/* Box */
.popup-content {
    width: 80%;
    height: 90%;
    max-width: 1000px;

    background: white;

    border-radius: 25px;

    display: flex;

    overflow: hidden;

    position: relative;

    animation: popup 0.3s;
}

/* Animasi */
@keyframes popup {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Tombol close */
.close-popup {
    position: absolute;

    top: 15px;
    right: 25px;

    font-size: 40px;

    cursor: pointer;

    color: #555;
}

/* Kiri */
.popup-image {
    width: 45%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 25px;
    box-sizing: border-box;
}

.popup-image img {
    width: 100%;
    height: auto;
    max-height: 520px;

    object-fit: contain; /* biar gak kepotong */
    border-radius: 18px;
    background: #f5f5f5;
}


/* Kanan */
.popup-text {
    width: 55%;

    padding: 40px;

    text-align: left;
}

.popup-text h2 {
    color: #7a5a3a;
    margin-bottom: 10px;
}

.popup-date {
    color: gray;
    margin-bottom: 25px;
}

.popup-desc {
    line-height: 1.8;
    color: #444;

    /* Biar deskripsi nggak makan kotak terlalu banyak */
    max-height: 230px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;

    /* JANGAN pake text-overflow agar tidak terlihat "kepotong" */
    white-space: normal;
    word-break: break-word;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1200px) {

    .gallery-container {
        grid-template-columns: repeat(4, 1fr);
    }

}

@media (max-width: 900px) {

    .gallery-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .popup-content {
        flex-direction: column;
    }

    .popup-image,
    .popup-text {
        width: 100%;
    }

}

@media (max-width: 800px) {

    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 500px) {

    .gallery-container {
        grid-template-columns: 1fr;
        gap: 14px;
    }

}

@media (max-width: 768px) {

    .gallery-section {
        padding: 55px 18px;
    }

    .gallery-title h1 {
        font-size: 32px;
    }
}

