/* style/news.css */

/* Variables for custom colors */
:root {
  --page-news-primary-color: #11A84E; /* Main color */
  --page-news-secondary-color: #22C768; /* Auxiliary color */
  --page-news-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
  --page-news-card-bg: #11271B; /* Card background */
  --page-news-background: #08160F; /* Section background */
  --page-news-text-main: #F2FFF6; /* Main text color */
  --page-news-text-secondary: #A7D9B8; /* Secondary text color */
  --page-news-border-color: #2E7A4E; /* Border color */
  --page-news-glow-color: #57E38D; /* Glow color */
  --page-news-gold-color: #F2C14E; /* Gold color */
  --page-news-divider-color: #1E3A2A; /* Divider color */
  --page-news-deep-green: #0A4B2C; /* Deep green color */

  /* Text colors for contrast based on body background (assuming body is dark from shared.css) */
  --page-news-text-on-dark: var(--page-news-text-main); /* Light text on dark backgrounds */
  --page-news-text-on-light: #333333; /* Dark text on light backgrounds */
}

/* Base styles for the page-news scope */
.page-news {
  font-family: Arial, sans-serif;
  color: var(--page-news-text-on-dark); /* Default text color for the page, assuming dark body bg */
  background-color: var(--page-news-background); /* Overall background for main content */
  line-height: 1.6;
}

/* Section styling */
.page-news__hero-section,
.page-news__latest-updates-section,
.page-news__featured-news-section,
.page-news__cta-section,
.page-news__faq-section {
  padding: 60px 0;
  overflow: hidden; /* Ensure no overflow for sections */
}

.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-height: 675px; /* Limit height for hero image */
  overflow: hidden;
}

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

.page-news__hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  margin-top: 40px; /* Space between image and content */
  padding: 0 20px;
}

.page-news__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size for H1 */
  font-weight: 700;
  line-height: 1.2;
  color: var(--page-news-text-main);
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

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

.page-news__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure button doesn't overflow */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__btn-primary {
  background: var(--page-news-button-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.page-news__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-news__btn-secondary {
  background: var(--page-news-card-bg); /* Use card bg for secondary button */
  color: var(--page-news-text-main);
  border: 2px solid var(--page-news-border-color);
  margin-left: 20px; /* Spacing for multiple buttons */
}

.page-news__btn-secondary:hover {
  background: var(--page-news-primary-color);
  color: #ffffff;
}

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

.page-news__section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--page-news-text-main);
  text-align: center;
  margin-bottom: 20px;
}

.page-news__section-subtitle {
  font-size: 1.1rem;
  color: var(--page-news-text-secondary);
  text-align: center;
  margin-bottom: 40px;
}

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

.page-news__news-card {
  background: var(--page-news-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--page-news-text-on-dark); /* Text on card background */
}

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

.page-news__news-card-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-news__news-card-content {
  padding: 25px;
}

.page-news__news-card-date {
  display: block;
  font-size: 0.9rem;
  color: var(--page-news-text-secondary);
  margin-bottom: 10px;
}

.page-news__news-card-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.4;
}

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

.page-news__news-card-title a:hover {
  color: var(--page-news-gold-color);
}

.page-news__news-card-excerpt {
  font-size: 1rem;
  color: var(--page-news-text-secondary);
  margin-bottom: 20px;
}

.page-news__read-more-link {
  color: var(--page-news-gold-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-news__read-more-link:hover {
  color: var(--page-news-glow-color);
  text-decoration: underline;
}

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

/* Featured News Section */
.page-news__featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  margin-top: 30px;
}

.page-news__featured-card {
  display: flex;
  background: var(--page-news-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  color: var(--page-news-text-on-dark);
}

.page-news__featured-card-image {
  width: 40%;
  height: auto;
  object-fit: cover;
  display: block;
}

.page-news__featured-card-content {
  width: 60%;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

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

.page-news__featured-card-title a:hover {
  color: var(--page-news-gold-color);
}

.page-news__featured-card-excerpt {
  font-size: 0.95rem;
  color: var(--page-news-text-secondary);
  margin-bottom: 15px;
}

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

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

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

/* FAQ Section */
.page-news__faq-section {
  background-color: var(--page-news-background); /* Use a background that contrasts with card-bg */
}

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

.page-news__faq-item {
  background-color: var(--page-news-card-bg);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: var(--page-news-text-on-dark);
}

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

.page-news__faq-question:hover {
  background-color: var(--page-news-deep-green);
}

.page-news__faq-item[open] .page-news__faq-question {
  border-bottom: 1px solid var(--page-news-divider-color);
}

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

.page-news__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 20px;
  color: var(--page-news-gold-color);
}

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

.page-news__faq-answer {
  padding: 20px 25px;
  font-size: 1rem;
  color: var(--page-news-text-secondary);
}

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

/* Dark/Light background helpers for contrast */
.page-news__dark-section {
  background-color: var(--page-news-deep-green);
  color: var(--page-news-text-on-dark);
}

.page-news__light-bg {
  background-color: var(--page-news-card-bg); /* Use card bg for elements that need a distinct background */
  color: var(--page-news-text-on-dark);
}

.page-news__dark-text {
  color: var(--page-news-text-main); /* Ensure main text color for titles on light backgrounds */
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__hero-content {
    margin-top: 20px;
  }
  .page-news__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  }
  .page-news__news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-news__featured-grid {
    grid-template-columns: 1fr; /* Stack featured cards on smaller screens */
  }
  .page-news__featured-card {
    flex-direction: column;
  }
  .page-news__featured-card-image,
  .page-news__featured-card-content {
    width: 100%;
  }
  .page-news__featured-card-image {
    height: 250px;
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding: 40px 0;
    padding-top: 10px !important; /* body handles --header-offset, this is for visual padding */
  }
  .page-news__hero-content {
    margin-top: 20px;
  }
  .page-news__main-title {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }
  .page-news__description {
    font-size: 1rem;
  }
  .page-news__cta-button {
    padding: 12px 20px;
    font-size: 1rem;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-left: 0 !important; /* Remove margin for stacked buttons */
  }

  .page-news__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    padding: 0 15px; /* Add padding to button container */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-news__section-title {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }
  .page-news__section-subtitle {
    font-size: 0.95rem;
  }

  /* Images responsive */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* All content containers for mobile responsiveness */
  .page-news__container,
  .page-news__news-grid,
  .page-news__featured-grid,
  .page-news__faq-list,
  .page-news__cta-section,
  .page-news__latest-updates-section,
  .page-news__featured-news-section,
  .page-news__faq-section {
    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__news-card-image {
    height: auto; /* Allow image height to be auto on mobile */
  }

  .page-news__featured-card-image {
    height: auto;
  }

  .page-news__faq-question {
    font-size: 1rem;
    padding: 15px 20px;
  }
  .page-news__faq-answer {
    padding: 15px 20px;
  }
}

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

/* Desktop video container width (even if no video is present, as per rule) */
.page-news__video-container {
  width: 100%; /* Explicitly set for desktop */
  max-width: 1200px;
}