/* style/news.css */

/* Custom Colors from prompt */
:root {
  --color-primary: #11A84E;
  --color-secondary: #22C768;
  --color-button-gradient-start: #2AD16F;
  --color-button-gradient-end: #13994A;
  --color-card-bg: #11271B;
  --color-background: #08160F;
  --color-text-main: #F2FFF6;
  --color-text-secondary: #A7D9B8;
  --color-border: #2E7A4E;
  --color-glow: #57E38D;
  --color-gold: #F2C14E;
  --color-divider: #1E3A2A;
  --color-deep-green: #0A4B2C;
}

.page-news {
  font-family: 'Arial', sans-serif;
  color: var(--color-text-main); /* Default text color for the page, assuming dark body background */
  background-color: var(--color-background); /* Explicitly set page background from custom colors */
  line-height: 1.6;
}

/* Base section padding */
.page-news__section {
  padding: 60px 20px;
  text-align: center;
}

.page-news__container {
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0 15px; /* Added for general container responsiveness */
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 10px; /* Small top padding as per rules */
  padding-bottom: 60px;
  overflow: hidden; /* Ensure no overflow from hero image */
  background-color: var(--color-deep-green); /* Example background for hero section */
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  opacity: 0.3; /* Subtle overlay */
  min-height: 400px; /* Ensure image is visible */
}

.page-news__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
  background: rgba(8, 22, 15, 0.7); /* Semi-transparent background for text */
  border-radius: 10px;
  color: var(--color-text-main);
}

.page-news__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* clamp for H1 */
  color: var(--color-gold);
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

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

.page-news__hero-cta {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary,
.page-news__read-more-btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Important for responsiveness */
  white-space: normal;
  word-wrap: break-word;
}

.page-news__btn-primary {
  background: var(--color-button-gradient-start); /* Fallback for gradient */
  background: linear-gradient(180deg, var(--color-button-gradient-start) 0%, var(--color-button-gradient-end) 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-news__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(87, 227, 141, 0.4); /* Glow color derived from --color-glow */
}

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

.page-news__btn-secondary:hover {
  background: var(--color-primary);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(17, 168, 78, 0.4); /* Primary color derived from --color-primary */
}

.page-news__read-more-btn {
  background: var(--color-deep-green);
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
  font-size: 0.9em;
  padding: 8px 15px;
}

.page-news__read-more-btn:hover {
  background: var(--color-primary);
  color: #ffffff;
}

/* Section Titles & Descriptions */
.page-news__section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--color-gold);
  margin-bottom: 15px;
  font-weight: 700;
}

.page-news__section-title--light {
  color: var(--color-text-main);
}

.page-news__section-description {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__section-description--light {
  color: var(--color-text-main);
}

/* Latest Articles Grid */
.page-news__latest-articles {
  background-color: var(--color-background); /* Ensure contrast */
}

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

.page-news__article-card {
  background-color: var(--color-card-bg); /* Card background */
  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;
  text-align: left;
  display: flex;
  flex-direction: column;
  height: 100%; /* Ensure cards are same 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; /* Fixed height for consistent card images */
  object-fit: cover;
  display: block;
}

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

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

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

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

.page-news__article-meta {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: 15px;
}

.page-news__article-summary {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  flex-grow: 1; /* Allow summary to grow */
}

.page-news__view-all-news {
  margin-top: 20px;
}

/* CTA Section */
.page-news__cta-section {
  background-color: var(--color-deep-green);
  padding: 80px 20px;
}

.page-news__cta-content {
  display: flex;
  align-items: center;
  gap: 50px;
  text-align: left;
  flex-wrap: wrap; /* Allow content to wrap */
}

.page-news__cta-text {
  flex: 1;
  min-width: 300px;
}

.page-news__cta-image {
  flex-shrink: 0;
  width: 400px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  object-fit: cover;
  max-width: 100%; /* Responsive */
}

/* FAQ Section */
.page-news__faq-section {
  background-color: var(--color-background);
}

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

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

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text-main);
  background-color: var(--color-deep-green);
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background-color: var(--color-primary);
}

.page-news__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
}

.page-news__faq-answer {
  padding: 0 25px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
  color: var(--color-text-secondary);
  font-size: 1rem;
}

.page-news__faq-item[open] .page-news__faq-answer {
  max-height: 500px; /* Adjust as needed */
  padding: 15px 25px 25px;
}

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

/* Remove default details arrow */
.page-news__faq-item summary::-webkit-details-marker {
  display: none;
}
.page-news__faq-item summary::marker {
  display: none;
}

/* About Section */
.page-news__about-section {
  background-color: var(--color-deep-green);
  padding: 70px 20px;
}

.page-news__about-content {
  max-width: 900px;
}

/* Global image styles for responsiveness */
.page-news img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile responsiveness */
@media (max-width: 1024px) {
  .page-news__hero-content {
    padding: 30px 15px;
  }
  .page-news__cta-content {
    flex-direction: column;
    text-align: center;
  }
  .page-news__cta-image {
    width: 100%;
    max-width: 500px; /* Constrain image width on tablets */
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding-bottom: 40px;
  }
  .page-news__main-title {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }
  .page-news__hero-description {
    font-size: 1rem;
  }
  .page-news__hero-cta {
    flex-direction: column;
    gap: 15px;
  }

  /* Force responsiveness for all images */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Force responsiveness for all containers holding images/content */
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__article-card,
  .page-news__cta-content,
  .page-news__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* Specific padding for video/hero section top */
  .page-news__hero-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }

  /* Force responsiveness for all buttons */
  .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__hero-cta,
  .page-news__cta-buttons {
    flex-direction: column !important;
    gap: 10px !important;
  }

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

  .page-news__article-title {
    font-size: 1.2rem;
  }
}

/* Ensure contrast for general text on background */
.page-news p,
.page-news li {
  color: var(--color-text-secondary); /* Use secondary text color for general content */
}

/* Contrast fix for headings that might be on a light background (though here all backgrounds are dark) */
.page-news__section-title,
.page-news__article-title a {
  color: var(--color-gold); /* Ensure contrast */
}

/* Special handling for text on dark sections, already handled by default text-main */
.page-news__dark-section .page-news__section-title,
.page-news__dark-section .page-news__section-description {
  color: var(--color-text-main);
}