:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --login-color: #EA7C07;
}

.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light backgrounds */
  background-color: var(--secondary-color); /* Matches body background if shared.css sets body to --secondary-color */
}

.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  min-height: 400px;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
}

.page-news__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.7;
}

.page-news__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  color: var(--text-light);
  padding: 20px;
  background: rgba(0, 0, 0, 0.4); /* Dark overlay for text readability */
  border-radius: 10px;
}

.page-news__main-title {
  font-size: clamp(2em, 3.5vw, 3.2em);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-light);
}

.page-news__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: var(--text-light);
}

.page-news__latest-news {
  padding: 60px 0;
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

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

.page-news__section-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.page-news__section-title--white {
  color: var(--text-light);
}

.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__section-description--white {
  color: var(--text-light);
}

.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: var(--text-light);
  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__news-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;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

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

.page-news__card-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__card-title a:hover {
  color: var(--login-color);
}

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

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

.page-news__read-more {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

.page-news__read-more:hover {
  color: var(--login-color);
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
}

.page-news__btn-primary {
  background-color: var(--primary-color);
  color: var(--text-light);
  border: 2px solid var(--primary-color);
}

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

.page-news__btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-news__btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-news__btn-primary--large {
  padding: 18px 35px;
  font-size: 1.2em;
}

.page-news__cta-section {
  background-color: var(--primary-color);
  padding: 80px 20px;
  text-align: center;
  color: var(--text-light);
}

.page-news__dark-section {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-news__light-bg {
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

.highlight {
  color: var(--login-color);
  font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .page-news__news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

  .page-news__hero-content {
    padding: 15px;
  }

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

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

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

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

  .page-news__container {
    padding: 0 15px;
  }

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

  .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;
    font-size: 1em;
    margin: 0 auto;
  }

  .page-news__btn-primary:hover,
  .page-news__btn-secondary:hover {
    /* Ensure hover states are also responsive and don't cause overflow */
    background-color: #1e87b7; /* Darken primary color */
    border-color: #1e87b7;
    color: var(--text-light);
  }

  .page-news__btn-primary--large {
    padding: 15px 25px;
    font-size: 1.1em;
  }

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

  /* Force responsive image and container styles */
  .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__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  .page-news__hero-section .page-news__hero-image {
    width: 100% !important;
    height: 100% !important;
  }
}

@media (max-width: 480px) {
  .page-news__main-title {
    font-size: clamp(1.5em, 8vw, 2em);
  }
  .page-news__section-title {
    font-size: 1.8em;
  }
}