/* ==========================================================================
   News Page Styles
   ========================================================================== */

:root {
    --primary-blue: rgba(26, 32, 44, 1);
    --secondary-blue: #0080CA;
    --text-color: #333;
    --light-grey: #F5F5F5;
    --border-radius: 20px;
    --font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ==========================================================================
   News Hero Section
   ========================================================================== */
.news-hero-section {
    text-align: center;
    padding: 80px 20px 50px;
}

.hero-container {
    max-width: 1312px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: 46px;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-family: var(--font-family);
}

.hero-subtitle {
    max-width: 920px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.8;
    font-family: var(--font-family);
    color: #999B9F;
}

/* ==========================================================================
   News List Section
   ========================================================================== */
.news-list-section {
    padding: 50px 0;
}

.news-container {
    max-width: 1312px;
    margin: 0 auto;
    padding: 0 20px;
}

.featured-news-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 50px;
}

.featured-image {
    width: 70%;
    max-width: 1312px;
    height: auto;
    border-radius: 50px;
    z-index: 1;
}

.featured-text-content {
    width: 467px;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    padding: 30px;
    background-color: #F8F8F8;
    border-radius: 40px;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);

    /* Vị trí chồng lớp */
    margin-left: -90px;
    /* Dịch chuyển sang trái để chồng lên ảnh */
    z-index: 2;
    /* Đảm bảo khối văn bản nằm trên ảnh */
    height: 351px;
    align-items: center;
    justify-content: center;
}

.news-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px;
    line-height: 1.2;
    color: rgba(26, 32, 44, 1);
    font-family: var(--font-family);
}

.news-excerpt {
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.5;
    color: rgba(26, 32, 44, 1);
    font-family: var(--font-family);
    font-weight: 400;
}

