* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: url("/images/hero-bg-light.webp") no-repeat center center fixed;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

.button-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 120px;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.card.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: none !important;
}

.card-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: 20px;
    color: white;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.card-subtitle {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 400;
    color: black;
}

.category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Custom Magnific Popup Styling */
.mfp-with-zoom .mfp-container,
.mfp-with-zoom.mfp-bg {
    opacity: 0;
    transition: all 0.4s ease-out;
}

.mfp-with-zoom.mfp-ready .mfp-container {
    opacity: 1;
}

.mfp-with-zoom.mfp-ready.mfp-bg {
    opacity: 0.9;
}

.mfp-image-holder .mfp-close,
.mfp-iframe-holder .mfp-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    opacity: 0.8;
    transition: 0.3s ease;
}

.mfp-image-holder .mfp-close:hover,
.mfp-iframe-holder .mfp-close:hover {
    opacity: 1;
    color: #fff;
}

/* Penempatan tombol X */
.mfp-close {
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1050;
    cursor: pointer;
    font-size: 24px;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Agar gambar tidak terlalu kecil */
.mfp-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.mfp-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2040;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 1;
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .button-container {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }

    body {
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .button-container {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }

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

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 6px;
    position: relative;
    z-index: 10; /* pastikan tidak ketutup elemen lain */
}

.pagination nav {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    position: relative;
    z-index: 10;
}

.pagination ul {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    display: inline-block;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #009241;
    color: #333;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #fff;
    color: #009241; /* kontras, jangan putih di atas putih */
    border-color: #009241;
}

.pagination span[aria-current="page"] {
    background: #fff;              
    color: #009241;                
    border: 2px solid #009241;     
    font-weight: 700;              
    box-shadow: 0 0 6px rgba(0, 146, 65, 0.2); 
}


.pagination .disabled span {
    background: rgba(255, 255, 255, 0.5);
    color: #aaa;
    cursor: not-allowed;
    border: 1px solid #ddd;
}
