/**
 * Custom Gallery Styles for HC Home Services Theme
 */

/* Gallery grid styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    padding: 10px;
}

@media (min-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 32px;
    }
}

.gallery-item {
    transition: all 0.3s ease;
    margin-bottom: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

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

/* Aspect ratio container */
.aspect-w-4 {
    position: relative;
    padding-bottom: 75%; /* 4:3 Aspect Ratio */
}

.aspect-w-4 > img {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    object-fit: cover;
}

/* Modal styles */
#gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

#gallery-modal.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

#gallery-modal:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* Swiper gallery styles */
.gallery-swiper .swiper-button-next,
.gallery-swiper .swiper-button-prev {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-swiper .swiper-button-next:after,
.gallery-swiper .swiper-button-prev:after {
    font-size: 24px;
}

.gallery-swiper .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.7;
}

.gallery-swiper .swiper-pagination-bullet-active {
    opacity: 1;
}
