/* style/news.css */

/* Base styles for the news page */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Light text for dark body background */
  background-color: #121212;
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

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

.page-news__section-title {
  font-size: 2.5em;
  color: #017439;
  text-align: center;
  margin-bottom: 30px;
  font-weight: bold;
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  padding: 80px 20px;
  overflow: hidden;
  text-align: center;
  background-color: #017439; /* Use brand color for hero section background */
}

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

.page-news__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  color: #ffffff;
}

.page-news__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-news__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
}

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

/* 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: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-news__btn-primary {
  background-color: #C30808; /* Specific color for registration/login */
  color: #FFFF00; /* Specific font color for registration/login */
  border: 2px solid #C30808;
}

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

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

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

/* Latest Articles Section */
.page-news__latest-articles {
  padding: 80px 0;
  background-color: #0d0d0d;
}

.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.05);
  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;
  display: flex;
  flex-direction: column;
}

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

.page-news__article-image {
  width: 100%;
  height: 225px;
  object-fit: cover;
  display: block;
  min-width: 200px; /* Enforce min-size */
  min-height: 200px; /* Enforce min-size */
}

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

.page-news__article-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  font-weight: bold;
}

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

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

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

.page-news__read-more {
  color: #017439;
  text-decoration: none;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: #02a04e;
}

.page-news__read-more-icon {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

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

/* Video Section */
.page-news__video-section {
  padding: 80px 0;
  background-color: #1a1a1a;
}

.page-news__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  margin-bottom: 30px;
  border-radius: 12px;
}

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

.page-news__video-cta {
  text-align: center;
}

/* In-depth Analysis Section */
.page-news__in-depth-analysis {
  padding: 80px 0;
  background-color: #121212;
}

.page-news__analysis-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.page-news__analysis-image {
  flex: 1;
  max-width: 50%;
  border-radius: 12px;
  object-fit: cover;
  height: auto;
  min-width: 200px; /* Enforce min-size */
  min-height: 200px; /* Enforce min-size */
}

.page-news__analysis-text {
  flex: 1;
  color: #e0e0e0;
}

.page-news__analysis-text h3 {
  font-size: 1.8em;
  color: #017439;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-news__analysis-text p {
  margin-bottom: 20px;
  font-size: 1.05em;
}

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

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

.page-news__faq-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  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: 1.2em;
  font-weight: bold;
  color: #ffffff;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.08);
  transition: background-color 0.3s ease;
}

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

.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;
  color: #e0e0e0;
  font-size: 1em;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 15px 25px 25px 25px;
}

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

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

.page-news__cta-section .page-news__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.page-news__cta-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  min-width: 200px; /* Enforce min-size */
  min-height: 200px; /* Enforce min-size */
}

.page-news__cta-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-news__cta-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 700px;
}

.page-news__cta-content .page-news__btn-primary,
.page-news__cta-content .page-news__btn-secondary {
  margin: 0 10px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 3em;
  }
  .page-news__hero-description {
    font-size: 1.15em;
  }
  .page-news__analysis-content {
    flex-direction: column;
    align-items: center;
  }
  .page-news__analysis-image {
    max-width: 80%;
    margin-bottom: 30px;
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-news__hero-section {
    min-height: 400px;
    padding: 60px 15px;
  }
  .page-news__hero-title {
    font-size: 2.2em;
  }
  .page-news__hero-description {
    font-size: 1em;
  }
  .page-news__hero-cta {
    flex-direction: column;
    gap: 15px;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100%;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 0.95em;
    margin: 0;
  }
  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }
  .page-news__latest-articles,
  .page-news__video-section,
  .page-news__in-depth-analysis,
  .page-news__faq-section,
  .page-news__cta-section {
    padding: 60px 0;
  }
  .page-news__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-news__articles-grid {
    grid-template-columns: 1fr;
  }
  .page-news__article-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }
  .page-news__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-news__analysis-image {
    max-width: 100%;
    min-width: 200px !important;
    min-height: 200px !important;
  }
  .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: 15px 20px 20px 20px;
  }
  .page-news__cta-title {
    font-size: 2em;
  }
  .page-news__cta-description {
    font-size: 1em;
  }
  .page-news__cta-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }
  .page-news__cta-content .page-news__btn-primary,
  .page-news__cta-content .page-news__btn-secondary {
    width: calc(100% - 30px);
    margin: 0 auto;
  }
  .page-news__cta-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
}

@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.8em;
  }
  .page-news__article-title {
    font-size: 1.3em;
  }
  .page-news__cta-title {
    font-size: 1.8em;
  }
}