/* style/news.css */
:root {
  --primary-color: #003366;
  --secondary-color: #FFD700;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f8f9fa;
  --border-light: #e0e0e0;
}

.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.7;
  color: var(--text-light); /* Assuming body background is dark from shared.css */
  background-color: var(--dark-bg-1); /* Inherited from shared.css, ensure text contrast */
}

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

/* Hero Section (News Page specific intro, NOT homepage HERO) */
.page-news__hero-section {
  background: linear-gradient(135deg, var(--primary-color), #004d99);
  padding: 180px 0 80px; /* Desktop: Adjust padding-top for fixed header */
  text-align: center;
  color: var(--text-light);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__hero-title {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.page-news__hero-description {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 30px;
  line-height: 1.8;
}

.page-news__hero-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__hero-link:hover {
  color: #fff;
  text-decoration: underline;
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button:hover {
  background: #ffc107;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Latest Articles Section */
.page-news__latest-articles-section,
.page-news__popular-topics-section,
.page-news__faq-section {
  padding: 60px 0;
  background-color: var(--bg-light); /* Light background for content sections */
  color: var(--text-dark);
}

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

.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: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  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-image {
  width: 100%;
  height: 220px; /* Fixed height for consistent card appearance */
  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;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

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

.page-news__article-title a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

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

.page-news__article-summary {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__article-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__article-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.page-news__read-more {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 600;
  align-self: flex-start;
  transition: background-color 0.3s ease;
}

.page-news__read-more:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
}

/* Popular Topics Section */
.page-news__topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 25px;
  text-align: center;
}

.page-news__topic-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--primary-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 180px; /* Ensure sufficient size for non-small images */
}

.page-news__topic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-news__topic-icon {
  width: 100px; /* Ensure minimum size */
  height: 100px; /* Ensure minimum size */
  object-fit: contain;
  margin-bottom: 15px;
}

.page-news__topic-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--primary-color);
}

/* FAQ Section */
.page-news__faq-section {
  background-color: var(--bg-light);
  padding: 60px 0;
  color: var(--text-dark);
}

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

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

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

.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 var(--border-light);
  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: 17px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--primary-color);
}

.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: var(--primary-color);
  transform: rotate(45deg);
}

.page-news__faq-answer p {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 0;
}

.page-news__faq-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__faq-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 36px;
  }
  .page-news__hero-description {
    font-size: 16px;
  }
  .page-news__section-title {
    font-size: 28px;
  }
  .page-news__article-title {
    font-size: 20px;
  }
  .page-news__articles-grid {
    gap: 20px;
  }
  .page-news__topic-card {
    padding: 20px;
    min-height: 160px;
  }
  .page-news__topic-icon {
    width: 80px;
    height: 80px;
  }
  .page-news__faq-question h3 {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding: 140px 0 60px !important; /* Mobile: Adjust padding-top for fixed header */
  }
  .page-news__hero-title {
    font-size: 30px;
  }
  .page-news__hero-description {
    font-size: 15px;
  }
  .page-news__cta-button {
    padding: 12px 30px;
    font-size: 18px;
  }
  .page-news__latest-articles-section,
  .page-news__popular-topics-section,
  .page-news__faq-section {
    padding: 40px 0;
  }
  .page-news__section-title {
    font-size: 26px;
    margin-bottom: 30px;
  }
  .page-news__articles-grid {
    grid-template-columns: 1fr;
  }
  .page-news__article-image {
    height: 180px;
  }
  .page-news__article-content {
    padding: 20px;
  }
  .page-news__article-title {
    font-size: 18px;
  }
  .page-news__article-summary {
    font-size: 15px;
  }
  .page-news__read-more {
    padding: 8px 15px;
    font-size: 14px;
  }
  .page-news__topics-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
  }
  .page-news__topic-card {
    padding: 15px;
    min-height: 140px;
  }
  .page-news__topic-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 10px;
  }
  .page-news__topic-title {
    font-size: 16px;
  }
  .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;
  }

  /* Mobile image responsive adaptation */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__articles-grid,
  .page-news__topics-grid {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 480px) {
  .page-news__hero-title {
    font-size: 26px;
  }
  .page-news__cta-button {
    font-size: 16px;
    padding: 10px 25px;
  }
  .page-news__section-title {
    font-size: 22px;
  }
  .page-news__topic-card {
    min-height: 120px;
  }
  .page-news__topic-icon {
    width: 60px;
    height: 60px;
  }
  .page-news__topic-title {
    font-size: 15px;
  }
}