.header-transparent .top-header .infodate {
    color: #fff
}
.header-transparent.is-fixed .top-header .infodate {
    color: #333
}
header.header-transparent .right-top-header .social li img {
    filter: grayscale(0);
    opacity: 1;
    width: 30px;
}
.header-transparent *{
    transition: all 0.3s;
}
.header-transparent .navbar {
    padding-top: 0;
    padding-bottom: 0;
}
.header-transparent .navbar .navbar-collapse:not(.show) {
    display: block !important
}
.header-transparent .navbar .container {
    border: none;
    width: auto;
    position: relative;
}
.header-transparent .navbar-right .dropdown-toggle, .header-transparent .navbar-right .navbar-toggler {
    width: 40px;
    height: 40px;
    color: #fff !important;
    padding: 8px 3px;
    text-align: center;
    border: 1px solid #fff;
    border-radius: 4px;
    display: inline-block;
}
.header-transparent .navbar .navbar-toggler .navbar-toggler-icon {
    color: #fff
}
.header-transparent.is-fixed .navbar .navbar-toggler .navbar-toggler-icon {
    color: #333
}
.header-transparent.is-fixed .navbar-right .dropdown-toggle, .header-transparent.is-fixed .navbar-right .navbar-toggler {
    border-color: #333;
    color: #333 !important
}
.navbar .navbar-right > form {
    height: 40px;
    margin-left: 5px;
}
.navbar .navbar-right form .dropdown-menu {
    left: 100%;
    right: auto;
    top: 1px
}
.navbar .navbar-right form .dropdown-menu input {
    padding: 7px 10px 5px 2px;
}

.sc-longform-header-media {
    width: 100%;
    display: block;
}
.sc-longform-header-media img {
    width: 100%;
}
.header-transparent .navbar .navbar-collapse {
    position: absolute;
    top: 110%;
    left: auto;
    right: 200px;
    opacity: 0;
    visibility: hidden;
    width: 300px;
    transition: all 0.3s;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 3px 20px rgba(0,0,0,0.3);
    max-height: 80vh;
    min-height: 400px;
    align-items: flex-start;
    overflow: hidden;
    overflow-y: auto;
}
.header-transparent .navbar .navbar-collapse.show {
    opacity: 1;
    left: 0;
    right: auto;
    visibility: initial;
}
.header-transparent .navbar-expand-lg .navbar-nav {
    flex-direction: column;
}
.header-transparent .navbar-nav {
    width: 100%;
    display: block;
}
.header-transparent .navbar-nav .nav-item {
    width: 100%;
    display: inline-block;
}
.header-transparent .navbar-nav .dropdown-menu {
    position: relative;
    display: block;
    width: 100%;
    border: none;
    padding-left: 10px;
    padding-top: 0;
}
.header-transparent .navbar-nav .dropdown-menu .dropdown-item::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 10px;
    display: inline-block;
    background-color: rgba(0,0,0,0.3);
    margin: 8px 8px 3px 0;
}
.header-transparent .navbar-nav .dropdown-menu .dropdown-item:hover {
    background-color: transparent;
    color: #539250
}
.header-transparent .navbar-nav .dropdown-menu .dropdown-item:hover::before {
    background-color: #539250;
}
.header-transparent.is-fixed {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s;
    background: #ffffff;
    box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.2);
}
.header-transparent.is-fixed .logo {
    margin-bottom: 0;
}
.header-transparent .logo img {
    height: 85px;
}
.header-transparent.is-fixed .logo img {
    height: 50px;
    transition: all 0.3s;
}
.header-transparent.is-fixed .top-header {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    transition: all 0.3s;
}

