/* === GAMERIYA - Pure Disintegrating Image Gallery (Aceternity UI Style) === */
.disintegrating-gallery-section {
    position: relative;
    width: 100%;
    padding: 20px 0 40px 0;
    overflow: hidden;
    /* Calm, modern ambient background matching the light theme seamlessly */
    background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(2, 132, 199, 0.04) 0%, rgba(248, 250, 252, 0.6) 65%, transparent 100%);
    user-select: none;
    -webkit-user-select: none;
}

/* Full-width scrollable container with soft left & right edge dissolving masks */
.disintegrating-gallery-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    cursor: -webkit-grab;
    padding: 10px 0;
    mask-image: linear-gradient(to right, transparent 0%, black 70px, black calc(100% - 70px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 70px, black calc(100% - 70px), transparent 100%);
}

.disintegrating-gallery-container.is-dragging {
    cursor: grabbing;
    cursor: -webkit-grabbing;
    scroll-behavior: auto;
}

.disintegrating-gallery-container::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Row of pure image cards */
.disintegrating-gallery-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 22px;
    padding: 30px 80px; /* Generous space for particles to fly outside without clipping */
    width: max-content;
}

/* Individual Card Wrap */
.disintegrate-item-wrap {
    position: relative;
    width: 225px;
    height: 380px;
    flex: 0 0 225px;
    cursor: pointer;
    border-radius: 16px;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
    user-select: none;
    -webkit-user-select: none;
    will-change: transform;
    display: block;
    text-decoration: none;
    color: inherit;
}

.disintegrate-item-wrap:hover {
    transform: translateY(-10px) scale(1.03);
    z-index: 10;
}

/* Frame holding image and particle canvas */
.disintegrate-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: visible; /* Allows canvas particles to scatter freely beyond the frame */
    box-shadow: 0 14px 34px -8px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.06);
    background: #0f172a;
    transition: box-shadow 0.35s ease;
}

.disintegrate-item-wrap:hover .disintegrate-frame {
    box-shadow: 0 22px 45px -10px rgba(2, 132, 199, 0.28), 0 8px 18px rgba(15, 23, 42, 0.1);
}

.disintegrate-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    pointer-events: none;
    transition: filter 0.3s ease;
}

/* Particle Canvas Overlay */
.disintegrate-canvas {
    position: absolute;
    top: -55px;
    left: -55px;
    width: calc(100% + 110px);
    height: calc(100% + 110px);
    pointer-events: none;
    z-index: 2;
}

/* Floating Frosted Glass Arrow Navigation Buttons */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.05);
    color: #0f172a;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0.95;
}

.gallery-nav-btn:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 12px 30px -4px rgba(2, 132, 199, 0.3);
    color: #0284c7;
}

.gallery-nav-btn:active {
    transform: translateY(-50%) scale(0.94);
}

.gallery-nav-prev {
    left: 24px;
}

.gallery-nav-next {
    right: 24px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .disintegrating-gallery-container {
        mask-image: linear-gradient(to right, transparent 0%, black 40px, black calc(100% - 40px), transparent 100%);
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40px, black calc(100% - 40px), transparent 100%);
    }

    .disintegrating-gallery-row {
        gap: 16px;
        padding: 20px 40px;
    }

    .disintegrate-item-wrap {
        width: 190px;
        height: 320px;
        flex: 0 0 190px;
    }

    .gallery-nav-btn {
        width: 42px;
        height: 42px;
        font-size: 15px;
    }

    .gallery-nav-prev {
        left: 12px;
    }

    .gallery-nav-next {
        right: 12px;
    }
}

@media (max-width: 600px) {
    .gallery-nav-btn {
        display: none; /* Mobile users swipe naturally */
    }

    .disintegrating-gallery-row {
        padding: 15px 24px;
        gap: 14px;
    }

    .disintegrate-item-wrap {
        width: 165px;
        height: 280px;
        flex: 0 0 165px;
    }
}
