/* Gallery Block Styles */
.gallery-block {
    width: 100%;
}

/* Content Section */
.gallery-content {
    padding: 64px 0 80px 0;
}

.gallery-header {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-heading {
    font-family: var(--h2-font-family);
    font-size: var(--h2-font-size);
    margin-bottom: 20px;
    color: var(--black);
}

.gallery-paragraph {
    font-size: 18px;
    color: var(--dark-slate-gray);
    max-width: 600px;
    margin: 0 auto;
}

.gallery-header {
    text-align: center;
    margin-bottom: 48px;
}

.gallery-heading {
    font-family: var(--h2-font-family);
    font-size: var(--h2-font-size);
    margin-bottom: 20px;
    color: var(--black);
}

.gallery-paragraph {
    font-size: 18px;
    color: var(--dark-slate-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin-bottom: 20px;
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 0px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

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

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.gallery-image.lazy {
    opacity: 0;
}

.gallery-image:not(.lazy) {
    opacity: 1;
}

/* Video Styles */
.gallery-video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-overlay i {
    color: white;
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.gallery-video-container:hover .video-overlay {
    opacity: 0;
}

/* Load More Button */
.gallery-load-more {
    text-align: center;
}

.gallery-load-more .button {
    padding: 15px 30px;
    font-size: 16px;
    background-color: var(--dark-green);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.gallery-load-more .button:hover {
    background-color: var(--dark-slate-gray);
}

/* Lightbox */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 10000;
}

.lightbox-media {
    transition: opacity 0.3s ease;
}

.lightbox-media img,
.lightbox-media video {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: var(--black);
    font-size: 24px;
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: white;
}

.lightbox-close {
    top: 10px;
    right: 10px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1px;
    }
    
    .gallery-content {
        padding: 60px 0;
    }
    
    .gallery-header {
        margin-bottom: 40px;
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        padding: 40px 0;
    }
    
    .gallery-hero-text {
        font-size: 2rem;
    }
    
    .gallery-content {
        padding: 40px 0;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1px;
        margin-bottom: 40px;
    }
    
    .gallery-header {
        margin-bottom: 30px;
    }
    
    .gallery-heading {
        font-size: 1.8rem;
    }
    
    .gallery-paragraph {
        font-size: 16px;
    }
    
    /* Mobile lightbox adjustments */
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    /* Video overlay for mobile */
    .video-overlay {
        opacity: 1;
        pointer-events: auto;
    }
    
    .gallery-video-container:hover .video-overlay {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .gallery-hero {
        padding: 30px 0;
    }
    
    .gallery-hero-text {
        font-size: 1.8rem;
    }
    
    .gallery-content {
        padding: 30px 0;
    }
    
    .gallery-heading {
        font-size: 1.5rem;
    }
    
    .gallery-paragraph {
        font-size: 14px;
    }
    
    .gallery-load-more .button {
        padding: 12px 24px;
        font-size: 14px;
    }
}