
.iga-gallery {
    display: grid;
    gap: 20px;
    margin: 30px 0;
}

.iga-gallery.iga-col-2 { grid-template-columns: repeat(2, 1fr); }
.iga-gallery.iga-col-3 { grid-template-columns: repeat(3, 1fr); }
.iga-gallery.iga-col-4 { grid-template-columns: repeat(4, 1fr); }
.iga-gallery.iga-col-6 { grid-template-columns: repeat(6, 1fr); }

.iga-link {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s;
}

.iga-link img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.iga-link:hover img {
    transform: scale(1.05);
}

.iga-galleries {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.iga-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.iga-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.iga-card-img {
    position: relative;
    display: block;
    overflow: hidden;
    height: 200px;
    text-decoration: none;
}

.iga-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.iga-card:hover .iga-card-img img {
    transform: scale(1.1);
}

.iga-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.iga-card:hover .iga-overlay {
    opacity: 1;
}

.iga-count {
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.iga-card-content {
    padding: 20px;
}

.iga-card h3 {
    margin: 0;
    font-size: 18px;
}

.iga-card a {
    color: inherit;
    text-decoration: none;
}

.iga-card a:hover {
    color: #2271b1;
}

/* MODAL */
.iga-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.iga-modal-overlay.active {
    display: flex;
    animation: igaFadeIn 0.3s ease;
}

.iga-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 60px rgba(0,0,0,0.3);
    z-index: 9999999;
}

.iga-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.iga-modal-header h2 {
    margin: 0;
    font-size: 24px;
}

.iga-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iga-modal-close:hover {
    color: #000;
    background: #f0f0f0;
    border-radius: 50%;
}

.iga-modal > .iga-gallery {
    padding: 30px 20px;
    margin: 0;
}

.iga-modal-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    background: #f9f9f9;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.iga-btn-back {
    background: #2271b1;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.iga-btn-back:hover {
    background: #1d5aa0;
}

/* LIGHTBOX */
.iga-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    display: none;
    z-index: 99999999;
    align-items: center;
    justify-content: center;
}

.iga-lightbox-overlay.active {
    display: flex;
    animation: igaLightboxFadeIn 0.3s ease;
}

.iga-lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    z-index: 99999999;
}

.iga-lightbox-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.iga-lightbox-image img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

.iga-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000000;
    transition: background 0.3s;
}

.iga-lightbox-close:hover {
    background: rgba(255,255,255,0.4);
}

.iga-lightbox-prev,
.iga-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    width: 60px;
    height: 60px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000000;
    transition: background 0.3s;
}

.iga-lightbox-prev:hover,
.iga-lightbox-next:hover {
    background: rgba(255,255,255,0.4);
}

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

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

.iga-lightbox-caption {
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

@keyframes igaFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes igaLightboxFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .iga-gallery.iga-col-3,
    .iga-gallery.iga-col-4,
    .iga-gallery.iga-col-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    .iga-galleries {
        grid-template-columns: 1fr;
    }

    .iga-modal {
        width: 95%;
        max-height: 95vh;
    }

    .iga-modal-header h2 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .iga-gallery {
        grid-template-columns: 1fr !important;
    }
}
