/* Modern Gallery Styles */

/* Featured Image Styles */
.featured-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.featured-image-container:hover {
    transform: translateY(-5px);
}

.featured-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-image-container:hover .featured-image {
    transform: scale(1.05);
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    padding: 2rem 1.5rem;
    color: white;
    transition: all 0.3s ease;
}

.featured-image-container:hover .featured-overlay {
    padding-bottom: 2.5rem;
}

/* Gallery Grid Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    height: 500px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

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

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-icon {
    color: white;
    font-size: 2rem;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease 0.1s;
}

.gallery-item:hover .gallery-icon {
    transform: translateY(0);
    opacity: 1;
}

.more-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.25rem;
}

/* Modal Gallery Styles */
.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.modal-close:hover {
    background-color: rgba(255, 123, 0, 0.8);
    transform: rotate(90deg);
}

.gallery-swiper {
    width: 100%;
    height: 70vh;
    margin-bottom: 1rem;
}

.gallery-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-swiper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-thumbs {
    width: 100%;
    height: 100px;
}

.gallery-thumbs .swiper-slide {
    opacity: 0.4;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    box-shadow: 0 0 0 2px #ff7b00;
}

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

.swiper-button-next,
.swiper-button-prev {
    color: white !important;
    background-color: rgba(0, 0, 0, 0.5);
    width: 3rem !important;
    height: 3rem !important;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: rgba(255, 123, 0, 0.8);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 1.5rem !important;
}

.swiper-pagination-bullet {
    background: white !important;
    opacity: 0.5 !important;
}

.swiper-pagination-bullet-active {
    background: #ff7b00 !important;
    opacity: 1 !important;
}

/* Animation for modal slides */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-modal.active .swiper-slide-active {
    animation: fadeInScale 0.5s ease forwards;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-grid {
        height: auto;
    }
    
    .gallery-item {
        aspect-ratio: 1/1;
    }
    
    .featured-image {
        height: 350px;
    }
    
    .gallery-swiper {
        height: 50vh;
    }
    
    .gallery-thumbs {
        height: 70px;
    }
}