/* Gallery */
.gallery-section {
    padding-bottom: 80px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    height: 250px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.gallery-overlay {
    position: absolute;
    pointer-events: auto;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.lightbox.is-open {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: -1;
}

.lightbox-inner {
    position: relative;
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    margin-bottom: 15px;
    padding: 0 10px;
}

.lightbox-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.lightbox-counter {
    font-size: 1rem;
    color: #ccc;
}

.lightbox-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.lightbox-content {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease;
    z-index: 2002;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

.lightbox-prev,
.lightbox-next {
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    padding: 0 20px;
    transition: color 0.3s ease;
    user-select: none;
    z-index: 2001;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {

    .lightbox-prev,
    .lightbox-next {
        position: absolute;
        bottom: -60px;
        font-size: 2.5rem;
    }

    .lightbox-prev {
        left: 20px;
    }

    .lightbox-next {
        right: 20px;
    }

    .lightbox-header {
        flex-direction: column;
        gap: 5px;
    }

    .lightbox-title {
        font-size: 1.2rem;
    }
}