/* Gallery Page Specific Styles */
.section {
    padding-left: 32px;
    padding-right: 32px;
}


.photo-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-row {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.gallery-item-image {
    flex: 1;
    max-width: 500px;
    min-width: 250px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    cursor: pointer;
}

.gallery-item-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.gallery-item-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.gallery-item-image.small {
    max-width: 200px;
    min-width: 150px;
}

.gallery-item-image.small img {
    height: 150px;
}

/* First row - 2 images */
.gallery-row:nth-child(1) .gallery-item-image {
    flex: 1;
    max-width: 600px;
}

.gallery-row:nth-child(1) .gallery-item-image img {
    height: 300px;
}

/* Second row - 3 images */
.gallery-row:nth-child(2) .gallery-item-image {
    flex: 1;
    max-width: 400px;
}

.gallery-row:nth-child(2) .gallery-item-image img {
    height: 280px;
}

/* Third row - 3 images */
.gallery-row:nth-child(3) .gallery-item-image {
    flex: 1;
    max-width: 400px;
}

.gallery-row:nth-child(3) .gallery-item-image img {
    height: 280px;
}

/* Fourth row - 2 images */
.gallery-row:nth-child(4) .gallery-item-image {
    flex: 1;
    max-width: 500px;
}

.gallery-row:nth-child(4) .gallery-item-image img {
    height: 300px;
}

/* Fifth row - 4 small images */
.gallery-row:nth-child(5) {
    justify-content: space-between;
}

.gallery-row:nth-child(5) .gallery-item-image {
    flex: 0 1 22%;
    max-width: 250px;
    min-width: 180px;
}

.gallery-row:nth-child(5) .gallery-item-image img {
    height: 180px;
}

/* Gallery Caption */
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item-image:hover .gallery-caption {
    opacity: 1;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: -10px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(0,0,0,0.8);
}

.lightbox-caption {
    color: white;
    margin-top: 1rem;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive adjustments for gallery page */
@media (max-width: 768px) {
    .section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .gallery-row {
        flex-direction: column;
        align-items: center;
    }
    
    .gallery-item-image {
        max-width: 100%;
        min-width: 100%;
    }
    
    .gallery-row:nth-child(5) .gallery-item-image {
        flex: 1;
        max-width: 100%;
        min-width: 100%;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .lightbox-close {
        top: -30px;
        right: -5px;
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
}