/* Project Slideshow Styles */

/* Main Card Slideshow */
.project-slideshow {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
    background: #f8f9fa;
    z-index: 1;
}

.project-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    /* Ensure proper containment */
    overflow: hidden;
}

.project-slideshow .slide.active {
    opacity: 1;
}

.project-slideshow .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
}

/* Navigation Arrows */
.project-slideshow .slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(199, 41, 33, 0.8);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Ensure these stay below the header */
    pointer-events: auto;
    /* Ensure proper containment */
    max-width: 100%;
    max-height: 100%;
    /* Force lower stacking context */
    position: absolute;
}

.project-slideshow .slide-nav:hover {
    background: rgba(199, 41, 33, 1);
    transform: translateY(-50%) scale(1.1);
}

.project-slideshow .slide-nav.prev {
    left: 10px;
}

.project-slideshow .slide-nav.next {
    right: 10px;
}

/* Dot Indicators */
.project-slideshow .slide-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 1;
}

.project-slideshow .slide-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.project-slideshow .slide-dot.active {
    background: #c72921;
    border-color: #c72921;
    transform: scale(1.2);
}

/* Modal Slideshow - Larger Version */
.modal-slideshow {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 15px;
    background: #f8f9fa;
    margin: 20px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.modal-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-slideshow .slide.active {
    opacity: 1;
}

.modal-slideshow .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

/* Modal Navigation Arrows - Larger */
.modal-slideshow .slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(199, 41, 33, 0.8);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-slideshow .slide-nav:hover {
    background: rgba(199, 41, 33, 1);
    transform: translateY(-50%) scale(1.1);
}

.modal-slideshow .slide-nav.prev {
    left: 15px;
}

.modal-slideshow .slide-nav.next {
    right: 15px;
}

/* Modal Dot Indicators - Larger */
.modal-slideshow .slide-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 1;
}

.modal-slideshow .slide-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.modal-slideshow .slide-dot.active {
    background: #c72921;
    border-color: #c72921;
    transform: scale(1.2);
}

/* Loading State */
.project-slideshow .loading,
.modal-slideshow .loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .project-slideshow {
        height: 180px;
    }
    
    .modal-slideshow {
        height: 250px;
    }
    
    .project-slideshow .slide-nav,
    .modal-slideshow .slide-nav {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .modal-slideshow .slide-nav {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .project-slideshow {
        height: 160px;
    }
    
    .modal-slideshow {
        height: 200px;
    }
    
    .project-slideshow .slide-nav,
    .modal-slideshow .slide-nav {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    .project-slideshow .slide-dots,
    .modal-slideshow .slide-dots {
        gap: 4px;
    }
    
    .project-slideshow .slide-dot,
    .modal-slideshow .slide-dot {
        width: 6px;
        height: 6px;
    }
}

/* Fade transition animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.project-slideshow .slide.fade-in,
.modal-slideshow .slide.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.project-slideshow .slide.fade-out,
.modal-slideshow .slide.fade-out {
    animation: fadeOut 0.5s ease-in-out;
}
