/* Galeria Mansory - IPDSA Core */

.ipdsa-gallery-mansory {
    --columns: 3;
    --gap: 10px;

    display: grid;
    grid-template-columns: repeat(var(--columns), 1fr);
    gap: var(--gap);
    margin: 20px 0;
}

.ipdsa-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f0f0f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ipdsa-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.ipdsa-gallery-link {
    display: block;
    position: relative;
    overflow: hidden;
}

.ipdsa-gallery-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ipdsa-gallery-item:hover .ipdsa-gallery-image {
    transform: scale(1.1);
}

.ipdsa-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 93, 134, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ipdsa-gallery-item:hover .ipdsa-gallery-overlay {
    opacity: 1;
}

.ipdsa-gallery-zoom {
    font-size: 48px;
    color: white;
}

/* Responsividade */
@media (max-width: 1024px) {
    .ipdsa-gallery-mansory {
        --columns: 2;
    }
}

@media (max-width: 768px) {
    .ipdsa-gallery-mansory {
        --columns: 1;
    }

    .ipdsa-gallery-image {
        height: 200px;
    }
}

/* Lightbox simples */
.ipdsa-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.ipdsa-lightbox.active {
    display: flex;
}

.ipdsa-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.ipdsa-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    display: block;
}

.ipdsa-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f89b1e;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000000;
    transition: transform 0.2s ease;
}

.ipdsa-lightbox-close:hover {
    transform: scale(1.1);
    background: #e08a0d;
}

.ipdsa-lightbox-prev,
.ipdsa-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(248, 155, 30, 0.8);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ipdsa-lightbox-prev {
    left: 20px;
}

.ipdsa-lightbox-next {
    right: 20px;
}

.ipdsa-lightbox-prev:hover,
.ipdsa-lightbox-next:hover {
    background: rgba(248, 155, 30, 1);
}

/* Post Gallery Wrapper */
.ipdsa-post-gallery-wrapper {
    margin: 40px 0;
    padding: 30px 0;
    border-top: 2px solid #005d86;
}

.ipdsa-post-gallery-wrapper h3 {
    color: #005d86;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 700;
}
