/* Interactive Gallery Styles */
.ig-gallery-wrapper {
    width: 100%;
    margin: 20px 0;
}

.ig-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.ig-filter-btn {
    padding: 10px 20px;
    background: #f0f0f0;
    border: 2px solid transparent;
    border-radius: var(--ig-border-radius, 8px);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #333;
}

.ig-filter-btn:hover {
    background: var(--ig-primary-color, #0073aa);
    color: #fff;
    transform: translateY(-2px);
}

.ig-filter-btn.active {
    background: var(--ig-primary-color, #0073aa);
    color: #fff;
    border-color: var(--ig-primary-color, #0073aa);
}

.ig-gallery-grid {
    display: grid;
    grid-template-columns: repeat(var(--ig-columns, 3), 1fr);
    gap: var(--ig-spacing, 10px);
    width: 100%;
}

.ig-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--ig-border-radius, 8px);
    aspect-ratio: 1;
    opacity: 1;
    transition: opacity var(--ig-animation-speed, 300ms) ease;
}

.ig-gallery-item.hidden {
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.ig-gallery-item-inner {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: var(--ig-border-radius, 8px);
}

.ig-gallery-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.ig-gallery-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--ig-animation-speed, 300ms) ease, filter var(--ig-animation-speed, 300ms) ease;
    display: block;
}

.ig-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    padding: 20px 15px 15px;
    transform: translateY(100%);
    transition: transform var(--ig-animation-speed, 300ms) ease;
    font-size: 14px;
}

/* Hover Effects */
.ig-gallery-item:hover .ig-gallery-link img {
    transform: scale(1.1);
}

.ig-gallery-item:hover .ig-gallery-caption {
    transform: translateY(0);
}

/* Hover Effect Variations */
.ig-gallery-wrapper[data-hover-effect="fade"] .ig-gallery-item:hover .ig-gallery-link img {
    transform: scale(1);
    opacity: 0.8;
}

.ig-gallery-wrapper[data-hover-effect="slide"] .ig-gallery-item:hover .ig-gallery-link img {
    transform: translateY(-10px) scale(1.05);
}

.ig-gallery-wrapper[data-hover-effect="blur"] .ig-gallery-item:hover .ig-gallery-link img {
    transform: scale(1.1);
    filter: blur(2px);
}

.ig-gallery-wrapper[data-hover-effect="blur"] .ig-gallery-item:hover .ig-gallery-caption {
    filter: blur(0);
}

.ig-gallery-wrapper[data-hover-effect="none"] .ig-gallery-item:hover .ig-gallery-link img {
    transform: none;
}

/* Lightbox Styles */
.ig-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn var(--ig-animation-speed, 300ms) ease;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0 80px;
    box-sizing: border-box;
}

.ig-lightbox.active {
    display: flex;
}

.ig-lightbox-content {
    position: relative;
    max-width: calc(100% - 160px);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: zoomIn var(--ig-animation-speed, 300ms) ease;
    flex: 1;
}

.ig-lightbox-content img {
    max-width: 100%;
    max-height: calc(100vh - 100px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--ig-border-radius, 8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.ig-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    z-index: 10000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
}

.ig-lightbox-close:hover {
    transform: rotate(90deg);
    background: rgba(255, 255, 255, 0.2);
}

.ig-lightbox-nav {
    position: relative;
    color: #fff;
    font-size: 48px;
    font-weight: bold;
    cursor: pointer;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    transition: all 0.3s ease;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 60px;
    flex-shrink: 0;
    margin: 0 10px;
}

.ig-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.ig-lightbox-nav:active {
    transform: scale(0.95);
}

.ig-lightbox-prev {
    order: 1;
}

.ig-lightbox-content {
    order: 2;
}

.ig-lightbox-next {
    order: 3;
}

.ig-lightbox-title {
    margin-top: 20px;
    color: #fff;
    text-align: center;
    font-size: 16px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    max-width: 100%;
    word-wrap: break-word;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .ig-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .ig-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ig-filter-buttons {
        gap: 8px;
    }
    
    .ig-filter-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .ig-lightbox {
        padding: 0 50px;
    }
    
    .ig-lightbox-content {
        max-width: calc(100% - 100px);
    }
    
    .ig-lightbox-nav {
        font-size: 36px;
        padding: 10px 15px;
        min-width: 50px;
        height: 50px;
        margin: 0 5px;
    }
    
    .ig-lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 28px;
    }
    
    .ig-lightbox-content img {
        max-height: calc(100vh - 120px);
    }
}

@media (max-width: 480px) {
    .ig-gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .ig-lightbox {
        padding: 0 40px;
        flex-direction: column;
    }
    
    .ig-lightbox-nav {
        position: absolute;
        font-size: 32px;
        padding: 8px 12px;
        min-width: 45px;
        height: 45px;
        margin: 0;
    }
    
    .ig-lightbox-prev {
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .ig-lightbox-next {
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .ig-lightbox-content {
        max-width: 100%;
        order: 2;
    }
    
    .ig-lightbox-content img {
        max-height: calc(100vh - 150px);
    }
    
    .ig-lightbox-title {
        font-size: 14px;
        padding: 8px 15px;
    }
}

