/* style/news.css */

/* Variables for consistency */
:root {
  --primary-color: #0A2463; /* Deep Blue */
  --secondary-color: #FFD700; /* Gold */
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #f9f9f9;
  --background-white: #ffffff;
  --border-color: #e0e0e0;
}

.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light background */
  background-color: var(--background-light);
  /* Fixed navigation bar spacing - desktop */
  padding-top: 120px; /* Adjust based on actual header height */
}

/* Hero Section */
.page-news__hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a3a7f 100%);
  color: var(--text-light);
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-news__hero-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page-news__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
  color: var(--text-light); /* Ensure contrast */
}

.page-news__highlight {
  color: var(--secondary-color);
}

.page-news__hero-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #e0e0e0; /* Slightly lighter for contrast */
}

.page-news__hero-cta {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Ensure word breaks */
  text-align: center;
}

.page-news__cta-button--primary {
  background: var(--secondary-color);
  color: var(--primary-color); /* Ensure contrast */
  border: 2px solid var(--secondary-color);
}

.page-news__cta-button--primary:hover {
  background: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-news__cta-button--secondary {
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--text-light);
}

.page-news__cta-button--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Categories Section */
.page-news__categories-section {
  padding: 60px 20px;
  background-color: var(--background-white);
  text-align: center;
}

.page-news__categories-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-news__categories-title {
  font-size: 2.2em;
  color: var(--primary-color);
  margin-bottom: 40px;
  font-weight: bold;
}

.page-news__category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-news__category-item {
  display: inline-block;
  padding: 10px 25px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid var(--primary-color);
  white-space: nowrap;
}

.page-news__category-item:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Articles Section */
.page-news__articles-section {
  padding: 60px 20px;
  background-color: var(--background-light);
}

.page-news__articles-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-news__articles-title {
  font-size: 2.2em;
  color: var(--primary-color);
  margin-bottom: 40px;
  text-align: center;
  font-weight: bold;
}

.page-news__articles-title--secondary {
  margin-top: 60px;
}

/* Featured Article */
.page-news__featured-article {
  background: var(--background-white);
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 60px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__featured-article:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-news__featured-link {
  display: flex;
  text-decoration: none;
  color: inherit;
  flex-direction: row;
}

.page-news__featured-image {
  width: 50%;
  height: auto;
  object-fit: cover;
  display: block;
}

.page-news__featured-content {
  width: 50%;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-news__featured-heading {
  font-size: 2em;
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-news__featured-excerpt {
  font-size: 1.1em;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.page-news__featured-date {
  font-size: 0.9em;
  color: #666;
  margin-top: auto; /* Pushes date to bottom */
}

.page-news__read-more {
  display: inline-block;
  margin-top: 15px;
  color: var(--secondary-color);
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: #e6c200;
  text-decoration: underline;
}

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

.page-news__article-item {
  background: var(--background-white);
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-news__article-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-news__article-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%; /* Ensure link covers entire card */
}

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

.page-news__article-content {
  padding: 20px;
  flex-grow: 1; /* Allow content to take available space */
  display: flex;
  flex-direction: column;
}

.page-news__article-heading {
  font-size: 1.4em;
  color: var(--primary-color);
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-news__article-excerpt {
  font-size: 0.95em;
  color: var(--text-dark);
  margin-bottom: 15px;
  flex-grow: 1; /* Allow excerpt to take available space */
}

.page-news__article-date {
  font-size: 0.85em;
  color: #666;
  margin-top: auto; /* Pushes date to bottom */
}

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

.page-news__pagination-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--background-white);
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  border: 1px solid var(--primary-color);
  transition: all 0.3s ease;
}

.page-news__pagination-link:hover:not(.page-news__pagination-link--active):not(.page-news__pagination-link--disabled) {
  background: var(--primary-color);
  color: var(--text-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-news__pagination-link--active {
  background: var(--primary-color);
  color: var(--text-light);
  border-color: var(--primary-color);
  cursor: default;
}

.page-news__pagination-link--disabled {
  background: #e0e0e0;
  color: #999;
  border-color: #e0e0e0;
  cursor: not-allowed;
}

/* Bottom CTA Section */
.page-news__cta-bottom-section {
  padding: 80px 20px;
  text-align: center;
}

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

.page-news__cta-bottom-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

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

/* Dark Background for CTA section */
.page-news__dark-bg {
  background: var(--primary-color);
  color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 2.8em;
  }
  .page-news__featured-link {
    flex-direction: column;
  }
  .page-news__featured-image,
  .page-news__featured-content {
    width: 100%;
  }
  .page-news__featured-heading {
    font-size: 1.8em;
  }
}

@media (max-width: 768px) {
  .page-news {
    padding-top: 100px !important; /* Mobile fixed header adjustment */
  }
  .page-news__hero-section,
  .page-news__categories-section,
  .page-news__articles-section,
  .page-news__cta-bottom-section {
    padding: 40px 15px;
  }
  .page-news__hero-title {
    font-size: 2.2em;
  }
  .page-news__hero-description {
    font-size: 1em;
  }
  .page-news__hero-cta {
    flex-direction: column;
    gap: 15px;
  }
  .page-news__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 25px;
    font-size: 1em;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-news__categories-title,
  .page-news__articles-title,
  .page-news__cta-bottom-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-news__category-list {
    gap: 10px;
  }
  .page-news__category-item {
    padding: 8px 18px;
    font-size: 0.9em;
  }
  .page-news__featured-heading {
    font-size: 1.5em;
  }
  .page-news__featured-excerpt {
    font-size: 0.9em;
  }
  .page-news__article-heading {
    font-size: 1.2em;
  }
  .page-news__article-excerpt {
    font-size: 0.85em;
  }
  .page-news__article-grid {
    grid-template-columns: 1fr;
  }

  /* Image responsive adaptation for mobile */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news__hero-section,
  .page-news__categories-section,
  .page-news__articles-section,
  .page-news__cta-bottom-section,
  .page-news__hero-container,
  .page-news__categories-container,
  .page-news__articles-container,
  .page-news__cta-bottom-container,
  .page-news__featured-article,
  .page-news__article-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0; /* Sections handle their own padding now */
    padding-right: 0; /* Sections handle their own padding now */
    overflow: hidden !important;
  }

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

  /* Specific padding for containers inside sections to ensure content doesn't touch edges */
  .page-news__hero-container,
  .page-news__categories-container,
  .page-news__articles-container,
  .page-news__cta-bottom-container {
    padding-left: 15px;
    padding-right: 15px;
  }
}