/* style/news.css */

:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --bg-color-light: #f8f8f8;
  --bg-color-dark: #26A9E0; /* Using primary color for dark sections */
  --border-color: #e0e0e0;
  --login-button-color: #EA7C07;
}

.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark); /* Default text color for light body background */
  background-color: var(--secondary-color); /* Default white background for main content */
}

/* Hero Section for News Page */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  /* body padding-top is handled by shared.css, so only small top padding here */
  padding-top: 10px; 
  background-color: var(--bg-color-light);
  border-bottom: 1px solid var(--border-color);
}

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

.page-news__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-news__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-news__hero-content {
  text-align: center;
  width: 100%;
}

.page-news__main-title {
  font-size: clamp(2em, 3.5vw, 3.2em); /* Using clamp for H1 font size */
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.2;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__intro-description {
  font-size: 1.1em;
  color: var(--text-color-dark);
  max-width: 800px;
  margin: 0 auto 30px auto;
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--login-button-color); /* Using login color for this CTA as it's a "join now" */
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  border: none;
  cursor: pointer;
}

.page-news__cta-button:hover {
  background: #D46F06; /* Darkened version of #EA7C07 */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* General Section Styles */
.page-news__section {
  padding: 60px 20px;
  text-align: center;
}

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

.page-news__section-title {
  font-size: 2.5em;
  color: var(--primary-color);
  margin-bottom: 20px;
  font-weight: 700;
}

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

.page-news__section-description {
  font-size: 1.1em;
  color: var(--text-color-dark);
  max-width: 900px;
  margin: 0 auto 40px auto;
}

.page-news__section-description--light {
  color: var(--text-color-light);
}

/* Latest Articles Section */
.page-news__latest-articles {
  background-color: var(--secondary-color);
}

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

.page-news__article-card,
.page-news__blog-card {
  background: var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-news__article-image,
.page-news__blog-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  overflow: hidden;
}

.page-news__article-image img,
.page-news__blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.page-news__article-card:hover .page-news__article-image img,
.page-news__blog-card:hover .page-news__blog-image img {
  transform: scale(1.05);
}

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

.page-news__article-title,
.page-news__blog-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  line-height: 1.3;
  min-height: 3.9em; /* Ensure consistent height for titles across cards */
}

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

.page-news__article-title a:hover,
.page-news__blog-title a:hover {
  color: var(--login-button-color); /* Use a secondary accent color on hover */
}

.page-news__article-meta,
.page-news__blog-meta {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 15px;
}

.page-news__article-excerpt,
.page-news__blog-excerpt {
  font-size: 1em;
  color: var(--text-color-dark);
  margin-bottom: 20px;
  min-height: 4.8em; /* Ensure consistent height for excerpts */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limit to 3 lines */
  -webkit-box-orient: vertical;
}

.page-news__read-more-button {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary-color);
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.9em;
  font-weight: bold;
  transition: background-color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__read-more-button:hover {
  background: #2299C9; /* Darkened version of #26A9E0 */
}

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

.page-news__view-all-button {
  display: inline-block;
  padding: 15px 35px;
  background: var(--primary-color);
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 50px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__view-all-button:hover {
  background: #2299C9; /* Darkened version of #26A9E0 */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Categories Section */
.page-news__categories-section {
  background-color: var(--bg-color-dark); /* Using primary color as dark background */
  color: var(--text-color-light);
}

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

.page-news__category-item {
  display: inline-block;
  padding: 12px 25px;
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 30px;
  font-size: 1em;
  font-weight: 600;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

/* Promotion CTA Section */
.page-news__promotion-cta-section {
  background-color: var(--bg-color-light);
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  border: none;
  cursor: pointer;
}

.page-news__btn-primary {
  background: var(--primary-color);
  color: var(--text-color-light);
}

.page-news__btn-primary:hover {
  background: #2299C9; /* Darkened version of #26A9E0 */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.page-news__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-color-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* FAQ Section */
.page-news__faq-section {
  background-color: var(--secondary-color);
}

.page-news__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--secondary-color);
}
details.page-news__faq-item summary.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: var(--text-color-dark);
}
details.page-news__faq-item summary.page-news__faq-question::-webkit-details-marker {
  display: none;
}
details.page-news__faq-item summary.page-news__faq-question:hover {
  background: #f5f5f5;
}
.page-news__faq-qtext {
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}
.page-news__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-news__faq-item .page-news__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: var(--text-color-dark);
}

/* Related Blog Posts Section */
.page-news__related-blog-posts {
  background-color: var(--bg-color-dark); /* Using primary color as dark background */
  color: var(--text-color-light);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: clamp(1.8em, 4vw, 2.8em);
  }
  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__articles-grid,
  .page-news__blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding-top: 10px !important; /* Ensure small top padding on mobile */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-news__main-title {
    font-size: clamp(1.6em, 6vw, 2.2em);
    margin-bottom: 15px;
  }
  .page-news__intro-description {
    font-size: 1em;
    margin-bottom: 25px;
  }
  .page-news__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    width: 100% !important;
  }

  .page-news__section {
    padding: 40px 15px;
  }
  .page-news__section-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }
  .page-news__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-news__articles-grid,
  .page-news__blog-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-news__article-card,
  .page-news__blog-card {
    border-radius: 8px;
  }
  .page-news__article-image,
  .page-news__blog-image {
    height: 180px;
  }
  .page-news__article-title,
  .page-news__blog-title {
    font-size: 1.3em;
    min-height: auto; /* Allow titles to wrap naturally */
  }
  .page-news__article-excerpt,
  .page-news__blog-excerpt {
    font-size: 0.9em;
    min-height: auto; /* Allow excerpts to wrap naturally */
    -webkit-line-clamp: 4; /* Adjust line clamp for mobile if needed */
  }
  .page-news__read-more-button {
    padding: 8px 15px;
    font-size: 0.85em;
  }
  .page-news__view-all-button {
    padding: 12px 25px;
    font-size: 1em;
    width: 100% !important;
  }

  .page-news__category-list {
    gap: 10px;
  }
  .page-news__category-item {
    padding: 10px 20px;
    font-size: 0.9em;
  }

  .page-news__cta-buttons {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    font-size: 1em;
    padding: 12px 25px;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  details.page-news__faq-item summary.page-news__faq-question { padding: 15px; }
  .page-news__faq-qtext { font-size: 15px; }
  details.page-news__faq-item .page-news__faq-answer { padding: 0 15px 15px; }

  /* Mobile image responsiveness */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-news__section,
  .page-news__card,
  .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Ensuring no CSS filters are used for image color modification */
.page-news img {
  filter: none !important; /* Override any potential unwanted filters */
}