/* Gallery Styles */

.gallery-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    font-size: 18px;
    color: var(--text-light);
    line-height: 1.8;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

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

.gallery-caption {
    padding: 15px;
    background: var(--white);
}

.gallery-caption p {
    font-size: 14px;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.5;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    overflow: auto;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-content img {
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--border-radius);
}

.lightbox-caption {
    text-align: center;
    padding: 20px;
    color: var(--white);
    font-size: 16px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--white);
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10000;
    transition: var(--transition);
}

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

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    transition: var(--transition);
    z-index: 10000;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: #ccc;
    background: rgba(255, 255, 255, 0.1);
}

.lightbox-prev {
    left: 0;
}

.lightbox-next {
    right: 0;
}

/* Responsive Gallery */
@media (max-width: 968px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .lightbox-close {
        font-size: 40px;
        top: 10px;
        right: 20px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 10px;
    }
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-item img {
        height: 220px;
    }
    
    .lightbox-content {
        max-width: 95%;
    }
    
    .lightbox-caption {
        font-size: 14px;
        padding: 15px;
    }
}
