/* style/news.css */

:root {
  --primary-color: #0A2239;
  --secondary-color: #FFD700;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --bg-light-gray: #f1f3f5;
  --border-color: #e0e0e0;
}

/* Global page-news container styling */
.page-news {
  line-height: 1.6;
  color: var(--text-color-light); /* Default for sections directly on body background */
  background-color: var(--dark-bg-1); /* Inherits from shared.css */
}

/* Hero Banner Section */
.page-news__hero-banner {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a3a5a 100%);
  padding: 180px 20px 80px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-color-light);
  position: relative;
  overflow: hidden;
}

.page-news__hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.page-news__main-title {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--text-color-light);
  line-height: 1.2;
}

.page-news__hero-description {
  font-size: 18px;
  margin-bottom: 30px;
  opacity: 0.9;
}

.page-news__hero-description a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
}

.page-news__hero-description a:hover {
  text-decoration: underline;
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color);
  color: var(--primary-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.2);
  border: none;
}

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

/* General Section Styling */
.page-news__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-news__section-title {
  font-size: 32px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
}

.page-news__section-intro {
  font-size: 17px;
  color: var(--text-color-dark);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.page-news__section-intro a {
  color: var(--primary-color);
  font-weight: bold;
  text-decoration: none;
}

.page-news__section-intro a:hover {
  text-decoration: underline;
}

/* Featured Articles Section */
.page-news__featured-articles {
  padding: 80px 0;
  background-color: var(--bg-light-gray);
}

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

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

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

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

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

.page-news__article-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  line-height: 1.4;
}

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

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

.page-news__article-excerpt {
  font-size: 16px;
  margin-bottom: 20px;
  line-height: 1.7;
}

.page-news__article-excerpt a {
  color: var(--primary-color);
  font-weight: bold;
  text-decoration: none;
}

.page-news__article-excerpt a:hover {
  text-decoration: underline;
}

.page-news__read-more {
  display: inline-block;
  color: var(--primary-color);
  font-weight: bold;
  text-decoration: none;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 3px;
  transition: all 0.3s ease;
}

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

/* Latest News Section */
.page-news__latest-news {
  padding: 80px 0;
  background-color: #ffffff;
}

.page-news__news-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.page-news__news-item {
  background: var(--bg-light-gray);
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-color-dark);
}

.page-news__news-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-news__news-meta {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #666666;
  margin-bottom: 10px;
}

.page-news__news-category {
  font-weight: bold;
  color: var(--primary-color);
}

.page-news__news-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

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

.page-news__news-title a:hover {
  color: var(--secondary-color);
}

.page-news__news-excerpt {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.page-news__news-excerpt a {
  color: var(--primary-color);
  font-weight: bold;
  text-decoration: none;
}

.page-news__news-excerpt a:hover {
  text-decoration: underline;
}

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

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

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

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

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

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

/* CTA Section */
.page-news__cta-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a3a5a 100%);
  padding: 80px 20px;
  text-align: center;
  color: var(--text-color-light);
}

.page-news__cta-title {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--text-color-light);
}

.page-news__cta-description {
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

.page-news__cta-description a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
}

.page-news__cta-description a:hover {
  text-decoration: underline;
}

.page-news__newsletter-form {
  display: flex;
  justify-content: center;
  gap: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.page-news__email-input {
  flex-grow: 1;
  padding: 15px 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.page-news__email-input::placeholder {
  color: #888;
}

.page-news__subscribe-button {
  padding: 15px 30px;
  background: var(--secondary-color);
  color: var(--primary-color);
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

/* FAQ Section */
.page-news__faq-section {
  padding: 80px 0;
  background-color: var(--bg-light-gray);
}

.page-news__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 25px;
  opacity: 0;
  background: #f9f9f9;
  color: var(--text-color-dark);
  font-size: 16px;
  line-height: 1.7;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important; /* Sufficiently large value */
  padding: 20px 25px !important;
  opacity: 1;
  border-radius: 0 0 8px 8px;
}

.page-news__faq-answer p {
  margin-bottom: 10px;
}

.page-news__faq-answer p:last-child {
  margin-bottom: 0;
}

.page-news__faq-answer a {
  color: var(--primary-color);
  font-weight: bold;
  text-decoration: none;
}

.page-news__faq-answer a:hover {
  text-decoration: underline;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--primary-color);
}

.page-news__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-news__faq-question:active {
  background: #eeeeee;
}

.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--primary-color);
}

.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: var(--secondary-color);
  transform: rotate(45deg);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 36px;
  }
  .page-news__section-title {
    font-size: 28px;
  }
  .page-news__cta-title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .page-news__hero-banner {
    padding-top: 160px !important;
    padding-bottom: 60px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__main-title {
    font-size: 30px;
    margin-bottom: 15px;
  }

  .page-news__hero-description {
    font-size: 16px;
    margin-bottom: 25px;
  }

  .page-news__cta-button {
    padding: 12px 30px;
    font-size: 18px;
  }

  .page-news__featured-articles,
  .page-news__latest-news,
  .page-news__cta-section,
  .page-news__faq-section {
    padding: 60px 0;
  }

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

  .page-news__section-title {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .page-news__section-intro {
    font-size: 15px;
    margin-bottom: 30px;
  }

  .page-news__articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-news__article-image {
    height: 180px;
  }

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

  .page-news__article-title {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .page-news__article-excerpt {
    font-size: 14px;
    margin-bottom: 15px;
  }

  .page-news__news-item {
    padding: 20px;
  }

  .page-news__news-meta {
    font-size: 13px;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .page-news__news-title {
    font-size: 17px;
  }

  .page-news__news-excerpt {
    font-size: 14px;
  }

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

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

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

  .page-news__cta-title {
    font-size: 28px;
  }

  .page-news__cta-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-news__newsletter-form {
    flex-direction: column;
    gap: 10px;
  }

  .page-news__email-input,
  .page-news__subscribe-button {
    width: 100%;
    font-size: 16px;
    padding: 12px 15px;
  }

  .page-news__faq-question {
    padding: 15px 20px;
  }

  .page-news__faq-question h3 {
    font-size: 16px;
  }

  .page-news__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }

  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px 20px !important;
  }

  /* Ensure all images and their containers are responsive and prevent overflow */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-news__hero-banner,
  .page-news__featured-articles,
  .page-news__latest-news,
  .page-news__cta-section,
  .page-news__faq-section,
  .page-news__container,
  .page-news__article-card,
  .page-news__news-item,
  .page-news__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}