.news-detail-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 45, 32, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-detail-modal.show {
    display: flex;
    opacity: 1;
}


.modal-content-wrapper {
    background-color: #FFFFFF;
    width: 90%;
    max-width: 720px;
    max-height: 85vh;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 20px 50px rgba(11, 29, 16, 0.25);
    display: flex;
    flex-direction: column;
    animation: modalSlideUpAnimation 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUpAnimation {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


.close-modal-trigger {
    position: absolute;
    right: 20px;
    top: 12px;
    font-size: 34px;
    font-weight: 300;
    color: #1B2E1E;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s ease, transform 0.2s ease;
}

.close-modal-trigger:hover {
    color: #2E7D32;
    transform: scale(1.08);
}


.modal-scroll-body {
    padding: 30px;
    overflow-y: auto;
    box-sizing: border-box;
}

.modal-news-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.modal-badge {
    background-color: #F4F7F5;
    color: #2E7D32;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

#modalDateLabel {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.modal-scroll-body h2 {
    font-size: 1.6rem;
    color: #1B2E1E;
    line-height: 1.35;
    margin: 0 0 16px 0;
    font-weight: 700;
}

.modal-img-cover {
    width: 100%;
    max-height: 320px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #F4F7F5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.modal-img-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.modal-news-full-text {
    font-size: 0.98rem;
    color: #334155;
    line-height: 1.75;
    white-space: pre-line;
    margin: 0;
}


.modal-footer-actions {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #E2EAF0;
    justify-content: flex-end;
}

.btn-modal-download:hover {
    background-color: #b45309 !important;
    transform: translateY(-1px);
}


@media (max-width: 600px) {
    .modal-scroll-body {
        padding: 20px;
    }

    .modal-scroll-body h2 {
        font-size: 1.3rem;
    }

    .modal-img-cover {
        max-height: 200px;
    }

    .btn-modal-download {
        width: 100%;
        justify-content: center;
    }
}

.close-modal-trigger {
    cursor: pointer !important;
    user-select: none !important;
    pointer-events: auto !important;
}


.news-standalone-page-scope .news-flex-container {
    display: block !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

.news-standalone-page-scope .news-left-feed-block {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}


.news-standalone-page-scope .news-horizontal-cards-grid,
.news-standalone-page-scope #news-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 0 40px 0 !important;
}


.news-standalone-page-scope .news-premium-boxed-card,
.news-standalone-page-scope #news-container>div {
    display: flex !important;
    flex-direction: column !important;
    background: #FFFFFF !important;
    border: 1px solid #E2EAF0 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    cursor: pointer !important;
    height: 100% !important;
    width: 100% !important;
    box-shadow: 0 4px 15px rgba(17, 45, 32, 0.02) !important;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease !important;
    box-sizing: border-box !important;
}


.news-standalone-page-scope .news-premium-boxed-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 12px 30px rgba(17, 45, 32, 0.08) !important;
    border-color: rgba(82, 183, 136, 0.3) !important;
}


.news-standalone-page-scope .card-thumb-side,
.news-standalone-page-scope #news-container .card-thumb-side,
.news-standalone-page-scope #news-container img {
    width: 100% !important;
    height: auto !important;

    aspect-ratio: 16 / 10 !important;

    clip-path: none !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    position: relative !important;
}

.news-standalone-page-scope .news-premium-boxed-card .card-thumb-side,
.news-standalone-page-scope #news-container>div .card-thumb-side {
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    overflow: hidden !important;
}


.news-standalone-page-scope .boxed-card-body,
.news-standalone-page-scope #news-container>div>div:last-child {

    padding: 14px 16px !important;

    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    flex-grow: 1 !important;
    width: 100% !important;
    height: auto !important;
    background: #FFFFFF !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}


.news-standalone-page-scope .boxed-card-body h4,
.news-standalone-page-scope #news-container h4 {
    margin: 0 0 4px 0 !important;
    font-size: 1.05rem !important;
}

.news-standalone-page-scope .boxed-card-meta {
    margin-bottom: 6px !important;
}



@media (max-width: 992px) {

    .news-standalone-page-scope .news-horizontal-cards-grid,
    .news-standalone-page-scope #news-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
}

@media (max-width: 600px) {

    .news-standalone-page-scope .news-horizontal-cards-grid,
    .news-standalone-page-scope #news-container {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .news-standalone-page-scope .card-thumb-side,
    .news-standalone-page-scope #news-container img {
        height: auto !important;
        aspect-ratio: 3 / 2 !important;
    }
}

#modalImgLabel {
    width: 100% !important;
    height: auto !important;
    max-height: 400px !important;
    object-fit: contain !important;
}

.news-horizontal-cards-grid .news-premium-boxed-card .card-thumb-side,
#news-container .news-premium-boxed-card .card-thumb-side,
.news-premium-boxed-card .card-thumb-side {
    width: 100% !important;
    height: 240px !important;
    max-height: 260px !important;
    min-height: 200px !important;
    overflow: hidden !important;
    position: relative !important;
    background-color: #f8fafc !important;
}


.news-premium-boxed-card .card-thumb-side img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}


.news-premium-boxed-card .boxed-card-body {
    padding: 16px 20px 20px 20px !important;
    background-color: #ffffff !important;
}

.news-premium-boxed-card .boxed-card-body h4 {
    margin-top: 5px !important;
    margin-bottom: 6px !important;
    font-size: 1.3rem !important;
}

.news-premium-boxed-card .boxed-card-body p {
    margin: 0 !important;
    line-height: 1.4 !important;
}

@media (max-width: 576px) {
    .news-premium-boxed-card .card-thumb-side {
        height: 18px !important;
        height: 180px !important;
    }
}


.news-premium-boxed-card [data-th],
.news-premium-boxed-card [data-en],
.card-doc-attachment-badge [data-th],
.card-doc-attachment-badge [data-en] {
    display: none !important;
}


body.lang-mode-th .news-premium-boxed-card [data-th],
body.lang-mode-th .card-doc-attachment-badge [data-th] {
    display: inline-block !important;
}


body.lang-mode-en .news-premium-boxed-card [data-en],
body.lang-mode-en .card-doc-attachment-badge [data-en] {
    display: inline-block !important;
}

#frontendNewsModal,
.news-detail-modal,
.modal-content-wrapper,
.modal-scroll-body {
    pointer-events: auto !important;
}

.embedded-close-trigger {
    position: absolute !important;
    right: 20px !important;
    top: 15px !important;
    z-index: 999999 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}


.close-modal-trigger,
#frontendNewsModal .close-modal-trigger {
    z-index: 999999 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}


#frontendNewsModal {
    cursor: pointer !important;
}


.modal-content-wrapper {
    cursor: default !important;
}