/* style/news.css */

/* Base styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: #f8f8f8; /* Light background for the page content */
}

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

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

.page-news__section-title {
    font-size: 36px;
    color: #8B0000; /* Dark red for titles */
    margin-bottom: 20px;
    font-weight: bold;
    text-transform: uppercase;
}

.page-news__section-description {
    font-size: 18px;
    color: #555555;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 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;
    /* Fixed Header Spacing: Apply to hero section if body doesn't have it */
    padding-top: var(--header-offset, 120px);
    background: linear-gradient(135deg, #FFD700, #8B0000); /* Brand colors for hero background */
    color: #ffffff; /* White text on dark/brand background */
}

.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;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.page-news__hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-news__hero-description {
    font-size: 20px;
    margin-bottom: 30px;
    color: #f0f0f0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #FFD700; /* Primary brand color */
    color: #8B0000; /* Dark red text for contrast */
    text-decoration: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid #FFD700;
}

.page-news__cta-button:hover {
    background: #8B0000; /* Auxiliary brand color on hover */
    color: #FFD700; /* Gold text on dark red hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: #FFD700;
}

/* Latest Articles Section */
.page-news__latest-articles {
    background-color: #ffffff;
    padding-top: 80px;
    padding-bottom: 80px;
}

.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: #fdfdfd;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

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

.page-news__article-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-news__article-content {
    padding: 25px;
}

.page-news__article-title {
    font-size: 22px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__article-title a.page-news__article-link {
    color: #8B0000; /* Dark red for article titles */
    text-decoration: none;
    font-weight: bold;
}

.page-news__article-title a.page-news__article-link:hover {
    color: #FFD700; /* Gold on hover */
    text-decoration: underline;
}

.page-news__article-meta {
    font-size: 14px;
    color: #777777;
    margin-bottom: 15px;
}

.page-news__article-excerpt {
    font-size: 16px;
    color: #555555;
    margin-bottom: 20px;
    height: 90px; /* Ensure consistent height for excerpts */
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-news__read-more-button {
    display: inline-block;
    padding: 10px 25px;
    background: #FFD700;
    color: #8B0000;
    text-decoration: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-news__read-more-button:hover {
    background: #8B0000;
    color: #FFD700;
}

/* Categories Section */
.page-news__categories {
    background-color: #f2f2f2;
    padding-top: 80px;
    padding-bottom: 80px;
}

.page-news__categories-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
}

.page-news__category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 20px;
    width: 220px; /* Adjusted width for category items */
    height: 250px; /* Adjusted height for category items */
    box-sizing: border-box;
}

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

.page-news__category-item img {
    width: 200px; /* Minimum display width */
     /* Minimum display height, maintaining aspect ratio */
    object-fit: cover;
    margin-bottom: 15px;
    border-radius: 5px;
    display: block;
}

.page-news__category-name {
    font-size: 18px;
    font-weight: bold;
    color: #8B0000;
}

/* Featured Articles Section */
.page-news__featured-articles {
    background-color: #ffffff;
    padding-top: 80px;
    padding-bottom: 80px;
}

.page-news__featured-list {
    display: grid;
    grid-template-columns: 1fr; /* Stack on mobile */
    gap: 30px;
    margin-top: 40px;
}

.page-news__featured-card {
    display: flex;
    background: #fdfdfd;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

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

.page-news__featured-image {
    width: 40%; /* Image takes 40% of card width */
    height: auto;
    object-fit: cover;
    display: block;
}

.page-news__featured-content {
    padding: 30px;
    width: 60%; /* Content takes 60% of card width */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-news__featured-title {
    font-size: 28px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-news__featured-title a.page-news__article-link {
    color: #8B0000;
    text-decoration: none;
    font-weight: bold;
}

.page-news__featured-title a.page-news__article-link:hover {
    color: #FFD700;
    text-decoration: underline;
}

.page-news__featured-excerpt {
    font-size: 17px;
    color: #555555;
    margin-bottom: 25px;
}

/* CTA Section */
.page-news__cta-section {
    background: #8B0000; /* Auxiliary brand color for dark section */
    color: #ffffff;
    padding-top: 80px;
    padding-bottom: 80px;
}

.page-news__cta-section .page-news__section-title {
    color: #FFD700; /* Gold title on dark red background */
}

.page-news__cta-section .page-news__section-description {
    color: #f0f0f0;
}

/* FAQ Section */
.page-news__faq-section {
    background-color: #f8f8f8;
    padding-top: 80px;
    padding-bottom: 80px;
}

.page-news__faq-list {
    max-width: 900px;
    margin: 40px auto 0 auto;
    text-align: left;
}

/* FAQ容器样式 */
.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
}

/* FAQ默认状态 - 答案隐藏 */
.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, opacity 0.4s ease;
    padding: 0 15px;
    opacity: 0;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important; /* 🚨 Sử dụng !important đảm bảo ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
    padding: 20px 15px !important;
    opacity: 1;
    background: #ffffff; /* White background for answer */
    border-radius: 0 0 5px 5px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 问题样式 */
.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #FFD700; /* Gold background for question */
    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;
    color: #8B0000; /* Dark red text for contrast */
}

.page-news__faq-question:hover {
    background: #e6c200; /* Slightly darker gold on hover */
    border-color: #d0d0d0;
}

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

/* 问题标题样式 */
.page-news__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Ngăn chặn thẻ h3 chặn sự kiện click */
    color: #8B0000; /* Đảm bảo màu chữ là đỏ sẫm */
}

/* 切换图标 */
.page-news__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #8B0000; /* Dark red for toggle icon */
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Ngăn chặn biểu tượng chặn sự kiện click */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-news__faq-item.active .page-news__faq-toggle {
    color: #333;
    transform: rotate(45deg); /* Xoay cho hiệu ứng 'x' */
}


/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 40px;
    }
    .page-news__hero-description {
        font-size: 18px;
    }
    .page-news__section-title {
        font-size: 30px;
    }
    .page-news__article-title {
        font-size: 20px;
    }
    .page-news__featured-title {
        font-size: 24px;
    }
    .page-news__categories-list {
        gap: 20px;
    }
    .page-news__category-item {
        width: 200px;
        height: 230px;
    }
    .page-news__category-item img {
        
        
    }
}

