/* style/news.css */

:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #000080; /* Deep Blue */
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #121212;
  --bg-light-card: rgba(255, 255, 255, 0.1);
  --border-color: #333333;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

.page-news {
  color: var(--text-light); /* Default text color for dark body background */
  background-color: var(--bg-dark); /* Inherits from body if not set, but ensures consistency */
  min-height: 100vh;
  padding-top: 100px; /* Adjust for fixed header */
}

@media (max-width: 768px) {
  .page-news {
    padding-top: 80px !important; /* Adjust for fixed header on mobile */
  }
}

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

.page-news__hero-section {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #000050 100%);
  color: var(--text-light);
  box-shadow: inset 0 -5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.page-news__main-title {
  font-size: 3.2em;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 25px;
  line-height: 1.2;
  text-shadow: 2px 2px 4px var(--shadow-color);
}

.page-news__description {
  font-size: 1.2em;
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.9);
}

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

.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 5px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
}

.page-news__btn-primary {
  background-color: var(--primary-color);
  color: var(--secondary-color); /* Dark text on gold */
  border: 2px solid var(--primary-color);
}

.page-news__btn-primary:hover {
  background-color: #e6c200;
  border-color: #e6c200;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-news__btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-news__btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-news__articles-section {
  padding: 60px 0;
  background-color: var(--bg-dark);
}

.page-news__section-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
  text-shadow: 1px 1px 3px var(--shadow-color);
}

.page-news__section-description {
  font-size: 1.1em;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  margin-bottom: 50px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

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

.page-news__article-card {
  background-color: var(--bg-light-card);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

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

.page-news__article-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border-color);
}

.page-news__article-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  color: var(--text-light);
}

.page-news__article-title {
  font-size: 1.6em;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.4;
}

.page-news__article-excerpt {
  font-size: 0.95em;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__article-date {
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
  display: block;
}

.page-news__read-more-button {
  background-color: var(--primary-color);
  color: var(--secondary-color); /* Dark text on gold */
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 0.9em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  align-self: flex-start;
  text-decoration: none;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__read-more-button:hover {
  background-color: #e6c200;
  transform: translateY(-2px);
}

.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(--bg-light-card);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 50%;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

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

.page-news__cta-bottom-section {
  background: linear-gradient(45deg, var(--secondary-color) 0%, #000050 100%);
  padding: 80px 0;
  text-align: center;
  color: var(--text-light);
  box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

@media (max-width: 768px) {
  .page-news__container {
    padding: 0 15px;
  }
  .page-news__hero-section,
  .page-news__articles-section,
  .page-news__cta-bottom-section {
    padding: 40px 0;
  }
  .page-news__main-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }
  .page-news__description {
    font-size: 1em;
    margin-bottom: 30px;
  }
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-news__cta-button {
    padding: 12px 25px;
    font-size: 1em;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-news__section-title {
    font-size: 2em;
    margin-bottom: 15px;
  }
  .page-news__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }
  .page-news__article-list {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-news__article-image {
    height: 180px;
  }
  .page-news__article-content {
    padding: 20px;
  }
  .page-news__article-title {
    font-size: 1.3em;
  }
  .page-news__article-excerpt {
    font-size: 0.9em;
  }
  .page-news__read-more-button {
    padding: 8px 15px;
    font-size: 0.85em;
  }
  .page-news__pagination {
    margin-top: 40px;
    gap: 8px;
  }
  .page-news__pagination-link {
    width: 35px;
    height: 35px;
    font-size: 0.9em;
  }
}

@media (max-width: 480px) {
  .page-news__main-title {
    font-size: 1.8em;
  }
  .page-news__section-title {
    font-size: 1.6em;
  }
  .page-news__description,
  .page-news__section-description {
    font-size: 0.9em;
  }
  .page-news__article-title {
    font-size: 1.1em;
  }
  .page-news__article-excerpt {
    font-size: 0.85em;
  }
  .page-news__article-image {
    height: 150px;
  }
}

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

/* Mobile specific image adaptation */
@media (max-width: 768px) {
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-news__hero-section,
  .page-news__articles-section,
  .page-news__cta-bottom-section,
  .page-news__article-card,
  .page-news__article-link,
  .page-news__article-image {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
}

/* Contrast fix classes (if needed) */
.page-news__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-news__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}