/* style/news.css */

/* Base Styles for the News Page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background */
    background-color: #f4f4f4; /* Inherited from shared.css, explicitly set for clarity */
}

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

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

.page-news__section-title {
    font-size: 36px;
    color: #1A1A1A;
    margin-bottom: 20px;
    font-weight: bold;
}

.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;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
    padding-bottom: 60px;
    background: linear-gradient(135deg, #FFD700, #1A1A1A); /* Background for visual appeal */
    color: #ffffff;
}

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

.page-news__hero-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    min-height: 200px; /* Enforce minimum image size */
}

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

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

.page-news__hero-description {
    font-size: 20px;
    color: #f0f0f0;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__hero-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 200px;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary {
    background: #FFD700;
    color: #1A1A1A;
    border: 2px solid #FFD700;
}

.page-news__btn-primary:hover {
    background: #e6c200;
    border-color: #e6c200;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-news__btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.page-news__btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #FFD700;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Latest Articles Section */
.page-news__latest-articles {
    background-color: #f9f9f9;
    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: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 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 {
    width: 100%;
    height: 225px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    min-height: 200px; /* Min size requirement */
}

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

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

.page-news__article-link {
    color: #1A1A1A;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-link:hover {
    color: #FFD700;
}

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

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

.page-news__read-more-link {
    display: inline-block;
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more-link:hover {
    color: #e6c200;
    text-decoration: underline;
}

/* All Articles List Section */
.page-news__all-articles {
    background-color: #ffffff; /* Light background for contrast */
    padding-top: 80px;
    padding-bottom: 80px;
}

.page-news__article-list {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-news__list-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    text-align: left;
    transition: box-shadow 0.3s ease;
}

.page-news__list-item:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.page-news__list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.page-news__list-item-title {
    font-size: 20px;
    margin: 0;
    flex-grow: 1;
    line-height: 1.4;
}

.page-news__list-item-date {
    font-size: 14px;
    color: #888888;
    white-space: nowrap;
    margin-left: 20px;
}

.page-news__list-item-summary {
    font-size: 15px;
    color: #555555;
    margin-bottom: 15px;
}

.page-news__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
}

.page-news__pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background: #e0e0e0;
    color: #333333;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.page-news__pagination-link:hover {
    background: #FFD700;
    color: #1A1A1A;
}

.page-news__pagination-link--active {
    background: #FFD700;
    color: #1A1A1A;
    pointer-events: none;
}

/* Call to Action Section */
.page-news__cta-section {
    background-color: #1A1A1A; /* Dark background */
    color: #ffffff; /* Light text */
    padding-top: 80px;
    padding-bottom: 80px;
}

.page-news__cta-content .page-news__section-title {
    color: #FFD700;
}

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

.page-news__cta-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    margin: 40px auto;
    display: block;
    min-height: 200px; /* Enforce minimum image size */
}

.page-news__cta-section .page-news__btn-primary {
    background: #FFD700;
    color: #1A1A1A;
    border-color: #FFD700;
}

.page-news__cta-section .page-news__btn-primary:hover {
    background: #e6c200;
    border-color: #e6c200;
}

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

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

/* FAQ容器样式 */
.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px; /* Slightly larger radius for a modern look */
  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 20px; /* Adjusted padding */
  opacity: 0;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important; /* 🚨 Use !important and sufficiently large value */
  padding: 20px !important; /* Adjusted padding */
  opacity: 1;
  background: #ffffff; /* White background for answer */
  border-radius: 0 0 8px 8px; /* Match item border-radius */
  border-top: 1px solid #e0e0e0;
}

/* 问题样式 */
.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px; /* Adjusted padding */
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px; /* Match item border-radius */
  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 font size */
  font-weight: 600;
  line-height: 1.5;
  color: #1A1A1A;
  pointer-events: none; /* Prevent h3 from blocking click events */
}

/* 切换图标 */
.page-news__faq-toggle {
  font-size: 28px; /* Slightly larger icon */
  font-weight: bold;
  line-height: 1;
  color: #FFD700; /* Use brand color for toggle */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; /* Slightly larger target area */
  height: 32px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: #1A1A1A; /* Change color when active */
  transform: rotate(45deg); /* Rotate for "x" effect */
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-image {
        max-width: 90%;
    }
    .page-news__main-title {
        font-size: 40px;
    }
    .page-news__hero-description {
        font-size: 18px;
    }
    .page-news__section-title {
        font-size: 32px;
    }
    .page-news__articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__hero-image {
        border-radius: 4px;
        margin-bottom: 20px;
    }
    .page-news__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .page-news__hero-description {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-news__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-news__cta-button {
        padding: 12px 25px;
        font-size: 16px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        min-width: unset;
    }

    .page-news__section {
        padding: 40px 0;
    }
    .page-news__container {
        padding: 0 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-news__section-title {
        font-size: 28px;
        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-card {
        border-radius: 8px;
    }
    .page-news__article-image {
        height: 180px;
        min-height: 180px;
    }
    .page-news__article-content {
        padding: 20px;
    }
    .page-news__article-title {
        font-size: 18px;
    }
    .page-news__article-summary {
        font-size: 14px;
    }

    .page-news__list-item {
        padding: 20px;
        border-radius: 6px;
    }
    .page-news__list-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .page-news__list-item-title {
        font-size: 17px;
    }
    .page-news__list-item-date {
        margin-left: 0;
        font-size: 13px;
    }
    .page-news__list-item-summary {
        font-size: 14px;
    }

    .page-news__pagination {
        gap: 8px;
        margin-top: 30px;
    }
    .page-news__pagination-link {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 14px;
    }

    .page-news__cta-image {
        margin: 30px auto;
        border-radius: 8px;
        min-height: 150px;
    }

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

    /* Images responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
}