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

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

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

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

.page-news__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 20px;
  padding-top: var(--header-offset, 120px);
  position: relative;
  overflow: hidden;
}

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

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

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

.page-news__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-news__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4); /* Darken image for text readability */
  position: absolute;
  top: 0;
  left: 0;
}

.page-news__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  color: inherit;
}

.page-news__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: inherit;
}

.page-news__latest-news, .page-news__guides-section, .page-news__safety-section, .page-news__cta-section {
  padding: 60px 0;
}

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

.page-news__article-card, .page-news__safety-item {
  background-color: #1A202C; /* Card background for dark theme */
  color: #ffffff; /* Light text for dark card background */
  border-radius: 10px;
  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, .page-news__safety-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-news__article-card.page-news__light-bg, .page-news__safety-item.page-news__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-news__article-image, .page-news__safety-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.page-news__article-content, .page-news__safety-item > div {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-news__article-title, .page-news__safety-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  line-height: 1.3;
}

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

.page-news__article-card.page-news__light-bg .page-news__article-title a, .page-news__safety-item.page-news__light-bg .page-news__safety-title a {
  color: #1A202C;
}

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

.page-news__article-card.page-news__light-bg .page-news__article-title a:hover, .page-news__safety-item.page-news__light-bg .page-news__safety-title a:hover {
  color: #FFD700;
}

.page-news__article-excerpt, .page-news__safety-text {
  font-size: 0.95em;
  margin-bottom: 20px;
  flex-grow: 1;
}

.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;
  text-align: center;
  cursor: pointer;
  margin-top: auto; /* Push button to bottom of card */
}

.page-news__btn-primary {
  background-color: #FFD700;
  color: #1A202C;
  border: 2px solid #FFD700;
}

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

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

.page-news__article-card.page-news__light-bg .page-news__btn-secondary {
  color: #1A202C;
  border-color: #1A202C;
}

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

.page-news__article-card.page-news__light-bg .page-news__btn-secondary:hover {
  background-color: #1A202C;
  color: #FFD700;
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.page-news__faq-section {
  padding: 60px 0;
}

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

.page-news__faq-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  font-weight: bold;
  color: #ffffff;
  cursor: pointer;
  background-color: #1A202C;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-news__faq-item:last-child .page-news__faq-question {
  border-bottom: none;
}

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

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

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background-color: rgba(255, 255, 255, 0.02);
  color: #f0f0f0;
}

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

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

/* Responsive styles */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 3em;
  }
  .page-news__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-news__hero-section {
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px) !important;
  }
  .page-news__hero-title {
    font-size: 2.2em;
  }
  .page-news__hero-description {
    font-size: 1em;
  }
  .page-news__section-title {
    font-size: 1.8em;
    padding: 0 15px;
  }
  .page-news__section-description {
    font-size: 0.95em;
    padding: 0 15px;
    margin-bottom: 30px;
  }
  .page-news__container {
    padding: 0 15px;
  }
  .page-news__article-grid, .page-news__safety-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__article-card, .page-news__safety-item {
    margin-left: 0;
    margin-right: 0;
  }
  .page-news__article-image, .page-news__safety-image {
    height: 180px;
  }
  .page-news__btn-primary, .page-news__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 10px 15px;
  }
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }
  .page-news__latest-news, .page-news__guides-section, .page-news__safety-section, .page-news__cta-section {
    padding: 40px 0;
  }
  .page-news__faq-question {
    padding: 15px 20px;
    font-size: 1em;
  }
  .page-news__faq-answer {
    padding: 0 20px;
  }
  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px 20px;
  }

  /* Image responsiveness */
  .page-news img {
    max-width: 100% !important;
    height: auto !important;
    display: block !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; */
  }
}

/* Ensure contrast for light background cards */
.page-news__article-card.page-news__light-bg, .page-news__safety-item.page-news__light-bg {
  background-color: #ffffff;
  color: #333333;
  border: 1px solid #e0e0e0;
}

.page-news__article-card.page-news__light-bg .page-news__article-title a {
  color: #1A202C;
}

.page-news__article-card.page-news__light-bg .page-news__btn-secondary {
  color: #1A202C;
  border-color: #1A202C;
}

.page-news__article-card.page-news__light-bg .page-news__btn-secondary:hover {
  background-color: #1A202C;
  color: #FFD700;
}