.entry .sc-longform-content {
    font-size: 19px;
    line-height: 1.618;
}
.entry figure figcaption {
    display: block;
    font-style: normal;
    margin-top: 0.25em;
    font-size: 14px;
    line-height: 1.5;
    font-weight: normal;
}
.entry .sc-longform-content .outset-lg img, .entry .sc-longform-content .outset-xl img, .entry .sc-longform-content .outset-xxl img, .entry.large-image > figure:not([class*=outset-]) img, .entry.large-image > .picBox:not([class*=outset-]) img, .entry.large-image > img:not([class*=outset-]) img, .entry.large-image > .sc-gallery:not([class*=outset-]) img, .entry.large-image > .sc-swiper:not([class*=outset-]) img, .entry.large-image > .sc-image-compare:not([class*=outset-]) img {
    max-width: 100%;
    width: 100%;
}
.entry .sc-longform-content *:not(.fa):not(figcaption) {
    font-family: unset;
}
.entry .sc-longform-content figure > img, .entry .sc-longform-content figure > iframe, .entry .sc-longform-content figure > pre, .entry .sc-longform-content figure > div {
    vertical-align: middle;
}
.entry .sc-longform-content p, .entry .sc-longform-content h2, .entry .sc-longform-content h3, .entry .sc-longform-content h4, .entry .sc-longform-content blockquote, .entry .sc-longform-content address, .entry .sc-longform-content blockquote, .entry .sc-longform-content dl, .entry .sc-longform-content figure, .entry .sc-longform-content .article-photo, .entry .sc-longform-content ol, .entry .sc-longform-content p, .entry .sc-longform-content pre, .entry .sc-longform-content table, .entry .sc-longform-content ul, .entry .sc-longform-content .image-responsive, .entry .sc-longform-content .grid {
    max-width: 600px;
}
.entry .sc-longform-content .outset-lg, .entry .sc-longform-content .outset-xl, .entry .sc-longform-content .outset-xxl {
    max-width: calc(100vw - 17px);
    width: 960px;
    transform: none;
    left: auto;
    right: auto;
    margin-left: auto;
    margin-right: auto;
}
.entry .sc-longform-content .outset-xl {
    width: 1140px;
}
.entry .sc-longform-content p, .entry .sc-longform-content h2, .entry .sc-longform-content h3, .entry .sc-longform-content h4, .entry .sc-longform-content blockquote {
    margin-left: auto;
    margin-right: auto;
}
.entry .sc-longform-content address, .entry .sc-longform-content blockquote, .entry .sc-longform-content dl, .entry .sc-longform-content figure, .entry .sc-longform-content .article-photo, .entry .sc-longform-content ol, .entry .sc-longform-content p, .entry .sc-longform-content pre, .entry .sc-longform-content table, .entry .sc-longform-content ul, .entry .sc-longform-content iframe {
    margin: 0 auto 1em;
}/* ==========================================================================
   INFOGRAPHIC DETAIL & E-MAGAZINE DETAIL — Figma node 8673:6649
   Shared CSS for InfographicDetail.cshtml and EMagazineDetail.cshtml
   ========================================================================== */

/* -- Page wrapper -- */
.ig-detail-page {
    background: #fff;
}

/* -- Hero thumb banner -- */
.ig-hero {
    width: 100%;
    position: relative;
    overflow: hidden;
    max-height: 1080px;
}

.ig-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* -- Centered content container -- */
.ig-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 20px;
    box-sizing: border-box;
}

@media (max-width: 991px) {
    .ig-container {
        padding: 20px 16px;
    }
}

/* -- Article narrow column -- */
.ig-article {
    max-width: 874px;
    margin: 0 auto;
    padding-bottom: 20px;
}

/* -- Title -- */
.ig-article__title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 25px;
    line-height: 33px;
    color: #000;
    margin: 0 0 10px;
}

@media (max-width: 767px) {
    .ig-article__title {
        font-size: 20px;
        line-height: 28px;
    }
}

/* -- Toolbar: author + audio player -- */
.ig-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 15px;
    border-bottom: 1px solid #B0B5BD;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 767px) {
    .ig-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Author block */
.ig-author {
    display: flex;
    gap: 15px;
    align-items: center;
}

.ig-author__avatar-wrap {
    display: flex;
    gap: 6px;
    align-items: center;
    padding-right: 15px;
    border-right: 1px solid #CED1D6;
}

