/**
 * Laisner Gallery - CSS
 * Fixed version - images visible from start
 */

/* ===================== */
/* MARQUEE GALLERY       */
/* ===================== */

.laisner-gallery-wrapper {
    position: relative;
    width: 100%;
    margin: 20px 0;
    overflow: hidden;
}

.marquee-gallery-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    background: #1a1a2e;
    border-radius: 12px 12px 0 0;
    padding: 15px 0;
}

.marquee-gallery-track {
    display: flex;
    width: max-content;
    animation: mg-scroll 30s linear infinite;
    animation-duration: var(--mg-speed, 30s);
}

/* Speed up on hover */
.marquee-gallery-track:hover {
    animation-duration: calc(var(--mg-speed, 30s) / 3);
}

.marquee-gallery-content {
    display: flex;
    flex-shrink: 0;
}

.marquee-gallery-item {
    flex-shrink: 0;
    height: var(--mg-height, 150px);
    margin: 0 calc(var(--mg-gap, 10px) / 2);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.marquee-gallery-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.marquee-gallery-item img {
    height: 100%;
    width: auto;
    display: block;
    border-radius: 8px;
}

/* Animation - starts at 0 so images are visible immediately */
@keyframes mg-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Navigation bar */
.lg-slider-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #16213e;
}

.lg-slider-label {
    font-size: 16px;
}

.lg-slider-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
}

.lg-slider-progress {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    width: 0%;
    pointer-events: none;
}

.lg-slider-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: grab;
    pointer-events: none;
}

.lg-slider-counter {
    color: #fff;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 15px;
    min-width: 60px;
    text-align: center;
}

/* Thumbnails - clickable to scroll gallery */
.lg-thumbs-strip {
    display: flex;
    gap: 8px;
    padding: 12px 15px;
    overflow-x: auto;
    background: #0f0f23;
    border-radius: 0 0 12px 12px;
}

.lg-thumbs-strip::-webkit-scrollbar {
    height: 4px;
}

.lg-thumbs-strip::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 2px;
}

.lg-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.lg-thumb:hover {
    opacity: 1;
    transform: scale(1.1);
}

.lg-thumb.active {
    opacity: 1;
    border-color: #667eea;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.5);
}

.lg-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===================== */
/* FLYER SLIDER          */
/* ===================== */

.lg-flyer-wrapper {
    max-width: 900px;
    margin: 20px auto;
}

.lg-flyer-container {
    position: relative;
    height: var(--lgf-height, 500px);
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
}

.lg-flyer-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.lg-flyer-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.lg-flyer-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.lg-flyer-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Arrows */
.lg-flyer-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 32px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lg-flyer-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.lg-flyer-prev {
    left: 15px;
}

.lg-flyer-next {
    right: 15px;
}

/* Dots */
.lg-flyer-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 15px;
}

.lg-flyer-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #667eea;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.lg-flyer-dot:hover,
.lg-flyer-dot.active {
    background: #667eea;
    transform: scale(1.3);
}

.lg-flyer-counter {
    text-align: center;
    color: #667eea;
    font-weight: bold;
    font-size: 16px;
}

/* ===================== */
/* LIGHTBOX              */
/* ===================== */

.mg-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

.mg-lightbox.active {
    display: flex;
}

.mg-lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
}

.mg-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.mg-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mg-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lg-error {
    color: #e74c3c;
    text-align: center;
    padding: 20px;
    background: #fdf2f2;
    border-radius: 8px;
}

.lg-nav-dots {
    display: none;
}

/* ===================== */
/* RESPONSIVE            */
/* ===================== */

@media (max-width: 768px) {
    .marquee-gallery-container {
        border-radius: 0;
    }

    .lg-thumbs-strip {
        border-radius: 0;
    }

    .lg-thumb {
        width: 50px;
        height: 50px;
    }

    .lg-flyer-container {
        border-radius: 0;
    }

    .lg-flyer-arrow {
        width: 45px;
        height: 45px;
        font-size: 26px;
    }

    .lg-flyer-prev {
        left: 10px;
    }

    .lg-flyer-next {
        right: 10px;
    }

    .mg-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
}