/**
 * Laisner Gallery - CSS
 * Fixed mobile display + frame styles
 */

/* ===================== */
/* MARQUEE GALLERY       */
/* ===================== */

.laisner-gallery-wrapper {
    position: relative;
    width: 100%;
    margin: 20px auto;
    overflow: hidden;
    direction: ltr !important;
}

.marquee-gallery-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px 12px 0 0;
    padding: 15px 0;
    direction: ltr !important;
    user-select: none;
    -webkit-user-select: none;
}

.marquee-gallery-track {
    display: flex;
    flex-wrap: nowrap;
    animation: mg-scroll var(--mg-speed, 30s) linear infinite;
    will-change: transform;
}

/* Speed up on hover */
.marquee-gallery-container:hover .marquee-gallery-track {
    animation-duration: calc(var(--mg-speed, 30s) / 3);
}

.marquee-gallery-content {
    display: flex;
    flex-wrap: nowrap;
    flex-shrink: 0;
    padding: 0 5px;
}

.marquee-gallery-item {
    flex-shrink: 0;
    height: var(--mg-height, 150px);
    margin-left: var(--mg-gap, 15px);
    border-radius: 10px;
    overflow: hidden;
    cursor: grab;
    transition: transform 0.3s ease;
}

.marquee-gallery-item:first-child {
    margin-left: 0;
}

.marquee-gallery-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.marquee-gallery-item img {
    height: 100%;
    width: auto;
    display: block;
    border-radius: 10px;
}

/* FRAME STYLES */
.lg-frame-glow .marquee-gallery-item {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5), 0 5px 15px rgba(0, 0, 0, 0.3);
}

.lg-frame-shadow .marquee-gallery-item {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.lg-frame-border .marquee-gallery-item {
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.lg-frame-none .marquee-gallery-item {
    box-shadow: none;
}

@keyframes mg-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Navigation */
.lg-slider-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #16213e;
    direction: ltr !important;
}

.lg-slider-label {
    font-size: 16px;
}

.lg-slider-track {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.lg-slider-progress {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    width: 0%;
}

.lg-slider-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.lg-slider-counter {
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 15px;
    min-width: 50px;
    text-align: center;
}

/* Thumbnails - BIGGER */
.lg-thumbs-strip {
    display: flex;
    gap: 12px;
    padding: 15px;
    overflow-x: auto;
    background: var(--lg-nav-bg, #0f0f23);
    border-radius: 0 0 12px 12px;
    direction: ltr !important;
}

.lg-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.lg-thumb:hover {
    opacity: 0.9;
    transform: scale(1.08);
}

.lg-thumb.active {
    opacity: 1;
    border-color: var(--lg-accent, #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 {
    margin: 20px auto;
    direction: ltr !important;
}

.lg-flyer-container {
    position: relative;
    height: var(--lgf-height, 400px);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    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;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    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: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lg-flyer-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 26px;
    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.25);
}

.lg-flyer-prev {
    left: 10px;
}

.lg-flyer-next {
    right: 10px;
}

.lg-flyer-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px;
}

.lg-flyer-dot {
    width: 12px;
    height: 12px;
    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.2);
}

.lg-flyer-counter {
    text-align: center;
    color: #667eea;
    font-weight: bold;
    font-size: 14px;
}

/* ===================== */
/* 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;
    direction: ltr !important;
}

.mg-lightbox.active {
    display: flex;
}

.mg-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    animation: lightbox-zoom 0.3s ease;
}

@keyframes lightbox-zoom {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.mg-lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.mg-lightbox-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 40px;
    height: 40px;
    background: #e74c3c;
    border: 3px solid #fff;
    color: white;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.mg-lightbox-close:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.lg-error {
    color: #e74c3c;
    text-align: center;
    padding: 20px;
    background: #fdf2f2;
    border-radius: 8px;
}

.lg-nav-dots {
    display: none;
}

/* ===================== */
/* RESPONSIVE - TABLET   */
/* ===================== */

@media (max-width: 768px) {
    .laisner-gallery-wrapper {
        margin: 10px auto;
    }

    .marquee-gallery-container {
        border-radius: 8px 8px 0 0;
        padding: 10px 0;
    }

    .marquee-gallery-item {
        margin-left: 8px;
        height: var(--mg-height, 120px) !important;
    }

    .lg-slider-nav {
        padding: 6px 8px;
        gap: 6px;
    }

    .lg-slider-label {
        font-size: 12px;
    }

    .lg-slider-counter {
        font-size: 10px;
        min-width: 40px;
        padding: 3px 6px;
    }

    .lg-thumbs-strip {
        border-radius: 0 0 8px 8px;
        padding: 8px;
        gap: 5px;
    }

    .lg-thumb {
        width: 40px;
        height: 40px;
    }

    .lg-flyer-wrapper {
        margin: 10px auto;
    }

    .lg-flyer-container {
        border-radius: 8px;
        height: var(--lgf-height, 300px) !important;
    }

    .lg-flyer-arrow {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .lg-flyer-prev {
        left: 5px;
    }

    .lg-flyer-next {
        right: 5px;
    }

    .lg-flyer-dots {
        padding: 8px;
        gap: 6px;
    }

    .lg-flyer-dot {
        width: 10px;
        height: 10px;
    }

    .mg-lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
        position: fixed;
    }
}

/* ===================== */
/* RESPONSIVE - MOBILE   */
/* ===================== */

@media (max-width: 480px) {
    .marquee-gallery-container {
        padding: 8px 0;
        border-radius: 0;
    }

    .marquee-gallery-item {
        margin-left: 5px;
        height: 120px !important;
    }

    .lg-slider-nav {
        display: none;
    }

    .lg-thumbs-strip {
        border-radius: 0;
        padding: 8px;
    }

    .lg-thumb {
        width: 50px;
        height: 50px;
    }

    /* FLYER - BIGGER ON MOBILE */
    .lg-flyer-container {
        border-radius: 0;
        height: 400px !important;
        min-height: 350px;
    }

    .lg-flyer-slide {
        padding: 10px;
    }

    .lg-flyer-slide img {
        max-height: 95%;
    }

    .lg-flyer-arrow {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .mg-lightbox-content {
        max-width: 95vw;
        max-height: 80vh;
    }

    .mg-lightbox-close {
        top: 5px;
        right: 5px;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}