/* style/news.css */
:root {
  --primary-color: #2F6BFF;
  --secondary-color: #6FA3FF;
  --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  --card-bg: #FFFFFF;
  --background-color: #F4F7FB;
  --text-main: #1F2D3D;
  --text-black: #000000;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;
}

.page-news {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-main);
  background-color: var(--background-color);
  line-height: 1.6;
  font-size: 16px;
}

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

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

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

.page-news__hero-content {
  max-width: 800px;
  margin-top: 20px;
  padding: 0 15px;
}

.page-news__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size for H1 */
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-news__hero-description {
  font-size: clamp(1em, 1.5vw, 1.25em);
  color: var(--text-main);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Intro Section */
.page-news__intro-section {
  padding: 60px 0;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

.page-news__section-title {
  font-size: clamp(1.8em, 3vw, 2.5em);
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 25px;
}

.page-news__section-description {
  font-size: 1.1em;
  color: var(--text-main);
  text-align: justify;
  margin-bottom: 15px;
}

.page-news__section-description strong {
  color: var(--primary-color);
}

/* News Grid Section */
.page-news__news-grid-section {
  padding: 60px 0;
  background-color: var(--background-color);
}

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

.page-news__news-card {
  background-color: var(--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;
  display: flex;
  flex-direction: column;
}

.page-news__news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px 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: 250px; /* 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.3em;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.page-news__card-link:hover .page-news__card-title {
  color: var(--primary-color);
}

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

.page-news__card-meta time {
  font-weight: 500;
}

.page-news__card-excerpt {
  font-size: 1em;
  color: var(--text-main);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__read-more-btn {
  display: inline-block;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

.page-news__pagination-item {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 15px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-main);
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  font-weight: 500;
}

.page-news__pagination-item:hover {
  background-color: var(--primary-color);
  color: #FFFFFF;
  border-color: var(--primary-color);
}

.page-news__pagination-item--active {
  background-color: var(--primary-color);
  color: #FFFFFF;
  border-color: var(--primary-color);
  pointer-events: none;
}

/* CTA Section */
.page-news__cta-section {
  padding: 80px 0;
  background: var(--button-gradient);
  color: #FFFFFF;
  text-align: center;
}

.page-news__cta-title {
  font-size: clamp(2em, 3.5vw, 3em);
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 20px;
}

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

.page-news__cta-button {
  display: inline-block;
  padding: 15px 35px;
  background-color: #FFFFFF;
  color: var(--primary-color);
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button:hover {
  background-color: #E0E0E0;
  color: var(--primary-color);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

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

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

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

  .page-news__main-title {
    font-size: clamp(1.8em, 8vw, 2.5em);
    margin-bottom: 10px;
  }

  .page-news__hero-description {
    font-size: clamp(0.9em, 4vw, 1.1em);
    margin-bottom: 20px;
  }

  .page-news__intro-section,
  .page-news__news-grid-section,
  .page-news__cta-section {
    padding: 40px 0;
  }

  .page-news__section-title {
    font-size: clamp(1.5em, 6vw, 2em);
    margin-bottom: 20px;
  }

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

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

  .page-news__card-image {
    height: 200px;
  }

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

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

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

  .page-news__cta-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-news__cta-button {
    padding: 12px 30px;
    font-size: 1em;
    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;
  }

  /* Mobile image and video responsiveness */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Mobile button containers */
  .page-news__cta-buttons,
  .page-news__button-group,
  .page-news__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
}

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