/* =========================================================
   CAESAR NEWS PAGE
   Toàn bộ class dùng tiền tố cx-news để tránh trùng CSS cũ
========================================================= */

.cx-news-page,
.cx-news-page *,
.cx-news-page *::before,
.cx-news-page *::after {
    box-sizing: border-box;
}

.cx-news-page {
    display: block;
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: #ffffff;
    color: #545454;
    font-family: Arial, Helvetica, sans-serif;
}

/* =========================================================
   BANNER
========================================================= */

.cx-news-banner {
    position: relative;
    /* Thoát khỏi container của layout ASP.NET */
    left: 50%;
    width: 100vw;
    max-width: none;
    height: 390px;
    margin-left: -50vw;
    overflow: hidden;
    background-color: #eeeeee;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.cx-news-banner-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.03);
    pointer-events: none;
}

.cx-news-banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 90%;
    margin: 0;
    padding: 0;
    text-align: center;
    transform: translate(-50%, -50%);
}

    .cx-news-banner-content h1 {
        margin: 0;
        padding: 0;
        color: #ffffff;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 31px;
        font-weight: 400;
        line-height: 1.3;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    }

.cx-news-banner-line {
    display: block;
    width: 58px;
    height: 1px;
    margin: 18px auto 0;
    padding: 0;
    background: #ffffff;
}

/* =========================================================
   MENU DANH MỤC
========================================================= */

.cx-news-category-section {
    display: block;
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff;
}

.cx-news-category-inner {
    display: block;
    width: calc(100% - 40px);
    max-width: 1250px;
    margin: 0 auto;
    padding: 0;
}

.cx-news-category-menu {
    display: flex;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    min-height: 64px;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #dedede;
}

.cx-news-category-item {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    margin: 0;
    padding: 0 24px;
    color: #222222;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    border: 0;
    background: transparent;
    transition: color 0.25s ease, background-color 0.25s ease;
}

    .cx-news-category-item:hover,
    .cx-news-category-item:focus {
        color: #a4862f;
        text-decoration: none;
        background: transparent;
    }

.cx-news-category-active {
    color: #111111;
    font-weight: 600;
}

    .cx-news-category-active::after {
        content: "";
        position: absolute;
        right: 24px;
        bottom: -1px;
        left: 24px;
        height: 2px;
        background: #b39840;
    }

/* =========================================================
   KHU VỰC DANH SÁCH
========================================================= */

.cx-news-main {
    display: block;
    position: relative;
    width: 100%;
    margin: 0;
    padding: 58px 0 75px;
    clear: both;
    background: #ffffff;
}

.cx-news-main-inner {
    display: block;
    width: calc(100% - 40px);
    max-width: 1250px;
    margin: 0 auto;
    padding: 0;
}

/* Chính xác 3 bài trên một hàng */
.cx-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 48px;
    row-gap: 55px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* =========================================================
   CARD TIN TỨC
========================================================= */

.cx-news-card {
    display: block;
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    float: none;
    clear: none;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

/* Khung ảnh */
.cx-news-card-image-link {
    display: block;
    position: relative;
    width: 100%;
    height: 0;
    margin: 0;
    padding: 0 0 65.2%;
    overflow: hidden;
    text-decoration: none;
    border: 0;
    background: #f1f1f1;
}

/* Ảnh bài viết */
.cx-news-card-image {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-width: 100%;
    max-width: none;
    height: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    object-fit: cover;
    object-position: center center;
    border: 0;
    opacity: 1;
    transform: scale(1);
    transition: transform 0.45s ease;
}

.cx-news-card-image-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    background: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
}

.cx-news-card:hover .cx-news-card-image {
    transform: scale(1.045);
}

.cx-news-card:hover .cx-news-card-image-overlay {
    background: rgba(0, 0, 0, 0.04);
}

/* Nội dung bên dưới ảnh */
.cx-news-card-body {
    display: block;
    width: 100%;
    margin: 0;
    padding: 25px 0 0;
}

/* Ngày đăng */
.cx-news-card-date {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    min-height: 23px;
    margin: 0;
    padding: 0;
    color: #999999;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-transform: uppercase;
}

    .cx-news-card-date time {
        display: block;
        margin: 0;
        padding: 0;
    }

.cx-news-date-line {
    display: block;
    flex: 0 0 2px;
    width: 2px;
    height: 23px;
    margin: 0;
    padding: 0;
    background: #c1a13e;
}

