/* style/news.css */

/* Base styles for the news page, ensuring light text on dark body background */
.page-news {
  color: #ffffff; /* Light text for dark background */
  background-color: #1a1a2e; /* Inherited from shared.css body, but explicitly set for consistency */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll on page level */
}

.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;
  text-align: center;
  padding-top: var(--header-offset, 120px); /* Ensure content is below header */
  background-color: #017439; /* Brand color as hero background */
  color: #ffffff;
  overflow: hidden;
}

.page-news__hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 40px 20px;
  background: rgba(0, 0, 0, 0.4); /* Slightly dark overlay for text readability */
  border-radius: 10px;
  margin: 20px;
}

.page-news__main-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: #FFFF00; /* Yellow for prominence */
  line-height: 1.2;
}

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

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

.page-news__hero-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.page-news__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

/* General Section Styling */
.page-news__articles-section,
.page-news__video-section,
.page-news__deep-dive-section,
.page-news__app-download-section,
.page-news__faq-section,
.page-news__cta-bottom-section {
  padding: 60px 0;
}

.page-news__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  color: #FFFF00; /* Yellow for prominence */
}

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

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

.page-news__article-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%; /* Ensure cards have consistent height */
}

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

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

.page-news__article-content {
  padding: 25px;
  flex-grow: 1; /* Allow content to grow */
  display: flex;
  flex-direction: column;
}

.page-news__article-title {
  font-size: 1.6em;
  margin-bottom: 15px;
  color: #FFFF00; /* Yellow for prominence */
  line-height: 1.3;
}

.page-news__article-title a {
  color: #FFFF00;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__article-title a:hover {
  color: #ffffff;
}

.page-news__article-text {
  font-size: 1em;
  color: #f0f0f0;
  margin-bottom: 20px;
  flex-grow: 1; /* Allow text to grow */
}

.page-news__read-more {
  color: #017439; /* Brand color */
  text-decoration: none;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

.page-news__read-more:hover {
  color: #FFFF00; /* Yellow on hover */
}

.page-news__arrow {
  transition: transform 0.3s ease;
}

.page-news__read-more:hover .page-news__arrow {
  transform: translateX(5px);
}

/* Video Section */
.page-news__video-section {
  background-color: rgba(1, 116, 57, 0.2); /* Semi-transparent brand color */
  text-align: center;
}

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

.page-news__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  cursor: pointer;
}

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

/* Deep Dive Section */
.page-news__deep-dive-section {
  background-color: #1a1a2e;
}

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

.page-news__feature-card {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: background-color 0.3s ease;
}

.page-news__feature-card:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.page-news__feature-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-news__feature-title {
  font-size: 1.8em;
  color: #FFFF00; /* Yellow for prominence */
  margin-bottom: 15px;
}

.page-news__feature-text {
  color: #f0f0f0;
  font-size: 1em;
}

/* App Download Section */
.page-news__app-download-section {
  background-color: #017439;
  color: #ffffff;
}

.page-news__app-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.page-news__app-benefits {
  flex: 1 1 500px;
  max-width: 600px;
}

.page-news__app-subtitle {
  font-size: 2em;
  color: #FFFF00; /* Yellow for prominence */
  margin-bottom: 20px;
}

.page-news__app-list {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}

.page-news__app-list li {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  font-size: 1.1em;
}

.page-news__list-icon {
  color: #FFFF00; /* Yellow for checkmark */
  font-size: 1.2em;
  margin-right: 10px;
  font-weight: bold;
}

.page-news__app-image-wrapper {
  flex: 1 1 400px;
  max-width: 500px;
  text-align: center;
}

.page-news__app-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* FAQ Section */
.page-news__faq-section {
  background-color: #1a1a2e;
}

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

.page-news__faq-item {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

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

.page-news__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.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-out, padding 0.3s ease-out;
  color: #f0f0f0;
}

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

.page-news__faq-answer p {
  margin: 0;
  padding-bottom: 10px; /* Add some padding for the text within */
}

