/* style/news.css */

/* Base styles for the news page */
.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: var(--bg-color); /* Inherit from shared.css */
}

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

/* Section Titles */
.page-news__section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 60px 0; /* body handles top padding, only small decorative top padding here */
  color: #ffffff;
  text-align: center;
  overflow: hidden;
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  position: relative;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Darken image slightly for text contrast */
}

.page-news__hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 900px;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
  z-index: 10;
  color: #ffffff;
}

.page-news__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 15px;
  color: #ffffff;
  line-height: 1.1;
}

.page-news__hero-content .page-news__description {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: #ffffff;
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

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

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

.page-news__btn-secondary {
  background-color: #FFFFFF;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-news__btn-secondary:hover {
  background-color: #e0e0e0;
  color: #1e87c0;
  border-color: #1e87c0;
}

/* Latest Articles Section */
.page-news__latest-articles {
  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;
  margin-bottom: 40px;
}

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

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

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

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

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

.page-news__card-title a {
  color: #26A9E0;
  text-decoration: none;
}

.page-news__card-title a:hover {
  text-decoration: underline;
}

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

.page-news__card-excerpt {
  font-size: 1rem;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__card-link {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: 600;
}

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

.page-news__view-all-button {
  text-align: center;
}

/* Industry Insights Section */
.page-news__industry-insights {
  padding: 60px 0;
  background-color: #26A9E0; /* Brand color background */
  color: #ffffff;
}

.page-news__industry-insights .page-news__section-title,
.page-news__industry-insights .page-news__section-description {
  color: #ffffff;
}

.page-news__content-block p {
  font-size: 1.1rem;
  margin-bottom: 20px;
  line-height: 1.7;
  color: #f0f0f0;
}

/* Company Announcements Section */
.page-news__company-announcements {
  padding: 60px 0;
  background-color: #ffffff; /* Light background */
}

.page-news__announcement-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 25px;
}

.page-news__announcement-item {
  background-color: #f9f9f9;
  border-left: 5px solid #26A9E0;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  color: #333333;
}

.page-news__announcement-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #26A9E0;
  margin-bottom: 10px;
}

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

.page-news__announcement-text {
  font-size: 1rem;
  color: #555555;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
  background-color: #26A9E0; /* Brand color background */
  color: #ffffff;
}

.page-news__faq-section .page-news__section-title {
  color: #ffffff;
}

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

.page-news__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #ffffff;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.page-news__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
}

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

.page-news__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  color: #f0f0f0;
}

.page-news__faq-item details > summary {
  list-style: none;
}

.page-news__faq-item details > summary::-webkit-details-marker {
  display: none;
}

/* Bottom CTA Section */
.page-news__cta-bottom {
  padding: 60px 0;
  background-color: #f0f0f0;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__hero-content {
    max-width: 700px;
  }
  .page-news__section-title {
    font-size: 2rem;
  }
  .page-news__hero-content .page-news__description {
    font-size: 1.1rem;
  }
}

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

  .page-news__hero-section {
    padding-bottom: 40px;
  }

  .page-news__hero-image-wrapper {
    max-height: 300px;
  }

  .page-news__hero-content {
    position: static;
    transform: none;
    padding: 20px 15px;
    margin-top: -20px; /* Pull content up slightly over image */
    background-color: rgba(0, 0, 0, 0.5); /* Add background for readability on image */
  }

  .page-news__main-title {
    font-size: clamp(2rem, 8vw, 2.5rem);
    margin-bottom: 10px;
  }

  .page-news__hero-content .page-news__description {
    font-size: 1rem;
    margin-bottom: 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: 12px 20px;
  }

  .page-news__articles-grid {
    grid-template-columns: 1fr;
  }

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

  .page-news__content-block p,
  .page-news__announcement-text,
  .page-news__card-excerpt {
    font-size: 0.95rem;
  }

  .page-news__announcement-title {
    font-size: 1.2rem;
  }

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

  /* Mobile responsive for images */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__hero-section,
  .page-news__latest-articles,
  .page-news__industry-insights,
  .page-news__company-announcements,
  .page-news__faq-section,
  .page-news__cta-bottom {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden;
  }

  /* Override hero content to be below image for mobile to prevent overlap */
  .page-news__hero-section {
    flex-direction: column;
  }
  .page-news__hero-image-wrapper {
    order: 1;
    max-height: 250px;
  }
  .page-news__hero-content {
    order: 2;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    background-color: transparent;
    padding: 20px 0;
    margin-top: 0;
  }
  .page-news__hero-image {
    filter: none; /* Remove filter if text is not overlapping */
  }
  .page-news__hero-content .page-news__description,
  .page-news__hero-content .page-news__main-title {
    color: #333333;
  }

  /* Ensure content images are not smaller than 200px (desktop and mobile) */
  .page-news__card-image {
    height: 200px; /* Minimum height */
  }
}

@media (min-width: 769px) {
  .page-news__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
  }
  .page-news__hero-image {
    height: 100%;
  }
  .page-news__hero-section {
    min-height: 500px;
  }
}

/* Color Contrast Adjustments */
/* Dark background sections */
.page-news__dark-section {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-news__dark-section .page-news__section-title,
.page-news__dark-section .page-news__description,
.page-news__dark-section .page-news__card-title a,
.page-news__dark-section .page-news__card-link,
.page-news__dark-section .page-news__announcement-title,
.page-news__dark-section .page-news__faq-question,
.page-news__dark-section .page-news__faq-qtext {
  color: #ffffff;
}

/* Light background sections */
.page-news__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-news__light-bg .page-news__section-title {
  color: #26A9E0;
}

.page-news__light-bg .page-news__card-title a,
.page-news__light-bg .page-news__card-link {
  color: #26A9E0;
}

.page-news__light-bg .page-news__announcement-item {
  background-color: #f9f9f9;
}

.page-news__light-bg .page-news__btn-primary {
  background-color: #26A9E0;
  color: #ffffff;
  border-color: #26A9E0;
}

.page-news__light-bg .page-news__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0;
  border-color: #26A9E0;
}