/* style/news.css */
:root {
  --primary-color: #007bff;
  --secondary-color: #ffc107;
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #121212;
  --bg-light: #f8f9fa;
  --card-bg-dark: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.15);
}

.page-news {
  padding-top: 120px; /* Adjust for fixed header */
  color: var(--text-light); /* Light text on dark body background */
  background-color: var(--bg-dark); /* Explicitly setting for clarity */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

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

.page-news__section-title,
.page-news__main-title {
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 30px;
  font-size: 3em;
  font-weight: bold;
  line-height: 1.2;
}

.page-news__section-description,
.page-news__hero-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  font-size: 1.1em;
  color: #e0e0e0;
}

/* Hero Section */
.page-news__hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
  padding: 80px 0;
  text-align: center;
  margin-bottom: 60px;
}

.page-news__main-title {
  color: var(--text-light);
  font-size: 3.5em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__cta-button--primary {
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

.page-news__cta-button--primary:hover {
  background-color: #e6b000;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

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

.page-news__cta-button--secondary:hover {
  background-color: #0056b3;
  border-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Category Section */
.page-news__category-section {
  padding: 60px 0;
  background-color: #1a1a1a;
}

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

.page-news__category-item {
  background-color: var(--card-bg-dark);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-news__category-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-news__category-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  max-width: 100%;
  display: block;
}

.page-news__category-heading {
  font-size: 1.5em;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.page-news__category-link {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__category-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-news__category-excerpt {
  font-size: 0.95em;
  color: #cccccc;
}

/* Latest Articles Section */
.page-news__latest-articles {
  padding: 60px 0;
  background-color: var(--bg-dark);
}

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

.page-news__article-item {
  background-color: var(--card-bg-dark);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

.page-news__article-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.page-news__article-content {
  padding: 20px;
}

.page-news__article-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  color: var(--text-light);
  transition: color 0.3s ease;
}

.page-news__article-item:hover .page-news__article-title {
  color: var(--secondary-color);
}

.page-news__article-excerpt {
  font-size: 0.9em;
  color: #b0b0b0;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-news__article-date,
.page-news__article-category {
  font-size: 0.85em;
  color: #888888;
  margin-right: 15px;
}

.page-news__article-category {
  background-color: var(--primary-color);
  padding: 5px 10px;
  border-radius: 5px;
  color: var(--text-light);
  font-weight: bold;
}

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

.page-news__pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--card-bg-dark);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
  font-weight: bold;
}

.page-news__pagination-link:hover {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-news__pagination-link--active {
  background-color: var(--secondary-color);
  color: var(--text-dark);
  pointer-events: none;
}

.page-news__pagination-link--next {
  width: auto;
  padding: 0 15px;
}

/* Why Follow Section */
.page-news__why-follow-section {
  padding: 60px 0;
  background-color: #1a1a1a;
}

.page-news__benefits-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 800px;
}

.page-news__benefits-list li {
  background-color: var(--card-bg-dark);
  margin-bottom: 15px;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: #e0e0e0;
}

.page-news__benefits-list li p {
  margin: 0;
  color: #e0e0e0;
  text-align: left;
}

.page-news__benefits-list li p strong {
  color: var(--secondary-color);
}

/* Bottom CTA Section */
.page-news__cta-bottom-section {
  background: linear-gradient(45deg, #0056b3 0%, var(--primary-color) 100%);
  padding: 80px 0;
  text-align: center;
  margin-top: 60px;
}

.page-news__cta-bottom-section .page-news__section-title {
  color: var(--text-light);
}

.page-news__cta-bottom-section .page-news__section-description {
  color: #e0e0e0;
  margin-bottom: 30px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 3em;
  }
  .page-news__section-title {
    font-size: 2.5em;
  }
}

@media (max-width: 768px) {
  .page-news {
    padding-top: 100px !important; /* Mobile adjust for fixed header */
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-news__hero-section {
    padding: 60px 0;
  }

  .page-news__main-title {
    font-size: 2.5em;
  }

  .page-news__section-title {
    font-size: 2em;
  }

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

  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
  }

  .page-news__cta-button {
    padding: 12px 20px;
    font-size: 1em;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__category-section,
  .page-news__latest-articles,
  .page-news__why-follow-section,
  .page-news__cta-bottom-section {
    padding: 40px 0;
  }

  .page-news__category-grid,
  .page-news__article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-news__category-item,
  .page-news__article-item {
    padding: 20px;
    border-radius: 8px;
  }

  .page-news__category-image,
  .page-news__article-image {
    height: 180px;
    border-radius: 6px;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

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

  .page-news__article-content {
    padding: 15px;
  }

  .page-news__pagination {
    margin-top: 30px;
    gap: 8px;
  }

  .page-news__pagination-link {
    width: 35px;
    height: 35px;
    font-size: 0.9em;
  }

  .page-news__pagination-link--next {
    padding: 0 12px;
  }

  .page-news__benefits-list li {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .page-news__main-title {
    font-size: 2em;
  }

  .page-news__section-title {
    font-size: 1.8em;
  }

  .page-news__hero-description,
  .page-news__section-description {
    font-size: 0.95em;
  }
}

/* Ensure all images are responsive and do not exceed container */
.page-news img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-news__section,
.page-news__card,
.page-news__container,
.page-news__category-item,
.page-news__article-item {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 768px) {
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__category-item,
  .page-news__article-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  
  .page-news__hero-section .page-news__container,
  .page-news__category-section .page-news__container,
  .page-news__latest-articles .page-news__container,
  .page-news__why-follow-section .page-news__container,
  .page-news__cta-bottom-section .page-news__container {
    padding-left: 0;
    padding-right: 0;
  }
}