/* === Grid === */
.ig-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
}

/* === Item === */
.ig-item {
    overflow: hidden;
    position: relative;
}

.ig-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.ig-item--link {
    display: block;
    cursor: pointer;
    text-decoration: none;
}

/* === Hover effects === */
.ig-hover--zoom .ig-item:hover img {
    transform: scale(1.08);
}

.ig-hover--opacity .ig-item:hover img {
    opacity: 0.7;
}

/* === Lightbox === */
.ig-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.ig-lightbox.is-open {
    display: flex;
}

.ig-lightbox__content {
    max-width: 90vw;
    max-height: 90vh;
}

.ig-lightbox__content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    display: block;
    margin: auto;
}

.ig-lightbox__close,
.ig-lightbox__prev,
.ig-lightbox__next {
    position: absolute;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 2;
    padding: 8px;
    transition: opacity 0.2s;
}

.ig-lightbox__close:hover,
.ig-lightbox__prev:hover,
.ig-lightbox__next:hover {
    opacity: 0.7;
}

.ig-lightbox__close {
    top: 20px;
    right: 20px;
    font-size: 36px;
    line-height: 1;
}

.ig-lightbox__prev,
.ig-lightbox__next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.ig-lightbox__prev {
    left: 20px;
}

.ig-lightbox__next {
    right: 20px;
}
