/* style/news.css */

/* Biến CSS cho màu sắc */
:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --dark-text-color: #333333;
    --light-text-color: #ffffff;
    --login-button-color: #EA7C07;
    --background-color: #FFFFFF;
    --black-color: #000000;
}

/* --- General Page Styling --- */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-text-color); /* Mặc định chữ tối cho nền sáng */
    background-color: var(--background-color);
}

.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.page-news__section {
    padding: 60px 0;
    text-align: center;
}

.page-news__section-title {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: bold;
    text-transform: uppercase;
}

.page-news__section-text {
    font-size: 18px;
    margin-bottom: 20px;
    line-height: 1.8;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__text-white {
    color: var(--light-text-color) !important;
}

/* --- Hero Section --- */
.page-news__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Đảm bảo không bị header che */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); /* Sử dụng màu sắc thương hiệu */
    color: var(--light-text-color);
}

.page-news__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-news__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

.page-news__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    color: var(--light-text-color);
}

.page-news__hero-title {
    font-size: 48px;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--light-text-color);
}

.page-news__hero-description {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--light-text-color);
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--login-button-color); /* Màu nút đăng ký/đăng nhập */
    color: var(--light-text-color);
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}

.page-news__cta-button:hover {
    background: darken(var(--login-button-color), 10%); /* Hiệu ứng hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button--dark {
    background: var(--primary-color);
    color: var(--light-text-color);
}

.page-news__cta-button--dark:hover {
    background: darken(var(--primary-color), 10%);
}

.page-news__cta-button--wide {
    min-width: 250px;
}

/* --- Introduction Section --- */
.page-news__introduction-section {
    background-color: var(--secondary-color);
    color: var(--dark-text-color);
}

.page-news__introduction-section .page-news__section-title {
    color: var(--primary-color);
}

.page-news__introduction-section .page-news__section-text strong {
    color: var(--primary-color);
}

/* --- Latest Articles Section --- */
.page-news__latest-articles-section {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}

.page-news__latest-articles-section .page-news__section-title {
    color: var(--light-text-color);
}

.page-news__articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news__article-card {
    background: var(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.page-news__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-news__article-image-wrapper {
    width: 100%;
    height: 225px; /* Chiều cao cố định cho hình ảnh */
    overflow: hidden;
}

.page-news__article-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Đảm bảo hình ảnh lấp đầy khung */
    display: block;
}

.page-news__article-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-news__article-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.page-news__article-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: darken(var(--primary-color), 15%);
}

.page-news__article-excerpt {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__read-more-button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--light-text-color);
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.page-news__read-more-button:hover {
    background: darken(var(--primary-color), 10%);
}

/* --- Expert Analysis Section --- */
.page-news__expert-analysis-section {
    background-color: var(--secondary-color);
    color: var(--dark-text-color);
}

.page-news__expert-analysis-section .page-news__section-title {
    color: var(--primary-color);
}

/* --- Community Section --- */
.page-news__community-section {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}

.page-news__community-section .page-news__section-title {
    color: var(--light-text-color);
}

/* --- FAQ Section --- */
.page-news__faq-section {
    background-color: var(--secondary-color);
    color: var(--dark-text-color);
}

.page-news__faq-section .page-news__section-title {
    color: var(--primary-color);
}

.page-news__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
    padding: 0 15px;
    opacity: 0;
    background: #f9f9f9;
    color: var(--dark-text-color);
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important;
    padding: 20px 15px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-news__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-news__faq-question:active {
    background: #eeeeee;
}

.page-news__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px; /* Tăng kích thước chữ cho dễ đọc */
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none;
    color: var(--dark-text-color);
}

.page-news__faq-toggle {
    font-size: 28px; /* Tăng kích thước biểu tượng */
    font-weight: bold;
    line-height: 1;
    color: var(--primary-color); /* Sử dụng màu thương hiệu */
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; /* Tăng kích thước vùng click */
    height: 32px;
}

.page-news__faq-item.active .page-news__faq-toggle {
    color: darken(var(--primary-color), 15%);
    transform: rotate(45deg); /* Thêm hiệu ứng xoay cho dấu cộng */
}

/* --- Call to Action Bottom Section --- */
.page-news__cta-bottom-section {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 80px 20px;
}

.page-news__cta-bottom-section .page-news__section-title {
    color: var(--light-text-color);
}


/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 40px;
    }
    .page-news__section-title {
        font-size: 30px;
    }
    .page-news__section-text {
        font-size: 16px;
    }
    .page-news__articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .page-news__article-title {
        font-size: 20px;
    }
    .page-news__article-excerpt {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__hero-title {
        font-size: 32px;
    }
    .page-news__hero-description {
        font-size: 16px;
    }
    .page-news__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-news__cta-button--wide {
        min-width: unset;
    }

    .page-news__section {
        padding: 40px 0;
    }
    .page-news__section-title {
        font-size: 24px;
    }
    .page-news__section-text {
        font-size: 15px;
    }

    .page-news__container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Image responsive for mobile */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-news__article-image-wrapper {
        height: 180px;
    }
    /* Content area images: min-width/height must not make display size smaller than 200px */
    .page-news__articles-grid img, .page-news__hero-image img {
        min-width: 200px;
        min- /* Adjusted min-height for aspect ratio */
    }

    .page-news__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-news__faq-question h3 {
        font-size: 16px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    .page-news__faq-toggle {
        margin-left: 10px;
        width: 28px;
        height: 28px;
        font-size: 24px;
    }
    .page-news__faq-answer {
        padding: 0 15px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px !important;
    }

    .page-news__cta-bottom-section {
        padding: 50px 15px;
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 28px;
    }
    .page-news__hero-description {
        font-size: 15px;
    }
    .page-news__section-title {
        font-size: 22px;
    }
    .page-news__section-text {
        font-size: 14px;
    }
    .page-news__articles-grid {
        grid-template-columns: 1fr;
    }
    .page-news__article-title {
        font-size: 18px;
    }
    .page-news__article-excerpt {
        font-size: 14px;
    }
    .page-news__article-image-wrapper {
        height: 160px;
    }
}