/* =============================
   Reset & Global Style
============================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    font-family: sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #ececec;
}

/* =============================
   Gallery Container
============================= */
.gallery_container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.2rem;
    padding: 0.2rem;
}

.gallery_item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    text-align: center;
    border-radius: 8px;
    border: 1px solid var(--bs-primary); /* Warna border Bootstrap primary */
    /* box-shadow removed */
}

.gallery_item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s, filter 0.3s;
    border-radius: 6px;
}

.gallery_item:hover img {
    filter: brightness(0.6);
    transform: scale(1.1);
}

.gallery_item figcaption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: bold;
    opacity: 0;
    transition: 0.3s ease;
    font-size: 0.9rem;
}

.gallery_item:hover figcaption {
    opacity: 1;
}



/* =============================
   Lightbox
============================= */
.lightbox_container {
    display: none;
    position: fixed;
    z-index: 1055;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.lightbox_container.show {
    display: flex;
}

.lightbox_item {
    display: none;
    position: absolute;
    width: 80%;
    max-width: 900px;
    text-align: center;
}

.lightbox_item.show {
    display: block;
}

.lightbox_item img {
    max-width: 100%;
    max-height: 80vh;
    margin: auto;
    transition: all 0.3s ease;
}

.caption_lightbox {
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 1rem;
}

/* Close and Nav */
#close {
    color: white;
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2rem;
    cursor: pointer;
    z-index: 100;
}

#close:hover {
    opacity: 0.7;
}

.parent_navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 99;
    transform: translateY(-50%);
}

#ripple {
    font-size: 2rem;
    color: white;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50%;
    transition: background 0.3s;
}

#ripple:hover {
    background: rgba(255, 255, 255, 0.3);
}

figure {
    margin: 0 !important;
}

.caption .btn {
    pointer-events: auto;
}
/* =============================
   Responsive
============================= */
@media (max-width: 768px) {
    .gallery_container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .gallery_item img {
        height: 140px;
    }

    .caption_lightbox {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery_item img {
        height: 120px;
    }

    .gallery_item figcaption {
        font-size: 0.7rem;
    }

    .caption_lightbox {
        font-size: 0.9rem;
    }
}
