/* style/news.css */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Body background is dark #0a0a0a, so text should be light */
  background-color: #0a0a0a; /* Ensure consistency with shared.css */
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  padding: 60px 0;
  text-align: center;
  overflow: hidden;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  background-color: #0a0a0a;
  color: #ffffff;
}

.page-news__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.3;
}

.page-news__hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 20px;
}

.page-news__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-news__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

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

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__btn-primary {
  background-color: #C30808; /* Custom color for Register/Login */
  color: #FFFF00; /* Custom font color for Register/Login */
  border: 2px solid #C30808;
}

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

.page-news__btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #017439;
}

.page-news__btn-secondary:hover {
  background-color: #017439;
  color: #ffffff;
}

/* Section Titles and Descriptions */
.page-news__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  color: #017439;
}

.page-news__section-title--white {
  color: #ffffff;
}

.page-news__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #666;
}

.page-news__section-description--white {
  color: #f0f0f0;
}

/* Featured Articles Section */
.page-news__featured-articles {
  padding: 80px 0;
  background-color: #ffffff;
  color: #333333;
}

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

.page-news__article-card {
  background-color: #f8f8f8;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: #333333;
}

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

.page-news__article-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  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: 1.4em;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-news__article-title a {
  color: #017439;
  text-decoration: none;
}

.page-news__article-title a:hover {
  text-decoration: underline;
}

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

.page-news__read-more {
  display: inline-block;
  color: #017439;
  font-weight: bold;
  text-decoration: none;
  align-self: flex-start;
}

.page-news__read-more:hover {
  text-decoration: underline;
}

/* Video Section */
.page-news__video-section {
  padding: 80px 0;
  text-align: center;
  background-color: #0a0a0a;
  color: #ffffff;
}

.page-news__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 900px;
  margin: 40px auto;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  width: 100%;
  box-sizing: border-box;
}

.page-news__video-link {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.page-news__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
}

.page-news__video-cta {
  margin-top: 40px;
}

/* Categories Section */
.page-news__categories {
  padding: 80px 0;
  background-color: #f8f8f8;
  color: #333333;
}

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

.page-news__category-card {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: #333333;
}

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

.page-news__category-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  color: #017439;
}

.page-news__category-description {
  font-size: 0.95em;
  color: #555;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 80px 0;
  background-color: #0a0a0a;
  color: #ffffff;
}

.page-news__faq-list {
  max-width: 900px;
  margin: 40px auto 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background-color: #1a1a1a; /* Slightly lighter dark background for FAQ cards */
}

.page-news__faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-news__faq-item:last-child {
  border-bottom: none;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  font-weight: bold;
  cursor: pointer;
  color: #ffffff;
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background-color: #2a2a2a;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
  transform: rotate(45deg);
}

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #f0f0f0;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 1000px !important; /* Use !important for override */
  padding: 15px 25px;
}

.page-news__faq-answer p {
  margin-bottom: 0;
  color: #f0f0f0;
}

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

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }
  
  .page-news__hero-section {
    min-height: 450px;
    padding: 40px 0;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile offset */
  }

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

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

  .page-news__hero-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
  }

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

  .page-news__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-news__featured-articles,
  .page-news__video-section,
  .page-news__categories,
  .page-news__faq-section {
    padding: 50px 0;
  }

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

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

  .page-news__article-image {
    height: 180px; /* Adjust height for mobile */
  }

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

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

  .page-news__video-wrapper {
    margin: 30px 15px;
  }

  .page-news__faq-list {
    margin: 30px 15px 0 15px;
  }

  .page-news__faq-question {
    font-size: 1em;
    padding: 18px 20px;
  }

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

  .page-news__faq-item.active .page-news__faq-answer {
    padding: 10px 20px;
  }

  /* Mobile image, video, button responsive enforcement */
  .page-news img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news video,
  .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__video-section,
  .page-news__video-container,
  .page-news__video-wrapper,
  .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;
    overflow-x: hidden !important; /* Ensure no horizontal scroll */
  }

  .page-news__hero-buttons,
  .page-news__video-cta {
    padding-left: 15px;
    padding-right: 15px;
  }

  .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;
  }
  .page-news__cta-buttons {
    flex-direction: column !important;
    gap: 10px !important;
  }
}

@media (max-width: 480px) {
  .page-news__hero-title {
    font-size: 1.8em;
  }
  .page-news__hero-description {
    font-size: 0.9em;
  }
  .page-news__section-title {
    font-size: 1.5em;
  }
}