/* style/news.css */

/* Base styles for the page content, assuming a dark body background from shared.css */
.page-news {
  background-color: var(--bg-color, #08160F); /* Fallback to custom dark green */
  color: var(--text-main, #F2FFF6); /* Main text color */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  overflow: hidden; /* Ensure no overflow from image */
  background-color: var(--deep-green, #0A4B2C);
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-width: 100%; /* Ensure image wrapper doesn't overflow */
  margin-bottom: 20px; /* Space between image and content */
}

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

.page-news__hero-content {
  text-align: center;
  max-width: 800px;
  z-index: 1;
  position: relative; /* Ensure content is above any potential background layers */
  padding-top: 20px; /* Space from image */
}

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

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

/* Buttons */
.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%; /* Ensure button container takes full width */
  max-width: 100%;
  box-sizing: border-box;
}

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure button doesn't overflow */
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

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

.page-news__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 0 15px var(--glow, #57E38D);
}

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

.page-news__btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--glow, #57E38D);
  color: var(--glow, #57E38D);
}

/* Section Titles */
.page-news__section-title {
  color: var(--text-main, #F2FFF6);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
}

/* Latest News Section */
.page-news__latest-news-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

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

.page-news__news-card {
  background-color: var(--card-bg, #11271B);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px 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: 220px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

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

.page-news__card-date {
  color: var(--text-secondary, #A7D9B8);
  font-size: 0.9rem;
  margin-bottom: 10px;
  display: block;
}

.page-news__card-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.4;
  flex-grow: 1;
}

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

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

.page-news__card-excerpt {
  color: var(--text-secondary, #A7D9B8);
  font-size: 1rem;
  margin-bottom: 15px;
}

.page-news__read-more {
  color: var(--glow, #57E38D);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-block;
  margin-top: auto; /* Push to bottom */
}

.page-news__read-more:hover {
  text-decoration: underline;
}

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

/* Featured News Section */
.page-news__featured-news-section {
  background-color: var(--deep-green, #0A4B2C);
  padding-top: 60px;
  padding-bottom: 60px;
}

.page-news__featured-grid {
  display: grid;
  grid-template-columns: 1fr; /* Stack on mobile, two columns on desktop */
  gap: 40px;
}

.page-news__featured-item {
  display: flex;
  flex-direction: column;
  background-color: var(--card-bg, #11271B);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__featured-image {
  width: 100%;
  height: 337px; /* Adjusted to maintain aspect ratio with 600 width for 1200x675 source */
  object-fit: cover;
  display: block;
}

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

.page-news__featured-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.3;
}

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

.page-news__featured-title a:hover {
  color: var(--gold, #F2C14E);
}

.page-news__featured-excerpt {
  color: var(--text-secondary, #A7D9B8);
  font-size: 1rem;
  margin-bottom: 20px;
}

/* News Categories Section */
.page-news__categories-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

.page-news__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Adjusted min-width for 200px icons */
  gap: 20px;
  text-align: center;
}

.page-news__category-card {
  background-color: var(--card-bg, #11271B);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-main, #F2FFF6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 280px; /* Increased min-height for 200px icon + text */
}

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

.page-news__category-icon {
  width: 200px; /* Displayed at 200px */
  height: 200px;
  object-fit: contain;
  margin-bottom: 10px;
}

.page-news__category-name {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Call to Action Section */
.page-news__cta-section {
  padding-top: 60px;
  padding-bottom: 60px;
  text-align: center;
  background-color: var(--deep-green, #0A4B2C);
}

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

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

.page-news__faq-item {
  background-color: var(--card-bg, #11271B);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-news__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  outline: none;
  list-style: none; /* Hide default marker */
}

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

.page-news__faq-question {
  flex-grow: 1;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main, #F2FFF6);
}

.page-news__faq-toggle {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--glow, #57E38D);
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-toggle {
  transform: rotate(45deg); /* Rotate '+' to 'x' or just change to '-' */
}

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

/* Custom colors */
.page-news__dark-bg {
  background-color: var(--card-bg, #11271B);
  color: var(--text-main, #F2FFF6);
}

.page-news__deep-green-bg {
  background-color: var(--deep-green, #0A4B2C);
  color: var(--text-main, #F2FFF6);
}

.page-news__text-main {
  color: var(--text-main, #F2FFF6);
}

.page-news__text-secondary {
  color: var(--text-secondary, #A7D9B8);
}

/* Responsive adjustments */
@media (min-width: 769px) {
  .page-news__featured-grid {
    grid-template-columns: repeat(2, 1fr); /* Two columns on desktop */
  }

  .page-news__hero-section {
    flex-direction: row; /* Image and content side by side */
    text-align: left;
    padding: 80px 40px;
    padding-top: 10px; /* Small top padding, body handles header offset */
  }

  .page-news__hero-image-wrapper {
    flex: 1;
    margin-right: 40px;
    margin-bottom: 0;
  }

  .page-news__hero-content {
    flex: 1;
    text-align: left;
    padding-top: 0;
  }

  .page-news__cta-buttons {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  /* General mobile padding */
  .page-news__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Images responsive */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Image and video containers responsive */
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__hero-section,
  .page-news__hero-image-wrapper,
  .page-news__news-grid,
  .page-news__featured-grid,
  .page-news__categories-grid,
  .page-news__faq-list,
  .page-news__video-section,
  .page-news__video-container,
  .page-news__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent overflow */
  }

  /* Buttons responsive */
  .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;
    padding-right: 15px;
    margin: 5px 0 !important; /* Stack buttons */
  }

  .page-news__cta-buttons,
  .page-news__button-group,
  .page-news__btn-container {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-news__hero-section {
    flex-direction: column;
    padding: 30px 15px;
    padding-top: 10px !important; /* Small top padding for mobile */
  }

  .page-news__hero-image-wrapper {
    margin-right: 0;
    margin-bottom: 20px;
  }

  .page-news__hero-content {
    text-align: center;
    padding-top: 0;
  }

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

  .page-news__section-title {
    font-size: 1.8rem;
  }

  .page-news__news-card {
    margin-bottom: 20px;
  }

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

  .page-news__featured-title {
    font-size: 1.3rem;
  }

  .page-news__category-icon {
    width: 150px; /* Adjust for mobile, still > 200px source */
    height: 150px;
  }
  .page-news__category-name {
    font-size: 1rem;
  }
  .page-news__category-card {
    min-height: 220px; /* Adjust for smaller icon on mobile */
  }
}