/* style/news.css */

/* Base styles for the page content, ensuring light text on dark body background */
.page-news {
  color: #f0f0f0; /* Light text for dark background */
  background-color: #121212; /* Matches body background from shared.css */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* Fixed header offset */
.page-news {
  padding-top: var(--header-offset, 120px);
}

/* Hero Banner Section */
.page-news__hero-banner {
  width: 100%;
  padding: 80px 20px;
  background: linear-gradient(135deg, #FFD700, #8B0000); /* Brand colors */
  text-align: center;
  box-sizing: border-box;
}

.page-news__hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.page-news__main-title {
  font-size: 42px;
  color: #ffffff; /* White text for contrast on gradient */
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-news__intro-text {
  font-size: 18px;
  color: #f0f0f0; /* Light text */
  max-width: 800px;
  margin: 0 auto;
}

/* Articles Section */
.page-news__articles-section {
  padding: 60px 20px;
  background-color: #1a1a1a; /* Slightly lighter dark background for contrast */
  box-sizing: border-box;
}

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

.page-news__section-title {
  font-size: 32px;
  color: #FFD700; /* Primary brand color for titles */
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

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

.page-news__article-card {
  background-color: #2a2a2a; /* Darker card background */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

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

.page-news__article-image {
  width: 100%;
  height: 200px; /* Fixed height for article images */
  overflow: hidden;
}

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

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

.page-news__article-title {
  font-size: 20px;
  color: #FFD700; /* Primary brand color */
  margin-bottom: 10px;
  font-weight: bold;
  line-height: 1.3;
}

.page-news__article-excerpt {
  font-size: 15px;
  color: #cccccc; /* Slightly lighter text for readability */
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-news__read-more {
  display: inline-block;
  font-size: 14px;
  color: #8B0000; /* Secondary brand color */
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: #FFD700; /* Primary brand color on hover */
}

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

.page-news__pagination-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #333333;
  color: #f0f0f0;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__pagination-item:hover:not(.active) {
  background-color: #555555;
  color: #FFD700;
}

.page-news__pagination-item.active {
  background-color: #FFD700;
  color: #121212; /* Dark text for contrast on yellow */
  cursor: default;
}

/* CTA Section */
.page-news__cta-section {
  padding: 80px 20px;
  background: linear-gradient(to right, #8B0000, #FFD700); /* Gradient for CTA */
  text-align: center;
  box-sizing: border-box;
}

.page-news__cta-container {
  max-width: 800px;
  margin: 0 auto;
}

.page-news__cta-title {
  font-size: 36px;
  color: #ffffff;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-news__cta-description {
  font-size: 18px;
  color: #f0f0f0;
  margin-bottom: 30px;
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-news__btn-primary {
  background-color: #FFD700;
  color: #121212; /* Dark text for contrast on yellow */
  border: 2px solid #FFD700;
}

.page-news__btn-primary:hover {
  background-color: #ffc400;
  border-color: #ffc400;
}

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

.page-news__btn-secondary:hover {
  background-color: #ffffff;
  color: #8B0000;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 36px;
  }
  .page-news__intro-text {
    font-size: 16px;
  }
  .page-news__section-title {
    font-size: 28px;
  }
  .page-news__articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
  }
  .page-news__article-image {
    height: 180px;
  }
  .page-news__article-title {
    font-size: 18px;
  }
  .page-news__article-excerpt {
    font-size: 14px;
  }
  .page-news__cta-title {
    font-size: 32px;
  }
  .page-news__cta-description {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  /* General mobile container padding */
  .page-news__hero-banner,
  .page-news__articles-section,
  .page-news__cta-section {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Fixed header offset for mobile */
  .page-news {
    padding-top: var(--header-offset, 120px) !important;
  }

  .page-news__main-title {
    font-size: 28px;
    margin-bottom: 15px;
  }
  .page-news__intro-text {
    font-size: 15px;
  }
  .page-news__section-title {
    font-size: 24px;
    margin-bottom: 30px;
  }
  .page-news__articles-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }
  .page-news__article-image {
    height: 160px;
  }
  .page-news__article-title {
    font-size: 17px;
  }
  .page-news__article-excerpt {
    font-size: 13px;
  }
  .page-news__pagination-item {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
  .page-news__cta-title {
    font-size: 26px;
  }
  .page-news__cta-description {
    font-size: 15px;
  }
  .page-news__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important; /* Force full width */
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
}

/* Image responsive rules */
.page-news img {
  max-width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-news__container,
  .page-news__hero-banner,
  .page-news__articles-section,
  .page-news__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}