/* Gallery Section Styles */
.gallery-section {
    padding: 80px 0;
    position: relative;
    background-color: transparent;
}

/* Gallery Header */
.gallery-header {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #1c4179 0%, #1c4179 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--font-heading, 'Poppins', sans-serif);
    line-height: 1.1;
}

.gallery-subtitle {
    font-size: 1.3rem;
    color: #6e7180;
    margin: 0;
    font-weight: 400;
    line-height: 1.6;
}


/* Gallery Carousel - Infinite Scroll */
.gallery-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

.gallery-carousel-track {
    display: flex;
    gap: 15px;
    animation: gallery-scroll 30s linear infinite;
    will-change: transform;
}

.gallery-carousel-track:hover {
    animation-play-state: paused;
}

.gallery-carousel-item {
    flex: 0 0 auto;
    width: 200px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-carousel-item:hover {
    transform: translateY(-5px);
}

@keyframes gallery-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-50% - 7.5px));
    }
}

/* Gallery Items - Grid Layout (for modal) */
.gallery-item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio (Square) */
    overflow: hidden;
    border-radius: 8px;
    background-color: #f0f0f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.gallery-image-wrapper:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-image-wrapper:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.gallery-image-wrapper:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: #ffffff;
    font-size: 1.5rem;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.gallery-image-wrapper:hover .gallery-overlay i {
    transform: scale(1);
}

/* Gallery Modal (Lightbox) */
.gallery-modal-content {
    background-color: rgba(0, 0, 0, 0.95);
    border: none;
    border-radius: 0;
}

/* Carousel transition duration */
#galleryLightboxCarousel.carousel {
    transition-duration: 0.6s;
}

#galleryLightboxCarousel .carousel-item {
    transition: transform 0.6s ease-in-out;
}

.gallery-modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
}

.gallery-modal-header .modal-title {
    color: #ffffff;
    font-weight: 600;
}

.gallery-modal-body {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
}

#galleryLightboxCarousel {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-lightbox-image {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 200px);
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.gallery-lightbox-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    padding: 2rem;
    text-align: center;
}

.gallery-lightbox-caption p {
    color: #ffffff;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 500;
}

.gallery-lightbox-control {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 0.7;
    transition: all 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-lightbox-control:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.3);
}

.gallery-lightbox-control .carousel-control-prev-icon,
.gallery-lightbox-control .carousel-control-next-icon {
    filter: invert(1);
    width: 24px;
    height: 24px;
}

/* Responsive */
@media (max-width: 991.98px) {
    .gallery-section {
        padding: 60px 0;
    }
    
    .gallery-header {
        margin-bottom: 40px;
    }
    
    .gallery-title {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
    
    .gallery-subtitle {
        font-size: 1.1rem;
    }
    
    .gallery-carousel-item {
        width: 180px;
    }
    
    .gallery-carousel-track {
        gap: 12px;
        animation-duration: 25s;
    }
    
    .gallery-image-wrapper {
        border-radius: 10px;
    }
    
    .gallery-carousel-control {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 768px) {
    .gallery-section {
        padding: 40px 0;
    }
    
    .gallery-header {
        margin-bottom: 30px;
    }
    
    .gallery-title {
        font-size: 2rem;
        letter-spacing: 1px;
        margin-bottom: 0.75rem;
    }
    
    .gallery-subtitle {
        font-size: 1rem;
    }
    
    .gallery-carousel-item {
        width: 150px;
    }
    
    .gallery-carousel-track {
        gap: 10px;
        animation-duration: 20s;
    }
    
    .gallery-carousel-wrapper {
        padding: 15px 0;
    }
    
    .gallery-image-wrapper {
        border-radius: 8px;
    }
    
    .gallery-overlay i {
        font-size: 1.5rem;
    }
    
    .gallery-lightbox-image {
        max-height: calc(100vh - 150px);
    }
    
    .gallery-lightbox-caption {
        padding: 1.5rem;
    }
    
    .gallery-lightbox-caption p {
        font-size: 1rem;
    }
    
    .gallery-lightbox-control {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 576px) {
    .gallery-carousel-item {
        width: 120px;
    }
    
    .gallery-carousel-track {
        gap: 8px;
        animation-duration: 18s;
    }
    
    .gallery-carousel-wrapper {
        padding: 10px 0;
    }
}

