/* style/news.css */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #f9f9f9;
  --border-color: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

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

/* Section common styles */
.page-news__section-title {
  font-size: 2.2em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-news__section-intro {
  text-align: center;
  margin-bottom: 50px;
  font-size: 1.1em;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  padding: 60px 20px;
  background: linear-gradient(135deg, var(--primary-color), #2087b7); /* Adjusted gradient for visual appeal */
  color: var(--text-light);
  text-align: center;
  overflow: hidden;
}

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

.page-news__hero-content {
  margin-bottom: 40px;
}

.page-news__hero-title {
  font-size: 3em;
  margin-bottom: 20px;
  color: var(--text-light);
  line-height: 1.2;
}

.page-news__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__hero-image {
  width: 100%;
  max-width: 800px;
}

.page-news__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 8px 25px var(--shadow-color);
  object-fit: cover;
}

/* CTA Button - Primary */
.page-news__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: #EA7C07; /* Login color for CTA */
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

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

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

.page-news__article-card {
  background: var(--secondary-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 450px; /* Ensure cards have a minimum height for consistency */
  display: flex;
  flex-direction: column;
}

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

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

.page-news__article-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.page-news__article-card:hover .page-news__article-thumbnail img {
  transform: scale(1.05);
}

.page-news__article-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

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

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

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

.page-news__article-date {
  font-size: 0.85em;
  color: #999;
  text-align: right;
  display: block;
}

/* Explore Categories Section */
.page-news__explore-categories {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-news__explore-categories .page-news__section-title {
  color: var(--text-light);
}

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

.page-news__category-card {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  text-decoration: none;
  color: var(--text-light);
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 180px;
}

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

.page-news__category-title {
  font-size: 1.6em;
  margin-bottom: 10px;
  color: var(--text-light);
}

.page-news__category-description {
  font-size: 0.95em;
  opacity: 0.9;
}

/* Comprehensive Overview Section & In-depth Analysis Section */
.page-news__comprehensive-overview,
.page-news__in-depth-analysis {
  padding: 80px 0;
}

.page-news__comprehensive-overview {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-news__comprehensive-overview .page-news__section-title {
  color: var(--text-light);
}

.page-news__text-block {
  margin-bottom: 25px;
  font-size: 1.05em;
  line-height: 1.7;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
}

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

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

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

/* FAQ default state - answer 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;
  color: var(--text-dark);
}

/* FAQ expanded state - \u26a0\ufe0f Use!important and sufficiently large max-height */
.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important; /* \u26a0\ufe0f Use!important ensure priority, large value for content */
  padding: 20px 15px !important;
  opacity: 1;
  background: var(--secondary-color);
  border-radius: 0 0 5px 5px;
  border-top: 1px solid var(--border-color);
}

/* Question styles */
.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  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;
}

/* Question title styles */
.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
  color: var(--primary-color);
}

/* Toggle icon */
.page-news__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--primary-color);
  border-radius: 50%;
}

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

/* CTA Banner Section */
.page-news__cta-banner {
  padding: 80px 0;
  background: linear-gradient(90deg, var(--primary-color), #2087b7); /* Gradient background */
  color: var(--text-light);
  text-align: center;
}

.page-news__cta-banner .page-news__section-title {
  color: var(--text-light);
}

.page-news__cta-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

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

/* Secondary button style */
.page-news__btn-secondary {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: none;
}

.page-news__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-light);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 2.5em;
  }

  .page-news__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
    padding-top: var(--header-offset, 120px) !important; /* Mobile specific padding-top */
  }

  .page-news__hero-section {
    padding: 40px 15px;
  }

  .page-news__hero-title {
    font-size: 2em;
  }

  .page-news__hero-description {
    font-size: 1em;
  }

  .page-news__hero-image {
    margin-top: 30px;
  }

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

  .page-news__section-intro {
    font-size: 1em;
    margin-bottom: 40px;
  }

  .page-news__article-grid,
  .page-news__category-grid {
    grid-template-columns: 1fr;
  }

  .page-news__article-card {
    min-height: auto;
  }

  .page-news__article-title {
    font-size: 1.2em;
  }

  .page-news__category-card {
    min-height: 150px;
  }

  .page-news__cta-banner {
    padding: 60px 15px;
  }

  .page-news__cta-description {
    font-size: 1em;
  }

  .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__cta-buttons,
  .page-news__button-group,
  .page-news__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }

  .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 specific rules */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-news__section, .page-news__card, .page-news__container, .page-news__text-block {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Ensure content area images are not too small */
.page-news__article-thumbnail img,
.page-news__hero-image img {
  min-width: 200px;
  min-height: 200px;
}

/* No CSS filters for images */
.page-news img {
  filter: none;
}