/* CTA Bottom Section */
.page-news__cta-bottom-section {
  background-color: #017439;
  text-align: center;
  padding: 80px 20px;
}

.page-news__cta-title {
  font-size: 3em;
  color: #FFFF00; /* Yellow for prominence */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__cta-description {
  font-size: 1.2em;
  color: #ffffff;
  max-width: 900px;
  margin: 0 auto 40px auto;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  text-align: center;
}

.page-news__btn-primary {
  background-color: #C30808; /* Red for register/login/CTA */
  color: #FFFF00; /* Yellow text for contrast */
  border: 2px solid #C30808;
}

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

.page-news__btn-secondary {
  background-color: #ffffff;
  color: #017439; /* Brand green text */
  border: 2px solid #017439;
}

.page-news__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #005020;
  border-color: #005020;
}

.page-news__btn-large {
  padding: 18px 40px;
  font-size: 1.3em;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 3em;
  }
  .page-news__section-title,
  .page-news__cta-title {
    font-size: 2.2em;
  }
  .page-news__hero-content {
    padding: 30px;
  }
  .page-news__articles-section,
  .page-news__deep-dive-section,
  .page-news__app-download-section,
  .page-news__faq-section,
  .page-news__cta-bottom-section {
    padding: 40px 0;
  }
  .page-news__feature-card {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-news__hero-section {
    min-height: 500px;
    padding-top: var(--header-offset, 120px) !important; /* Ensure header offset applies */
  }
  .page-news__hero-content {
    margin: 10px;
    padding: 20px;
  }
  .page-news__main-title {
    font-size: 2.2em;
  }
  .page-news__lead-paragraph {
    font-size: 1em;
  }
  .page-news__hero-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .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;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-news__hero-buttons a {
    max-width: 100% !important;
  }

  .page-news__section-title,
  .page-news__cta-title {
    font-size: 1.8em;
  }
  .page-news__section-description,
  .page-news__cta-description {
    font-size: 0.95em;
  }
  .page-news__articles-grid,
  .page-news__feature-grid {
    grid-template-columns: 1fr;
  }
  .page-news__article-image {
    height: 200px;
  }
  .page-news__article-title {
    font-size: 1.4em;
  }
  .page-news__article-text {
    font-size: 0.9em;
  }
  .page-news__video-wrapper {
    margin: 20px auto;
  }
  .page-news__app-content {
    flex-direction: column;
    gap: 20px;
  }
  .page-news__app-benefits,
  .page-news__app-image-wrapper {
    max-width: 100%;
    flex: none;
  }
  .page-news__app-subtitle {
    font-size: 1.6em;
  }
  .page-news__app-list li {
    font-size: 1em;
  }
  .page-news__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }
  .page-news__faq-answer {
    padding: 0 20px;
  }
  .page-news__faq-item.active .page-news__faq-answer {
    padding: 10px 20px 20px 20px;
  }
  .page-news__cta-bottom-section {
    padding: 50px 20px;
  }
  .page-news__cta-title {
    font-size: 2em;
  }
  .page-news__btn-large {
    font-size: 1.1em;
    padding: 15px 30px;
  }

  /* Mobile specific image/video/container rules */
  .page-news img {
    max-width: 100% !important;
    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: hidden !important;
  }
  .page-news__hero-section .page-news__container {
    padding-left: 0;
    padding-right: 0;
  }
  .page-news__hero-content {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-news__cta-buttons {
    flex-direction: column !important; /* For multiple buttons */
    gap: 10px !important;
  }
}

@media (max-width: 480px) {
  .page-news__main-title {
    font-size: 1.8em;
  }
  .page-news__lead-paragraph {
    font-size: 0.9em;
  }
  .page-news__section-title,
  .page-news__cta-title {
    font-size: 1.6em;
  }
  .page-news__app-subtitle {
    font-size: 1.4em;
  }
  .page-news__faq-question {
    font-size: 1em;
  }
  .page-news__faq-answer {
    font-size: 0.9em;
  }
  .page-news__btn-large {
    font-size: 1em;
    padding: 12px 25px;
  }
}