/* ========================================
   MASONRY GALLERY
   ======================================== */

.gallery-section {
    padding: 60px 20px;
    background-color: var(--white);
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
}

.masonry-gallery {
    column-count: 3;
    column-gap: 20px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.gallery-item-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--white);
    padding: 20px 15px 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-caption {
    opacity: 1;
}

.gallery-item-caption h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--white);
}

.gallery-item-caption p {
    font-size: 14px;
    margin-bottom: 0;
    color: var(--white);
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

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

.lightbox-caption {
    color: var(--white);
    text-align: center;
    padding: 20px;
    font-size: 18px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: var(--white);
    cursor: pointer;
    z-index: 10000;
    background: none;
    border: none;
    padding: 10px;
    line-height: 1;
}

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

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: var(--white);
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 20px 15px;
    z-index: 10000;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .masonry-gallery {
        column-count: 2;
        column-gap: 15px;
    }

    .gallery-item {
        margin-bottom: 15px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 15px 10px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .masonry-gallery {
        column-count: 1;
    }
}
