/* style/news.css */

/* Base styles for the news page */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text on light background */
  background-color: #f8f8f8; /* Light background for the page */
}

.page-news__section {
  padding: 60px 0;
  background-color: #ffffff;
  margin-bottom: 20px;
}

.page-news__section:last-of-type {
  margin-bottom: 0;
}

.page-news__dark-section {
  background-color: #26A9E0; /* Primary color as background */
  color: #ffffff; /* White text on dark background */
}

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

.page-news__section-title {
  font-size: 36px;
  font-weight: bold;
  color: #26A9E0; /* Primary color for titles */
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

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

.page-news__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #26A9E0;
  border-radius: 2px;
}

.page-news__section-title--light::after {
  background-color: #ffffff;
}

.page-news__text-block {
  font-size: 17px;
  margin-bottom: 20px;
  text-align: justify;
}

.page-news__text-block--light {
  color: #f0f0f0;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
  background: linear-gradient(135deg, #26A9E0 0%, #007bb6 100%); /* Gradient background for visual appeal */
  color: #ffffff;
  margin-bottom: 20px;
}

.page-news__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-news__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-news__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.page-news__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-news__hero-title {
  font-size: 48px;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
}

.page-news__hero-description {
  font-size: 20px;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: #EA7C07; /* Login color for CTA */
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-size: 20px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button:hover {
  background: #d46a00;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-news__cta-button--large {
  padding: 18px 50px;
  font-size: 22px;
}

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

.page-news__news-card,
.page-news__featured-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;
}

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

.page-news__news-image-wrapper,
.page-news__featured-image-wrapper {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  overflow: hidden;
}

.page-news__news-image-wrapper img,
.page-news__featured-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.page-news__news-card:hover .page-news__news-image-wrapper img,
.page-news__featured-card:hover .page-news__featured-image-wrapper img {
  transform: scale(1.05);
}

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

.page-news__news-card-title,
.page-news__featured-card-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-news__news-card-title a,
.page-news__featured-card-title a {
  color: #26A9E0; /* Primary color for article titles */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__news-card-title a:hover,
.page-news__featured-card-title a:hover {
  color: #007bb6;
}

.page-news__news-card-excerpt,
.page-news__featured-card-excerpt {
  font-size: 16px;
  color: #555555;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-news__news-card-date,
.page-news__featured-card-date {
  font-size: 14px;
  color: #888888;
  margin-bottom: 15px;
}

.page-news__read-more-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #26A9E0;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  font-size: 15px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  align-self: flex-start;
}

.page-news__read-more-button:hover {
  background-color: #007bb6;
  transform: translateY(-2px);
}

.page-news__read-more-button--light {
  background-color: #ffffff;
  color: #26A9E0;
}

.page-news__read-more-button--light:hover {
  background-color: #f0f0f0;
  color: #007bb6;
}

/* Pagination */
.page-news__pagination {
  display: flex;
  justify-content: center;
  margin-top: 50px;
  gap: 10px;
}

.page-news__pagination-link {
  display: block;
  padding: 12px 18px;
  background-color: #f0f0f0;
  color: #26A9E0;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__pagination-link:hover {
  background-color: #e0e0e0;
}

.page-news__pagination-link--active {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-news__pagination-link--active:hover {
  background-color: #007bb6;
}

/* Promotions and Guides Sections */
.page-news__promo-list,
.page-news__guides-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.page-news__promo-item {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.page-news__promo-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-news__promo-title {
  font-size: 24px;
  color: #26A9E0;
  margin-bottom: 15px;
}

.page-news__promo-description {
  font-size: 16px;
  color: #555555;
  margin-bottom: 25px;
}

.page-news__promo-button {
  display: inline-block;
  padding: 12px 25px;
  background-color: #EA7C07; /* Login color */
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: bold;
  font-size: 16px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-news__promo-button:hover {
  background-color: #d46a00;
  transform: translateY(-2px);
}

.page-news__guides-list li {
  background-color: #ffffff;
  padding: 20px 25px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s ease;
}

.page-news__guides-list li:hover {
  background-color: #f5f5f5;
}

.page-news__guides-list li a {
  color: #26A9E0;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  display: block;
  transition: color 0.3s ease;
}

.page-news__guides-list li a:hover {
  color: #007bb6;
  text-decoration: underline;
}

/* Final Call to Action Section */
.page-news__call-to-action {
  text-align: center;
  padding: 80px 0;
}

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

/* Responsive adjustments */
@media (max-width: 992px) {
  .page-news__hero-title {
    font-size: 40px;
  }
  .page-news__hero-description {
    font-size: 18px;
  }
  .page-news__section-title {
    font-size: 30px;
  }
  .page-news__news-card-title,
  .page-news__featured-card-title {
    font-size: 20px;
  }
  .page-news__promo-title {
    font-size: 22px;
  }
  .page-news__guides-list li a {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-news__hero-title {
    font-size: 32px;
  }
  .page-news__hero-description {
    font-size: 16px;
  }
  .page-news__cta-button {
    padding: 12px 30px;
    font-size: 18px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-news__cta-button--large {
    padding: 15px 40px;
    font-size: 20px;
  }
  .page-news__section {
    padding: 40px 0;
  }
  .page-news__container {
    padding: 0 15px;
  }
  .page-news__section-title {
    font-size: 26px;
    margin-bottom: 30px;
  }
  .page-news__news-grid,
  .page-news__featured-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__news-image-wrapper,
  .page-news__featured-image-wrapper {
    height: auto; /* Allow height to adjust */
  }
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__promo-item,
  .page-news__guides-list li {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-news__promo-list,
  .page-news__guides-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__promo-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-news__read-more-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-news__pagination {
    flex-wrap: wrap;
  }
  .page-news__pagination-link {
    flex: 1 1 auto;
    text-align: center;
  }
}

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

/* Color contrast enforcement */
.page-news {
  color: #333333; /* Default text color for light backgrounds */
}

.page-news__dark-section {
  background: #26A9E0;
  color: #ffffff; /* White text on primary color background */
}

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

.page-news__text-block--light {
  color: #f0f0f0;
}

.page-news__cta-button {
  background: #EA7C07;
  color: #ffffff;
}

.page-news__promo-button {
  background: #EA7C07;
  color: #ffffff;
}

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

.page-news__read-more-button--light {
  background-color: #ffffff;
  color: #26A9E0;
}