.news-card{display:flex;align-items:stretch;box-shadow:0 6px 6px #C9C9C9;margin:40px 0;flex-wrap:wrap;cursor:pointer}
.news-card .news-cover{
    position:relative;
    padding-top:420px;
    width:40%;
	overflow: hidden;
}
.news-card .news-cover img{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:cover}

.news-content{width:60%;padding:40px 20px}
.news-content h3.news-title{color:var(--primary-color);margin:0 0 30px;display:flex;justify-content:space-between;flex-wrap:wrap;}
.news-content h3.news-title span{font-size:30px;width:100%;}
.news-content .preview{margin-bottom:50px}
.news-content .preview p {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}
.news-content .view-more{color:var(--primary-color);border:0;background-color:transparent;padding:0}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0,0, 0.5);
    z-index: 2000;
    overflow-y: auto; /* Enable scrolling for modal overlay */
    justify-content: center;
    align-items: flex-start; /* Align content to top for scrolling */
    padding: 20px 0; /* Add padding to prevent content from touching edges */
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease-in;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh; /* Limit height to 60% of viewport */
    overflow-y: auto; /* Enable scrolling within modal content */
    position: relative;
    top: 10%; /* Position at 30% from top */
    margin: auto;
    transform: translateY(-10%); /* Adjust for centering */
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.modal-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--primary-color)
}

.modal-date {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.modal-body {
    margin-bottom: 20px;
    white-space: pre-wrap; /* Preserve newlines from JSON */
}

.modal-cover img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media screen and (max-width: 991px){
    .news-content h3.news-title span{width:100%;margin:5px 0}
    .news-content h3.news-title span.news-date{text-align:left;margin-left:0;}
}

@media screen and (max-width: 768px) {
    .news-card .news-content{width:100%;order:2}
    .news-card .news-cover{width:100%;order:1;padding-top:0;}
    .news-card .news-cover img{position:static;width:100%;height:auto;}
}