
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}


.modal-overlay.is-active {
    display: flex;
    opacity: 1;
}


.modal-content {
    background: #fff;
    width: 100%;
    max-width: 850px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(30px);
    transition: transform 0.4s ease;
}

.modal-overlay.is-active .modal-content {
    transform: translateY(0);
}

.modal-body {
    display: flex;
    flex-direction: row;
}


#modal-img {
    width: 450px;
    height: 500px;
    object-fit: cover;
    background-color: #f0f0f0;
}

.modal-text {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: justify;
}

#modal-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #1a1a1a;
    line-height: 1.2;
}

.modal-date {
    display: inline-block;
    background: #fff5f5;
    color: #d40a11;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 20px;
    width: fit-content;
}

#modal-desc {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #4a4a4a;
    margin-top: 10px;
}


.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.close-btn:hover {
    background: #e74c3c;
    color: white;
    transform: rotate(90deg);
}


@media screen and (max-width: 1023px) {
    .modal-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        padding: 0;
        justify-content: center;
        align-items: center;
    }

    .modal-content {
        width: 92%;
        max-width: 900px;
        height: 85vh;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        transform: translateY(0);
    }

    .modal-body {
        flex-direction: column;
        overflow-y: auto;
        height: 100%;
    }

    #modal-img {
        width: 100%;
        height: 60vh;
        object-fit: cover;
    }

    .modal-text {
        padding: 30px 25px;
        text-align: center; 
    }

    #modal-title {
        font-size: 4rem;
        font-weight: 900;
        margin-bottom: 15px;
    }

    #modal-desc {
        font-size: 3rem;
        line-height: 1.6;
        text-align: justify;
    }

    .modal-date {
        font-size: 3rem;
    }

    .close-btn {
        top: 10px;
        right: 10px;
        width: 120px;
        height: 120px;
        font-size: 80px;
        background: #fff;
        color: #d40a11;
        box-shadow: 0 5px 20px rgba(0,0,0,0.4);
        opacity: 1 !important;
    }
}