/* Peak Gallery Slider Styles */

/* Gallery Container */
.peak-gallery-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 2rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Main Slider */
.peak-gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.peak-gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    pointer-events: none;
    cursor: pointer;
}

.peak-gallery-slide.active {
    opacity: 1;
    pointer-events: auto;
}

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

.peak-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: 2rem 1.5rem 1rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Navigation Arrows */
.peak-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.peak-gallery-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

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

.peak-gallery-prev {
    left: 1rem;
}

.peak-gallery-next {
    right: 1rem;
}

/* Thumbnails */
.peak-gallery-thumbs-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.peak-gallery-thumbs {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    flex: 1;
}

.peak-gallery-thumbs::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

/* Thumbnail Navigation Arrows */
.peak-gallery-thumb-nav {
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 5;
    opacity: 0.7;
}

.peak-gallery-thumb-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    opacity: 1;
    transform: scale(1.1);
}

.peak-gallery-thumb-nav:active {
    transform: scale(0.95);
}

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

.peak-gallery-thumb-nav:disabled:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1);
}

.peak-gallery-thumb {
    flex: 0 0 auto;
    width: 120px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.peak-gallery-thumb:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.peak-gallery-thumb.active {
    border-color: #2271b1;
    opacity: 1;
}

.peak-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.peak-gallery-lightbox.active {
    display: flex;
}

.peak-gallery-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000001;
}

.peak-gallery-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

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

.peak-gallery-lightbox-image {
    max-width: 100%;
    max-height: calc(100% - 150px);
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.peak-gallery-lightbox-info {
    max-width: 800px;
    margin-top: 1.5rem;
    color: #fff;
    text-align: center;
}

.peak-gallery-lightbox-caption {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.peak-gallery-lightbox-description {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
    max-height: 100px;
    overflow-y: auto;
}

.peak-gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.peak-gallery-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.peak-gallery-lightbox-prev {
    left: 2rem;
}

.peak-gallery-lightbox-next {
    right: 2rem;
}

/* Empty State */
.peak-gallery-empty {
    padding: 3rem;
    text-align: center;
    background: #f5f5f5;
    border-radius: 8px;
    color: #666;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .peak-gallery-main {
        aspect-ratio: 4 / 3;
    }
    
    .peak-gallery-nav {
        width: 40px;
        height: 40px;
    }
    
    .peak-gallery-prev {
        left: 0.5rem;
    }
    
    .peak-gallery-next {
        right: 0.5rem;
    }
    
    .peak-gallery-thumb {
        width: 80px;
        height: 60px;
    }
    
    .peak-gallery-thumb-nav {
        width: 32px;
        height: 32px;
    }
    
    .peak-gallery-thumb-nav svg {
        width: 16px;
        height: 16px;
    }
    
    .peak-gallery-lightbox-image {
        max-height: calc(100% - 200px);
    }
    
    .peak-gallery-lightbox-nav {
        width: 50px;
        height: 50px;
    }
    
    .peak-gallery-lightbox-prev {
        left: 0.5rem;
    }
    
    .peak-gallery-lightbox-next {
        right: 0.5rem;
    }
    
    .peak-gallery-close {
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
    }
    
    .peak-gallery-caption {
        font-size: 0.85rem;
        padding: 1.5rem 1rem 0.75rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .peak-gallery-thumbs::-webkit-scrollbar-track {
        background: #333;
    }
    
    .peak-gallery-empty {
        background: #1a1a1a;
        color: #ccc;
    }
}

/* Animation for loading */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.peak-gallery-slide img,
.peak-gallery-thumb img {
    animation: fadeIn 0.3s ease-in;
}
