#modal-overlay {
    display: none; 
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000; 
    background: rgba(0, 167, 172, 0.7); 
    justify-content: center; 
    align-items: center;     
    overflow-y: auto; 
    opacity: 0; 
    transition: opacity 0.7s ease-in-out; 
}

#modal-overlay.is-active {
    opacity: 1;
}

#modal-content {
    background: #ffffff; 
    border-radius: 8px; 
    padding: 8px 0; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    position: relative; 
    max-width: 400px; 
    width: 90%; 
    margin: 20px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
    animation: none; 
    animation-fill-mode: none;
}

#modal-image {
    max-width: 95%;
    height: auto;
    display: block;
    animation: none;
}
#modal-content a {
    max-width: 100%; 
    display: contents;
    text-align: center;
}

#modal-close {
    top: 5px;
    right: 5px;
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    width: 30px;
    height: 30px;
    position: absolute;
    top: -15px;
    right: -15px;
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    width: 30px;
    height: 30px;
    line-height: 26px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: background 0.3s, transform 0.3s;
}

#modal-close:hover {
    background: #eeeeee;
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    #modal-close {
        top: -12px;
        right: -12px;
    }
    #modal-content {
    max-width: 350px;
}
}