/* style/news.css */
/* Base styles for the news page */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main); /* Default text color for dark background */
  background-color: var(--bg-color); /* Inherits from body (shared.css) */
}

/* Color variables based on provided palette */
:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --btn-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --bg-color: #08160F; /* This is the body background */
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green: #0A4B2C;
  --light-text-on-dark: #F2FFF6; /* Specifically for dark backgrounds */
  --dark-text-on-light: #333333; /* Specifically for light backgrounds */
  --light-bg-color: #ffffff; /* For sections with light background */
}

/* Sections with dark background */
.page-news__dark-bg {
  background-color: var(--bg-color);
  color: var(--text-main);
}

/* Sections with light background */
.page-news__light-bg {
  background-color: var(--light-bg-color);
  color: var(--dark-text-on-light);
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Stacks image and content vertically */
  align-items: center;
  padding-bottom: 60px;
  padding-top: 10px; /* Small top padding as body handles header offset */
  overflow: hidden;
  background-color: var(--bg-color); /* Ensure consistent background */
}

.page-news__hero-image-wrapper {
  width: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 600px; /* Limit height on desktop */
}

.page-news__hero-content {
  width: 100%;
  max-width: 1200px;
  padding: 40px 20px;
  text-align: center;
  box-sizing: border-box;
  margin-top: 40px; /* Clear separation from image */
  position: relative;
  z-index: 1;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  background-color: var(--card-bg);
  color: var(--text-main);
}

.page-news__main-title {
  font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size for H1 */
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 15px;
  color: var(--gold-color); /* Use gold for main title */
}

.page-news__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: var(--text-secondary);
}

/* General button styles */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1em;
  text-align: center;
}

.page-news__btn-primary {
  background: var(--btn-gradient);
  color: #ffffff;
}

.page-news__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-news__btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  margin-left: 15px;
}

.page-news__btn-secondary:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Container for main content */
.page-news__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-news__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.5em);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
  color: inherit; /* Inherit from section, will be dark or light */
}

.page-news__section-subtitle {
  text-align: center;
  font-size: 1.1em;
  margin-bottom: 40px;
  color: inherit;
}

/* Latest Articles Section */
.page-news__latest-articles {
  padding: 60px 0;
}

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

.page-news__article-card {
  background-color: var(--card-bg); /* Dark card background */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  color: var(--text-main); /* Light text on dark card */
}

.page-news__article-card:hover {
  transform: translateY(-5px);
}

.page-news__article-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

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

.page-news__article-date {
  font-size: 0.9em;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: block;
}

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

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

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

.page-news__article-excerpt {
  font-size: 0.95em;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.page-news__read-more {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: var(--gold-color);
}

.page-news__view-all-wrapper {
  text-align: center;
  margin-top: 40px;
}

/* Featured Section */
.page-news__featured-section {
  padding: 60px 0;
  background-color: var(--deep-green); /* Use deep green for this section */
  color: var(--text-main);
}

.page-news__featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  text-align: center;
}

.page-news__featured-item {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-news__featured-image {
  width: 100%;
  max-width: 300px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-news__featured-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--gold-color);
}

.page-news__featured-description {
  font-size: 0.95em;
  color: var(--text-secondary);
}

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

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

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
}

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

.page-news__faq-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--text-main);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  background-color: var(--deep-green); /* Slightly different background for question */
  color: var(--text-main);
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background-color: rgba(var(--deep-green), 0.8);
}

.page-news__faq-qtext {
  flex-grow: 1;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--gold-color);
}

.page-news__faq-answer {
  padding: 0 25px 20px;
  font-size: 0.95em;
  color: var(--text-secondary);
  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; /* Adjust as needed for content */
  padding-top: 15px;
}

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

.page-news__faq-item[open] .page-news__faq-toggle {
  color: #ffffff;
}

/* Details element specific styling */
.page-news__faq-item summary {
  list-style: none; /* Remove default marker */
}
.page-news__faq-item summary::-webkit-details-marker {
  display: none; /* Remove default marker for Webkit */
}


/* Responsive styles */
@media (max-width: 1024px) {
  .page-news__hero-image {
    max-height: 500px;
  }
  .page-news__hero-content {
    margin-top: 30px;
    padding: 30px 20px;
  }
}

@media (max-width: 768px) {
  .page-news__hero-image {
    max-height: 400px;
  }
  .page-news__hero-content {
    margin-top: 20px;
    padding: 25px 15px;
  }

  .page-news__main-title {
    font-size: 2em;
  }

  .page-news__description {
    font-size: 1em;
  }

  .page-news__articles-grid,
  .page-news__featured-grid {
    grid-template-columns: 1fr;
  }

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

  .page-news__section-subtitle {
    font-size: 1em;
  }

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

  .page-news__btn-primary,
  .page-news__btn-secondary {
    margin-left: 0;
    width: 100%;
  }
  
  /* Mobile responsive for images, videos, buttons - CRITICAL */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important; /* Ensure image takes full width in mobile */
    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__hero-section,
  .page-news__latest-articles,
  .page-news__featured-section,
  .page-news__cta-section,
  .page-news__faq-section,
  .page-news__article-card,
  .page-news__featured-item,
  .page-news__faq-item,
  .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; /* Prevent overflow */
  }

  .page-news__hero-content {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* Specific padding for sections, small top padding for hero */
  .page-news__hero-section {
    padding-top: 10px !important;
    padding-bottom: 30px !important;
  }
  .page-news__latest-articles,
  .page-news__featured-section,
  .page-news__cta-section,
  .page-news__faq-section {
    padding-top: 30px !important;
    padding-bottom: 30px !important;
  }

  .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;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  
  .page-news__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px !important;
    flex-direction: column !important; /* Stack buttons vertically */
  }
}

@media (max-width: 480px) {
  .page-news__main-title {
    font-size: 1.8em;
  }
  .page-news__section-title {
    font-size: 1.6em;
  }
  .page-news__hero-content {
    margin-top: 20px;
    padding: 20px 10px;
  }
}