.btn-submit {
    position: relative;
    width: 150px;
    height: 40px;
    border-radius: 50px;
    border: none;
    text-decoration: none;
    text-align: center;
    background-size: 200% auto;
    color: #ffffff;
    transition: all 0.4s ease;
    cursor: pointer;
    background: linear-gradient(90deg, #033793 -18.33%, #033793 10.11%, #0080CA 69.28%, #025CAF 100%);
    line-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-submit:hover {
    background-position: right center;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.btn-submit span {
    font-weight: 400;
    font-size: 12px;
    text-transform: uppercase;
}

.btn-submit i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
}

.news-grid {
    display: grid;
    /* Giữ nguyên bố cục lưới 3 cột */
    grid-template-columns: repeat(3, 1fr);
    /* Khoảng cách giữa các cột */
    gap: 30px;
    /* Chiều rộng tối đa bằng với container */
    max-width: 1312px;
    /* Căn giữa khối */
    margin: 0 auto 50px auto;
}

.news-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.card-image {
    width: 100%;
    height: 200px;
    /* Thêm chiều cao */
    object-fit: cover;
    /* Đảm bảo ảnh vừa khung */
    border-radius: 50px;
    margin-bottom: 15px;
}

.card-content-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    align-items: center;
}

.card-text-content {
    flex-grow: 1;
}

.news-date {
    font-size: 14px;
    color: #999;
    font-weight: 500;
    margin-right: 0;
    font-family: var(--font-family);
    font-weight: 400;
}

.news-title {
    font-size: 20px;
    font-weight: 800;
    margin: 10px 0;
    color: var(--primary-blue);
    line-height: 1.2;
}

.news-excerpt {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 20px;
}

.read-more {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    background: linear-gradient(90deg, #033793 -18.33%, #033793 10.11%, #0080CA 69.28%, #025CAF 100%);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.read-more::after {
    content: '›';
    font-size: 24px;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.read-more:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.read-more:hover::after {
    transform: translateX(5px);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 18px;
}

.pagination a {
    text-decoration: none;
    color: var(--primary-blue);
    padding: 5px 10px;
    font-family: var(--font-family);
}

.pagination span {
    margin-top: 5px;
}

.pagination a:hover {
    background-position: right center;
    /* Nổi lên bằng cách tăng box-shadow và di chuyển nhẹ */
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-section {
    background-color: var(--primary-blue);
    padding: 80px 20px;
    color: #fff;
}

.contact-container {
    display: flex;
    max-width: 1312px;
    margin: 0 auto;
    align-items: center;
    gap: 80px;
}

.contact-form-container {
    flex: 1;
}

.contact-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 30px;
}

.contact-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #fff;
    border-radius: 10px;
    background-color: transparent;
    color: #fff;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #fff;
}

.contact-form textarea {
    height: 120px;
    margin-bottom: 20px;
}

.contact-form button {
    background-color: #fff;
    color: var(--primary-blue);
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}

.contact-image {
    flex: 1;
    text-align: center;
}

.contact-image img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   ABOUT US PAGE - FINAL CONTACT SECTION
   ========================================================================== */

.final-contact-section {
    padding: 100px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.final-contact-section .container {
    display: flex;
    align-items: center;
    gap: 100px;
    max-width: 1140px;
}

/* --- Cột Form bên trái --- */
.contact-form-wrapper {
    flex-basis: 50%;
    background-color: #E8E8E8;
    padding: 50px;
    border-radius: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.form-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: #033793;
    text-align: center;
    margin: 0 0 35px 0;
}

.contact-form-wrapper .form-row {
    display: flex;
    gap: 20px;
    width: 100%;
}

.contact-form-wrapper .form-group {
    width: 100%;
    margin-bottom: 20px;
}

.contact-form-wrapper input,
.contact-form-wrapper textarea {
    width: 100%;
    padding: 18px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background-color: #ffffff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
}

.contact-form-wrapper textarea {
    height: 120px;
    resize: vertical;
}

.contact-information {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.btn-submit-2 {
    /* ... Copy style của các nút gradient bạn đã có, ví dụ .btn-arrow ... */
    position: relative;
    display: block;
    width: 50%;
    padding: 16px 0;
    border-radius: 50px;
    border: none;
    text-decoration: none;
    text-align: center;
    background-color: #033793;
    background: linear-gradient(90deg, #033793 -18.33%, #033793 10.11%, #0080CA 69.28%, #025CAF 100%);
    background-size: 200% auto;
    color: #ffffff;
    transition: all 0.4s ease;
    cursor: pointer;
}

.btn-submit-2:hover {
    background-position: right center;
}

.btn-submit-2 span {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
}

.btn-submit-2 i {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
}


/* --- Cột ảnh bên phải --- */
.contact-image-wrapper {
    flex-basis: 40%;
}

.contact-image-wrapper img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   News Modal Styles
   ========================================================================== */
.news-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    /* Ẩn modal ban đầu */
    display: none;
}

.news-modal-content {
    max-width: 1200px;
    max-height: 95vh;
    overflow-y: auto;
    margin: 20px;
    padding: 40px;
    background-color: #f8f8f8;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    text-align: center;

    /* Ẩn thanh cuộn trên trình duyệt WebKit (Chrome, Safari) */
    &::-webkit-scrollbar {
        display: none;
    }

    /* Ẩn thanh cuộn trên trình duyệt Firefox */
    scrollbar-width: none;

    /* Ẩn thanh cuộn trên trình duyệt Internet Explorer và Edge */
    -ms-overflow-style: none;
}

.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    cursor: pointer;
}

.close-button .x-icon::before,
.close-button .x-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background-color: #333;
    transform: translate(-50%, -50%) rotate(45deg);
}

.close-button .x-icon::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.news-modal-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 150px;
}

.news-single-date {
    font-size: 14px;
    color: #999;
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin-bottom: 10px;
    border: none;
    background: none;
    cursor: pointer;
}

.news-single-title {
    font-size: 46px;
    font-weight: 800;
    text-align: center;
    color: var(--primary-blue);
    margin-bottom: 50px;
    line-height: 1.2;
    font-family: var(--font-family);
}

.news-single-subtitle {
    max-width: 1045px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.8;
    color: #999B9F;
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin-bottom: 40px;
    font-weight: 400;
}

.news-single-image-wrapper {
    max-width: 935px;
    margin: 0 auto;
}

.news-single-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.news-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    margin-left: 95px;
    margin-bottom: 50px;
}

.news-single-body {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    text-align: justify;
    margin-top: 40px;
}

.news-single-body p {
    margin-bottom: 20px;
    font-family: var(--font-family);
}


