/* style/news.css */

/* Common styles for page-news */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Dark body background #0a0a0a, so use light text */
  background-color: transparent; /* Inherit from body or shared */
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure spacing from fixed header */
  background-color: #26A9E0; /* Brand color as background */
  color: #ffffff;
  overflow: hidden;
  gap: 30px;
}

.page-news__hero-content {
  max-width: 900px;
  z-index: 1;
}

.page-news__main-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  color: #ffffff;
  line-height: 1.2;
}

.page-news__intro-text {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-news__cta-button {
  display: inline-block;
  background-color: #EA7C07; /* Login color for CTA */
  color: #ffffff;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__cta-button:hover {
  background-color: #d66f06;
}

.page-news__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  opacity: 0.2;
}

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

/* Latest News Section */
.page-news__latest-news-section,
.page-news__featured-articles-section,
.page-news__news-categories-section,
.page-news__faq-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.05); /* Slightly transparent background for sections */
  border-radius: 10px;
  color: #ffffff;
}

.page-news__section-title {
  font-size: 2em;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 40px;
}

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

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

.page-news__news-card:hover {
  transform: translateY(-5px);
}

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

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

.page-news__card-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: #26A9E0;
}

.page-news__card-title a {
  color: #26A9E0;
  text-decoration: none;
}

.page-news__card-title a:hover {
  text-decoration: underline;
}

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

.page-news__read-more {
  display: inline-block;
  background-color: #26A9E0;
  color: #ffffff;
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.9em;
  align-self: flex-start;
  transition: background-color 0.3s ease;
}

.page-news__read-more:hover {
  background-color: #1e87b8;
}

/* Featured Articles Section */
.page-news__articles-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-news__article-item {
  display: flex;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.page-news__article-item:hover {
  transform: translateX(5px);
}

.page-news__article-thumb {
  width: 250px;
  height: 150px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

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

.page-news__article-title {
  font-size: 1.3em;
  margin-bottom: 5px;
  color: #26A9E0;
}

.page-news__article-title a {
  color: #26A9E0;
  text-decoration: none;
}

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

.page-news__article-date {
  font-size: 0.85em;
  color: #cccccc;
  margin-bottom: 10px;
}

.page-news__article-summary {
  font-size: 0.9em;
  color: #f0f0f0;
}

/* News Categories Section */
.page-news__category-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-news__category-item a {
  display: block;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 20px;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  font-weight: bold;
}

.page-news__category-item a:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

/* FAQ Section */
.page-news__faq-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-news__faq-item {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.page-news__faq-title {
  font-size: 1.1em;
  margin: 0;
  color: #26A9E0;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
  color: #ffffff;
}

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

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

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 15px 20px;
}

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

  .page-news__intro-text {
    font-size: 1.1em;
  }

  .page-news__article-item {
    flex-direction: column;
  }

  .page-news__article-thumb {
    width: 100%;
    height: 200px;
  }
}

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

  .page-news__hero-section {
    padding: 40px 15px;
    padding-top: var(--header-offset, 120px) !important; /* Ensure spacing on mobile */
  }

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

  .page-news__intro-text {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-news__cta-button {
    padding: 12px 25px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__latest-news-section,
  .page-news__featured-articles-section,
  .page-news__news-categories-section,
  .page-news__faq-section {
    margin: 20px auto;
    padding: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-news__section-title {
    font-size: 1.6em;
    margin-bottom: 30px;
  }

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

  .page-news__card-title {
    font-size: 1.2em;
  }

  .page-news__article-item {
    flex-direction: column;
  }

  .page-news__article-thumb {
    width: 100% !important;
    height: 180px;
  }

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

  .page-news__article-title {
    font-size: 1.1em;
  }

  .page-news__category-list {
    gap: 10px;
  }

  .page-news__category-item a {
    padding: 8px 15px;
    font-size: 0.9em;
  }

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

  .page-news__faq-title {
    font-size: 1em;
  }

  /* Image responsive rules for mobile */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-news__hero-image-wrapper,
  .page-news__news-card,
  .page-news__article-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Buttons responsive rules for mobile */
  .page-news__cta-button,
  .page-news__read-more {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Ensure contrast for text on various backgrounds */
.page-news__dark-bg {
  color: #ffffff;
  background: #26A9E0;
}

.page-news__light-bg {
  color: #333333;
  background: #ffffff;
}

.page-news__medium-bg {
  color: #000000;
  background: #FFFFFF;
}

.page-news__content-area,
.page-news__text-block {
  color: #ffffff; /* Default for body background #0a0a0a */
}

.page-news p,
.page-news li {
  color: #f0f0f0;
}

.page-news__card {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-news__dark-section {
  background: #26A9E0;
  color: #ffffff;
}

.page-news__btn-primary {
  background: #26A9E0;
  color: #ffffff;
  border: 2px solid transparent;
}

.page-news__btn-secondary {
  background: #ffffff;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}