/* style/news.css */

/* --- Base Styles & Layout --- */
.page-news {
  font-family: Arial, sans-serif;
  color: #333333; /* Default dark text for light body background */
  line-height: 1.6;
  background-color: #FFFFFF; /* Explicitly set for clarity, though body is default white */
}

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

/* --- Hero Section --- */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Image first, then content */
  align-items: center;
  text-align: center;
  padding-bottom: 60px; /* Space below content */
  background-color: #f0f8ff; /* Light background for hero section */
  padding-top: 10px; /* Small top padding, relying on body for header offset */
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  margin-bottom: 30px; /* Space between image and text */
}

.page-news__hero-content {
  max-width: 900px;
  padding: 0 20px;
}

.page-news__main-title {
  font-size: clamp(2.2em, 4vw, 3em); /* Responsive font size */
  font-weight: 700;
  color: #26A9E0; /* Primary color for title */
  margin-bottom: 15px;
  line-height: 1.2;
}

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

/* --- Buttons --- */
.page-news__btn-primary {
  display: inline-block;
  background-color: #26A9E0; /* Primary color */
  color: #ffffff;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1em;
  transition: background-color 0.3s ease;
  border: 2px solid transparent;
}

.page-news__btn-primary:hover {
  background-color: #1a7fb3; /* Darker shade on hover */
}

/* --- Latest News Section --- */
.page-news__latest-section {
  padding: 60px 0;
  background-color: #ffffff;
}

.page-news__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.5em);
  font-weight: 700;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 20px;
}

.page-news__section-description {
  font-size: 1.1em;
  color: #555555;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

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

.page-news__news-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 200px; /* Min size for card */
}

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

.page-news__card-image {
  width: 100%;
  height: 220px; /* Fixed height for consistent card appearance */
  object-fit: cover;
  display: block;
}

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

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

.page-news__card-title a {
  color: #333333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__card-title a:hover {
  color: #26A9E0; /* Primary color on hover */
}

.page-news__card-meta {
  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: #1a7fb3;
  text-decoration: underline;
}

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

.page-news__pagination-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  text-decoration: none;
  color: #26A9E0;
  border: 1px solid #26A9E0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* --- CTA Block --- */
.page-news__cta-block {
  background-color: #f0f8ff; /* Light blue background */
  border-radius: 12px;
  padding: 50px 30px;
  text-align: center;
  margin-top: 60px;
}

.page-news__cta-title {
  font-size: clamp(1.8em, 3.5vw, 2.2em);
  font-weight: 700;
  color: #26A9E0;
  margin-bottom: 15px;
}

.page-news__cta-description {
  font-size: 1.1em;
  color: #555555;
  max-width: 700px;
  margin: 0 auto 30px auto;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
  .page-news__container {
    padding: 0 15px; /* Smaller padding on mobile */
  }

  .page-news__hero-section {
    padding-bottom: 40px;
    padding-top: 10px !important; /* body handles header offset */
  }

  .page-news__hero-image {
    margin-bottom: 20px;
  }

  .page-news__main-title {
    font-size: 2em; /* Adjust for smaller screens */
  }

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

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

  .page-news__grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

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

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

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

  .page-news__cta-block {
    padding: 40px 20px;
    margin-top: 40px;
  }

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

  /* Force responsive for all images */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Force responsive for all image containers */
  .page-news__hero-section,
  .page-news__latest-section,
  .page-news__container,
  .page-news__grid,
  .page-news__news-card,
  .page-news__cta-block {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow */
  }

  /* Force responsive for buttons */
  .page-news__btn-primary {
    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;
  }
  
  /* Button containers on mobile */
  .page-news__cta-block .page-news__btn-primary {
    display: block; /* Make button block level on mobile */
  }
}

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

/* Content area image CSS dimensions check */
.page-news__news-card .page-news__card-image {
    min-width: 200px;
    min-height: 200px;
}