/* style/news.css */

/* Body background color is from shared.css, assuming dark based on custom colors */
.page-news {
  background-color: var(--background-color, #08160F);
  color: var(--text-main, #F2FFF6);
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

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

.page-news__section-title {
  font-size: clamp(28px, 4vw, 38px);
  color: var(--text-main, #F2FFF6);
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
  line-height: 1.2;
}

.page-news__description {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: var(--text-secondary, #A7D9B8);
}

.page-news__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: var(--text-main, #F2FFF6);
  border: none;
}

.page-news__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(42, 209, 111, 0.4);
}

.page-news__btn-secondary {
  background: var(--card-bg, #11271B);
  color: var(--primary-color, #11A84E);
  border: 2px solid var(--border-color, #2E7A4E);
}

.page-news__btn-secondary:hover {
  transform: translateY(-2px);
  background-color: var(--deep-green, #0A4B2C);
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 60px 0; /* body already handles padding-top */
  overflow: hidden;
  background-color: var(--background-color, #08160F);
}

.page-news__hero-image-wrapper {
  width: 100%;
  margin-bottom: 30px;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 600px; /* Limit height for aesthetic */
  border-radius: 12px;
}

.page-news__hero-content {
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
}

.page-news__main-title {
  font-size: clamp(36px, 5vw, 52px);
  color: var(--text-main, #F2FFF6);
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.1;
}

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

/* Latest News Section */
.page-news__latest-section {
  padding: 60px 0;
  background-color: var(--background-color, #08160F);
}

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

.page-news__article-card {
  background-color: var(--card-bg, #11271B);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

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

.page-news__article-title a:hover {
  color: var(--primary-color, #11A84E);
}

.page-news__article-meta {
  font-size: 14px;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 15px;
}

.page-news__article-excerpt {
  font-size: 16px;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 20px;
}

.page-news__read-more {
  color: var(--primary-color, #11A84E);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: var(--glow-color, #57E38D);
}

.page-news__view-all-wrapper {
  text-align: center;
}

/* Featured Section */
.page-news__featured-section {
  padding: 60px 0;
  background-color: var(--background-color, #08160F);
}

.page-news__featured-content {
  display: flex;
  flex-direction: row;
  gap: 40px;
  align-items: center;
  background-color: var(--card-bg, #11271B);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__featured-image {
  width: 50%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.page-news__featured-text {
  width: 50%;
}

.page-news__featured-title {
  font-size: 28px;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-news__featured-description {
  font-size: 18px;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 30px;
}

/* Categories Section */
.page-news__categories-section {
  padding: 60px 0;
  background-color: var(--background-color, #08160F);
}

.page-news__category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-news__category-item a {
  display: block;
  padding: 12px 25px;
  background-color: var(--deep-green, #0A4B2C);
  color: var(--text-main, #F2FFF6);
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  font-weight: bold;
}

.page-news__category-item a:hover {
  background-color: var(--primary-color, #11A84E);
  transform: translateY(-2px);
}

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
  background-color: var(--background-color, #08160F);
}

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

.page-news__faq-item {
  background-color: var(--card-bg, #11271B);
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 18px;
  font-weight: bold;
  color: var(--text-main, #F2FFF6);
  cursor: pointer;
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

.page-news__faq-question::-webkit-details-marker {
  display: none; /* For details/summary */
}

.page-news__faq-item[open] .page-news__faq-question,
.page-news__faq-item.active .page-news__faq-question {
  background-color: var(--primary-color, #11A84E);
}

.page-news__faq-toggle {
  font-size: 24px;
  line-height: 1;
  margin-left: 15px;
  color: var(--glow-color, #57E38D);
}

.page-news__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 16px;
  color: var(--text-secondary, #A7D9B8);
}

.page-news__faq-item:not([open]) .page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-news__faq-item[open] .page-news__faq-answer {
  max-height: 500px; /* Arbitrary large value for smooth transition */
  transition: max-height 0.3s ease-in, padding 0.3s ease-in;
}

/* Final CTA Section */
.page-news__cta-section {
  padding: 60px 0;
  background-color: var(--deep-green, #0A4B2C);
  text-align: center;
}

.page-news__cta-section .page-news__section-title {
  color: var(--text-main, #F2FFF6);
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-image {
    max-height: 500px;
  }
  .page-news__featured-content {
    flex-direction: column;
    padding: 30px;
  }
  .page-news__featured-image,
  .page-news__featured-text {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .page-news__container {
    padding: 0 15px !important;
  }

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

  .page-news__hero-image-wrapper {
    margin-bottom: 20px;
  }

  .page-news__hero-image {
    max-height: 350px;
  }

  .page-news__main-title {
    font-size: 32px;
  }

  .page-news__description {
    font-size: 16px;
    margin-bottom: 20px;
  }

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

  .page-news__articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-news__article-image {
    height: 180px;
  }

  .page-news__article-title {
    font-size: 20px;
  }

  .page-news__featured-content {
    padding: 20px;
  }

  .page-news__featured-title {
    font-size: 24px;
  }

  .page-news__featured-description {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .page-news__category-list {
    flex-direction: column;
    gap: 10px;
  }

  .page-news__category-item a {
    width: 100%;
  }

  .page-news__faq-question {
    font-size: 16px;
    padding: 15px 20px;
  }

  .page-news__faq-answer {
    font-size: 15px;
    padding: 0 20px 15px 20px;
  }

  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  .page-news__btn {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Ensure all images are responsive */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__hero-section,
  .page-news__latest-section,
  .page-news__featured-section,
  .page-news__categories-section,
  .page-news__faq-section,
  .page-news__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-news__video-section {
    padding-top: 10px !important;
  }
}