/* style/news.css */

/* Base styles for the page content */
.page-news {
  font-family: Arial, sans-serif;
  color: #333333; /* Dark text for light body background */
  line-height: 1.6;
  background-color: #F5F7FA; /* Body background from shared.css, but ensuring consistency */
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding as body already handles --header-offset */
  background-color: #f5f7fa; /* Match body background */
  overflow: hidden; /* Ensure no overflow */
}

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

.page-news__hero-content {
  text-align: center;
  max-width: 900px;
  margin-top: 30px;
  padding: 0 15px;
}

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

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

/* Articles Section */
.page-news__articles-section {
  padding: 40px 20px;
  background-color: #F5F7FA;
}

.page-news__container {
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0 15px; /* Add padding for content within container */
}

.page-news__section-title {
  font-size: 2.2em;
  font-weight: 700;
  color: #E53935;
  text-align: center;
  margin-bottom: 40px;
}

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

.page-news__article-card {
  background-color: #FFFFFF; /* Card background */
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #E0E0E0; /* Border color */
}

.page-news__article-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-news__article-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

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

.page-news__article-title a {
  color: #E53935; /* Brand color for article titles */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__article-title a:hover {
  color: #FF5A4F; /* Auxiliary color on hover */
}

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

.page-news__article-summary {
  font-size: 1em;
  color: #333333;
  margin-bottom: 20px;
  flex-grow: 1; /* Allow summary to take up available space */
}

.page-news__read-more-btn {
  display: inline-block;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Button gradient */
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s ease;
  text-align: center;
  max-width: 100%; /* Ensure button adapts to container */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__read-more-btn:hover {
  opacity: 0.9;
}

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

.page-news__view-all-btn {
  display: inline-block;
  background: #E53935; /* Main brand color for view all button */
  color: #ffffff;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
  max-width: 100%; /* Ensure button adapts to container */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__view-all-btn:hover {
  background-color: #FF5A4F;
}

/* Call to Action Section */
.page-news__cta-section {
  padding: 60px 20px;
  background-color: #F5F7FA;
}

.page-news__cta-section .page-news__container.page-news__dark-bg {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  background-color: #E53935; /* Main brand color for dark background */
  color: #ffffff; /* White text for dark background */
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-news__cta-content {
  flex: 1;
  min-width: 300px;
}

.page-news__cta-title {
  font-size: 2em;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
  color: #ffffff;
}

.page-news__cta-description {
  font-size: 1.1em;
  margin-bottom: 25px;
  color: #f0f0f0;
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Button gradient */
  color: #ffffff;
  border: none;
  cursor: pointer;
  max-width: 100%; /* Ensure button adapts to container */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-news__cta-image-wrapper {
  flex: 1;
  min-width: 250px;
  text-align: center;
}

.page-news__cta-image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: contain; /* Ensure image fits well */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-news__hero-section {
    padding: 30px 10px;
    padding-top: 10px !important; /* Small top padding for mobile hero */
  }

  .page-news__hero-content {
    margin-top: 20px;
    padding: 0 10px;
  }

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

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

  .page-news__articles-section,
  .page-news__cta-section {
    padding: 30px 10px;
  }

  .page-news__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

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

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

  .page-news__article-image {
    height: 180px; /* Adjust image height for mobile */
  }

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

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

  .page-news__cta-section .page-news__container.page-news__dark-bg {
    flex-direction: column;
    padding: 30px;
    text-align: center;
  }

  .page-news__cta-image-wrapper {
    margin-top: 20px;
  }

  /* Mobile image responsiveness */
  .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__hero-section,
  .page-news__articles-section,
  .page-news__cta-section,
  .page-news__cta-section .page-news__container.page-news__dark-bg,
  .page-news__cta-image-wrapper,
  .page-news__articles-grid {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow */
  }

  /* Mobile video responsiveness (if any) */
  .page-news video,
  .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__video-section,
  .page-news__video-container,
  .page-news__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  .page-news__video-section {
    padding-top: 10px !important;
  }
}