/**
 * VCN Sequence Gallery CSS
 */

.vcn-sequence-gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    perspective: 1000px;
    /* 3D Action Grid Perspective */
}

.sequence-item {
    position: relative;
    width: 300px;
    height: 200px;
    cursor: pointer;
    border-radius: 20px;
    /* Apple Bento Style */
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

    /* 3D and Reveal base states */
    transform-style: preserve-3d;
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    /* Dual transitions: slow reveal vs fast 3D tilt */
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.1s ease-out,
        box-shadow 0.1s ease-out;
}

/* IntersectionObserver Target State */
.sequence-item.is-revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
    /* JS mousemove will override this later */
}

/* Removed static hover scale as JS handles the dynamic 3D scale now */
.sequence-item.is-active {
    z-index: 10;
    /* Pop out when frozen and clicked */
}

.sequence-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.sequence-item:hover img {
    opacity: 1;
}

.play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #333;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Lightbox Base */
.sequence-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.lightbox-close:hover {
    color: #ccc;
}

/* Loading Screen */
.sequence-loading {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-family: 'Helvetica', Arial, sans-serif;
}

.sequence-loading .spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Image Container & Navigation */
.lightbox-image-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

#lightbox-main-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    user-select: none;
}

.seq-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 5;
}

.seq-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* Speed Controls */
.vcn-speed-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 12px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 20;
}

.vcn-speed-controls button {
    background: transparent;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Helvetica', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vcn-speed-controls button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.vcn-speed-controls button.active {
    background: var(--color-cta, #F9C537);
    /* Vereins-Gelb CTA */
    color: #111;
}