/* style/news.css */

/* Base styles for news page, based on dark body background */
.page-news {
  color: #ffffff; /* Light text for dark body background */
  background-color: #000000; /* Ensure content area has a background for contrast */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

/* Fixed navigation bar spacing */
.page-news__hero-section {
  padding-top: 120px; /* Desktop spacing for fixed header */
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #1A1A1A, #000000);
  text-align: center;
  padding-bottom: 60px;
}

.page-news__hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-news__main-title {
  font-size: 42px;
  font-weight: 700;
  color: #FFD700; /* Gold color for main title */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__subtitle {
  font-size: 18px;
  color: #f0f0f0;
  max-width: 800px;
  margin: 0 auto;
}

.page-news__section-title {
  font-size: 32px;
  font-weight: 700;
  color: #FFD700; /* Gold color for section titles */
  text-align: center;
  margin-bottom: 40px;
}

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

/* Categories section */
.page-news__articles-overview-section {
  padding: 60px 0;
  background-color: #1a1a1a;
}

.page-news__categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.page-news__category-button {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 50px;
  background-color: #FFD700;
  color: #1A1A1A;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid #FFD700;
  font-size: 16px;
}

.page-news__category-button:hover {
  background-color: #1A1A1A;
  color: #FFD700;
  border-color: #FFD700;
}

/* Latest articles section */
.page-news__latest-articles-section {
  padding: 80px 0;
  background-color: #000000;
}

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

.page-news__article-card {
  background-color: #1a1a1a; /* Dark background for cards */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

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

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

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

.page-news__article-content {
  padding: 20px;
  color: #ffffff; /* Light text for card content */
}

.page-news__article-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #FFD700; /* Gold color for article titles */
  line-height: 1.4;
}

.page-news__article-excerpt {
  font-size: 15px;
  color: #cccccc;
  margin-bottom: 15px;
}

.page-news__read-more {
  display: inline-flex;
  align-items: center;
  color: #FFD700;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: #ffffff;
}

.page-news__read-more i {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.page-news__article-card:hover .page-news__read-more i {
  transform: translateX(5px);
}

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

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

.page-news__pagination-link:hover:not(.page-news__pagination-link--active) {
  background-color: #FFD700;
  color: #1A1A1A;
}

.page-news__pagination-link--active {
  background-color: #FFD700;
  color: #1A1A1A;
  cursor: default;
}

/* CTA Section */
.page-news__cta-section {
  padding: 80px 0;
  background: linear-gradient(90deg, #FFD700, #FFA500);
  text-align: center;
  color: #1A1A1A;
}

.page-news__cta-content {
  max-width: 900px;
}

.page-news__cta-title {
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1A1A1A;
}

.page-news__cta-description {
  font-size: 18px;
  margin-bottom: 30px;
  color: #333333;
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
}

.page-news__btn-primary {
  background-color: #1A1A1A;
  color: #FFD700;
  border: 2px solid #1A1A1A;
}

.page-news__btn-primary:hover {
  background-color: #000000;
  color: #ffffff;
  border-color: #000000;
}

.page-news__btn-secondary {
  background-color: transparent;
  color: #1A1A1A;
  border: 2px solid #1A1A1A;
}

.page-news__btn-secondary:hover {
  background-color: #1A1A1A;
  color: #FFD700;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 80px 0;
  background-color: #000000;
}

.page-news__faq-list {
  margin-top: 40px;
}

/* FAQ container style */
.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #1a1a1a; /* Dark background for FAQ items */
  border: 1px solid rgba(255, 215, 0, 0.2);
}

/* FAQ default state - answer hidden */
.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 20px;
  opacity: 0;
  color: #cccccc;
  font-size: 15px;
}

/* FAQ expanded state - 🚨 Use!important and sufficiently large max-height */
.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important; /* 🚨 Use!important, value large enough to contain any content */
  padding: 20px !important;
  opacity: 1;
  background-color: #0d0d0d; /* Slightly lighter dark background for answer */
  border-radius: 0 0 8px 8px;
}

/* Question style */
.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background-color: #1a1a1a;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: #FFD700; /* Gold text for questions */
}

.page-news__faq-question:hover {
  background-color: #2a2a2a;
}

.page-news__faq-question:active {
  background-color: #3a3a3a;
}

/* Question title style */
.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click events */
  color: #FFD700; /* Gold color for FAQ questions */
}

/* Toggle icon */
.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 36px;
  }
  .page-news__section-title {
    font-size: 28px;
  }
  .page-news__article-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-news__cta-title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding-top: 100px; /* Mobile spacing for fixed header */
    padding-bottom: 40px;
  }
  .page-news__main-title {
    font-size: 28px;
  }
  .page-news__subtitle {
    font-size: 16px;
    padding: 0 10px;
  }
  .page-news__section-title {
    font-size: 24px;
    margin-bottom: 30px;
  }
  .page-news__categories {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
  .page-news__category-button {
    width: 80%;
    max-width: 300px;
    font-size: 15px;
    padding: 10px 20px;
  }
  .page-news__latest-articles-section {
    padding: 50px 0;
  }
  .page-news__article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__article-image {
    height: 180px;
  }
  .page-news__article-title {
    font-size: 18px;
  }
  .page-news__article-excerpt {
    font-size: 14px;
  }
  .page-news__cta-section {
    padding: 50px 0;
  }
  .page-news__cta-title {
    font-size: 26px;
  }
  .page-news__cta-description {
    font-size: 16px;
  }
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 80%;
    max-width: 300px;
    font-size: 16px;
    padding: 12px 25px;
    margin: 0 auto;
  }
  .page-news__faq-section {
    padding: 50px 0;
  }
  .page-news__faq-question {
    padding: 15px;
  }
  .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 !important;
  }

  /* Mobile image adaptation (forced) */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__hero-section,
  .page-news__articles-overview-section,
  .page-news__latest-articles-section,
  .page-news__cta-section,
  .page-news__faq-section,
  .page-news__article-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-news__hero-container,
  .page-news__cta-content,
  .page-news__faq-list {
    padding-left: 0;
    padding-right: 0;
  }
}