/* style/news.css */

/* Custom CSS Variables */
:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: var(--dark-bg); /* Inherit from shared.css */
}

/* Base styles for the page-news scope */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Assuming --dark-bg from shared.css is dark, so light text */
  background-color: var(--bg-dark); /* Ensure consistency with body background */
  padding-top: var(--header-offset, 120px); /* Space for fixed header */
}

/* Hero Section */
.page-news__hero-section {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(135deg, var(--secondary-color) 0%, rgba(139, 0, 0, 0.8) 50%, var(--primary-color) 100%);
  color: var(--text-light);
  border-bottom: 5px solid var(--primary-color);
  box-shadow: inset 0 -5px 15px rgba(0, 0, 0, 0.3);
}

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

.page-news__main-title {
  font-size: 48px;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  font-weight: bold;
}

.page-news__intro-description {
  font-size: 20px;
  margin-bottom: 40px;
  line-height: 1.8;
  color: #f0f0f0;
}

/* Call to Action Button */
.page-news__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  border: 2px solid var(--primary-color);
  text-transform: uppercase;
}

.page-news__cta-button:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

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

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

.page-news__section-title {
  font-size: 36px;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 50px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

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

.page-news__article-card {
  background-color: rgba(255, 255, 255, 0.08); /* Slightly transparent white for dark background */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%; /* Ensure cards have equal height */
}

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

.page-news__article-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  border-bottom: 3px solid var(--primary-color);
}

.page-news__article-content {
  padding: 25px;
  flex-grow: 1; /* Allow content to grow and push meta to bottom */
  display: flex;
  flex-direction: column;
}

.page-news__article-title {
  font-size: 24px;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-news__article-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: bold;
}

.page-news__article-title a:hover {
  color: #fff;
}

.page-news__article-excerpt {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 20px;
  flex-grow: 1; /* Allows excerpt to take available space */
}

.page-news__article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto; /* Pushes meta to the bottom */
  padding-top: 15px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

.page-news__article-date {
  font-size: 14px;
  color: #aaa;
}

.page-news__read-more-link {
  display: inline-block;
  padding: 8px 18px;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: 1px solid var(--secondary-color);
}

.page-news__read-more-link:hover {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border-color: var(--primary-color);
}

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

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

.page-news__pagination-item:hover:not(.page-news__pagination-item--active) {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.page-news__pagination-item--active {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border-color: var(--primary-color);
  cursor: default;
}

.page-news__pagination-item--next {
  width: auto;
  border-radius: 20px;
  padding: 0 15px;
}

/* Final CTA Section */
.page-news__cta-section {
  text-align: center;
  padding: 80px 20px;
  background: var(--primary-color);
  color: var(--secondary-color);
  border-top: 5px solid var(--secondary-color);
}

.page-news__cta-title {
  font-size: 40px;
  margin-bottom: 20px;
  color: var(--secondary-color);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.page-news__cta-description {
  font-size: 20px;
  margin-bottom: 40px;
  color: #333;
}

.page-news__cta-button--large {
  padding: 18px 50px;
  font-size: 22px;
  border-width: 3px;
  background: var(--secondary-color);
  color: var(--primary-color);
  border-color: var(--secondary-color);
}

.page-news__cta-button--large:hover {
  background: #a00000; /* Slightly darker red */
  color: var(--primary-color);
  border-color: #a00000;
  transform: translateY(-4px) scale(1.03);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 40px;
  }
  .page-news__intro-description {
    font-size: 18px;
  }
  .page-news__section-title {
    font-size: 32px;
  }
  .page-news__article-title {
    font-size: 22px;
  }
  .page-news__cta-title {
    font-size: 34px;
  }
  .page-news__cta-description {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .page-news {
    padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
  }
  .page-news__hero-section {
    padding: 60px 15px;
  }
  .page-news__main-title {
    font-size: 32px;
  }
  .page-news__intro-description {
    font-size: 16px;
  }
  .page-news__cta-button {
    padding: 12px 30px;
    font-size: 18px;
    max-width: 100% !important; /* Button responsive */
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__articles-section {
    padding: 40px 15px;
  }
  .page-news__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .page-news__articles-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }
  .page-news__article-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-news__article-image {
    max-width: 100% !important; /* Image responsive */
    width: 100% !important;
    height: auto !important;
    min-height: 200px; /* Ensure min size */
  }
  .page-news__article-title {
    font-size: 20px;
  }
  .page-news__article-excerpt {
    font-size: 15px;
  }
  .page-news__pagination {
    margin-top: 40px;
    flex-wrap: wrap;
  }
  .page-news__pagination-item {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  .page-news__pagination-item--next {
    padding: 0 12px;
  }

  .page-news__cta-section {
    padding: 60px 15px;
  }
  .page-news__cta-title {
    font-size: 28px;
  }
  .page-news__cta-description {
    font-size: 16px;
  }
  .page-news__cta-button--large {
    padding: 15px 35px;
    font-size: 20px;
    max-width: 100% !important; /* Button responsive */
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* General image and container responsiveness for mobile */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__section, .page-news__article-card, .page-news__container, .page-news__hero-section, .page-news__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 480px) {
  .page-news__main-title {
    font-size: 28px;
  }
  .page-news__section-title {
    font-size: 24px;
  }
  .page-news__article-title {
    font-size: 18px;
  }
  .page-news__cta-title {
    font-size: 24px;
  }
  .page-news__cta-button,
  .page-news__cta-button--large {
    font-size: 16px;
    padding: 10px 25px;
  }
}