/* style/news.css */

/* Body background is light (var(--secondary-color) = #FFFFFF), so default text color should be dark */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text for light background */
  background-color: #ffffff;
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: #26A9E0; /* Brand primary color for dark background */
  color: #ffffff; /* White text for dark background */
}

.page-news__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.page-news__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2; /* Subtle overlay for text readability */
}

.page-news__hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.page-news__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size */
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-news__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #ffffff;
}

.page-news__hero-cta {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.3s ease;
}

/* Latest News Section */
.page-news__latest-news {
  padding: 60px 0;
  background-color: #ffffff; /* Light background */
  color: #333333; /* Dark text */
}

.page-news__section-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #26A9E0; /* Brand primary color */
}

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

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

.page-news__news-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;
  border: 1px solid #e0e0e0;
}

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

.page-news__card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-news__card-content {
  padding: 20px;
}

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

.page-news__card-title a {
  color: #26A9E0; /* Brand primary color for links */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__card-title a:hover {
  color: #1a7fb0; /* Slightly darker blue on hover */
}

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

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

.page-news__read-more {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: #1a7fb0;
}

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

/* CTA Section */
.page-news__cta-section {
  padding: 80px 0;
  background-color: #26A9E0; /* Brand primary color for dark background */
  color: #ffffff; /* White text for dark background */
}

.page-news__cta-container {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-news__cta-content {
  flex: 1;
}

.page-news__cta-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-news__cta-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #ffffff;
}

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

.page-news__cta-image-wrapper {
  flex: 0 0 600px;
  max-width: 600px;
  text-align: right;
}

.page-news__cta-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Button styles (shared by hero and CTA) */
.page-news__btn-primary {
  background-color: #EA7C07; /* Login color for primary action */
  color: #ffffff;
  border: 2px solid transparent;
}

.page-news__btn-primary:hover {
  background-color: #d16e07;
}

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

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

/* Responsive Design */
@media (max-width: 992px) {
  .page-news__hero-section {
    padding: 40px 15px;
  }

  .page-news__main-title {
    font-size: clamp(1.8em, 5vw, 3em);
  }

  .page-news__section-title {
    font-size: 2em;
  }

  .page-news__cta-section .page-news__container {
    flex-direction: column;
    text-align: center;
  }

  .page-news__cta-image-wrapper {
    flex: 0 0 auto;
    max-width: 100%;
    margin-top: 40px;
    text-align: center;
  }

  .page-news__cta-buttons {
    justify-content: center;
  }
}

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

  .page-news__hero-section {
    padding: 30px 15px;
    padding-top: 10px !important; /* Ensure small top padding on mobile */
  }

  .page-news__main-title {
    font-size: clamp(1.5em, 6vw, 2.5em);
  }

  .page-news__hero-description {
    font-size: 1em;
  }

  .page-news__latest-news {
    padding: 40px 0;
  }

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

  .page-news__section-description {
    font-size: 1em;
  }

  .page-news__news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-news__news-card {
    margin: 0 15px;
  }

  .page-news__card-image {
    height: auto; /* Allow image height to adjust */
  }

  .page-news__cta-section {
    padding: 60px 15px;
  }

  .page-news__cta-title {
    font-size: 2em;
  }

  .page-news__cta-description {
    font-size: 1em;
  }

  .page-news__cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  /* Mobile image responsiveness */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-news__hero-image-wrapper,
  .page-news__news-card,
  .page-news__cta-image-wrapper,
  .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  /* Mobile button responsiveness */
  .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;
  }

  .page-news__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
    padding-left: 15px;
    padding-right: 15px;
  }
}