/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {

    .hero-container {
        padding: 15px;
    }

    .news-container {
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .news-hero-section {
        padding: 20px 0;
    }

    .hero-subtitle {}

    .news-grid {
        /* Chuyển về bố cục một cột cho mobile */
        grid-template-columns: 1fr;
        /* Thêm khoảng cách ở dưới để tách khỏi phần phân trang */
        margin-bottom: 20px;
        padding: 15px;
    }

    /* Hiển thị thẻ news-card đầu tiên và ẩn các thẻ còn lại */
    .news-card {
        display: none;
        /* Ẩn tất cả các thẻ news-card */
    }

    .news-card:first-child {
        display: flex;
        /* Chỉ hiển thị thẻ news-card đầu tiên */
        flex-direction: column;
        background-color: transparent;
        /* Bỏ màu nền */
        box-shadow: none;
        /* Bỏ đổ bóng */
        padding: 0;
        /* Bỏ padding */
    }

    .news-card:first-child .card-image {
        /* Đảm bảo ảnh chiếm hết chiều rộng */
        width: 100%;
        height: auto;
        /* Tăng bo tròn góc để phù hợp với mẫu */
        border-radius: 50px;
    }

    .news-card:first-child .card-content-wrapper {
        padding: 0 10px;
        /* Thêm padding ngang để căn lề cho nội dung */
    }

    .news-card:first-child .card-text-content {
        margin-bottom: 20px;
    }

    .news-card:first-child .read-more {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 12px 25px;
        background: linear-gradient(90deg, #033793 -18.33%, #033793 10.11%, #0080CA 69.28%, #025CAF 100%);
        color: #fff;
        text-decoration: none;
        font-weight: 600;
        border-radius: 10px;
        align-self: flex-start;
    }

    .news-card:first-child .news-title {
        font-size: 24px;
        margin-top: 10px;
    }

    .news-card:first-child .news-excerpt {
        font-size: 16px;
    }

    /* Đảm bảo phần phân trang vẫn hiển thị */
    .pagination {
        display: flex;
        justify-content: center;
    }

    .featured-news-card {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 15px;
        margin-bottom: 5px;
    }

    .featured-image,
    .featured-text-content {
        width: 100%;
        border-radius: 20px;
    }

    .featured-text-content {
        margin-left: 0;
        max-width: 80vw;
        height: auto;
        opacity: 1;
        border-radius: 34px;
        position: relative;
        bottom: 40px;
    }

    .contact-container {
        flex-direction: column;
        text-align: center;
    }

    .contact-form-container,
    .contact-image {
        width: 100%;
    }

    .contact-image img {
        margin-top: 30px;
    }

    .hero-title {
        font-size: 32px;
    }

    .final-contact-section {
        padding: 80px 20px 110px;
        /* Giảm padding cho section */
    }

    .final-contact-section .container {
        flex-direction: column;
        /* Xếp các cột theo chiều dọc */
        gap: 0;
        /* Bỏ khoảng cách ngang */
    }

    /* --- Ẩn cột ảnh bên phải trên mobile --- */
    .contact-image-wrapper {
        display: none;
    }

    /* --- Cho cột form chiếm toàn bộ chiều rộng --- */
    .contact-form-wrapper {
        flex-basis: 100%;
        /* Chiếm hết chiều rộng */
        width: 140%;
        padding: 40px 20px;
        /* Giảm padding trên mobile */
    }

    .contact-form-wrapper .form-row {
        flex-direction: column;
        /* Xếp 2 ô input dọc */
        gap: 0;
    }

    /* --- Di chuyển nút Gửi lời nhắn ra ngoài --- */
    .contact-form-wrapper .btn-submit-2 {
        position: absolute;
        margin: 640px auto 0 auto;
        width: 60%;
    }

    .contact-information {
        width: 90%;
    }

    .news-modal-body {
        margin-top: 70px;
    }

    .news-meta {
        margin-bottom: 20px;
    }

    .news-modal-content {
        height: 90vh;
    }
}

/* Responsive cho Modal */
@media (max-width: 758px) {
    .news-modal-content {
        padding: 20px;
        margin: 30px;
    }

    .news-single-title {
        font-size: 28px;
    }

    .news-single-subtitle {
        font-size: 14px;
        padding: 0 10px;
    }

    .hero-container {
        padding: 12px;
    }

    .news-container {
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .news-hero-section {
        padding: 20px 0;
    }

    .hero-subtitle {}

    .news-grid {
        /* Chuyển về bố cục một cột cho mobile */
        grid-template-columns: 1fr;
        /* Thêm khoảng cách ở dưới để tách khỏi phần phân trang */
        margin-bottom: 20px;
        padding: 15px;
    }

    /* Hiển thị thẻ news-card đầu tiên và ẩn các thẻ còn lại */
    .news-card {
        display: none;
        /* Ẩn tất cả các thẻ news-card */
    }

    .news-card:first-child {
        display: flex;
        /* Chỉ hiển thị thẻ news-card đầu tiên */
        flex-direction: column;
        background-color: transparent;
        /* Bỏ màu nền */
        box-shadow: none;
        /* Bỏ đổ bóng */
        padding: 0;
        /* Bỏ padding */
    }

    .news-card:first-child .card-image {
        /* Đảm bảo ảnh chiếm hết chiều rộng */
        width: 100%;
        height: auto;
        /* Tăng bo tròn góc để phù hợp với mẫu */
        border-radius: 50px;
    }

    .news-card:first-child .card-content-wrapper {
        padding: 0 10px;
        /* Thêm padding ngang để căn lề cho nội dung */
    }

    .news-card:first-child .card-text-content {
        margin-bottom: 20px;
    }

    .news-card:first-child .read-more {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 12px 25px;
        background: linear-gradient(90deg, #033793 -18.33%, #033793 10.11%, #0080CA 69.28%, #025CAF 100%);
        color: #fff;
        text-decoration: none;
        font-weight: 600;
        border-radius: 10px;
        align-self: flex-start;
    }

    .news-card:first-child .news-title {
        font-size: 24px;
        margin-top: 10px;
    }

    .news-card:first-child .news-excerpt {
        font-size: 16px;
    }

    /* Đảm bảo phần phân trang vẫn hiển thị */
    .pagination {
        display: flex;
        justify-content: center;
    }

    .featured-news-card {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 15px;
        margin-bottom: 5px;
    }

    .featured-image,
    .featured-text-content {
        width: 100%;
        border-radius: 20px;
    }

    .featured-text-content {
        margin-left: 0;
        width: 80%;
        height: auto;
        opacity: 1;
        border-radius: 34px;
        position: relative;
        bottom: 40px;
    }

    .contact-container {
        flex-direction: column;
        text-align: center;
    }

    .contact-form-container,
    .contact-image {
        width: 100%;
    }

    .contact-image img {
        margin-top: 30px;
    }

    .hero-title {
        font-size: 32px;
    }

    .final-contact-section {
        padding: 80px 20px 110px;
        /* Giảm padding cho section */
    }

    .final-contact-section .container {
        flex-direction: column;
        /* Xếp các cột theo chiều dọc */
        gap: 0;
        /* Bỏ khoảng cách ngang */
    }

    /* --- Ẩn cột ảnh bên phải trên mobile --- */
    .contact-image-wrapper {
        display: none;
    }

    /* --- Cho cột form chiếm toàn bộ chiều rộng --- */
    .contact-form-wrapper {
        flex-basis: 100%;
        /* Chiếm hết chiều rộng */
        width: 140%;
        padding: 40px 20px;
        /* Giảm padding trên mobile */
    }

    .contact-form-wrapper .form-row {
        flex-direction: column;
        /* Xếp 2 ô input dọc */
        gap: 0;
    }

    /* --- Di chuyển nút Gửi lời nhắn ra ngoài --- */
    .contact-form-wrapper .btn-submit-2 {
        position: absolute;
        margin: 640px auto 0 auto;
        width: 60%;
    }

    .contact-information {
        width: 90%;
    }

    .news-modal-body {
        margin-top: 70px;
    }

    .news-meta {
        margin-bottom: 20px;
        margin-left: 20px;
    }

    .news-modal-content {
        height: 90vh;
    }
}

@media (min-width: 320px) and (max-width: 420px) {
    .news-single-title {
        font-size: 26px;
    }
}