/* style/news.css */
/* 
 * Body padding-top is handled by shared.css via var(--header-offset).
 * This page's first section should only have a small decorative top padding,
 * NOT var(--header-offset) to avoid double spacing.
 */

/* Variables from the color scheme */
:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --background-color: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green: #0A4B2C;
}

/* Base styles for the page-news scope */
.page-news {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-main); /* Default text color for the page, will be overridden by section-specific colors */
  background-color: var(--background-color); /* Page background from shared.css */
}

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

.page-news__section-title, 
.page-news__cta-title {
  font-size: clamp(2em, 5vw, 2.8em); /* H1 font-size clamp for responsiveness */
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-main);
  line-height: 1.2;
}

.page-news__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: -20px auto 40px auto;
  color: var(--text-secondary);
}

.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Image on top, content below */
  align-items: center;
  justify-content: center;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: var(--background-color);
  overflow: hidden; /* Ensure content doesn't spill */
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    margin-bottom: 30px; /* Space between image and text */
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 8px;
}

.page-news__hero-content {
  text-align: center;
  padding: 40px 0;
  background-color: var(--background-color); /* Dark background for text content */
  color: var(--text-main);
  width: 100%;
}

.page-news__main-title {
  font-size: clamp(2.5em, 6vw, 3.5em); /* H1 font-size clamp */
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.1;
  color: var(--text-main);
}

.page-news__subtitle {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-secondary);
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure buttons don't overflow */
  box-sizing: border-box;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-news__btn-primary {
  background: var(--button-gradient);
  color: var(--text-main); /* White text on dark button */
  border: none;
  box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

.page-news__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(42, 209, 111, 0.6);
}

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

.page-news__btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--text-main);
  box-shadow: 0 4px 15px rgba(17, 168, 78, 0.4);
}

/* Latest Articles Section */
.page-news__latest-articles {
  padding: 80px 0;
  background-color: var(--text-main); /* Light background for contrast */
  color: #333333; /* Dark text for light background */
}

.page-news__latest-articles .page-news__section-title {
  color: var(--background-color); /* Dark title on light background */
}

.page-news__latest-articles .page-news__section-description {
  color: #555555;
}

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

.page-news__article-card {
  background-color: #ffffff; /* White card background */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #333333; /* Dark text on white card */
}

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

.page-news__article-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

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

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

.page-news__article-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-news__article-title a {
  color: var(--background-color); /* Dark link color for titles */
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.page-news__article-meta {
  font-size: 0.9em;
  color: #666666; /* Lighter grey for meta info */
  margin-bottom: 15px;
}

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

.page-news__read-more-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s ease;
}

.page-news__read-more-link:hover {
  text-decoration: underline;
  color: var(--deep-green);
}

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

/* CTA Section */
.page-news__cta-section {
  padding: 80px 0;
  background-color: var(--deep-green); /* Deep green background */
  color: var(--text-main); /* Light text on deep green */
  text-align: center;
}

.page-news__cta-title {
  color: var(--text-main);
  margin-bottom: 20px;
}

.page-news__cta-description {
  font-size: 1.1em;
  max-width: 700px;
  margin: 0 auto 40px auto;
  color: var(--text-secondary);
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 80px 0;
  background-color: var(--text-main); /* Light background */
  color: #333333; /* Dark text */
}

.page-news__faq-section .page-news__section-title {
  color: var(--background-color); /* Dark title on light background */
}

.page-news__faq-list {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-news__faq-item {
  background-color: #ffffff; /* White card background */
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  color: #333333; /* Dark text on white card */
}

.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;
  background-color: #f9f9f9; /* Slightly off-white for summary */
  border-bottom: 1px solid #eeeeee;
  transition: background-color 0.3s ease;
  color: var(--background-color); /* Dark question text */
}

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

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

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

.page-news__faq-item[open] .page-news__faq-toggle {
  content: '−'; /* Change to minus when open */
}

.page-news__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  color: #444444;
  border-top: 1px solid #eeeeee;
}

/* Details element specific styling for native collapse */
.page-news__faq-item summary {
  list-style: none; /* Remove default marker */
}

.page-news__faq-item summary::-webkit-details-marker {
  display: none; /* Hide for Webkit browsers */
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__hero-section {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-news__hero-content {
      padding: 30px 15px;
  }
  .page-news__latest-articles,
  .page-news__cta-section,
  .page-news__faq-section {
    padding: 60px 0;
  }
  .page-news__container {
    padding: 0 15px;
  }
  .page-news__articles-grid {
    gap: 25px;
  }
}

@media (max-width: 768px) {
  .page-news__main-title {
    font-size: 2.2em;
  }
  .page-news__subtitle {
    font-size: 1.1em;
  }
  .page-news__section-title,
  .page-news__cta-title {
    font-size: 2em;
    margin-bottom: 30px;
  }

  /* Mobile image responsiveness */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Mobile container responsiveness */
  .page-news__container,
  .page-news__hero-image-wrapper,
  .page-news__article-image-wrapper,
  .page-news__cta-buttons,
  .page-news__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure content doesn't overflow */
  }

  /* Specific padding for sections that might not have a container */
  .page-news__latest-articles,
  .page-news__cta-section,
  .page-news__faq-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Buttons mobile adaptation */
  .page-news__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }
  .page-news__btn-secondary {
    margin-left: 0; /* Remove left margin when stacked */
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important; /* Full width buttons */
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__hero-section {
    padding-top: 10px !important; /* Small top padding for hero section */
  }

  .page-news__article-image {
    height: 180px;
  }
  .page-news__article-title {
    font-size: 1.2em;
  }
  .page-news__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }
  .page-news__faq-answer {
    padding: 15px 20px;
  }
}

@media (max-width: 480px) {
  .page-news__main-title {
    font-size: 1.8em;
  }
  .page-news__subtitle {
    font-size: 1em;
  }
  .page-news__section-title,
  .page-news__cta-title {
    font-size: 1.8em;
  }
  .page-news__article-image {
    height: 150px;
  }
}