@media (max-width: 768px) {
    /* Fixed Header Spacing: Mobile specific adjustment */
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-news__container {
        padding: 0 15px;
    }

    .page-news__section {
        padding: 40px 0;
    }

    .page-news__hero-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .page-news__hero-description {
        font-size: 16px;
        margin-bottom: 20px;
    }
    .page-news__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        max-width: 100% !important; /* Mobile button adaptation */
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-news__section-title {
        font-size: 26px;
        margin-bottom: 15px;
    }
    .page-news__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-news__articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-news__article-image {
        height: 180px;
    }
    .page-news__article-title {
        font-size: 18px;
    }
    .page-news__article-excerpt {
        height: auto; /* Allow excerpt to expand */
    }

    .page-news__categories-list {
        flex-direction: column; /* Stack categories vertically */
        gap: 15px;
    }
    .page-news__category-item {
        width: 100%;
        max-width: 400px; /* Max width for mobile category item */
        height: auto;
        padding: 15px;
        flex-direction: row; /* Icon and text side-by-side */
        justify-content: flex-start;
    }
    .page-news__category-item img {
        width: 200px; /* Maintain minimum 200px width */
         /* Maintain minimum 150px height */
        object-fit: cover;
        margin-right: 15px;
        margin-bottom: 0;
    }
    .page-news__category-name {
        flex: 1; /* Allow name to take remaining space */
        text-align: left;
    }

    .page-news__featured-card {
        flex-direction: column; /* Stack image and content vertically */
    }
    .page-news__featured-image {
        width: 100%;
        height: 200px;
    }
    .page-news__featured-content {
        width: 100%;
        padding: 20px;
    }
    .page-news__featured-title {
        font-size: 20px;
    }
    .page-news__featured-excerpt {
        font-size: 15px;
    }

    /* FAQ Mobile */
    .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: 24px;
        height: 24px;
        font-size: 20px;
    }
    .page-news__faq-answer {
        padding: 0 15px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px !important;
    }

    /* Mobile image adaptation */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    .page-news__section,
    .page-news__article-card,
    .page-news__featured-card,
    .page-news__category-item,
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__categories-list {
        padding-left: 0;
        padding-right: 0;
    }
}