/* Optimized CSS for smooth, seamless gallery */
.gallery-section {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    min-height: 100dvh;
    gap: 4rem;
}


.gallery-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;

}


.featured-header {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #fff 0%, #fdfaf7 100%);
    text-align: center;
    position: relative;
}

.featured-container {
    max-width: 900px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease, transform 1s ease;
}

.featured-container.in-view {
    opacity: 1;
    transform: translateY(0);
}

.featured-divider {
    width: 50%;
    height: 8px;
    background: linear-gradient(90deg, var(--clr-primary-orange), var(--clr-neutral-blue), var(--clr-primary-blue));
    margin: 15px auto 25px;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 122, 0, 0.3);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

.featured-container.in-view .featured-divider {
    transform: scaleX(1);
    opacity: 1;
    animation: pulse 2.5s ease-in-out infinite 1.2s;
}

.featured-subtitle {
    font-family: var(--font-mono);
    max-width: 100%;
    margin: 0 auto;
    padding: 0.50rem;
}

.featured-title {
    font-family: var(--font-display);
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 122, 0, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 122, 0, 0.6);
    }
}



.gallery-track {
    display: flex;
    height: 100%;
    will-change: transform;
    contain: layout style paint;
    /* ✅ Added for GPU acceleration and layout isolation */
}

.gallery-item {
    flex-shrink: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-right: 2rem;
    transition: transform 0.3s ease;
    width: auto;
    content-visibility: auto;
    contain-intrinsic-size: auto 350px;
}

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

.gallery-item:hover .image-container {
    border-color: rgba(255, 122, 0, 0.2);
    outline-color: rgba(207, 4, 4, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.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);
    border: 2px solid transparent;
    outline: 1px solid transparent;
    transition: border-color 0.3s ease, outline-color 0.3s ease, box-shadow 0.3s ease;
}

.gallery-image {
    height: 300px;
    width: auto;
    min-width: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
    transform: translateZ(0);
    /* ✅ GPU acceleration for image transforms */
}


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



}

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

.gallery-caption {
    display: flex;
    flex-direction: column;
    padding: 1rem 0.5rem;

}

.caption-link {
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-family: var(--font-display);
    font-size: var(--font-size-h4);
    letter-spacing: normal;
    line-height: 1.5;
    color: var(--clr-secondary-orange);
}

.caption-link:hover {
    color: var(--clr-secondary-blue);
    background: rgba(207, 4, 4, 0.05);
    transform: translateY(-1px);
    width: fit-content;
    padding: 0.3rem;
}

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

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

.title {
    font-size: var(--font-size-hero);
    text-align: center;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
    margin-bottom: 3rem;
    color: var(--clr-primary-orange);
    font-family: var(--ff-primary);
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    z-index: 1;
}