/* Modal Overlay Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: scale(0.7);
    transition: transform 0.3s ease;
    padding: 20px;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.modal-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 800px;
    max-height: 80vh;
    object-fit: contain;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-container {
        max-width: 95%;
        max-height: 95%;
        margin: 20px;
        padding: 15px;
    }
    
    .modal-close {
        top: 10px;
        right: 15px;
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}

/* Body scroll lock when modal is open */
body.modal-open {
    overflow: hidden;
}