.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text on light body background */
  background-color: #FFFFFF; /* Explicitly set for clarity, though body handles it */
}

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

/* Hero Section */
.page-news__hero-section {
  display: flex;
  flex-direction: column; /* Image above text */
  align-items: center;
  text-align: center;
  padding: 10px 0 60px 0; /* Small top padding, larger bottom padding */
  background-color: #f8f8f8;
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-width: 1200px; /* Constrain image width */
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-news__hero-content {
  padding: 40px 20px;
  max-width: 800px;
  background-color: #ffffff; /* Explicitly light background for text */
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-top: -80px; /* Overlap slightly with image for visual effect */
  position: relative;
  z-index: 1;
}

.page-news__main-title {
  font-size: 2.8em;
  font-weight: 700;
  color: #26A9E0; /* Brand color for H1 */
  margin-bottom: 20px;
  line-height: 1.2;
}

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

/* Section Titles */
.page-news__section-title {
  font-size: 2.2em;
  font-weight: 700;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 40px;
  padding-top: 60px;
}

/* News Grid */
.page-news__latest-updates {
  background-color: #FFFFFF;
  padding-bottom: 60px;
}

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

.page-news__news-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards in a row have similar height */
  display: flex;
  flex-direction: column;
}

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

.page-news__card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-news__card-image {
  width: 100%;
  height: 220px; /* 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-date {
  font-size: 0.9em;
  color: #777777;
  margin-bottom: 10px;
}

.page-news__card-title {
  font-size: 1.4em;
  color: #26A9E0;
  margin-bottom: 15px;
  line-height: 1.3;
  flex-grow: 1;
}

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

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

.page-news__read-more:hover {
  color: #1a7bb0; /* Darker shade on hover */
}


/* CTA Section */
.page-news__cta-section {
  background-color: #26A9E0; /* Brand color background */
  color: #ffffff; /* White text */
  padding: 80px 20px;
  text-align: center;
}

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

.page-news__cta-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  max-width: 100%; /* For responsive buttons */
  box-sizing: border-box;
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
}

.page-news__btn-primary {
  background-color: #EA7C07; /* Custom color for login/register */
  color: #ffffff;
  border: 2px solid transparent;
}

.page-news__btn-primary:hover {
  background-color: #d16b06; /* Slightly darker on hover */
}

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

.page-news__btn-secondary:hover {
  background-color: #e0f2f7; /* Lighter blue on hover */
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 2.2em;
  }
  .page-news__section-title {
    font-size: 1.8em;
  }
  .page-news__cta-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-news__container {
    padding: 0 15px !important; /* Adjust padding for smaller screens */
  }

  /* Images */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__hero-image-wrapper,
  .page-news__news-grid,
  .page-news__news-card,
  .page-news__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important; /* Add padding to containers */
    padding-right: 15px !important;
    overflow: hidden !important; /* Prevent overflow */
  }

  .page-news__hero-section {
    padding-top: 10px !important; /* Small top padding for mobile */
    padding-bottom: 40px !important;
  }

  .page-news__hero-content {
    margin-top: -40px;
    padding: 30px 15px;
  }

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

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

  .page-news__section-title {
    font-size: 1.6em;
    margin-bottom: 30px;
    padding-top: 40px;
  }

  .page-news__news-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }

  .page-news__card-image {
    height: 180px; /* Adjust card image height */
  }

  .page-news__card-title {
    font-size: 1.2em;
  }

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

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

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

  .page-news__cta-buttons {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 15px;
  }

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}