/* Gallery Container */
.cigp-gallery {
    margin: 30px 0;
    max-width: 100%;
}

/* Slider Styles */
.cigp-gallery-slider .cigp-slider-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.cigp-gallery-slider .cigp-slider-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.cigp-gallery-slider .cigp-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f5f5f5;
}

.cigp-gallery-slider .cigp-slide img {
    width: 100%;
    height: 500px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.cigp-gallery-slider .cigp-slide img:hover {
    transform: scale(1.02);
}

.cigp-gallery-slider .cigp-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 16px;
    padding: 8px 12px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.cigp-gallery-slider .cigp-slider-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.cigp-gallery-slider .cigp-slider-prev {
    left: 15px;
}

.cigp-gallery-slider .cigp-slider-next {
    right: 15px;
}

/* Slider Dots Navigation */
.cigp-slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.cigp-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
}

.cigp-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.cigp-dot.active {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.3);
}

/* Grid Styles */
.cigp-gallery-grid .cigp-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 100%;
}

.cigp-gallery-grid .cigp-grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
    aspect-ratio: 1;
}

.cigp-gallery-grid .cigp-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.cigp-gallery-grid .cigp-grid-item:hover img {
    transform: scale(1.1);
}

/* Image Overlay on Hover */
.cigp-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 70%, transparent 100%);
    color: white;
    padding: 20px 15px 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.cigp-slide:hover .cigp-image-overlay,
.cigp-carousel-item:hover .cigp-image-overlay,
.cigp-grid-item:hover .cigp-image-overlay {
    opacity: 1;
}

.cigp-overlay-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.cigp-overlay-caption {
    margin: 0;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    line-height: 1.4;
}

.cigp-slide,
.cigp-carousel-item,
.cigp-grid-item {
    position: relative;
}

/* Carousel Styles */
.cigp-gallery-carousel .cigp-carousel-wrapper {
    position: relative;
    padding: 0 50px;
}

.cigp-gallery-carousel .cigp-carousel-container {
    overflow: hidden;
    border-radius: 8px;
}

.cigp-gallery-carousel .cigp-carousel-track {
    display: flex;
    gap: 15px;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.cigp-gallery-carousel .cigp-carousel-item {
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
}

.cigp-gallery-carousel .cigp-carousel-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: block;
}

.cigp-gallery-carousel .cigp-carousel-item:hover img {
    transform: scale(1.05);
}

.cigp-gallery-carousel .cigp-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 16px;
    padding: 8px 12px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.cigp-gallery-carousel .cigp-carousel-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.cigp-gallery-carousel .cigp-carousel-prev {
    left: 0;
}

.cigp-gallery-carousel .cigp-carousel-next {
    right: 0;
}

/* Lightbox Styles */
.cigp-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cigp-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cigp-lightbox-image-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
}

.cigp-lightbox-image-container img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}

.cigp-lightbox-info {
    text-align: center;
    color: white;
    margin-top: 20px;
    max-width: 600px;
}

.cigp-lightbox-info h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

.cigp-lightbox-info p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
}

.cigp-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 32px;
    width: 45px;
    height: 45px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.cigp-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.cigp-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 40px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.cigp-lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

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

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

.cigp-lightbox-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cigp-gallery-slider .cigp-slide img {
        height: 300px;
    }
    
    .cigp-gallery-grid .cigp-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .cigp-gallery-slider .cigp-slider-nav {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    .cigp-slider-dots {
        bottom: 10px;
        gap: 8px;
    }
    
    .cigp-dot {
        width: 10px;
        height: 10px;
    }
    
    .cigp-gallery-carousel .cigp-carousel-wrapper {
        padding: 0 40px;
    }
    
    .cigp-gallery-carousel .cigp-carousel-item img {
        height: 200px;
    }
    
    .cigp-gallery-carousel .cigp-carousel-nav {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    .cigp-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
    
    .cigp-lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 32px;
    }
    
    .cigp-lightbox-prev {
        left: 10px;
    }
    
    .cigp-lightbox-next {
        right: 10px;
    }
    
    .cigp-lightbox-counter {
        bottom: 10px;
        right: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .cigp-lightbox-image-container img {
        max-height: 60vh;
    }
}

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