/* Gallery-specific CSS - Does not affect other site pages */

/* Reset for gallery only */
.gallery-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Gallery body styles */
body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background-color: #000;
    color: #fff;
    overflow: hidden;
    height: 100vh;
    margin: 0;
    padding: 0;
}

/* Main gallery container */
.gallery-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* Gallery header */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.close-gallery {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

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

.gallery-title {
    font-size: 1.2rem;
    font-weight: normal;
    color: #fff;
    text-align: center;
    flex-grow: 1;
}

.gallery-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    min-width: 80px;
    text-align: right;
}

/* Main gallery content */
.gallery-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Loading indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.7);
}

.loading-indicator i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Error message */
.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.7);
}

.error-message i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #e74c3c;
}

/* Image viewer */
.image-viewer {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Main image container */
.main-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1rem;
}

.main-image-wrapper {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

/* Navigation buttons */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

.prev-btn {
    left: 2rem;
}

.next-btn {
    right: 2rem;
}

/* Thumbnail strip */
.thumbnail-strip {
    padding: 1rem 2rem 2rem;
    background: rgba(0, 0, 0, 0.8);
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    min-height: 100px;
    max-height: 120px;
}

.thumbnail-strip::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-strip::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.thumbnail-strip::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.thumbnail-strip::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Thumbnail images */
.thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.2s ease;
    border: 2px solid transparent;
}

.thumbnail:hover {
    transform: scale(1.05);
    opacity: 1;
}

.thumbnail.active {
    border-color: #fff;
    opacity: 1;
}

.thumbnail:not(.active) {
    opacity: 0.6;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .gallery-header {
        padding: 0.5rem 1rem;
    }

    .gallery-title {
        font-size: 1rem;
    }

    .main-image-container {
        padding: 0.5rem;
    }

    .main-image {
        max-height: calc(100vh - 180px);
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .prev-btn {
        left: 1rem;
    }

    .next-btn {
        right: 1rem;
    }

    .thumbnail-strip {
        padding: 0.5rem 1rem 1rem;
        min-height: 80px;
        max-height: 90px;
    }

    .thumbnail {
        width: 60px;
        height: 45px;
    }

    .gallery-info {
        font-size: 0.8rem;
        min-width: 60px;
    }
}

@media (max-width: 480px) {
    .gallery-header {
        padding: 0.5rem;
    }

    .close-gallery {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .gallery-title {
        font-size: 0.9rem;
    }

    .main-image {
        max-height: calc(100vh - 160px);
    }

    .nav-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .prev-btn {
        left: 0.5rem;
    }

    .next-btn {
        right: 0.5rem;
    }

    .thumbnail-strip {
        padding: 0.5rem;
        min-height: 70px;
        max-height: 80px;
    }

    .thumbnail {
        width: 50px;
        height: 38px;
    }
}

/* Keyboard navigation feedback */
.gallery-container:focus-within .nav-btn {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Animation for image transitions */
.main-image.loading {
    opacity: 0.5;
    transform: scale(0.95);
}

.main-image.loaded {
    opacity: 1;
    transform: scale(1);
}
