/* GRID GENERAL */
.sg-gallery {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sg-item {
    overflow: hidden;
    border-radius: 8px;
    cursor: zoom-in;
}

.sg-item img {
    width: 100%;
    height: auto;
    transition: transform .4s ease;
}

.sg-item:hover img {
    transform: scale(1.06);
}

/* GRID (tipo portafolio) */
.sg-grid .sg-item {
    flex: 1 1 calc(33.333% - 12px);
}

@media(max-width: 800px) {
    .sg-grid .sg-item {
        flex: 1 1 calc(50% - 12px);
    }
}

@media(max-width: 500px) {
    .sg-grid .sg-item {
        flex: 1 1 100%;
    }
}

/* MASONRY */
.sg-masonry {
    column-count: 3;
    column-gap: 12px;
}

.sg-masonry .sg-item {
    break-inside: avoid;
    margin-bottom: 12px;
}

/* Responsivo masonry */
@media(max-width: 800px) { .sg-masonry { column-count: 2; } }
@media(max-width: 500px) { .sg-masonry { column-count: 1; } }

/* SLIDER (carrusel) */
.sg-slider {
    position: relative;
    overflow: hidden;
}

.sg-slider .sg-item {
    min-width: 100%;
    flex: none;
}

.sg-slider-track {
    display: flex;
    transition: transform .5s ease;
}

/* Botones slider */
.sg-slider-prev,
.sg-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #0007;
    color: #fff;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    user-select: none;
}

.sg-slider-prev { left: 10px; }
.sg-slider-next { right: 10px; }

/* LIGHTBOX fondo */
.sg-lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.sg-lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}
