/* style/news.css */

/* Body background color is #1a1a2e (dark), so use light text */
.page-news {
  color: #ffffff; /* Light text for dark body background */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

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

.page-news__section {
  padding: 60px 0;
  text-align: center;
}

.page-news__hero-section {
  position: relative;
  padding: 10px 0 60px 0; /* Small top padding, body handles main offset */
  background-color: #1a1a2e; /* Ensure hero section has dark background */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  margin-bottom: 30px;
}

.page-news__hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.page-news__main-title {
  font-size: clamp(2.2rem, 4vw, 3rem); /* Responsive font size */
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-news__hero-description {
  font-size: 1.1rem;
  color: #f0f0f0;
  margin-bottom: 30px;
}

.page-news__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem); /* Responsive font size */
  font-weight: 700;
  color: #26A9E0;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__section-description {
  font-size: 1rem;
  color: #cccccc;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__dark-bg {
  background-color: #1a1a2e;
  color: #ffffff;
}

.page-news__light-bg {
  background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter background for cards/sections on dark body */
  color: #ffffff;
}

.page-news__content-image {
  width: 100%;
  height: auto;
  max-width: 800px;
  margin: 0 auto 30px auto;
  display: block;
  border-radius: 8px;
}

.page-news p {
  margin-bottom: 1em;
  font-size: 1rem;
  color: #f0f0f0;
  text-align: left;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

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

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  font-weight: 600;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  max-width: 100%; /* Ensure button doesn't overflow */
}

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

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

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

.page-news__btn-secondary:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

/* Specific button for login/register if needed */
.page-news__btn-login {
  background-color: #EA7C07;
  color: #ffffff;
  border: 2px solid #EA7C07;
}

.page-news__btn-login:hover {
  background-color: #cc6a00;
  border-color: #cc6a00;
}

/* News Grid */
.page-news__news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.page-news__news-card {
  background-color: rgba(255, 255, 255, 0.05); /* Semi-transparent white on dark body */
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

.page-news__card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
}

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

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

.page-news__card-meta {
  font-size: 0.85rem;
  color: #aaaaaa;
  margin-bottom: 15px;
}

.page-news__card-excerpt {
  font-size: 0.95rem;
  color: #cccccc;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__card-link {
  display: inline-block;
  color: #26A9E0;
  font-weight: 600;
  margin-top: auto;
}

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

.page-news__view-all {
  margin-top: 40px;
}

/* FAQ Section */
.page-news__faq-list {
  max-width: 800px;
  margin: 40px auto 0 auto;
  text-align: left;
}

.page-news__faq-item {
  background-color: rgba(255, 255, 255, 0.05); /* Semi-transparent white on dark body */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-news__faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.page-news__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-news__faq-item summary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.page-news__faq-qtext {
  flex-grow: 1;
  color: #ffffff;
}

.page-news__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: #26A9E0;
}

.page-news__faq-item[open] .page-news__faq-toggle {
  content: '−'; /* Changed by JS */
}

.page-news__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  color: #cccccc;
  line-height: 1.6;
}

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

/* CTA Section */
.page-news__cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #26A9E0, #1e87c2);
  color: #ffffff;
}

.page-news__cta-section .page-news__section-title,
.page-news__cta-section .page-news__section-description {
  color: #ffffff;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .page-news__hero-image {
    height: 400px;
  }
  .page-news__news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-news__section {
    padding: 40px 0;
  }

  .page-news__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-news__hero-image {
    height: 300px;
    margin-bottom: 20px;
  }

  .page-news__main-title {
    font-size: 2rem;
  }

  .page-news__hero-description {
    font-size: 1rem;
  }

  .page-news__section-title {
    font-size: 1.8rem;
  }

  .page-news__section-description {
    font-size: 0.95rem;
  }

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

  /* Ensure all image containers are responsive */
  .page-news__hero-section,
  .page-news__section,
  .page-news__news-card,
  .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent horizontal scroll */
  }

  /* Buttons responsive */
  .page-news__btn-primary,
  .page-news__btn-secondary,
  .page-news__btn-login,
  .page-news a[class*="button"],
  .page-news a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-bottom: 10px; /* Space between stacked buttons */
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__view-all,
  .page-news__hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .page-news__cta-section .page-news__btn-primary {
    margin-left: auto;
    margin-right: auto;
  }

  .page-news__faq-item summary {
    padding: 15px 20px;
    font-size: 1rem;
  }

  .page-news__faq-answer {
    padding: 0 20px 15px 20px;
    font-size: 0.95rem;
  }
}