/* style/news.css */

/* General page styling */
.page-news {
  background-color: var(--bg-color, #08160F); /* Fallback to custom color if --bg-color not set */
  color: var(--text-main-color, #F2FFF6); /* Main text color for dark background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
}

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

.page-news__section-title {
  font-size: 2.5em;
  font-weight: bold;
  color: var(--text-main-color, #F2FFF6);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

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

/* Buttons */
.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;
  text-align: center;
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  max-width: 100%; /* Ensure responsiveness */
}

.page-news__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #F2FFF6;
  border: 2px solid transparent;
}

.page-news__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 5px 15px rgba(42, 209, 111, 0.4);
}

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

.page-news__btn-secondary:hover {
  background: var(--border-color, #2E7A4E);
  color: #F2FFF6;
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap; /* Allow wrapping for multiple buttons */
  width: 100%; /* Ensure container width for responsiveness */
  max-width: 100%; /* Ensure container width for responsiveness */
  box-sizing: border-box;
  overflow: hidden;
}

.page-news__cta-buttons--centered {
  justify-content: center;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Small top padding */
  display: flex;
  flex-direction: column; /* Image on top, content below */
  align-items: center;
  overflow: hidden;
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height for hero image */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.page-news__hero-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 900px;
  margin-top: -80px; /* Pull content up slightly over image for visual flow */
  position: relative;
  z-index: 1;
  background-color: var(--bg-color, #08160F); /* Ensure background for text */
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.page-news__hero-description {
  font-size: 1.2em;
  color: var(--text-secondary-color, #A7D9B8);
  margin-bottom: 30px;
}

/* Latest News Section */
.page-news__latest-news-section {
  padding: 60px 0;
  background-color: var(--bg-color, #08160F);
}

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

.page-news__news-card {
  background-color: var(--card-bg-color, #11271B);
  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;
  color: var(--text-main-color, #F2FFF6);
  display: flex;
  flex-direction: column;
}

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

.page-news__news-image-wrapper {
  width: 100%;
  height: 220px; /* Fixed height for consistent card images */
  overflow: hidden;
}

.page-news__news-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-width: 200px; /* Min size for card images */
  min-height: 200px; /* Min size for card images */
}

.page-news__news-card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

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

.page-news__news-card-title a {
  color: var(--text-main-color, #F2FFF6);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__news-card-title a:hover {
  color: var(--primary-color, #11A84E);
}

.page-news__news-card-date {
  font-size: 0.9em;
  color: var(--text-secondary-color, #A7D9B8);
  margin-bottom: 15px;
  display: block;
}

.page-news__news-card-excerpt {
  font-size: 1em;
  color: var(--text-secondary-color, #A7D9B8);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__news-card-link {
  display: inline-block;
  color: var(--primary-color, #11A84E);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto; /* Push link to bottom */
}

.page-news__news-card-link:hover {
  text-decoration: underline;
}

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

/* Promotional News Section */
.page-news__promotional-news-section {
  padding: 60px 0;
  background-color: var(--bg-color, #08160F);
}

.page-news__promo-banner {
  width: 100%;
  max-width: 1200px;
  margin: 40px auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  min-height: 200px; /* Minimum size for banner */
}

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

.page-news__promo-list {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-news__promo-item {
  background-color: var(--card-bg-color, #11271B);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: var(--text-main-color, #F2FFF6);
}

.page-news__promo-item-title {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--primary-color, #11A84E);
  margin-bottom: 15px;
}

.page-news__promo-item-text {
  font-size: 1em;
  color: var(--text-secondary-color, #A7D9B8);
}

/* Platform Updates Section */
.page-news__platform-updates-section {
  padding: 60px 0;
  background-color: var(--bg-color, #08160F);
}

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

.page-news__update-card {
  background-color: var(--card-bg-color, #11271B);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: var(--text-main-color, #F2FFF6);
  padding-bottom: 20px; /* Padding for content below image */
}

.page-news__update-image-wrapper {
  width: 100%;
  height: 200px; /* Fixed height for consistent update images */
  overflow: hidden;
  margin-bottom: 20px;
}

.page-news__update-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-width: 200px; /* Min size for update images */
  min-height: 200px; /* Min size for update images */
}

.page-news__update-card-title {
  font-size: 1.4em;
  font-weight: bold;
  color: var(--primary-color, #11A84E);
  margin: 0 20px 10px;
}

.page-news__update-card-text {
  font-size: 1em;
  color: var(--text-secondary-color, #A7D9B8);
  margin: 0 20px;
}

/* Industry Insights Section */
.page-news__industry-insights-section {
  padding: 60px 0;
  background-color: var(--bg-color, #08160F);
}

.page-news__insights-list {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-news__insights-item {
  background-color: var(--card-bg-color, #11271B);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: var(--text-main-color, #F2FFF6);
}

.page-news__insights-item-title {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--primary-color, #11A84E);
  margin-bottom: 15px;
}

.page-news__insights-item-text {
  font-size: 1em;
  color: var(--text-secondary-color, #A7D9B8);
  margin-bottom: 20px;
}

.page-news__insights-link {
  display: inline-block;
  color: var(--primary-color, #11A84E);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__insights-link:hover {
  text-decoration: underline;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
  background-color: var(--bg-color, #08160F);
}

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

.page-news__faq-item {
  background-color: var(--card-bg-color, #11271B);
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  color: var(--text-main-color, #F2FFF6);
  padding: 0; /* Reset padding for details element */
}

.page-news__faq-item summary {
  list-style: none; /* Hide default marker */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--text-main-color, #F2FFF6);
  cursor: pointer;
  outline: none;
  border-bottom: 1px solid var(--border-color, #2E7A4E);
}

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

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--primary-color, #11A84E);
  margin-left: 15px;
}

.page-news__faq-answer {
  padding: 20px 25px 25px;
  font-size: 1em;
  color: var(--text-secondary-color, #A7D9B8);
}

/* CTA Section */
.page-news__cta-section {
  padding: 60px 0;
  text-align: center;
  background-color: var(--deep-green-color, #0A4B2C); /* Use a darker green for CTA */
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__hero-content {
    margin-top: -60px;
  }
}

@media (max-width: 768px) {
  .page-news__section-title {
    font-size: 2em;
  }

  .page-news__section-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-news__hero-content {
    padding: 30px 20px;
    margin-top: -40px;
  }

  .page-news__main-title {
    font-size: clamp(1.8em, 6vw, 2.5em);
  }

  .page-news__hero-description {
    font-size: 1.1em;
    margin-bottom: 25px;
  }

  .page-news__news-grid,
  .page-news__promo-list,
  .page-news__update-grid,
  .page-news__insights-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

  /* Mobile image responsiveness */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Mobile video responsiveness - no video on this page, but keeping for general rule */
  .page-news video,
  .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Mobile container padding for content areas */
  .page-news__container,
  .page-news__hero-section,
  .page-news__latest-news-section,
  .page-news__promotional-news-section,
  .page-news__platform-updates-section,
  .page-news__industry-insights-section,
  .page-news__faq-section,
  .page-news__cta-section,
  .page-news__news-card,
  .page-news__promo-item,
  .page-news__update-card,
  .page-news__insights-item,
  .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; /* Prevent horizontal overflow */
  }

  .page-news__hero-image-wrapper,
  .page-news__promo-banner,
  .page-news__update-image-wrapper,
  .page-news__news-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

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

@media (max-width: 480px) {
  .page-news__hero-content {
    margin-top: -30px;
    padding: 20px 15px;
  }
  .page-news__main-title {
    font-size: 1.8em;
  }
  .page-news__hero-description {
    font-size: 1em;
  }
  .page-news__faq-item summary {
    font-size: 1.1em;
    padding: 15px 20px;
  }
  .page-news__faq-answer {
    padding: 15px 20px 20px;
  }
}

/* Color contrast enforcement */
.page-news {
  color: #F2FFF6; /* Main text on dark background */
}

.page-news__card,
.page-news__promo-item,
.page-news__update-card,
.page-news__insights-item,
.page-news__faq-item {
  background-color: #11271B; /* Card background */
  color: #F2FFF6; /* Text on card */
}

.page-news__section-description,
.page-news__news-card-date,
.page-news__news-card-excerpt,
.page-news__promo-item-text,
.page-news__update-card-text,
.page-news__insights-item-text,
.page-news__faq-answer {
  color: #A7D9B8; /* Secondary text color */
}

.page-news__news-card-title a,
.page-news__faq-item summary {
  color: #F2FFF6; /* Ensure link/summary text on dark card is light */
}

.page-news__news-card-link,
.page-news__insights-link,
.page-news__faq-toggle,
.page-news__promo-item-title,
.page-news__update-card-title,
.page-news__insights-item-title {
  color: #11A84E; /* Primary brand color for accents */
}