/* Image and Video Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.1);
    animation: zoom-in 0.3s ease;
}

@keyframes zoom-in {
    from {opacity: 0; transform: scale(0.9);}
    to {opacity: 1; transform: scale(1);}
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #e0e0e0;
    font-size: 40px;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 1001;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: #FFD700;
    text-decoration: none;
    transform: scale(1.1);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #e0e0e0;
    padding: 20px 0;
    font-size: 1.2rem;
    height: 50px;
}

.modal-controls {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    padding: 0 20px;
}

.modal-prev,
.modal-next {
    color: #e0e0e0;
    font-size: 30px;
    font-weight: bold;
    border: none;
    background-color: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    opacity: 0.7;
}

.modal-prev:hover,
.modal-next:hover {
    background-color: rgba(255, 215, 0, 0.3);
    color: #FFD700;
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

/* Video content specific styles */
#modal-video {
    max-width: 90%;
    max-height: 80vh;
    margin: auto;
    display: block;
}

/* Responsive styles for modal */
@media (max-width: 768px) {
    .image-modal {
        padding-top: 30px;
    }
    
    .modal-content {
        max-width: 95%;
    }
    
    .close-modal {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
    
    .modal-prev,
    .modal-next {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .modal-controls {
        padding: 0 10px;
    }
    
    .modal-caption {
        font-size: 1rem;
        padding: 15px 0;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .image-modal {
        padding-top: 20px;
    }
    
    .modal-content {
        max-width: 98%;
    }
    
    .close-modal {
        top: 5px;
        right: 15px;
        font-size: 24px;
    }
    
    .modal-prev,
    .modal-next {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .modal-caption {
        font-size: 0.9rem;
        padding: 10px 0;
        height: 35px;
    }
}
