/* Gallery Styles */
.gallery-section {
    margin-bottom: 1rem;
}

.gallery-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gallery-images {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    gap: 15px;
}

.gallery-images.carousel-mode {
    justify-content: center;
}

.gallery-images.multi-mode {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f0f0f0;
}

.gallery-images.multi-mode::-webkit-scrollbar {
    height: 8px;
}

.gallery-images.multi-mode::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.gallery-images.multi-mode::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.gallery-images.multi-mode::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.gallery-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    transition: transform 0.3s ease, opacity 0.5s ease-in-out;
    min-width: 200px;
    max-width: 300px;
}

/* Carousel mode - only one image visible */
.gallery-images.carousel-mode .gallery-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    width: 100%;
    max-width: none;
    padding: 20px;
}

.gallery-images.carousel-mode .gallery-item.active {
    opacity: 1;
    pointer-events: all;
}

/* Multi mode - multiple images visible */
.gallery-images.multi-mode .gallery-item {
    opacity: 1;
    pointer-events: all;
    position: relative;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: auto;
    height: auto;
    max-height: 320px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-images.carousel-mode .gallery-item img {
    max-height: 360px;
}

.gallery-images.multi-mode .gallery-item img {
    max-height: 280px;
}

.gallery-item img:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.gallery-item img:hover {
    transform: scale(1.02);
}

/* Gallery Controls - Show/hide based on mode */
.gallery-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: none;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 10;
}

.gallery-images.carousel-mode ~ .gallery-controls {
    display: flex;
}

.gallery-images.multi-mode ~ .gallery-controls {
    display: flex;
}

.gallery-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s ease;
    font-size: 16px;
    backdrop-filter: blur(10px);
}

.gallery-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.gallery-btn:active {
    transform: scale(0.95);
}

.gallery-btn:disabled {
    background: rgba(0, 0, 0, 0.3);
    cursor: not-allowed;
    transform: none;
}

.gallery-btn:disabled:hover {
    transform: none;
}

/* Gallery Indicators - Show/hide based on mode */
.gallery-indicators {
    display: none;
    justify-content: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    gap: 8px;
}

.gallery-images.carousel-mode ~ .gallery-indicators {
    display: flex;
}

.gallery-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-indicator.active,
.gallery-indicator:hover {
    background: #3273dc;
    transform: scale(1.2);
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

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

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

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

#lightbox-image {
    max-width: 95%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

#lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 15px;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 4px;
}

/* Responsive Design */
/* Responsive Breakpoints */
@media (min-width: 1400px) {
    .gallery-item {
        min-width: 250px;
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .gallery-carousel {
        margin: 0 1rem;
    }
    
    .gallery-images {
        height: 350px;
        gap: 10px;
        padding: 15px;
    }
    
    .gallery-item {
        min-width: 180px;
        max-width: 250px;
    }
    
    .gallery-item img {
        max-height: 250px;
    }
    
    .gallery-images.carousel-mode .gallery-item img {
        max-height: 300px;
    }
    
    .gallery-images.multi-mode .gallery-item img {
        max-height: 220px;
    }
    
    .gallery-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .gallery-controls {
        padding: 0 10px;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .lightbox-close {
        top: -30px;
        right: -10px;
        font-size: 24px;
        width: 35px;
        height: 35px;
    }
    
    #lightbox-image {
        max-width: 98%;
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .gallery-images {
        height: 300px;
        gap: 8px;
        padding: 10px;
    }
    
    .gallery-item {
        min-width: 160px;
        max-width: 220px;
    }
    
    .gallery-item img {
        max-height: 200px;
    }
    
    .gallery-images.carousel-mode .gallery-item img {
        max-height: 250px;
    }
    
    .gallery-images.multi-mode .gallery-item img {
        max-height: 180px;
    }
    
    .gallery-indicator {
        width: 10px;
        height: 10px;
    }
    
    #lightbox-image {
        max-width: 95%;
        max-height: 80vh;
    }
}
