/* style/news.css */

/* Base styles for the news page, ensuring text color contrasts with body background */
/* Assuming body background is light (white or light grey) based on common practice and no explicit dark-bg instruction for body */
.page-news {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Deep gray for good contrast on light backgrounds */
  background-color: var(--background-color, #ffffff); /* Fallback to white if var not set */
}

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

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

.page-news__hero-content {
  max-width: 900px;
  padding: 0 20px;
  box-sizing: border-box;
  color: #333333; /* Default text color on assumed light background */
}

.page-news__hero-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size */
  font-weight: 700;
  line-height: 1.2;
  color: #26A9E0; /* Brand primary color for title */
  margin-bottom: 15px;
}

.page-news__hero-description {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #555555;
}

.page-news__hero-cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

/* General button styles */
.page-news__btn-primary,
.page-news__btn-secondary,
.page-news__read-more-btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons are responsive */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  text-align: center;
}

.page-news__btn-primary {
  background-color: #26A9E0; /* Primary brand color */
  color: #ffffff;
  border: 2px solid #26A9E0;
}

.page-news__btn-primary:hover {
  background-color: #1e87b7;
  border-color: #1e87b7;
}

.page-news__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0; /* Primary brand color */
  border: 2px solid #26A9E0;
}

.page-news__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #1e87b7;
  border-color: #1e87b7;
}

.page-news__read-more-btn {
  background-color: transparent;
  color: #26A9E0;
  border: 1px solid #26A9E0;
  padding: 10px 20px;
  font-size: 0.95rem;
  border-radius: 5px;
}

.page-news__read-more-btn:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

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

.page-news__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem); /* Responsive font size */
  font-weight: 700;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 20px;
  padding-top: 40px;
}

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

/* Latest Articles Section */
.page-news__latest-articles-section {
  padding: 60px 0;
  background-color: #f8f8f8; /* Light background for contrast */
}

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

.page-news__article-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

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

.page-news__article-content {
  padding: 20px;
  flex-grow: 1; /* Allow content to grow */
  display: flex;
  flex-direction: column;
}

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

.page-news__article-title a {
  color: #333333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__article-title a:hover {
  color: #26A9E0;
}

.page-news__article-meta {
  font-size: 0.9rem;
  color: #777777;
  margin-bottom: 15px;
}

.page-news__article-excerpt {
  font-size: 1rem;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1; /* Allow excerpt to grow */
}

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

/* CTA Banner Section */
.page-news__cta-banner-section {
  padding: 80px 0;
  background-color: #26A9E0; /* Primary brand color as background */
  color: #ffffff; /* White text for contrast */
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-news__cta-banner-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15; /* Subtly visible background image */
  z-index: 0;
}

.page-news__cta-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-news__cta-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-news__cta-description {
  font-size: 1.15rem;
  margin-bottom: 40px;
  color: #f0f0f0;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
  background-color: #ffffff; /* White background for contrast */
}

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

.page-news__faq-item {
  background-color: #f5f5f5;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.page-news__faq-item summary {
  list-style: none; /* Hide default marker */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333333;
  cursor: pointer;
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
}
.page-news__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit */
}

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

.page-news__faq-qtext {
  flex-grow: 1;
  color: #26A9E0; /* Brand color for question text */
}

.page-news__faq-toggle {
  font-size: 1.5rem;
  font-weight: bold;
  color: #26A9E0;
  margin-left: 15px;
}

.page-news__faq-answer {
  padding: 20px;
  font-size: 1rem;
  color: #555555;
  background-color: #f5f5f5;
}

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

.page-news__faq-answer a {
  color: #26A9E0;
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }
  .page-news__section-title {
    font-size: clamp(1.6rem, 4.5vw, 2.5rem);
  }
  .page-news__cta-title {
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Images */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Containers for images, buttons, videos */
  .page-news__container,
  .page-news__hero-section,
  .page-news__latest-articles-section,
  .page-news__cta-banner-section,
  .page-news__faq-section,
  .page-news__article-card,
  .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 scroll */
  }

  /* Specific padding for hero section to avoid double header offset */
  .page-news__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px !important;
  }

  /* Buttons */
  .page-news__btn-primary,
  .page-news__btn-secondary,
  .page-news__read-more-btn,
  .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: 12px 20px !important;
    font-size: 1rem !important;
  }
  
  .page-news__hero-cta-buttons,
  .page-news__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px !important;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
  }

  .page-news__article-image {
    height: 180px; /* Adjust height for mobile cards */
  }

  .page-news__article-title {
    font-size: 1.15rem;
  }
  .page-news__faq-item summary {
    font-size: 1rem;
    padding: 15px;
  }
  .page-news__faq-answer {
    padding: 15px;
  }
}

/* Ensure all images are content display images, not small icons */
.page-news img {
  min-width: 200px;
  min-height: 200px;
}

/* Additional contrast safety for text on potential dark backgrounds */
.page-news__dark-bg {
  color: #ffffff; /* Forced white text on dark backgrounds */
}

.page-news__light-bg {
  color: #333333; /* Forced dark text on light backgrounds */
}