/* Tiêu đề */
.cx-news-card-title {
    display: block;
    width: 100%;
    margin: 16px 0 0;
    padding: 0;
    color: #545454;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.55;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;
    word-break: normal;
    overflow-wrap: break-word;
}

    .cx-news-card-title a {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
        color: #545454;
        font-family: inherit;
        font-size: inherit;
        font-weight: inherit;
        line-height: inherit;
        text-decoration: none;
        transition: color 0.25s ease;
    }

        .cx-news-card-title a:hover,
        .cx-news-card-title a:focus {
            color: #a4862f;
            text-decoration: none;
        }

/* Mô tả */
.cx-news-card-description {
    display: -webkit-box;
    width: 100%;
    max-height: 73px;
    margin: 10px 0 0;
    padding: 0;
    overflow: hidden;
    color: #777777;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.75;
    text-align: left;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

    .cx-news-card-description p,
    .cx-news-card-description div,
    .cx-news-card-description span {
        margin: 0;
        padding: 0;
        color: inherit;
        font-family: inherit;
        font-size: inherit;
        font-weight: inherit;
        line-height: inherit;
    }

    .cx-news-card-description img,
    .cx-news-card-description iframe,
    .cx-news-card-description table {
        display: none;
    }

/* =========================================================
   KHÔNG CÓ DỮ LIỆU
========================================================= */

.cx-news-empty {
    display: block;
    width: 100%;
    margin: 0;
    padding: 70px 20px;
    color: #777777;
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
    border: 1px solid #eeeeee;
    background: #fafafa;
}

/* =========================================================
   PHÂN TRANG
========================================================= */

.cx-news-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 55px 0 0;
    padding: 0;
    clear: both;
}

    .cx-news-pagination ul.pagination {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

        .cx-news-pagination ul.pagination > li {
            display: block;
            margin: 0;
            padding: 0;
        }

            .cx-news-pagination ul.pagination > li > a,
            .cx-news-pagination ul.pagination > li > span {
                display: flex;
                align-items: center;
                justify-content: center;
                min-width: 40px;
                height: 40px;
                margin: 0;
                padding: 0 12px;
                color: #545454;
                font-size: 14px;
                line-height: 1;
                text-decoration: none;
                border: 1px solid #dddddd;
                border-radius: 0;
                background: #ffffff;
                transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
            }

                .cx-news-pagination ul.pagination > li > a:hover {
                    color: #ffffff;
                    border-color: #a98b35;
                    background: #a98b35;
                }

            .cx-news-pagination ul.pagination > li.active > a,
            .cx-news-pagination ul.pagination > li.active > span {
                color: #ffffff;
                border-color: #a98b35;
                background: #a98b35;
            }

/* =========================================================
   TABLET
========================================================= */

@media screen and (max-width: 1024px) {

    .cx-news-banner {
        height: 320px;
    }

    .cx-news-banner-content h1 {
        font-size: 27px;
    }

    .cx-news-category-inner {
        width: calc(100% - 30px);
    }

    .cx-news-category-menu {
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }

        .cx-news-category-menu::-webkit-scrollbar {
            display: none;
        }

    .cx-news-category-item {
        flex: 0 0 auto;
        padding-right: 18px;
        padding-left: 18px;
        font-size: 14px;
    }

    .cx-news-category-active::after {
        right: 18px;
        left: 18px;
    }

    .cx-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 28px;
        row-gap: 45px;
    }
}

/* =========================================================
   MOBILE
========================================================= */

@media screen and (max-width: 767px) {

    .cx-news-banner {
        height: 230px;
    }

    .cx-news-banner-content h1 {
        font-size: 21px;
    }

    .cx-news-banner-line {
        width: 44px;
        margin-top: 13px;
    }

    .cx-news-category-inner {
        width: calc(100% - 20px);
    }

    .cx-news-category-menu {
        min-height: 54px;
    }

    .cx-news-category-item {
        min-height: 54px;
        padding-right: 14px;
        padding-left: 14px;
        font-size: 13px;
    }

    .cx-news-category-active::after {
        right: 14px;
        left: 14px;
    }

    .cx-news-main {
        padding: 38px 0 55px;
    }

    .cx-news-main-inner {
        width: calc(100% - 30px);
    }

    .cx-news-grid {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 40px;
    }

    .cx-news-card-body {
        padding-top: 20px;
    }

    .cx-news-card-title {
        font-size: 17px;
    }

    .cx-news-card-description {
        font-size: 13px;
    }

    .cx-news-pagination {
        margin-top: 40px;
    }
}
