/* Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;                           /* covers the full screen */
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;                      /* only shows when .active is added */
}

/* Modal box */
.modal-box {
    background: #FAF9F6;
    border-radius: 12px;
    overflow: hidden;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.modal-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
}

.modal-date {
    font-size: 13px;
    color: var(--secondary-color);
}

.modal-description {
    font-size: 14px;
    color: rgb(45, 45, 45);
    line-height: 1.6;
    margin: 0;
}

/* Close button */
.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(0,0,0,0.4);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card {
    cursor: pointer;
}

/* ANIM */

.modal-box {
    transform: scale(0.6);
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.modal-box.active {
    transform: scale(1);
    opacity: 1;
}