/* ==========================================================================
   Galeri Dokumentasi - Satu Ruang UNTAN Style
   ========================================================================== */

.gallery-layout2 {
    position: relative;
    background: #f8fafc;
}

.gallery-card {
    position: relative;
    height: 260px;
    border-radius: 16px;
    overflow: hidden;
    background: #001f4d;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 4px 14px rgba(0, 45, 98, 0.06);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-6px);
    border-color: rgba(11, 87, 164, 0.4);
    box-shadow: 0 16px 32px -6px rgba(11, 87, 164, 0.2);
}

.gallery-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover .gallery-card-img {
    transform: scale(1.08);
}

/* Lightbox trigger overlay button */
.gallery-card .gallery-popup-trigger {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 31, 77, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    z-index: 10;
    text-decoration: none !important;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover .gallery-popup-trigger {
    opacity: 1;
}

.gallery-popup-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f59e0b;
    color: #001f4d;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.1rem;
    line-height: 1 !important;
    text-align: center !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    transform: scale(0.85);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, color 0.2s ease;
}

.gallery-popup-icon i {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    vertical-align: 0 !important;
    text-align: center !important;
}

.gallery-card:hover .gallery-popup-icon {
    transform: scale(1);
}

.gallery-card .gallery-popup-trigger:hover .gallery-popup-icon {
    background: #ffffff;
    color: #0b57a4;
    transform: scale(1.1);
}

/* Bottom Title Banner */
.gallery-card-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 14px 12px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 31, 77, 0.92) 100%);
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.gallery-card-title {
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* CRITICAL: Strictly hide supporting lightbox images so they never disrupt layout */
.gallery-card a.popup-gallery-hidden-link,
a.popup-gallery-hidden-link,
.popup-gallery-hidden-link {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Pagination Satu Ruang */
.pagination-saturuang .pagination {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-saturuang .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.88rem;
    box-shadow: 0 2px 6px rgba(0, 45, 98, 0.04);
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pagination-saturuang .page-item:not(.active):not(.disabled) .page-link:hover {
    background-color: #eff6ff;
    border-color: #93c5fd;
    color: #0b57a4;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(11, 87, 164, 0.12);
}

.pagination-saturuang .page-item.active .page-link {
    background: #002d62 !important;
    border-color: #002d62 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 45, 98, 0.3);
}

.pagination-saturuang .page-item.disabled .page-link {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

@media (max-width: 767.98px) {
    .gallery-card {
        height: 220px;
        border-radius: 14px;
    }

    .gallery-popup-icon {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .gallery-card-title {
        font-size: 12px;
    }
}

