/* style/news.css */

:root {
  --primary-color-dark: #1A1A1A;
  --accent-color-red: #DC143C;
  --text-color-light: #ffffff;
  --text-color-dark: #333333;
  --card-bg-light: #ffffff;
  --section-bg-dark: #1A1A1A;
  --section-bg-light: #f5f5f5;
  --border-color: #e0e0e0;
}

.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-light); /* Default text color for the page, assuming dark body background */
  background-color: var(--primary-color-dark); /* Assuming body background is dark */
}

/* Fixed Header Offset: Assuming shared.css sets padding-top on body */
.page-news__hero-section {
  position: relative;
  padding-top: 0; /* Assuming shared.css handles body padding-top */
  padding-bottom: 0;
  margin-top: 0;
  background-color: var(--primary-color-dark);
  overflow: hidden;
}

.page-news__hero-image {
  width: 100%;
  height: 500px; /* Fixed height for desktop hero image */
  overflow: hidden;
}

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

.page-news__hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text-color-light);
  max-width: 800px;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
  border-radius: 8px;
}

.page-news__hero-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--text-color-light);
}

.page-news__hero-description {
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-color-light);
}

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

.page-news__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-color-dark); /* Default for light background sections */
}

.page-news__dark-bg .page-news__section-title {
  color: var(--text-color-light);
}

/* Categories Section */
.page-news__categories-section {
  padding: 60px 0;
  background-color: var(--section-bg-light);
}

.page-news__category-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
}

.page-news__category-item {
  display: inline-block;
  padding: 10px 25px;
  border-radius: 50px;
  background-color: #e0e0e0;
  color: var(--text-color-dark);
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.page-news__category-item:hover,
.page-news__category-item.active {
  background-color: var(--accent-color-red);
  color: var(--text-color-light);
}

/* Featured News Section */
.page-news__featured-news-section {
  padding: 80px 0;
  background-color: var(--section-bg-dark);
  color: var(--text-color-light);
}

.page-news__featured-card {
  display: flex;
  background-color: rgba(255, 255, 255, 0.08); /* Slightly visible on dark bg */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__featured-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.page-news__featured-image {
  flex: 2;
  min-width: 400px;
}

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

.page-news__featured-content {
  flex: 3;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-news__featured-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.3;
}

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

.page-news__featured-title a:hover {
  color: var(--accent-color-red);
}

.page-news__featured-excerpt {
  font-size: 16px;
  margin-bottom: 30px;
  color: #cccccc;
}

.page-news__read-more-btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  text-align: center;
}

/* Primary Button */
.page-news__btn-primary {
  background-color: var(--accent-color-red);
  color: var(--text-color-light);
  border: 2px solid var(--accent-color-red);
}

.page-news__btn-primary:hover {
  background-color: #b30f2f;
  border-color: #b30f2f;
}

/* Secondary Button */
.page-news__btn-secondary {
  background-color: transparent;
  color: var(--accent-color-red);
  border: 2px solid var(--accent-color-red);
  margin-left: 15px;
}

.page-news__btn-secondary:hover {
  background-color: var(--accent-color-red);
  color: var(--text-color-light);
}

/* Article Grid Section */
.page-news__article-grid-section {
  padding: 80px 0;
  background-color: var(--section-bg-light);
  color: var(--text-color-dark);
}

.page-news__article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.page-news__article-card {
  background-color: var(--card-bg-light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-news__article-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.page-news__article-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
}

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

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

.page-news__article-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
  color: var(--text-color-dark);
}

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

.page-news__article-title a:hover {
  color: var(--accent-color-red);
}

.page-news__article-excerpt {
  font-size: 15px;
  color: #666666;
  margin-bottom: 20px;
}

.page-news__read-more-link {
  display: inline-block;
  padding: 10px 25px;
  margin: 0 25px 25px;
  border-radius: 5px;
  background-color: var(--accent-color-red);
  color: var(--text-color-light);
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.page-news__read-more-link:hover {
  background-color: #b30f2f;
}

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

.page-news__cta-content {
  max-width: 800px;
}

.page-news__cta-title {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--text-color-light);
}

.page-news__cta-description {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 40px;
  color: #cccccc;
}

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

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

.page-news__faq-list {
  margin-top: 40px;
}

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--card-bg-light);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
  position: relative;
}

.page-news__faq-question:hover {
  background: #f0f0f0;
}

.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--text-color-dark);
}

.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(--accent-color-red);
  transform: rotate(45deg); /* Change from '-' to 'x' visually */
}

.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 20px;
  opacity: 0;
  background: #f9f9f9;
  color: var(--text-color-dark);
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important;
  padding: 20px !important;
  opacity: 1;
  border-radius: 0 0 5px 5px;
}

.page-news__faq-answer p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #555555;
}

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

  .page-news__hero-description {
    font-size: 16px;
  }

  .page-news__featured-card {
    flex-direction: column;
  }

  .page-news__featured-image {
    min-width: unset;
    height: 350px;
  }

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

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

  .page-news__article-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .page-news__cta-title {
    font-size: 30px;
  }
}

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

  .page-news__hero-image {
    height: 300px;
  }

  .page-news__hero-content {
    max-width: 90%;
    padding: 15px;
  }

  .page-news__hero-title {
    font-size: 28px;
    margin-bottom: 10px;
  }

  .page-news__hero-description {
    font-size: 15px;
  }

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

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

  .page-news__categories-section,
  .page-news__featured-news-section,
  .page-news__article-grid-section,
  .page-news__cta-section,
  .page-news__faq-section {
    padding: 40px 0;
  }

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

  .page-news__category-item {
    padding: 8px 20px;
    font-size: 14px;
  }

  .page-news__featured-card {
    margin: 0 15px;
  }

  .page-news__featured-image {
    height: 250px;
  }

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

  .page-news__featured-title {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .page-news__featured-excerpt {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .page-news__read-more-btn {
    padding: 10px 25px;
    font-size: 15px;
  }

  .page-news__article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }

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

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

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

  .page-news__article-excerpt {
    font-size: 14px;
    margin-bottom: 15px;
  }

  .page-news__read-more-link {
    margin: 0 20px 20px;
    padding: 8px 20px;
    font-size: 14px;
  }

  .page-news__cta-title {
    font-size: 28px;
  }

  .page-news__cta-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

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

  .page-news__btn-secondary {
    margin-left: 0;
  }

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

  .page-news__faq-question {
    padding: 15px;
  }

  .page-news__faq-question h3 {
    font-size: 16px;
  }

  .page-news__faq-toggle {
    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;
  }

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

  .page-news__hero-image img,
  .page-news__featured-image img,
  .page-news__article-image img {
    width: 100% !important;
    height: 100% !important; /* object-fit will handle aspect ratio */
  }

  /* All containers containing images */
  .page-news__section,
  .page-news__container,
  .page-news__card,
  .page-news__featured-card,
  .page-news__article-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}