/* =========================
   GLOBAL
========================= */
body {
    margin: 0;
    padding-top: 90px; /* supaya ga ketutup navbar */
}

/* =========================
   WRAPPER FULL WIDTH
========================= */
.gallery-page,
.gallery-detail-page {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    background: #fff;
}

/* =========================
   TITLE
========================= */
.gallery-title,
.gallery-detail-title {
    text-align: center;
    font-size: 20px;
    letter-spacing: 2px;
    margin-bottom: 60px;
    font-weight: 500;
}

/* =========================
   GRID (AUTO RESPONSIVE ðŸ”¥)
========================= */
.gallery-page {
    padding: 40px 40px 80px;
}

.gallery-grid {
    display: grid; /* ðŸ”¥ INI YANG HILANG */
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
}

.gallery-item img {
    width: 100%;
    height: 480px;
    object-fit: cover;
}
/* =========================
   ITEM
========================= */
.gallery-item {
    text-decoration: none;
    color: #000;
    display: block;
    position: relative;
    transition: 0.3s;
}

.gallery-item .image {
    overflow: hidden;
    position: relative;
}

/* IMAGE */
.gallery-item img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    transition: 0.4s ease;
}

/* HOVER */
.gallery-item:hover img {
    transform: scale(1.05);
}

/* OVERLAY */
.gallery-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    text-align: center;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    color: #fff;
    font-size: 12px;
    letter-spacing: 1px;
    opacity: 0;
    transition: 0.3s;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

/* TITLE */
.gallery-item p {
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
    letter-spacing: 1px;
}

/* =========================
   DETAIL GRID
========================= */
.gallery-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-detail-grid .item {
    overflow: hidden;
    position: relative;
}
.video-thumb{
    position: relative;
}
.gallery-detail-grid img{
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}

/* 🔥 pindahkan ratio ke container */
.video-thumb{
    width:100%;
    aspect-ratio:3/4;
    position:relative;
    overflow:hidden;
}

.video-thumb video{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    object-fit:cover;
}
.play-btn{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%, -50%);
    
    background:rgba(0,0,0,0.5);
    color:#fff;
    font-size:24px;
    
    width:60px;
    height:60px;
    
    display:flex;
    align-items:center;
    justify-content:center;
    
    border-radius:50%;
}

/* =========================
   LIGHTBOX
========================= */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
}
#lightbox video {
    max-width: 80%;
    max-height: 80%;
    border-radius: 8px;
}
/* =========================
   TABLET
========================= */
@media (max-width: 1024px){
    .gallery-item img {
        height: 300px;
    }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px){

    body {
        padding-top: 70px;
    }

    .gallery-page {
        padding: 20px 15px 50px;
    }

    .gallery-title {
        font-size: 16px;
        margin-bottom: 30px;
    }

    /* ðŸ”¥ INI KUNCI */
    .gallery-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 kolom */
        gap: 15px;
    }

    /* ðŸ”¥ PROPORSI GAMBAR */
    .gallery-item img {
        height: 200px;
    }

    /* TEXT */
    .gallery-item p {
        font-size: 11px;
        margin-top: 8px;
    }
}

/* =========================
   FORCE NAVBAR TOP
========================= */
.navbar,
.navbar-custom,
header {
    position: fixed !important;
    top: 0;
    width: 100%;
    z-index: 999999 !important;
}
@media (max-width:768px){

    .gallery-detail-grid{
        grid-template-columns: repeat(2, 1fr);
        gap:10px;
    }

    /* 🔥 override semua (img + video) */
    .gallery-detail-grid img,
    .gallery-detail-grid .video-thumb,
    .gallery-detail-grid .video-thumb video{
        aspect-ratio: 1/1 !important;
    }

}

