/* Optimized CSS for smooth, seamless gallery */
.gallery-section {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.gallery-track {
    display: flex;
    height: 100%;
    will-change: transform;
    /* ✅ Added for GPU acceleration */
}

.gallery-item {
    flex-shrink: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin-right: 2rem;
    transition: transform 0.3s ease;
    width: auto;
}

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

.image-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.gallery-image {
    height: 350px;
    width: auto;
    min-width: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}


@media screen and (max-width: 767px) {
    .gallery-image {
        height: 250px;
        width: auto;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    .potrait {
        min-width: 160px;
    }

}

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

.gallery-caption {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0.5rem;
}

.caption-link {
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    font-family: var(--ff-secondary);
    font-size: clamp(16px, 3vw, 18px);
    font-weight: 500;
    letter-spacing: normal;
    line-height: 1.5;
    color: var(--clr-secondary-orange);
}

.caption-link:hover {
    color: var(--clr-secondary-blue);
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.caption-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0.5rem;
    left: 50%;
    background: #333;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.caption-link:hover::after {
    width: calc(100% - 2rem);
}