/* style/news.css */

/* Base styles for the news page */
.page-news {
  font-family: Arial, sans-serif;
  color: #1F2D3D; /* Text Main */
  background-color: #F4F7FB; /* Background */
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 40px;
  background-color: #F4F7FB;
}

.page-news__hero-image-wrapper {
  width: 100%;
  overflow: hidden;
  margin-bottom: 20px;
}

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

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

.page-news__hero-title {
  font-size: clamp(2em, 4vw, 3.2em);
  font-weight: bold;
  color: #2F6BFF; /* Main color */
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-news__hero-description {
  font-size: 1.1em;
  line-height: 1.6;
  color: #1F2D3D;
  max-width: 800px;
  margin: 0 auto;
}

/* News List Section */
.page-news__news-list-section {
  padding: 60px 0;
  background-color: #F4F7FB;
}

.page-news__section-title {
  font-size: clamp(1.8em, 3vw, 2.5em);
  font-weight: bold;
  color: #2F6BFF;
  text-align: center;
  margin-bottom: 40px;
}

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

.page-news__news-card {
  background-color: #FFFFFF; /* Card BG */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #D6E2FF; /* Border */
  display: flex;
  flex-direction: column;
}

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

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

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

.page-news__card-title {
  font-size: 1.3em;
  font-weight: bold;
  color: #1F2D3D; /* Text Main */
  margin-bottom: 15px;
  line-height: 1.4;
}

.page-news__card-excerpt {
  font-size: 0.95em;
  color: #1F2D3D;
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__read-more {
  display: inline-block;
  color: #2F6BFF; /* Main color */
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: #4A8BFF;
}

.page-news__view-all-wrapper {
  text-align: center;
  margin-top: 50px;
}

.page-news__view-all-button {
  display: inline-block;
  padding: 14px 30px;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button gradient */
  color: #ffffff;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-news__view-all-button:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
}

/* CTA Section */
.page-news__cta-section {
  background-color: #2F6BFF; /* Main color */
  padding: 80px 20px;
  text-align: center;
  color: #ffffff;
}

.page-news__cta-title {
  font-size: clamp(1.8em, 3.5vw, 2.8em);
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.3;
  color: #ffffff;
}

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

.page-news__cta-button {
  display: inline-block;
  padding: 16px 35px;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button gradient */
  color: #ffffff;
  font-size: 1.2em;
  font-weight: bold;
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.3s ease, transform 0.3s ease;
  border: 2px solid #ffffff;
  cursor: pointer;
}

.page-news__cta-button:hover {
  transform: translateY(-3px);
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: clamp(2em, 5vw, 2.8em);
  }
  .page-news__section-title {
    font-size: clamp(1.8em, 4vw, 2.2em);
  }
  .page-news__cta-title {
    font-size: clamp(1.8em, 4.5vw, 2.5em);
  }
  .page-news__news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-news__container,
  .page-news__hero-content {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-news__hero-section {
    padding-top: 10px !important;
    padding-bottom: 30px;
  }

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

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

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

  .page-news__section-title {
    font-size: clamp(1.6em, 5vw, 2em);
    margin-bottom: 30px;
  }

  .page-news__news-card {
    margin-bottom: 20px;
  }

  .page-news__card-image {
    height: 180px; /* Adjust height for smaller screens */
  }

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

  .page-news__card-excerpt {
    font-size: 0.9em;
  }

  .page-news__view-all-button,
  .page-news__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

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

  .page-news__cta-title {
    font-size: clamp(1.6em, 5.5vw, 2.2em);
  }

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

  /* Ensure all images are responsive and don't overflow */
  .page-news img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__hero-image-wrapper,
  .page-news__news-card,
  .page-news__card-content,
  .page-news__view-all-wrapper,
  .page-news__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
}

@media (max-width: 480px) {
  .page-news__news-grid {
    grid-template-columns: 1fr;
  }
  .page-news__hero-section {
    padding-bottom: 20px;
  }
  .page-news__card-image {
    height: 160px;
  }
  .page-news__card-content {
    padding: 15px;
  }
  .page-news__card-title {
    font-size: 1em;
  }
  .page-news__card-excerpt {
    font-size: 0.85em;
  }
}