/* Showcase Modal - Isolated Styles */

.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
}

.image-modal.active {
    display: flex;
}

.modal-content {
    background-color: #e8e8e0;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    width: 90vw;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #F87D08;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 30;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background-color: #e67300;
}

.modal-description {
    padding: 1.5rem;
    background-color: #e8e8e0;
    border-top: 1px solid #d0d0c8;
}

.modal-description h3 {
    color: #617B47;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.modal-description p {
    color: #4a4a4a;
    line-height: 1.6;
}

/* Carousel Container */
.project-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #000;
    box-sizing: border-box;
    min-height: 400px;
    max-height: 70vh;
}

/* Carousel Track */
.project-carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    align-items: center;
    min-height: 400px;
}

/* Carousel Images */
.project-carousel-image {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

/* Navigation Arrows */
.project-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #F87D08;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 25;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.project-carousel-arrow:hover {
    background-color: #e67300;
}

.project-carousel-arrow-left {
    left: 1rem;
}

.project-carousel-arrow-right {
    right: 1rem;
}

/* Indicator */
.project-carousel-indicator {
    text-align: center;
    color: #4a4a4a;
    font-size: 0.9rem;
    padding: 0.5rem;
    background-color: #e8e8e0;
}

/* Thumbnails Container */
.project-thumbnails-container {
    display: flex !important;
    gap: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    flex-wrap: nowrap;
    width: 100%;
    background-color: #e8e8e0;
    box-sizing: border-box;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 100px;
    max-height: none !important;
    height: auto !important;
    /* Ensure it's visible and not hidden by parent */
    position: relative;
    z-index: 10;
}

.project-thumbnails-container::-webkit-scrollbar {
    height: 8px;
}

.project-thumbnails-container::-webkit-scrollbar-track {
    background: #d0d0c8;
    border-radius: 4px;
}

.project-thumbnails-container::-webkit-scrollbar-thumb {
    background-color: #F87D08;
    border-radius: 4px;
}

.project-thumbnails-container::-webkit-scrollbar-thumb:hover {
    background-color: #e06d07;
}

/* Firefox scrollbar */
.project-thumbnails-container {
    scrollbar-width: thin;
    scrollbar-color: #F87D08 #d0d0c8;
}

/* Thumbnails */
.project-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
    display: block !important;
    visibility: visible !important;
    /* Ensure thumbnails are always visible */
    min-width: 80px;
    min-height: 80px;
}

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

.project-thumbnail.active {
    opacity: 1;
    border-color: #F87D08;
    box-shadow: 0 0 0 2px #e8e8e0, 0 0 8px rgba(248, 125, 8, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .image-modal {
        padding: 1rem;
    }
    
    .modal-content {
        max-width: 95vw;
        width: 95vw;
    }
    
    .project-carousel-arrow {
        width: 40px;
        height: 40px;
    }
    
    .project-carousel-arrow-left {
        left: 0.5rem;
    }
    
    .project-carousel-arrow-right {
        right: 0.5rem;
    }
    
    .project-thumbnail {
        width: 60px;
        height: 60px;
    }
}
