/* style/news.css */

/* General Page Styles */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background */
    background-color: #ffffff; /* Explicitly set for content area if body is transparent */
}

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

.page-news__section-title {
    font-size: 32px;
    color: #26A9E0; /* Brand color for titles */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

/* 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;
    background: linear-gradient(135deg, #e0f2f7, #ffffff); /* Light gradient background */
    padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
}

.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;
}

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

.page-news__hero-title {
    font-size: 48px;
    color: #000000; /* Darker title for better contrast */
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-news__hero-description {
    font-size: 20px;
    color: #333333;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #EA7C07; /* Login color for CTA */
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-news__cta-button:hover {
    background: #d46a00; /* Slightly darker orange */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

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

.page-news__article-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    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 8px 25px rgba(0, 0, 0, 0.1);
}

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

.page-news__article-image 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: 10px;
    color: #26A9E0; /* Brand color for article titles */
    line-height: 1.3;
}

.page-news__article-title a {
    color: #26A9E0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: #1a7a9e; /* Darker shade on hover */
    text-decoration: underline;
}

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

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

.page-news__read-more-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #26A9E0;
    color: #ffffff;
    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-btn:hover {
    background: #1a7a9e;
}

/* Featured Analysis Section */
.page-news__featured-analysis {
    padding: 80px 0;
    background-color: #26A9E0; /* Brand color background */
    color: #ffffff; /* White text for dark background */
}

.page-news__featured-analysis .page-news__section-title {
    color: #ffffff;
}

.page-news__content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.page-news__content-text {
    flex: 2;
}

.page-news__content-text h3 {
    font-size: 28px;
    margin-top: 30px;
    margin-bottom: 20px;
    color: #ffffff;
}

.page-news__content-text p {
    font-size: 18px;
    margin-bottom: 20px;
    color: #f0f0f0;
}

.page-news__content-text strong {
    color: #ffffff;
    font-weight: bold;
}

.page-news__list {
    list-style-type: disc;
    margin-left: 25px;
    margin-bottom: 20px;
    font-size: 18px;
    color: #f0f0f0;
}

.page-news__list li {
    margin-bottom: 10px;
}

.page-news__content-image {
    flex: 1;
    min-width: 300px; /* Ensure image has some width */
    max-width: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

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

/* CTA Section */
.page-news__cta-section {
    padding: 80px 0;
    background-color: #f9f9f9;
    text-align: center;
}

.page-news__cta-container {
    max-width: 900px;
}

.page-news__cta-description {
    font-size: 20px;
    color: #555555;
    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,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.page-news__btn-primary {
    background: #EA7C07; /* Login color */
    color: #ffffff;
}

.page-news__btn-primary:hover {
    background: #d46a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-news__btn-secondary {
    background: #ffffff;
    color: #26A9E0; /* Brand color for text */
    border-color: #26A9E0; /* Brand color for border */
}

.page-news__btn-secondary:hover {
    background: #e0f2f7; /* Light background on hover */
    color: #1a7a9e;
    border-color: #1a7a9e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* FAQ Section */
.page-news__faq-section {
    padding: 80px 0;
    background-color: #ffffff;
}

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

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

/* 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: #f0f8ff; /* Light blue tint for expanded answer */
  border-radius: 0 0 5px 5px;
  color: #333333;
}

.page-news__faq-answer p {
    margin: 0;
    padding: 0;
}

/* 问题样式 */
.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; /* Slightly larger for better readability */
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn chặn thẻ h3 chặn sự kiện nhấp */
  color: #26A9E0; /* Brand color for question */
}

/* 切换图标 */
.page-news__faq-toggle {
  font-size: 28px; /* Larger icon */
  font-weight: bold;
  line-height: 1;
  color: #26A9E0; /* Brand color for toggle */
  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 nhấp */
  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 {
  color: #d46a00; /* Orange when active */
  transform: rotate(45deg); /* Plus to X effect */
}


/* Related Links Section */
.page-news__related-links {
    padding: 60px 0;
    background-color: #26A9E0; /* Brand color background */
    color: #ffffff;
}

.page-news__related-links .page-news__section-title {
    color: #ffffff;
}

.page-news__links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

.page-news__related-link {
    display: block;
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent white */
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-news__related-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}


/* 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: 28px;
    }
    .page-news__content-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .page-news__content-image {
        margin-top: 40px;
        max-width: 600px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure space for fixed header on mobile */
        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__latest-articles,
    .page-news__featured-analysis,
    .page-news__cta-section,
    .page-news__faq-section,
    .page-news__related-links {
        padding: 40px 0;
    }

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

    .page-news__section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .page-news__articles-grid {
        grid-template-columns: 1fr;
    }

    .page-news__article-image {
        height: 180px;
    }

    .page-news__article-title {
        font-size: 18px;
    }

    .page-news__article-summary,
    .page-news__content-text p,
    .page-news__list li {
        font-size: 15px;
    }

    .page-news__content-text h3 {
        font-size: 24px;
    }

    .page-news__content-image {
        min-width: unset;
        width: 100%;
    }

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 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: 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;
    }

    /* Images responsive */
    .page-news img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
    }
    
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__latest-articles,
    .page-news__featured-analysis,
    .page-news__cta-section,
    .page-news__faq-section,
    .page-news__related-links {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      overflow-x: hidden; /* Prevent horizontal scroll */
    }
}

/* Ensure no filter on images */
.page-news img {
    filter: none !important;
}