.ig-author__avatar {
    width: 30px;
    height: 30px;
    border-radius: 30px;
    object-fit: cover;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ig-author__avatar i {
    font-size: 14px;
    color: #888;
}

.ig-author__name {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 15px;
    line-height: 18px;
    color: #2C3544;
    margin: 0;
    white-space: nowrap;
}

.ig-author__date {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 18px;
    color: #2C3544;
    white-space: nowrap;
}

/* -- Body content -- */
.ig-body {
    padding: 10px 0 20px;
}

.ig-body__lead {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #1C232D;
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.ig-body__lead strong {
    font-weight: 700;
}

.ig-body__infographic {
    width: 100%;
    background: #EEF0F3;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.ig-body__infographic img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.ig-body__text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 26px;
    color: #1C232D;
    overflow: hidden;
}

.ig-body__text p {
    margin-bottom: 10px;
}

/* K? th?a format cho vùng content full-width m?i l?p */
.ig-content-full {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 26px;
    color: #1C232D;
    /* KHÔNG DÙNG overflow: hidden d? tránh c?t m?t ?nh ngang */
}

/* Gi?i h?n max-width cho các th? ch? co b?n n?m th?ng trong content không có div b?c ngoài */
.ig-content-full > p,
.ig-content-full > h1,
.ig-content-full > h2,
.ig-content-full > h3,
.ig-content-full > h4,
.ig-content-full > ul,
.ig-content-full > ol,
.ig-content-full > blockquote,
.ig-content-full > div:not([class]) {
    max-width: 874px; /* Quay l?i form 874px c?a bài vi?t m?c d?nh */
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

/* Fix images/figures from CKEditor overflowing */
.ig-body__text img,
.ig-body__text figure,
.ig-body__text figure.image,
.ig-body__text table,
.ig-content-full img,
.ig-content-full figure,
.ig-content-full figure.image,
.ig-content-full table {
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
}

.ig-body__text figure,
.ig-content-full figure {
    margin: 0 auto 16px;
    display: block;
}

.ig-body__text figure img,
.ig-content-full figure img {
    width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

/* -- Tin liên quan (Related news) -- */
.ig-related {
    background: rgba(59, 157, 223, 0.1);
    border-radius: 12px;
    padding: 20px 30px;
    margin: 0 60px 20px;
}

@media (max-width: 767px) {
    .ig-related {
        margin: 0 0 20px;
        padding: 15px;
    }
}

.ig-related__title {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 28px;
    color: #00548D;
    text-transform: uppercase;
    margin: 0;
    padding-bottom: 20px;
}

.ig-related__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ig-related__item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 15px 0;
    border-top: 1px dashed #757E8C;
}

.ig-related__item:first-child {
    border-top: none;
    padding-top: 0;
}

.ig-related__icon {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    margin-top: 3px;
}

.ig-related__icon::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: #00548D;
    border-radius: 50%;
    margin-top: 2px;
}

.ig-related__link {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 15px;
    line-height: normal;
    color: #1B1D2D;
    text-decoration: none;
    flex: 1;
    transition: color 0.2s;
}

.ig-related__link:hover {
    color: #00548D;
    text-decoration: underline;
}

/* -- Tags & Share bar -- */
.ig-tags-share {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 0;
    margin: 0 60px;
    flex-wrap: wrap;
    gap: 15px;
}

@media (max-width: 767px) {
    .ig-tags-share {
        margin: 0;
        flex-direction: column;
        align-items: flex-start;
    }
}

.ig-tags {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.ig-tags__icon {
    font-size: 19px;
    color: #00548D;
    line-height: 22px;
}

.ig-tags__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 15px;
    border: 1px solid #CED1D6;
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 22px;
    color: #344052;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.ig-tags__pill:hover {
    background: #f0f4f8;
    border-color: #00548D;
    color: #00548D;
}

.ig-share {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ig-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 5px 15px;
    background: #1877F2;
    border-radius: 5px;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 22px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.ig-share__btn:hover {
    opacity: 0.85;
    color: #fff;
}

/* -- Bình lu?n (Comment section) -- */
.ig-comment {
    margin: 0 60px 25px;
}

@media (max-width: 767px) {
    .ig-comment {
        margin: 0 0 25px;
    }
}

.ig-comment__title {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 28px;
    color: #00548D;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.ig-comment__inputs-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.ig-comment__inputs-row .ig-comment__input {
    flex: 1;
    min-width: 160px;
}

.ig-comment__input {
    width: 100%;
    padding: 8px 16px;
    border: 1px solid #B0B5BD;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 22px;
    color: #1C232D;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
}

.ig-comment__input:focus {
    border-color: #00548D;
}

.ig-comment__input::placeholder {
    color: #556987;
}

.ig-comment__textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px 20px;
    border: 1px solid #B0B5BD;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 22px;
    color: #1C232D;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.ig-comment__textarea::placeholder {
    color: #556987;
}

.ig-comment__textarea:focus {
    border-color: #00548D;
}

.ig-comment__footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.ig-comment__submit {
    background: #00548D;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 22px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}

.ig-comment__submit:hover {
    background: #003d6a;
}

.ig-comment__info {
    background: #e8f4fd;
    border: 1px solid #bee3f8;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    color: #2d6a9f;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Comments list */
.ig-comment__list {
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.ig-comment__item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    border-left: 3px solid #00548D;
}

.ig-comment__user {
    color: #00548D;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.ig-comment__text {
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 6px;
}

.ig-comment__time {
    color: #6c757d;
    font-size: 12px;
}

/* -- Cùng chuyên m?c section -- */
.ig-cungcm {
    padding: 10px 0;
}

.ig-cungcm__head {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.ig-cungcm__title {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 28px;
    color: #00548D;
    text-transform: uppercase;
    margin: 0;
    white-space: nowrap;
}

.ig-cungcm__divider {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 0;
    overflow: hidden;
}

.ig-cungcm__divider span {
    display: block;
    width: 100%;
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        rgba(206, 192, 178, 0.45) 0,
        rgba(206, 192, 178, 0.45) 4px,
        transparent 4px,
        transparent 8px
    );
}

/* Top row: main + right grid */
.ig-cungcm__top {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
}

.ig-cungcm__main {
    flex: 0 0 57%;
    max-width: 57%;
}

.ig-cungcm__main-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 737 / 442;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    display: block;
}

.ig-cungcm__main-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.ig-cungcm__main-img-wrap:hover img {
    transform: scale(1.03);
}

.ig-cungcm__main-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 19px;
    line-height: 29px;
    color: #2A3342;
    margin: 0 0 8px;
}

.ig-cungcm__main-title a {
    color: inherit;
    text-decoration: none;
}

.ig-cungcm__main-title a:hover {
    color: #00548D;
}

.ig-cungcm__main-date {
    display: flex;
    gap: 6px;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 18px;
    color: #00548D;
    margin-bottom: 10px;
}

.ig-cungcm__main-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
    color: #4D5F7A;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.ig-cungcm__right {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.ig-cungcm__right-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ig-cungcm__right-img {
    position: relative;
    width: 100%;
    aspect-ratio: 247.5 / 165;
    border-radius: 6px;
    overflow: hidden;
    display: block;
}

.ig-cungcm__right-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.ig-cungcm__right-img:hover img {
    transform: scale(1.03);
}

.ig-cungcm__right-title {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 26px;
    color: #000;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    margin: 0;
}

.ig-cungcm__right-title a {
    color: inherit;
    text-decoration: none;
}

.ig-cungcm__right-title a:hover {
    color: #00548D;
}

/* Bottom row: 4 cards */
.ig-cungcm__bottom {
    display: flex;
    gap: 20px;
    padding: 20px 0;
}

.ig-cungcm__bottom-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ig-cungcm__bottom-img {
    position: relative;
    width: 100%;
    aspect-ratio: 305 / 190;
    border-radius: 6px;
    overflow: hidden;
    display: block;
}

.ig-cungcm__bottom-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.ig-cungcm__bottom-img:hover img {
    transform: scale(1.03);
}

.ig-cungcm__bottom-title {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 26px;
    color: #000;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    margin: 0;
}

.ig-cungcm__bottom-title a {
    color: inherit;
    text-decoration: none;
}

.ig-cungcm__bottom-title a:hover {
    color: #00548D;
}

/* "Xem thêm" button */
.ig-cungcm__more {
    display: flex;
    justify-content: center;
    padding: 10px 0;
}

.ig-cungcm__more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    padding: 10px 20px;
    background: #00548D;
    border-radius: 8px;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 22px;
    color: #fff;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.ig-cungcm__more-btn:hover {
    background: #003d6a;
    color: #fff;
}

