/* style/news.css */

/* General Page Styles */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text for light background */
    background-color: #f8f8f8; /* Light background for the page */
}

/* Header offset */
.page-news__hero-section {
    padding-top: var(--header-offset, 120px);
}

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

.page-news__section-title {
    font-size: 36px;
    color: #8B4513; /* Brand primary color */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__section-description {
    font-size: 18px;
    color: #555555;
    text-align: center;
    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-bottom: 60px;
    background: linear-gradient(135deg, #A52A2A, #8B4513);
}

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

.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-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #ffffff;
}

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

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

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

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

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

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

.page-news__btn-secondary:hover {
    background: #ffffff;
    color: #8B4513;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Introduction Section */
.page-news__introduction-section {
    padding: 80px 0;
    background-color: #ffffff;
}
.page-news__introduction-section p {
    font-size: 17px;
    margin-bottom: 15px;
    text-align: justify;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}


/* Latest News Section */
.page-news__latest-news-section {
    padding: 80px 0;
    background-color: #f8f8f8;
}

.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;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

.page-news__article-title {
    font-size: 22px;
    margin-bottom: 10px;
    font-weight: bold;
}

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

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

.page-news__article-excerpt {
    font-size: 16px;
    color: #555555;
    margin-bottom: 15px;
    text-align: justify;
}

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

.page-news__read-more:hover {
    color: #8B4513;
}

.page-news__view-all {
    text-align: center;
    margin-top: 50px;
}

/* Categories Section */
.page-news__categories-section {
    padding: 80px 0;
    background: #8B4513;
    color: #ffffff;
}

.page-news__categories-section .page-news__section-title {
    color: #FFD700;
}

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

.page-news__categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.page-news__category-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-news__category-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.page-news__category-title {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-news__category-title a {
    color: #FFD700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__category-title a:hover {
    color: #ffffff;
}

.page-news__category-description {
    font-size: 16px;
    color: #e0e0e0;
    text-align: justify;
}

/* 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;
}

/* 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;
  color: #333333;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.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: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: #333333;
}

/* 切换图标 */
.page-news__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  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: 28px;
  height: 28px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: #333;
  transform: rotate(45deg);
}


/* Call to Action Banner */
.page-news__cta-banner {
    padding: 80px 0;
    background: linear-gradient(90deg, #A52A2A, #8B4513);
    text-align: center;
    color: #ffffff;
}

.page-news__cta-banner .page-news__section-title {
    color: #FFD700;
    margin-bottom: 20px;
}

.page-news__cta-banner .page-news__section-description {
    color: #f0f0f0;
    margin-bottom: 40px;
}

.page-news__cta-banner .page-news__cta-button {
    background: #FFD700;
    color: #333333;
    border: 2px solid #FFD700;
}

.page-news__cta-banner .page-news__cta-button:hover {
    background: #e6c200;
    border-color: #e6c200;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-content h1 {
        font-size: 40px;
    }
    .page-news__hero-description {
        font-size: 18px;
    }
    .page-news__section-title {
        font-size: 32px;
    }
    .page-news__section-description {
        font-size: 16px;
    }
    .page-news__article-title {
        font-size: 20px;
    }
    .page-news__category-title {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    /* Mobile Content Overflow Prevention */
    .page-news__container,
    .page-news__hero-container,
    .page-news__articles-grid,
    .page-news__categories-grid,
    .page-news__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow-x: hidden;
    }

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

    /* Buttons responsiveness */
    .page-news__cta-button,
    .page-news__btn-primary,
    .page-news__btn-secondary,
    .page-news a[class*="button"],
    .page-news a[class*="btn"] {
      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;
    }
    
    .page-news__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
    }
    .page-news__hero-content h1 {
        font-size: 32px;
    }
    .page-news__hero-description {
        font-size: 16px;
    }
    .page-news__section-title {
        font-size: 28px;
    }
    .page-news__section-description {
        font-size: 15px;
    }

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

    .page-news__categories-grid {
        grid-template-columns: 1fr;
    }
    .page-news__category-card {
        padding: 25px;
    }
    .page-news__category-title {
        font-size: 20px;
    }

    /* FAQ mobile adjustments */
    .page-news__faq-question {
      padding: 15px;
      flex-wrap: wrap;
    }
    
    .page-news__faq-question h3 {
      font-size: 15px;
      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;
    }

    .page-news__introduction-section,
    .page-news__latest-news-section,
    .page-news__categories-section,
    .page-news__faq-section,
    .page-news__cta-banner {
        padding: 40px 0;
    }
}