/* Custom Gallery Player Styles */

.custom-gallery-wrapper {
    display: block;
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.custom-gallery-header {
    background: #AB7442;
    padding: 20px 30px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.gallery-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    flex: 1;
}

.gallery-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
}

.gallery-link-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(3px);
    color: white;
}

.gallery-link-btn i {
    font-size: 0.85rem;
}

/* Gallery Display Area */
.gallery-display-area {
    position: relative;
    background: #f8f9fa;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-main-image {
    max-width: 100%;
    max-height: 480px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Gallery Controls */
.gallery-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.gallery-nav-btn {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

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

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

/* Gallery Counter */
.gallery-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Thumbnail Section */
.gallery-thumbnails-section {
    background: #fff;
    padding: 15px;
    border-top: 1px solid #e0e0e0;
}

.gallery-thumbnails-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px 0;
    scroll-behavior: smooth;
}

.gallery-thumbnails-scroll::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbnails-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.gallery-thumbnails-scroll::-webkit-scrollbar-thumb {
    background: #AB7442;
    border-radius: 10px;
}

.gallery-thumbnails-scroll::-webkit-scrollbar-thumb:hover {
    background: #8f5e35;
}

.gallery-thumbnail {
    min-width: 80px;
    height: 80px;
    object-fit: cover;
    border: 3px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.gallery-thumbnail:hover {
    opacity: 0.9;
    border-color: #AB7442;
}

.gallery-thumbnail.active {
    border-color: #AB7442;
    opacity: 1;
    box-shadow: 0 0 10px rgba(171, 116, 66, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .custom-gallery-header {
        flex-direction: column;
        gap: 15px;
    }

    .gallery-title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

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

    .gallery-link-btn {
        width: 100%;
        justify-content: center;
        white-space: normal;
    }

    .gallery-display-area {
        min-height: 350px;
    }

    .gallery-main-image {
        max-height: 350px;
    }

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

    .gallery-controls {
        padding: 0 10px;
    }

    .gallery-counter {
        font-size: 0.8rem;
        padding: 6px 12px;
        bottom: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .custom-gallery-wrapper {
        margin-bottom: 20px;
    }

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

    .gallery-display-area {
        min-height: 250px;
    }

    .gallery-main-image {
        max-height: 250px;
    }

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

    .gallery-thumbnail {
        min-width: 60px;
        height: 60px;
    }

    .gallery-countertitle {
        font-size: 0.75rem;
    }
}

/* Hide Galleries by Filter */
.custom-gallery-wrapper {
    display: block;
}

/* Animation for gallery transitions */
.gallery-main-image {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
