/* Gallery Page Styles */

/* Gallery Hero Section */
.gallery-hero {
    background: url('../images/gallery/Hero/Wikremasingha family (1).png');
    background-size: cover;
    background-position: center;
}

/* Section backgrounds */
.gallery-section-light {
    background-color: #ffffff;
}

/* Full width section content for intro */
.section-content.full-width {
    flex: 1 1 100%;
    max-width: 100%;
    text-align: center;
    padding: 0 50px;
}

/* Main gallery container */
.gallery-container {
    padding: 0 50px 50px;
}

/* Photo gallery grid */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Gallery item styling */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    margin-bottom: 0;
    cursor: pointer;
    aspect-ratio: 1/1; /* Square aspect ratio */
    width: 100%;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

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

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

.gallery-item figcaption {
    display: none;
}

/* Overlay styling */
.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

/* For non-touch devices (desktop) - use hover */
@media (hover: hover) and (pointer: fine) {
    .gallery-item:hover .overlay {
        opacity: 1;
    }
}

/* For touch devices - use active class that will be toggled with JS */
.gallery-item.active .overlay {
    opacity: 1;
}

/* Description styling */
.gallery-item .description {
    text-align: center;
    padding: 15px;
}

.gallery-item .description h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    font-weight: 600;
    color: #fff;
}

.gallery-item .description p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

/* PhotoSwipe caption styling */
.pswp__caption__center {
    max-width: 600px;
    text-align: center;
    font-size: 16px;
    padding: 15px 20px;
    color: #fff;
}

.pswp__caption__center h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: bold;
}

.pswp__caption__center p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* PhotoSwipe UI Controls */
.pswp__button--arrow--left,
.pswp__button--arrow--right {
    background-color: rgba(0, 0, 0, 0.3) !important;
    width: 44px !important;
    height: 44px !important;
    position: absolute !important;
    top: 50% !important;
    margin-top: -22px !important;
    border-radius: 50%;
}

.pswp__top-bar {
    background-color: rgba(0, 0, 0, 0.3) !important;
    position: absolute;
    left: 0;
    top: 0;
    height: 44px;
    width: 100%;
}

.pswp__button--close {
    opacity: 1 !important;
    background-position: 0 -44px;
}

/* Responsive styles */
@media (max-width: 960px) {
    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-container {
        padding: 0 30px 40px;
    }
    
    .section-content.full-width {
        padding: 0 30px;
    }
}

@media (max-width: 600px) {
    .photo-gallery {
        grid-template-columns: 1fr;
        grid-gap: 15px;
    }
    
    .gallery-container {
        padding: 0 20px 30px;
    }
    
    .section-content.full-width {
        padding: 0 20px;
    }
    
    .gallery-item .description h3 {
        font-size: 1.1rem;
    }
    
    .gallery-item .description p {
        font-size: 0.85rem;
    }
}
