:root {
    --corp-primary: #0f172a;
    --corp-accent: #2563eb;
    --corp-bg-card: #ffffff;
    --corp-text: #334155;
    --corp-border: #e2e8f0;
}

.corporate-gallery-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.activity-group {
    background: var(--corp-bg-card);
    border: 1px solid var(--corp-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--corp-border);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.activity-title {
    margin: 0;
    font-size: 1.35rem;
    color: var(--corp-primary);
    font-weight: 700;
}

.activity-date {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

/* Susunan 3 Foto Sebaris & Berada di Tengah (Center) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    justify-content: center;
    align-items: center;
}

/* Responsif untuk Skrin Kecil / Telefon */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

.gallery-item {
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #f8fafc;
    border: 1px solid var(--corp-border);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.img-container {
    position: relative;
    width: 100%;
    padding-top: 66.66%; /* Nisbah Kad 3:2 yang Seimbang */
    overflow: hidden;
}

.img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease;
}

.img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zoom-icon {
    font-size: 1.75rem;
    color: #ffffff;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

.gallery-item:hover .img-overlay {
    opacity: 1;
}

/* POP-UP LIGHTBOX MODAL (Disorok secara Lalai) */
.gallery-modal {
    display: none !important;
    position: fixed;
    z-index: 999999;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.gallery-modal.show {
    display: flex !important;
}

.modal-content-wrapper {
    max-width: 850px;
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-image-container {
    width: 100%;
    max-height: 70vh;
    background-color: #020617;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-image {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.modal-caption {
    padding: 1.25rem 1.5rem;
    font-size: 1.05rem;
    color: var(--corp-primary);
    text-align: center;
    background: #ffffff;
    font-weight: 500;
    border-top: 1px solid var(--corp-border);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000000;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.modal-close:hover {
    color: #f87171;
}