/* ===== HORIZONTAL SCROLL - FINAL OPTIMIZED VERSION ===== */

.image-grid-section .image-box,
.static-grid-section .image-box,
.image-grid .image-box,
.image-box.slide-left {
    animation: none !important;
    transition: none !important;
    will-change: auto !important;
}

/* Disable slide-left keyframe animation completely */
@keyframes slide-left {
    from, to {
        opacity: 1 !important;
        transform: translate3d(0, 0, 0) !important;
    }
}

.image-grid-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 20px;
    scroll-snap-align: start;
}

.image-grid-wrapper {
    position: relative;
    width: 100%;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-behavior: auto !important;
    cursor: grab;
    padding: 20px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(32, 178, 170, 0.5) rgba(0, 0, 0, 0.2);
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
}

.image-grid-wrapper::-webkit-scrollbar {
    height: 8px;
}

.image-grid-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.image-grid-wrapper::-webkit-scrollbar-thumb {
    background: rgba(32, 178, 170, 0.5);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.image-grid-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(32, 178, 170, 0.8);
}

.image-grid-wrapper:active {
    cursor: grabbing;
}

.static-grid {
    display: flex;
    gap: 20px;
    padding: 0 10px;
    width: max-content;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
}

/* CRITICAL: Override ALL image-box styles */
.image-grid-section .image-box,
.static-grid-section .image-box,
.image-grid .image-box {
    flex-shrink: 0;
    width: 300px !important;
    height: 400px !important;
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    border: 3px solid rgba(32, 178, 170, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin: 0 !important;
    /* NO transitions or animations */
    transition: none !important;
    animation: none !important;
    /* GPU acceleration */
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* Prevent dimming */
    opacity: 1 !important;
    filter: brightness(1) !important;
    -webkit-filter: brightness(1) !important;
}

/* ONLY hover when NOT scrolling */
.image-grid-wrapper:not(.scrolling) .image-box:hover {
    transform: scale(1.05) translate3d(0, 0, 0) !important;
    box-shadow: 0 15px 40px rgba(32, 178, 170, 0.6) !important;
    border-color: rgba(32, 178, 170, 0.8) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
}

/* Force disable slide-left on images */
.image-grid .image-box.slide-left,
.static-grid .image-box.slide-left {
    animation: none !important;
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .image-grid-section .image-box,
    .static-grid-section .image-box,
    .image-grid .image-box {
        width: 250px !important;
        height: 350px !important;
    }
}

@media (max-width: 480px) {
    .image-grid-section .image-box,
    .static-grid-section .image-box,
    .image-grid .image-box {
        width: 200px !important;
        height: 300px !important;
    }
}