body.modal-open {
    overflow: hidden;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 80px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 30px;
    border: 1px solid #ccc;
    width: 90%;
    max-width: 700px;
    border-radius: 10px;
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}


/* Add focus style for keyboard accessibility */
.modal-content:focus {
    outline: 2px solid #0c96e2;
    outline-offset: 4px;
}


.modal-img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    border-radius: 8px;
}

.modal-date {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 15px;
}

.modal-desc {
    font-size: 1em;
    line-height: 1.6;
}

.close {
    background: transparent;
    border: none;
    line-height: 2;
    transition:0.3s ease;
    color: #000;
    font-size: 30px;
    font-weight: 700;
}


.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.card.placeholder {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px dashed #ccc;
    margin-top: 20px;
    font-size: 0.95em;
    color: #555;
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 20px;
    }

    .close {
        top: 10px;
        right: 15px;
        font-size: 24px;
    }
}
