/* style/news.css */
/* BEM Naming: page-news__element-name */

/* Base styles for the news page content */
.page-news {
  background-color: #08160F; /* Background color from custom palette */
  color: #F2FFF6; /* Text Main color for general content */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image on top, text below */
  align-items: center;
  padding-bottom: 60px; /* Space below content */
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: #0A4B2C; /* Deep Green for hero section background */
  overflow: hidden; /* Ensure no image overflow */
}

.page-news__hero-image {
  width: 100%;
  max-height: 600px; /* Limit height for hero image */
  object-fit: cover;
  display: block;
  margin-bottom: 30px; /* Space between image and text */
}

.page-news__hero-content {
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
  box-sizing: border-box;
  z-index: 1; /* Ensure text is above any potential background elements */
}

.page-news__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size for H1 */
  font-weight: 700;
  line-height: 1.2;
  color: #F2C14E; /* Gold color for main title */
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); /* subtle shadow for readability */
}

.page-news__hero-description {
  font-size: 1.15rem;
  color: #A7D9B8; /* Text Secondary color */
  margin-bottom: 30px;
}

/* Call to Action Button */
.page-news__cta-button {
  display: inline-block;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
  color: #F2FFF6; /* Text Main for button text */
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.page-news__cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* General Section Styles */
.page-news__section {
  padding: 60px 0;
  text-align: center;
}

.page-news__dark-section {
  background-color: #11271B; /* Card BG for dark sections */
  color: #F2FFF6;
}

.page-news__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: #F2C14E; /* Gold for section titles */
  margin-bottom: 20px;
}

.page-news__section-description {
  font-size: 1.05rem;
  color: #A7D9B8; /* Text Secondary */
  max-width: 800px;
  margin: 0 auto 40px auto;
}

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

.page-news__article-card {
  background-color: #11271B; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #2E7A4E; /* Border color */
  display: flex;
  flex-direction: column;
}

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

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

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

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

.page-news__article-title a {
  color: #F2FFF6; /* Text Main for article title links */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__article-title a:hover {
  color: #F2C14E; /* Gold on hover */
}

.page-news__article-meta {
  font-size: 0.9rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 15px;
}

.page-news__article-excerpt {
  font-size: 1rem;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 20px;
  flex-grow: 1; /* Allow excerpt to take up space */
}

.page-news__read-more {
  display: inline-block;
  color: #2AD16F; /* Button green for read more */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

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

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

/* CTA Section specific styles */
.page-news__cta-section .page-news__section-description {
  margin-bottom: 50px;
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease, border-color 0.3s ease;
  cursor: pointer;
  box-sizing: border-box; /* Crucial for responsive buttons */
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow long words to break */
}

.page-news__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
  color: #F2FFF6; /* Text Main */
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.page-news__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.page-news__btn-secondary {
  background-color: transparent;
  color: #2AD16F; /* Button green */
  border: 2px solid #2AD16F; /* Border color */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.page-news__btn-secondary:hover {
  background-color: #2AD16F; /* Button green */
  color: #F2FFF6; /* Text Main */
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* FAQ Section */
.page-news__faq-section {
  background-color: #08160F; /* Background color */
  color: #F2FFF6;
}

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

.page-news__faq-item {
  background-color: #11271B; /* Card BG */
  border: 1px solid #2E7A4E; /* Border color */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.page-news__faq-item summary {
  list-style: none; /* Hide default marker */
  cursor: pointer;
  padding: 20px 25px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #F2FFF6; /* Text Main */
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

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

.page-news__faq-item summary:hover {
  background-color: rgba(46, 122, 78, 0.2); /* Hover effect using border color with opacity */
}

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

.page-news__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: #2AD16F; /* Button green */
}

.page-news__faq-item[open] .page-news__faq-toggle {
  color: #F2C14E; /* Gold when open */
}

.page-news__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
}

.page-news__faq-answer p {
  margin: 0;
}

/* Ensure all images meet minimum size requirements */
.page-news img {
  min-width: 200px;
  min-height: 200px;
  object-fit: cover; /* Ensure images fill their space without distortion */
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-news__hero-image {
    max-height: 500px;
  }
  .page-news__hero-content {
    padding: 0 15px;
  }
  .page-news__articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding-bottom: 40px;
  }
  .page-news__hero-image {
    max-height: 400px;
    margin-bottom: 20px;
  }
  .page-news__main-title {
    font-size: clamp(2rem, 6vw, 2.5rem);
    margin-bottom: 15px;
  }
  .page-news__hero-description {
    font-size: 1rem;
    margin-bottom: 25px;
  }
  .page-news__cta-button {
    padding: 12px 25px;
    font-size: 1rem;
  }
  .page-news__section {
    padding: 40px 0;
  }
  .page-news__section-title {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    margin-bottom: 15px;
  }
  .page-news__section-description {
    font-size: 0.95rem;
    margin-bottom: 30px;
  }
  .page-news__articles-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 25px;
    padding: 0 15px; /* Add padding to prevent overflow */
  }
  .page-news__article-image {
    height: 180px;
  }
  .page-news__article-title {
    font-size: 1.25rem;
  }
  .page-news__article-excerpt {
    font-size: 0.95rem;
  }
  .page-news__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    padding: 0 15px; /* Add padding to prevent overflow */
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important; /* Force full width */
    max-width: 100% !important;
    padding: 14px 20px !important;
    font-size: 1rem !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-news__faq-list {
    padding: 0 15px; /* Add padding to prevent overflow */
  }
  .page-news__faq-item summary {
    font-size: 1.1rem;
    padding: 15px 20px;
  }
  .page-news__faq-answer {
    padding: 0 20px 15px 20px;
    font-size: 0.95rem;
  }

  /* Mobile image responsiveness - MUST BE PRESENT */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: 200px !important; /* Ensure minimum size is maintained */
    min-height: 200px !important;
  }

  /* Containers for images/content must also be responsive */
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__article-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-news__hero-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }
}

@media (max-width: 480px) {
  .page-news__hero-image {
    max-height: 300px;
  }
  .page-news__main-title {
    font-size: clamp(1.8rem, 8vw, 2.2rem);
  }
  .page-news__section-title {
    font-size: clamp(1.5rem, 7vw, 1.8rem);
  }
}

/* Ensure no filter on images */
.page-news img {
  filter: none !important;
}

/* Content area image CSS size lower limit */
.page-news__articles-grid img,
.page-news__hero-section img {
    min-width: 200px;
    min-height: 200px;
}