/* Masonry Grid */
.masonry {
    column-count: 1;
    column-gap: 1.5rem;
}

@media (min-width: 768px) {
    .masonry {
        column-count: 2;
    }
}

@media (min-width: 992px) {
    .masonry {
        column-count: 3;
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.masonry-item img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    max-height: 500px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.masonry-item:hover img {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
    border-radius: 12px;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 98, 204, 0.5); /* semi-transparent blue */
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 15px;
    border-radius: 12px;
}

.overlay-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

/* On hover */
.masonry-item:hover .image-overlay {
    opacity: 1;
}

.masonry-item:hover .overlay-title {
    opacity: 1;
    transform: translateY(0);
}

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;

    /* Transisi smooth */
    opacity: 0;
    visibility: hidden;
    transform: scale(0.98);
    transition: all 0.3s ease-in-out;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Lightbox Content - Vertical Layout */
.lightbox-content {
    display: flex;
    flex-direction: column;
    background: #1f2937; /* Dark slate (custom primary color) */
    border-radius: 10px;
    overflow: hidden;
    max-width: 720px;
    width: 100%;
    color: white;
}

/* Lightbox Image */
.lightbox-image {
    width: 100%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image img {
    max-width: 100%;
    max-height: 90vh;
    height: auto;
    width: auto;
    display: block;
    margin: 0 auto;
}

.lightbox-image img.portrait {
    height: 70vh;
    width: 100%;
    max-width: none;
}

/* Lightbox Info Section */
.lightbox-info {
    padding: 20px;
    background: var(--primary-color); /* Slightly darker for contrast */
}

.lightbox-info h2 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.lightbox-info p {
    font-size: 1rem;
    line-height: 1.6;
    color: #e5e7eb; /* Light gray */
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: 25px;
    right: 35px;
    font-size: 32px;
    color: #fff;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-close:hover {
    color: #ff6b6b;
}
