/* style/news.css */

/* Variables from shared.css are available */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f8f8f8;
  --bg-dark: #26A9E0;
  --btn-login-color: #EA7C07;
}

.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light body background */
  background-color: var(--secondary-color); /* Explicitly set for clarity, though body default is white */
}

/* Fixed header offset */
.page-news__hero-section {
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
}

/* General container for content sections */
.page-news__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

/* Section styling */
.page-news__section {
  padding: 60px 0;
}

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

.page-news__text-block {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: justify;
}

/* 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; /* Adjust padding-top handled by var(--header-offset) */
  background: linear-gradient(135deg, var(--primary-color) 0%, #a8e0f9 100%); /* Lighter gradient */
  overflow: hidden;
}

.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%;
  z-index: 1;
}

.page-news__hero-image {
  width: 100%;
  margin-bottom: 30px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

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

.page-news__main-title {
  font-size: 50px;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text-light);
  line-height: 1.2;
}

.page-news__hero-description {
  font-size: 20px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
}

.page-news__cta-button {
  display: inline-block;
  padding: 18px 45px;
  background: var(--btn-login-color); /* Using login color for CTA */
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button:hover {
  background: #d46c05; /* Slightly darker orange */
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Introduction Section */
.page-news__introduction-section {
  background-color: var(--secondary-color);
  padding-top: 40px; /* Adjust as Hero already has offset */
}

/* Featured Articles Section */
.page-news__featured-articles-section {
  background-color: var(--bg-dark); /* Primary color as background */
  color: var(--text-light);
}

.page-news__featured-articles-section .page-news__section-title {
  color: var(--text-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: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.page-news__article-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.page-news__article-card .page-news__card-title {
  font-size: 22px;
  font-weight: bold;
  margin: 20px 20px 10px;
  line-height: 1.4;
  flex-grow: 1; /* Make title take available space */
}

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

.page-news__article-card .page-news__card-title a:hover {
  color: #1a7bbd; /* Slightly darker primary */
}

.page-news__card-excerpt {
  font-size: 16px;
  color: var(--text-dark);
  margin: 0 20px 20px;
  flex-grow: 1;
}

.page-news__read-more-button {
  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: bold;
  margin: 0 20px 20px;
  transition: background-color 0.3s ease;
  align-self: flex-start; /* Align button to start */
}

.page-news__read-more-button:hover {
  background: #1a7bbd;
}

/* Latest Articles Section */
.page-news__latest-articles-section {
  background-color: var(--bg-light);
}

.page-news__article-list {
  display: grid;
  gap: 25px;
}

.page-news__list-item {
  display: flex;
  align-items: flex-start;
  background: var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__list-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.page-news__list-image {
  width: 300px;
  height: 200px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.page-news__list-content {
  padding: 20px;
  flex-grow: 1;
}

.page-news__list-title {
  font-size: 20px;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 10px;
}

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

.page-news__list-title a:hover {
  color: #1a7bbd;
}

.page-news__list-date {
  font-size: 14px;
  color: #777;
  margin-bottom: 10px;
}

.page-news__list-excerpt {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 15px;
}

/* Categories Section */
.page-news__categories-section {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

.page-news__categories-section .page-news__section-title {
  color: var(--text-light);
}

.page-news__categories-section .page-news__text-block {
  color: var(--text-light);
}

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

.page-news__category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.15); /* Semi-transparent white */
  padding: 30px 20px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-light);
  transition: background-color 0.3s ease, transform 0.3s ease;
  height: 100%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.page-news__category-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 5px rgba(0,0,0,0.3)); /* Allowed: drop-shadow, not color-changing filter */
}

.page-news__category-card .page-news__card-title {
  font-size: 20px;
  font-weight: bold;
  margin: 0;
  color: var(--text-light);
}

/* FAQ Section */
.page-news__faq-section {
  background-color: var(--secondary-color);
}

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

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: var(--secondary-color);
  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;
}

.page-news__faq-question:active {
  background: #eeeeee;
}

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

.page-news__faq-toggle {
  font-size: 28px;
  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; /* Prevents icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transform: rotate(0deg);
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: #333;
  transform: rotate(180deg); /* Rotate for minus sign */
}

.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 25px;
  opacity: 0;
  background: #fcfcfc;
  color: var(--text-dark);
  border-top: 1px solid #eee;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to accommodate content */
  padding: 20px 25px !important;
  opacity: 1;
  border-radius: 0 0 8px 8px;
}

.page-news__faq-answer p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
}

/* CTA Section at bottom */
.page-news__cta-section {
  background-color: var(--bg-dark); /* Primary color as background */
  color: var(--text-light);
  text-align: center;
  padding: 80px 0;
}

.page-news__cta-section .page-news__container {
  padding-top: 0;
  padding-bottom: 0;
}

.page-news__cta-section .page-news__section-title {
  color: var(--text-light);
  margin-bottom: 25px;
}

.page-news__cta-section .page-news__text-block {
  color: var(--text-light);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 40px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-news__section {
    padding: 40px 0;
  }

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

  .page-news__text-block {
    font-size: 16px;
    line-height: 1.7;
  }

  /* Hero Section Mobile */
  .page-news__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Ensure header offset for mobile */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__main-title {
    font-size: 36px;
    margin-bottom: 15px;
  }

  .page-news__hero-description {
    font-size: 17px;
    margin-bottom: 30px;
  }
}