/* ==========================================
   Image Gallery Styles
   Reusable gallery component with navigation
   ========================================== */

/* Gallery Section */
.gallery-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

/* Gallery Container */
.gallery-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

/* Gallery Wrapper */
.gallery-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* Gallery Track - contains all slides */
.gallery-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Individual Slide */
.gallery-slide {
    min-width: 100%;
    position: relative;
}

.gallery-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

/* Placeholder for missing images */
.gallery-placeholder {
    width: 100%;
    height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.gallery-placeholder i {
    font-size: 4rem;
    margin-bottom: 16px;
    color: var(--accent-primary);
}

.gallery-placeholder p {
    font-size: 1rem;
}

/* Slide Caption */
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 32px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
}

.gallery-caption h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.gallery-caption p {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* Navigation Arrows */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 11, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 10;
    backdrop-filter: blur(8px);
}

.gallery-nav:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-primary);
}

.gallery-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-nav.prev {
    left: 20px;
}

.gallery-nav.next {
    right: 20px;
}

.gallery-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gallery-nav:disabled:hover {
    background: rgba(10, 10, 11, 0.7);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Dots Indicator */
.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-fast);
}

.gallery-dot:hover {
    border-color: var(--accent-primary);
}

.gallery-dot.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Counter */
.gallery-counter {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.gallery-counter .current {
    color: var(--accent-primary);
    font-weight: 600;
}

/* ==========================================
   Gallery Variants
   ========================================== */

/* Compact Gallery - smaller height */
.gallery-wrapper.compact .gallery-slide img,
.gallery-wrapper.compact .gallery-placeholder {
    height: 350px;
}

/* Full Width Gallery */
.gallery-container.full-width {
    max-width: 100%;
}

/* Gallery with thumbnails */
.gallery-thumbnails {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.gallery-thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition-fast);
    opacity: 0.6;
}

.gallery-thumbnail:hover {
    opacity: 0.9;
}

.gallery-thumbnail.active {
    border-color: var(--accent-primary);
    opacity: 1;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================
   Lightbox (optional enhancement)
   ========================================== */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.gallery-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.gallery-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.gallery-lightbox-close:hover {
    background: var(--accent-primary);
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
    .gallery-slide img,
    .gallery-placeholder {
        height: 350px;
    }
    
    .gallery-wrapper.compact .gallery-slide img,
    .gallery-wrapper.compact .gallery-placeholder {
        height: 280px;
    }
    
    .gallery-nav {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    
    .gallery-nav.prev {
        left: 12px;
    }
    
    .gallery-nav.next {
        right: 12px;
    }
    
    .gallery-caption {
        padding: 16px 20px;
    }
    
    .gallery-caption h4 {
        font-size: 1rem;
    }
    
    .gallery-caption p {
        font-size: 0.85rem;
    }
    
    .gallery-thumbnails {
        gap: 8px;
    }
    
    .gallery-thumbnail {
        width: 60px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .gallery-slide img,
    .gallery-placeholder {
        height: 280px;
    }
    
    .gallery-wrapper.compact .gallery-slide img,
    .gallery-wrapper.compact .gallery-placeholder {
        height: 220px;
    }
    
    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .gallery-nav.prev {
        left: 8px;
    }
    
    .gallery-nav.next {
        right: 8px;
    }
    
    .gallery-dots {
        gap: 8px;
    }
    
    .gallery-dot {
        width: 10px;
        height: 10px;
    }
}