/* -- Responsive: Cùng chuyên m?c -- */
@media (max-width: 991px) {
    .ig-cungcm__top {
        flex-direction: column;
    }

    .ig-cungcm__main {
        flex: none;
        max-width: 100%;
    }

    .ig-cungcm__right {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .ig-cungcm__right {
        grid-template-columns: 1fr;
    }

    .ig-cungcm__bottom {
        flex-wrap: wrap;
    }

    .ig-cungcm__bottom-card {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .ig-cungcm__bottom-card {
        flex: 0 0 100%;
    }
}

/* ==========================================================================
   BLOCK SHADING BOX - T?o kh?i h?p có màu n?n cho do?n van
   ========================================================================== */

/* ----------------------------------------------
   1. Render chu?n cho toàn b? kh?i có n?n màu
   ---------------------------------------------- */
.ck-content [style*="background-color"],
.detail-content [style*="background-color"] {
  display: block;
  padding: 15px 20px;
  margin-top: 15px !important;
  margin-bottom: 15px !important;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

/* ----------------------------------------------
   2. N?I LI?N M?CH CÁC ÐO?N (Paragraph) SÁT NHAU
   Khi bôi den nhi?u do?n, chúng s? dính thành 1 kh?i duy nh?t
   ---------------------------------------------- */

/* Kh?i n?m du?i li?n k? kh?i có màu g?c */
.ck-content [style*="background-color"] + [style*="background-color"],
.detail-content [style*="background-color"] + [style*="background-color"] {
  margin-top: 0 !important;
  padding-top: 7px !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

/* Kh?i n?m trên li?n k? kh?i có màu bên du?i */
.ck-content [style*="background-color"]:has(+ [style*="background-color"]),
.detail-content [style*="background-color"]:has(+ [style*="background-color"]) {
  margin-bottom: 0 !important;
  padding-bottom: 7px !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* ----------------------------------------------
   3. X? LÝ <figure> CH?A ?NH CÓ N?N MÀU
   Khi ?nh n?m trong <p style="background-color:..."> bên trong <figure>,
   figcaption và figure ph?i k? th?a n?n màu dó
   ---------------------------------------------- */

/* Figure ch?a ph?n t? con có background-color */
.ck-content figure:has(> [style*="background-color"]),
.detail-content figure:has(> [style*="background-color"]) {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* Th? <p> ch?a ?nh bên trong figure ? b? padding d? ?nh full-width */
.ck-content figure:has(> [style*="background-color"]) > [style*="background-color"],
.detail-content figure:has(> [style*="background-color"]) > [style*="background-color"] {
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* figcaption bên trong figure có n?n ? k? th?a n?n cùng màu */
.ck-content figure:has(> [style*="background-color"]) > figcaption,
.detail-content figure:has(> [style*="background-color"]) > figcaption {
  background-color: inherit;
  padding: 10px 20px !important;
  margin: 0 !important;
}

/* Figure có n?n + Block có n?n k? c?nh ? n?i li?n m?ch */
.ck-content figure:has(> [style*="background-color"]) + [style*="background-color"],
.detail-content figure:has(> [style*="background-color"]) + [style*="background-color"] {
  margin-top: 0 !important;
  padding-top: 7px !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

/* Block có n?n + Figure có n?n k? du?i ? n?i li?n m?ch */
.ck-content [style*="background-color"]:has(+ figure:has(> [style*="background-color"])),
.detail-content [style*="background-color"]:has(+ figure:has(> [style*="background-color"])) {
  margin-bottom: 0 !important;
  padding-bottom: 7px !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* Figure có n?n n?m tru?c block có n?n ? b? margin du?i */
.ck-content figure:has(> [style*="background-color"]):has(+ [style*="background-color"]),
.detail-content figure:has(> [style*="background-color"]):has(+ [style*="background-color"]) {
  margin-bottom: 0 !important;
}

/* ----------------------------------------------
   4. Ch? d?o ngu?c (Ch? tr?ng trên n?n t?i)
   ---------------------------------------------- */
.ck-content [style*="background-color: #111827"],
.ck-content [style*="background-color: #1f2937"],
.ck-content [style*="background-color: #374151"],
.ck-content [style*="background-color: #1d4ed8"],
.ck-content [style*="background-color: #2563eb"],
.ck-content [style*="background-color: #15803d"],
.ck-content [style*="background-color: #16a34a"],
.ck-content [style*="background-color: #7e22ce"],
.ck-content [style*="background-color: #9333ea"],
.ck-content [style*="background-color: #ef4444"],
.ck-content [style*="background-color: #f97316"],
.ck-content [style*="background-color: #9ca3af"],
.detail-content [style*="background-color: #111827"],
.detail-content [style*="background-color: #1f2937"],
.detail-content [style*="background-color: #374151"],
.detail-content [style*="background-color: #1d4ed8"],
.detail-content [style*="background-color: #2563eb"],
.detail-content [style*="background-color: #15803d"],
.detail-content [style*="background-color: #16a34a"],
.detail-content [style*="background-color: #7e22ce"],
.detail-content [style*="background-color: #9333ea"],
.detail-content [style*="background-color: #ef4444"],
.detail-content [style*="background-color: #f97316"],
.detail-content [style*="background-color: #9ca3af"] {
  color: #ffffff;
}


/* ==========================================================================
   FULL-WIDTH BACKGROUND CHO BLOCK SHADING TRONG EMAGAZINE
   ========================================================================== */
.ig-detail-page {
    overflow-x: hidden;
}

.ig-body__text [style*="background-color"] {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    border-radius: 0 !important;
}

.ig-body__text [style*="background-color"]:not(figure) {
    padding-left: max(20px, calc((100vw - 874px) / 2)) !important;
    padding-right: max(20px, calc((100vw - 874px) / 2)) !important;
}

.ig-body__text figure:has(> [style*="background-color"]),
.ig-body__text figure[style*="background-color"] {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    border-radius: 0 !important;
}

.ig-body__text figure:has(> [style*="background-color"]) > figcaption,
.ig-body__text figure[style*="background-color"] > figcaption {
    padding-left: max(20px, calc((100vw - 874px) / 2)) !important;
    padding-right: max(20px, calc((100vw - 874px) / 2)) !important;
}

.ig-body__text figure > [style*="background-color"] {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    display: flex;
    justify-content: center;
}

/* ==========================================================================
   E-MAGAZINE FULL-WIDTH LAYER (Tuong thích Layer--one c?a NhanDan)
   ========================================================================== */
.Layer--one {
    /* Phóng to Layer b?ng kích thu?c màn hình */
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding: 40px 0;
    margin: 30px 0;
    background-color: #EEF0F3; /* Màu n?n m?c d?nh n?u không có */
}

/* Can gi?a l?i n?i dung bên trong Layer full-width */
.Layer--one .Layout {
    width: 100%;
    max-width: 874px; /* B?ng v?i d? r?ng c?a .ig-article ho?c có th? nâng lên tùy ý */
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Màu n?n & ch? c? th? theo mã NhanDan (n?u c?n copy mã NhanDan) */
.Theme-ForegroundColorCustom-tn58Pa {
    background-color: #efefef !important; /* Màu n?n nguyên do?n */
}
.Layer--one:has(.Theme-ForegroundColorCustom-tn58Pa) {
    background-color: #efefef; /* Ð?ng b? màu n?n cho Layer bao ngoài */
}

/* Format ch? m?u chu?n cho do?n Highlight / Quote */
.Layer--one .Theme-TextSize-xsmall {
    font-size: 22px;
    line-height: 1.5;
    margin-bottom: 15px;
    text-align: center;
}
.Layer--one .Theme-TextSize-default {
    font-size: 18px;
    line-height: 1.6;
}
