/* style/news.css */

/* --- General Page Styling --- */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Light text for dark body background */
  background-color: var(--primary-color); /* Inherits from shared.css, which is #1A1A1A */
}

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

.page-news__section-title {
  font-size: 2.5em;
  color: #FFD700; /* Auxiliary color for titles */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-news__sub-title {
  font-size: 1.8em;
  color: #FFD700;
  margin-bottom: 15px;
}

.page-news__section-description {
  font-size: 1.1em;
  color: #cccccc;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-news p {
  margin-bottom: 1em;
  color: #f0f0f0;
}

/* --- Buttons --- */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Break long words */
  box-sizing: border-box;
  text-align: center;
}

.page-news__btn-primary {
  background-color: #FFD700; /* Auxiliary color */
  color: #1A1A1A; /* Primary color for text */
  border: 2px solid #FFD700;
}

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

.page-news__btn-secondary {
  background-color: transparent;
  color: #FFD700; /* Auxiliary color */
  border: 2px solid #FFD700;
}

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

/* --- Hero Section --- */
.page-news__hero-section {
  position: relative;
  width: 100%;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  background-color: #1A1A1A; /* Ensure dark background for hero */
}

.page-news__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3; /* Subtle background */
  z-index: 1;
}

.page-news__hero-section .page-news__container {
  position: relative;
  z-index: 2;
  color: #ffffff;
  max-width: 900px;
}

.page-news__hero-title {
  font-size: 3.5em;
  color: #FFD700;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-news__hero-description {
  font-size: 1.3em;
  color: #f0f0f0;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__cta-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* --- Articles Section --- */
.page-news__articles-section {
  padding: 80px 0;
  background-color: #1A1A1A; /* Dark background */
}

.page-news__dark-section {
  background-color: #1A1A1A;
  color: #ffffff;
}

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

.page-news__article-card {
  background-color: #2a2a2a; /* Slightly lighter dark for card background */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-news__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-news__article-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-news__article-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-news__article-title a {
  color: #FFD700; /* Auxiliary color for article titles */
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.page-news__article-excerpt {
  color: #cccccc;
  font-size: 0.95em;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-news__read-more-link {
  color: #FFD700;
  text-decoration: none;
  font-weight: bold;
  align-self: flex-start;
  transition: color 0.3s ease;
}

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

.page-news__view-all-button {
  text-align: center;
  margin-top: 50px;
}

/* --- Analysis Section --- */
.page-news__analysis-section {
  padding: 80px 0;
  background-color: #333333; /* Slightly lighter dark background */
}

.page-news__analysis-content {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap; /* Allow wrapping */
}

.page-news__analysis-image {
  flex: 1;
  min-width: 300px;
  max-width: 50%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.page-news__analysis-text {
  flex: 1;
  min-width: 400px;
}

.page-news__analysis-text p {
  color: #f0f0f0;
}

/* --- Promotions Section --- */
.page-news__promotions-section {
  padding: 80px 0;
}

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

.page-news__promotion-card {
  background-color: #2a2a2a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-news__promotion-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-news__promotion-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-news__promotion-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-news__promotion-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-news__promotion-title a {
  color: #FFD700;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__promotion-title a:hover {
  color: #ffffff;
}

.page-news__promotion-excerpt {
  color: #cccccc;
  font-size: 0.95em;
  margin-bottom: 15px;
  flex-grow: 1;
}

/* --- Tips Section --- */
.page-news__tips-section {
  padding: 80px 0;
  background-color: #333333;
}

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

.page-news__tip-card {
  background-color: #2a2a2a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-news__tip-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-news__tip-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-news__tip-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-news__tip-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-news__tip-title a {
  color: #FFD700;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__tip-title a:hover {
  color: #ffffff;
}

.page-news__tip-excerpt {
  color: #cccccc;
  font-size: 0.95em;
  margin-bottom: 15px;
  flex-grow: 1;
}

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

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

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

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  background-color: #3a3a3a;
  color: #FFD700;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background-color: #4a4a4a;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  width: 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
  transform: rotate(45deg); /* Plus sign to X */
}

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  background-color: #2a2a2a;
  color: #cccccc;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 1000px !important; /* Ensure it expands fully */
  padding: 20px !important; /* Restore padding */
}

.page-news__faq-answer p {
  margin-bottom: 0;
  color: #cccccc;
}

/* --- Final CTA Section --- */
.page-news__cta-section {
  padding: 80px 0;
  text-align: center;
  background-color: #1A1A1A;
}

.page-news__cta-section .page-news__section-title {
  font-size: 2.8em;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 3em;
  }
  .page-news__hero-description {
    font-size: 1.1em;
  }
  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__analysis-content {
    flex-direction: column;
    text-align: center;
  }
  .page-news__analysis-image {
    max-width: 80%;
  }
  .page-news__analysis-text {
    min-width: unset;
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Images responsive */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Containers for images and other content */
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__hero-section,
  .page-news__articles-section,
  .page-news__analysis-section,
  .page-news__promotions-section,
  .page-news__tips-section,
  .page-news__faq-section,
  .page-news__cta-section,
  .page-news__article-card,
  .page-news__promotion-card,
  .page-news__tip-card,
  .page-news__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }

  /* Specific padding for sections if needed */
  .page-news__hero-section,
  .page-news__articles-section,
  .page-news__analysis-section,
  .page-news__promotions-section,
  .page-news__tips-section,
  .page-news__faq-section,
  .page-news__cta-section {
    padding: 40px 15px !important;
  }

  /* Hero section specific */
  .page-news__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Ensure fixed header offset */
    min-height: 400px;
  }

  .page-news__hero-title {
    font-size: 2em;
  }
  .page-news__hero-description {
    font-size: 1em;
  }

  /* Buttons responsive */
  .page-news__cta-group {
    flex-direction: column;
    gap: 15px;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 15px !important; /* Adjust padding for mobile */
    font-size: 1em;
  }

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

  .page-news__article-image,
  .page-news__promotion-image,
  .page-news__tip-image {
    height: 180px; /* Adjust height for mobile cards */
  }

  .page-news__analysis-image {
    max-width: 100%;
  }

  .page-news__faq-question {
    font-size: 1em;
    padding: 15px;
  }
  .page-news__faq-answer {
    padding: 0 15px;
  }
  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px !important;
  }
}

@media (max-width: 480px) {
  .page-news__hero-title {
    font-size: 1.8em;
  }
  .page-news__section-title {
    font-size: 1.5em;
  }
  .page-news__article-title,
  .page-news__promotion-title,
  .page-news__tip-title {
    font-size: 1.1em;
  }
}