﻿/* Gallery grid */

.gallery-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 70px;
    font-weight: 600;
    color: #111;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    align-items: start;
}

@media (max-width:1000px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width:600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    background: #ddd;
    height:550px;
}

    .gallery-item img, .gallery-item video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .35s ease;
    }

    .gallery-item:hover img, .gallery-item:hover video {
        transform: scale(1.05);
    }

    /* small IG badge on thumbnail (top-right) */
    .gallery-item .thumb-ig {
        position: absolute;
        bottom: 10px;
        left: 10px;
        background: rgba(0,0,0,0.5);
        color: #fff;
        padding: 8px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        z-index: 5;
        transition: background .2s;
    }

        .gallery-item .thumb-ig:hover {
            background: rgba(0,0,0,0.75);
        }

    /* Play icon for videos */
    .gallery-item .thumb-play {
        position: absolute;
        top: 12px;
        right: 12px;
        background: rgba(0,0,0,0.6);
        color: #fff;
        padding: 8px 10px;
        border-radius: 999px;
        font-size: 14px;
    }

/* ===== Lightbox overlay & modal ===== */
.lg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.lg-modal {
    width: 100%;
    max-width: 1200px;
    height: 75vh;
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    background: transparent;
}

/* Left media area (black) */
.lg-media {
    flex: 2;
    background: #0b0b0b;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}

    .lg-media img, .lg-media video {
        max-width: 100%;
        max-height: 100%;
        box-shadow: none;
        border-radius: 4px;
    }

/* Right caption area (white) */
.lg-side {
    flex: 1;
    background: #fff;
    padding: 28px;
    overflow: auto;
    box-sizing: border-box;
}

    .lg-side .meta {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 12px;
    }

        .lg-side .meta .counter {
            color: #666;
            font-size: 13px;
        }

        .lg-side .meta .ig-link {
            text-decoration: none;
            color: #999;
            font-size: 13px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

    .lg-side h3 {
        margin: 0 0 12px 0;
        font-size: 18px;
        color: #111;
    }

    .lg-side p {
        color: #333;
        line-height: 1.6;
        font-size: 15px;
        white-space: pre-wrap;
    }
    /* preserve newlines */
    .lg-side .open-inst {
        margin-top: 18px;
        display: inline-block;
/*        background: #efefef;
        color: #222;*/
        padding: 10px 12px;
        border-radius: 6px;
        text-decoration: none;
        font-weight: 600;
    }

/* Close & arrows */
.lg-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
    color: #fff;
    font-size: 26px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.lg-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
}

    .lg-arrow:hover {
        background: rgba(0,0,0,0.65);
    }

.lg-prev {
    left: 20px;
}

.lg-next {
    right: 20px;
}

/* small dot / page indicator inside side panel (optional) */
.lg-side .caption-scroll {
    max-height: calc(75vh - 120px);
    overflow: auto;
    padding-right: 6px;
}

/* Responsive: stack panels on small screens */
@media (max-width:900px) {
    .lg-modal {
        flex-direction: column;
        height: 85vh;
        max-width: 940px;
    }

    .lg-media {
        flex: unset;
        height: 56%;
        padding: 12px;
    }

    .lg-side {
        flex: unset;
        height: 44%;
        padding: 16px;
    }

        .lg-side .caption-scroll {
            max-height: calc(44vh - 120px);
        }

    .lg-arrow {
        display: none;
    }
    /* hide large side arrows on small screens (optional) */
}
