/* =========================================================
   StreamLine56 – AeroFluid56 Widget Styles
   ========================================================= */

/* Wrapper */
.sl56-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #080c14;
    min-height: 400px;
    border-radius: 8px;
    -webkit-font-smoothing: antialiased;
}

/* Canvas for streamlines */
.sl56-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    will-change: transform;
}

/* Grid */
.sl56-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(var(--sl56-cols, 3), 1fr);
    gap: 16px;
    padding: 24px;
}

@media (max-width: 768px) {
    .sl56-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .sl56-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 8px;
    }
}

/* Card */
.sl56-card {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    will-change: transform;
    transform-origin: center center;
    transition: box-shadow 0.3s ease;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.sl56-card:hover {
    box-shadow: 0 0 24px var(--sl56-neon1, #00f5ff), 0 0 6px var(--sl56-neon2, #ff00e5);
}

.sl56-card-inner {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.07);
}

.sl56-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    will-change: transform;
    transition: filter 0.4s ease;
}

.sl56-card:hover .sl56-img {
    filter: brightness(1.1) saturate(1.2);
}

/* Caption */
.sl56-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: #fff;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.04em;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.sl56-card:hover .sl56-caption {
    opacity: 1;
}

/* =========================================================
   LIGHTBOX
   ========================================================= */
.sl56-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.sl56-lightbox.sl56-lb-open {
    display: flex;
}

/* Backdrop */
.sl56-lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 20, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: sl56FadeIn 0.35s ease forwards;
}

/* Burst / brake effect */
.sl56-lb-burst {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center,
        rgba(0,245,255,0.18) 0%,
        rgba(255,0,229,0.10) 35%,
        transparent 70%
    );
    opacity: 0;
    animation: sl56Burst 0.7s ease forwards;
    z-index: 1;
}

/* Inner container */
.sl56-lb-inner {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: sl56SlideIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.sl56-lb-img {
    display: block;
    max-width: 85vw;
    max-height: 75vh;
    border-radius: 6px;
    box-shadow:
        0 0 40px rgba(0,245,255,0.35),
        0 0 80px rgba(255,0,229,0.2),
        0 20px 60px rgba(0,0,0,0.6);
    border: 1px solid rgba(0,245,255,0.3);
    object-fit: contain;
}

.sl56-lb-caption {
    color: rgba(255,255,255,0.7);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Close button */
.sl56-lb-close {
    position: absolute;
    top: -48px;
    right: 0;
    background: none;
    border: 1px solid rgba(0,245,255,0.4);
    color: #00f5ff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sl56-lb-close:hover {
    background: rgba(0,245,255,0.15);
    box-shadow: 0 0 12px rgba(0,245,255,0.5);
}

/* Prev / Next */
.sl56-lb-prev,
.sl56-lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(8,12,20,0.7);
    border: 1px solid rgba(0,245,255,0.3);
    color: #00f5ff;
    font-size: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, box-shadow 0.2s;
    z-index: 3;
}

.sl56-lb-prev { left: -60px; }
.sl56-lb-next { right: -60px; }

@media (max-width: 600px) {
    .sl56-lb-prev { left: -44px; }
    .sl56-lb-next { right: -44px; }
}

.sl56-lb-prev:hover,
.sl56-lb-next:hover {
    background: rgba(0,245,255,0.15);
    box-shadow: 0 0 12px rgba(0,245,255,0.5);
}

/* =========================================================
   KEYFRAMES
   ========================================================= */
@keyframes sl56FadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes sl56SlideIn {
    from { opacity: 0; transform: scale(0.88) translateY(24px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

@keyframes sl56Burst {
    0%   { opacity: 0;   transform: scale(0.4); }
    40%  { opacity: 1;   transform: scale(1.3); }
    100% { opacity: 0;   transform: scale(2);   }
}
