:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --login-color: #EA7C07;
    --background-color: #FFFFFF; /* Default body background is white */
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --border-color: #e0e0e0;
}

/* Base styles for the page content */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark); /* Default text color for light background */
    background-color: var(--background-color);
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

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

.page-news__section-title {
    font-size: 36px;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    line-height: 1.2;
}

.page-news__main-title {
    font-size: 42px;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-news__intro-text {
    font-size: 18px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px auto;
    line-height: 1.8;
}

/* Hero Banner Section (not the homepage specific HERO, but a banner for news) */
.page-news__hero-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #a6d8f0 100%); /* Lighter gradient for hero */
    color: var(--text-color-light); /* Light text on primary background */
}

.page-news__hero-content-wrapper {
    max-width: 900px;
    margin-bottom: 40px;
}

.page-news__hero-content-wrapper .page-news__main-title {
    color: var(--text-color-light); /* Ensure title is white on this background */
}

.page-news__hero-content-wrapper .page-news__intro-text {
    color: var(--text-color-light); /* Ensure intro text is white */
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-width: 1000px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* CTA Button Styles */
.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--login-color); /* Use login color for CTA */
    color: var(--text-color-light);
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    border: 2px solid var(--login-color);
}

.page-news__cta-button:hover {
    background: #c76600; /* Manual darken */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.page-news__cta-button--small {
    padding: 12px 30px;
    font-size: 16px;
    margin-top: 30px;
    border-radius: 6px;
}


/* Latest Articles Section */
.page-news__latest-articles {
    padding: 80px 0;
    background-color: var(--background-color); /* Light background */
}

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

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

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

.page-news__article-thumbnail {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    overflow: hidden;
}

.page-news__article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.page-news__article-title {
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.3;
}

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

.page-news__article-title a:hover {
    color: #1e87bb;
}

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

.page-news__read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more:hover {
    color: #1e87bb;
}

.page-news__arrow {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.page-news__read-more:hover .page-news__arrow {
    transform: translateX(5px);
}

/* Detailed Article Sections */
.page-news__detailed-article-section {
    padding: 80px 0;
}

.page-news__detailed-article-section.page-news__dark-bg {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.page-news__detailed-article-section.page-news__light-bg {
    background-color: var(--background-color);
    color: var(--text-color-dark);
}

.page-news__detailed-article-section.page-news__dark-bg .page-news__section-title {
    color: var(--text-color-light);
}

.page-news__detailed-article-section.page-news__light-bg .page-news__section-title {
    color: var(--primary-color);
}

.page-news__article-content-full {
    max-width: 900px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.8;
}

.page-news__article-content-full h3 {
    font-size: 28px;
    color: var(--login-color); /* Use a contrasting color for subheadings */
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.3;
}

.page-news__detailed-article-section.page-news__dark-bg .page-news__article-content-full h3 {
    color: var(--secondary-color); /* White for subheadings on dark background */
}

.page-news__article-content-full p {
    margin-bottom: 20px;
}

.page-news__article-main-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* FAQ Section */
.page-news__faq-section {
    padding: 80px 0;
    background-color: #f9f9f9; /* Slightly off-white for contrast */
}

.page-news__faq-list {
    max-width: 800px;
    margin: 0 auto;
}

/* FAQ容器样式 */
.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* 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 25px;
  opacity: 0;
  font-size: 16px;
  color: #555555;
  line-height: 1.7;
}

/* 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 25px !important;
  opacity: 1;
  background: var(--secondary-color); /* White background for answer */
  border-radius: 0 0 8px 8px;
}

/* 问题样式 */
.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: var(--primary-color); /* Primary color for question background */
  color: var(--text-color-light); /* White text on primary background */
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  position: relative;
}

.page-news__faq-question:hover {
  background: #1e87bb;
  border-color: #1e87bb;
}

.page-news__faq-item.active .page-news__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: #1f94c9;
    border-color: #1f94c9;
}

/* 问题标题样式 */
.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
  color: var(--text-color-light); /* Ensure h3 is white */
}

/* 切换图标 */
.page-news__faq-toggle {
  font-size: 28px; /* Larger for better visibility */
  font-weight: bold;
  line-height: 1;
  color: var(--text-color-light); /* White toggle icon */
  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; /* Larger hit area */
  height: 32px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' effect */
  color: var(--text-color-light);
}

/* CTA Section */
.page-news__cta-section {
    padding: 80px 0;
    background-color: var(--primary-color); /* Dark background */
    color: var(--text-color-light); /* Light text */
    text-align: center;
}

.page-news__cta-content {
    max-width: 900px;
    margin: 0 auto;
}

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

.page-news__cta-section p {
    font-size: 18px;
    margin-bottom: 40px;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-news__btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background: var(--login-color);
    color: var(--text-color-light);
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid var(--login-color);
}

.page-news__btn-primary:hover {
    background: #c76600; /* Manual darken */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 40px;
    background: transparent;
    color: var(--text-color-light); /* White text on primary background */
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid var(--text-color-light); /* White border */
}

.page-news__btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 38px;
    }
    .page-news__section-title {
        font-size: 32px;
    }
    .page-news__article-content-full {
        font-size: 16px;
    }
    .page-news__article-content-full h3 {
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    .page-news {
        padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
        font-size: 16px;
        line-height: 1.6;
    }
    .page-news__container {
        padding: 0 15px;
    }
    .page-news__main-title {
        font-size: 30px;
        margin-bottom: 15px;
    }
    .page-news__intro-text {
        font-size: 16px;
        margin-bottom: 25px;
    }
    .page-news__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    .page-news__hero-banner {
        padding: 40px 15px;
    }
    .page-news__hero-content-wrapper {
        margin-bottom: 30px;
    }
    .page-news__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        margin-top: 15px;
        width: 100% !important; /* Ensure buttons are full width */
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-news__cta-button--small {
        padding: 10px 25px;
        font-size: 15px;
        width: 100% !important;
        max-width: 100% !important;
    }
    .page-news__latest-articles,
    .page-news__detailed-article-section,
    .page-news__faq-section,
    .page-news__cta-section {
        padding: 50px 0;
    }
    .page-news__articles-grid {
        grid-template-columns: 1fr;
    }
    .page-news__article-thumbnail {
        height: 200px;
    }
    .page-news__article-title {
        font-size: 20px;
    }
    .page-news__article-content-full {
        font-size: 15px;
    }
    .page-news__article-content-full h3 {
        font-size: 24px;
        margin-top: 30px;
        margin-bottom: 15px;
    }
    .page-news__article-main-image {
        border-radius: 8px;
        margin-bottom: 20px;
    }

    /* FAQ Mobile */
    .page-news__faq-item {
        margin-bottom: 10px;
    }
    .page-news__faq-question {
        padding: 15px 20px;
    }
    .page-news__faq-question h3 {
        font-size: 16px;
    }
    .page-news__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }
    .page-news__faq-answer {
        padding: 0 20px;
        font-size: 15px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px 20px !important;
    }

    /* CTA Buttons Mobile */
    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-news__btn-primary,
    .page-news__btn-secondary {
        padding: 12px 30px;
        font-size: 16px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* General image responsive styles */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__hero-content-wrapper,
    .page-news__hero-image-wrapper,
    .page-news__article-card,
    .page-news__article-content-full,
    .page-news__faq-list,
    .page-news__cta-content,
    .page-news__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__cta-buttons {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}