/* style/news.css */

/* Base styles for the news page */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main); /* Light text on dark background */
  background-color: var(--background-color); /* Deep Green from custom colors */
}

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

.page-news__section-padding {
  padding: 60px 0;
}

.page-news__dark-section {
  background-color: var(--card-bg);
  color: var(--text-main);
}

.page-news__section-title {
  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-main);
  line-height: 1.2;
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  min-height: 500px;
  background-color: var(--background-color);
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px; /* Space between image and content */
}

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

.page-news__hero-content {
  max-width: 900px;
  padding: 0 20px;
  z-index: 1;
}

.page-news__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size */
  font-weight: 800;
  margin-bottom: 15px;
  color: var(--text-main);
  line-height: 1.2;
}

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

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

.page-news__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  border: none;
  margin-right: 15px;
}

.page-news__btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

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

.page-news__btn-secondary:hover {
  background-color: var(--deep-green);
  color: #ffffff;
  border-color: var(--deep-green);
}

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

/* Latest News Section */
.page-news__news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-news__news-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

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

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

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

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

.page-news__card-title a:hover {
  color: var(--glow);
}

.page-news__card-date {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
  display: block;
}

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

.page-news__read-more {
  display: inline-block;
  color: var(--glow);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  margin-top: auto;
}

.page-news__read-more:hover {
  text-decoration: underline;
  color: #57E38D;
}

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

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

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

/* FAQ Section */
.page-news__faq-list {
  max-width: 800px;
  margin: 0 auto;
  border-top: 1px solid var(--divider);
}

.page-news__faq-item {
  margin-bottom: 10px;
  border-bottom: 1px solid var(--divider);
}

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

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

.page-news__faq-item details > summary {
  list-style: none;
}

.page-news__faq-item details > summary::-webkit-details-marker {
  display: none;
}

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

.page-news__faq-toggle {
  font-size: 1.5rem;
  font-weight: bold;
  margin-left: 20px;
  color: var(--glow);
}

.page-news__faq-item[open] .page-news__faq-toggle {
  content: '−';
}

.page-news__faq-answer {
  padding-bottom: 20px;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-right: 40px; /* To align with question text */
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
  }
  .page-news__main-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }
  .page-news__description {
    font-size: 1.15rem;
  }
  .page-news__news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-news__section-padding {
    padding: 40px 0;
  }
  .page-news__hero-section {
    padding-bottom: 40px;
    min-height: 400px;
  }
  .page-news__hero-image-wrapper {
    max-height: 300px;
  }
  .page-news__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }
  .page-news__description {
    font-size: 1rem;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-bottom: 15px;
  }
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-news__news-grid {
    grid-template-columns: 1fr;
  }
  .page-news__news-card {
    margin-bottom: 20px;
  }
  .page-news__card-image {
    height: 200px;
  }
  .page-news__faq-question {
    font-size: 1.1rem;
    padding: 15px 0;
  }
  .page-news__faq-answer {
    font-size: 0.95rem;
    padding-right: 20px;
  }

  /* Mobile specific overrides */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news__hero-image {
    min-height: 200px !important;
  }

  .page-news__section-padding,
  .page-news__hero-section,
  .page-news__latest-news,
  .page-news__cta-section,
  .page-news__faq-section,
  .page-news__container,
  .page-news__news-card,
  .page-news__cta-content,
  .page-news__cta-buttons,
  .page-news__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Prevent horizontal scroll */
  }

  .page-news__hero-section {
    padding-top: 10px !important;
  }

  .page-news__hero-image-wrapper {
    margin-bottom: 20px !important;
  }

  .page-news__btn-primary,
  .page-news__btn-secondary {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

/* Custom Colors */
: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: #57E38D;
  --gold: #F2C14E;
  --divider: #1E3A2A;
  --deep-green: #0A4B2C;
}