/* Gallery Carousel Section */

.gallery-section {
    width: 100%;
    padding: 60px 0;
    background-color: #f8f9fa;
}

.gallery-section h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.gallery-underline {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #2E3192, #2E3192);
    margin: 0 auto 50px;
    display: block;
}

/* Gallery Carousel Container */
.gallery-carousel {
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
    width: 96%;
    margin: 0 auto;
}

.gallery-track {
    display: flex;
    gap: 30px;
    animation: scrollGallery 30s linear infinite;
    will-change: transform;
}

.gallery-track:hover {
    animation-play-state: paused;
}

@keyframes scrollGallery {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100% - 30px));
    }
}

/* Gallery Item */
.gallery-item {
    flex: 0 0 calc(20% - 24px);
    min-width: 200px;
    background: white;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; ;
    overflow: hidden;
    min-height: 300px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.gallery-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    max-height: 280px !important;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.gallery-item h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 15px 0 10px;
    padding: 0 15px;
}

.gallery-item p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
    padding: 0 15px 15px;
    display: -webkit-box;
    -webkit-line-clamp: 1; 
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Gallery Grid Fallback */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-section {
        padding: 40px 0;
    }

    .gallery-section h2 {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .gallery-track .gallery-item {
        flex: 0 0 calc(50% - 15px);
        min-width: 200px;
        min-height: 240px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-bottom: 30px;
    }

    .gallery-item {
        min-height: 240px;
    }

    .gallery-item img {
        max-height: 120px;
    }

    .gallery-item h3 {
        font-size: 16px;
    }

    .gallery-item p {
        font-size: 13px;
    }

    .gallery-underline {
        margin: 0 auto 30px;
    }
}

@media (max-width: 480px) {
    .gallery-section {
        /* padding: 30px 0; */
    }

    .gallery-section h2 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .gallery-track .gallery-item {
        flex: 0 0 100%;
        min-width: 100%;
        min-height: 116px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gallery-item {
        min-height: 160px;
        /* padding: 12px; */
    }

    .gallery-item img {
        max-height: 200px;
    }

    .gallery-item h3,
    .gallery-item p {
        display: none;
    }

    .gallery-underline {
        margin: 0 auto 20px;
    }
}

/* Lightbox Gallery Link */
a[data-lightbox] {
    cursor: zoom-in;
}

a[data-lightbox]:hover {
    opacity: 0.9;
}
