/* style/news.css */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: #121212; /* Inherited from body via shared.css */
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  padding: 100px 0;
  text-align: center;
  background-color: #26A9E0; /* Primary brand color */
  color: #FFFFFF; /* White text for contrast */
  padding-top: var(--header-offset, 120px); /* Adjust for fixed header */
}

.page-news__hero-title {
  font-size: 3em;
  margin-bottom: 20px;
  color: #FFFFFF;
  font-weight: bold;
}

.page-news__hero-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* General Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  text-align: center;
}

.page-news__btn-primary {
  background-color: #EA7C07; /* Login color for primary action */
  color: #FFFFFF;
  border: 2px solid #EA7C07;
}

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

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

.page-news__btn-secondary:hover {
  background-color: #FFFFFF;
  color: #26A9E0; /* Primary color for hover text */
}

/* Section Titles and Descriptions */
.page-news__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  color: #26A9E0; /* Primary color for titles */
  font-weight: bold;
}

.page-news__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 50px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0; /* Light gray for descriptions on dark background */
}

/* Featured News Section */
.page-news__featured-news {
  padding: 80px 0;
  background-color: #1a1a1a; /* Slightly lighter dark background */
  color: #f0f0f0;
}

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

.page-news__news-card {
  background-color: #2a2a2a; /* Darker card background */
  border-radius: 12px;
  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__news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

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

.page-news__card-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  color: #26A9E0; /* Primary color for card titles */
  font-weight: bold;
}

.page-news__card-link {
  text-decoration: none;
  color: inherit;
}

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

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

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

.page-news__read-more {
  display: inline-block;
  color: #EA7C07; /* Login color for read more link */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: #D46B00;
  text-decoration: underline;
}

/* Latest News Section (List) */
.page-news__latest-news {
  padding: 80px 0;
  background-color: #121212; /* Body background color */
  color: #ffffff;
}

.page-news__news-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.page-news__list-item {
  display: flex;
  background-color: #1a1a1a; /* Slightly lighter dark background for list items */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__list-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.page-news__list-image {
  width: 300px;
  height: 200px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

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

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

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

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

/* CTA Section */
.page-news__cta-section {
  padding: 80px 0;
  text-align: center;
  background-color: #2a2a2a; /* Darker background */
  color: #FFFFFF;
}

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

.page-news__faq-list {
  max-width: 900px;
  margin: 0 auto;
  padding-top: 30px;
}

.page-news__faq-item {
  background-color: #1a1a1a; /* Slightly lighter dark background */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-news__faq-item summary {
  display: block;
  cursor: pointer;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #26A9E0; /* Primary color for question */
  position: relative;
  list-style: none;
  -webkit-touch-callout: none; /* Disable text selection on iOS */
  -webkit-user-select: none; /* Disable text selection on iOS */
  user-select: none;
}

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

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

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

.page-news__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  color: #f0f0f0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dark/Light Background Classes for Contrast */
.page-news__dark-bg {
  color: #ffffff; /* Deep dark background, use light text */
}

.page-news__light-bg {
  color: #f0f0f0; /* Slightly lighter dark background, use light text */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 2.5em;
  }

  .page-news__section-title {
    font-size: 2em;
  }

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

  .page-news__list-image {
    width: 100%;
    height: 250px;
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding: 80px 0;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
  }

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

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

  .page-news__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-news__btn-primary,
  .page-news__btn-secondary,
  .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;
    padding-left: 15px;
    padding-right: 15px;
  }

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

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

  .page-news__grid {
    grid-template-columns: 1fr;
  }

  .page-news__news-image {
    height: 200px;
  }

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

  .page-news__list-image {
    width: 100%;
    height: 200px;
  }

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

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

  .page-news__list-excerpt {
    font-size: 0.9em;
  }

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

  .page-news__faq-answer {
    padding: 0 20px 15px 20px;
  }

  /* Image responsive rules */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__list-item,
  .page-news__news-card,
  .page-news__hero-section,
  .page-news__featured-news,
  .page-news__latest-news,
  .page-news__cta-section,
  .page-news__faq-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden;
  }
  
  .page-news__hero-cta-buttons,
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-news__cta-buttons a {
    width: 100%;
  }
}