/* style/news.css */

/* Body background from shared.css is #121212 (dark), so default text color should be light */
.page-news {
  color: #ffffff;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #121212; /* Ensure consistency with body background */
}

.page-news__hero-section {
  position: relative;
  width: 100%;
  padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: #017439; /* Use brand color for hero section background */
}

.page-news__hero-content-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column; /* Ensure image is above text */
  align-items: center;
  gap: 30px;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  max-height: 675px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-news__hero-text-container {
  color: #ffffff;
  max-width: 800px;
  text-align: center;
}

.page-news__main-title {
  font-size: clamp(2em, 4vw, 2.8em); /* Use clamp for H1 font size */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #FFFF00; /* Highlight title with custom color */
}

.page-news__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

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

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

.page-news__btn-primary {
  background-color: #C30808; /* Custom color for primary button (Register/Login) */
  color: #FFFF00; /* Custom font color for primary button */
  border: 2px solid #C30808;
}

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

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

.page-news__btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

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

.page-news__section-title {
  font-size: 2.2em;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  color: #017439; /* Use brand color for section titles */
}

.page-news__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__light-bg {
  background-color: #f0f0f0; /* Lighter background for better contrast with dark body */
  color: #333333;
}

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

.page-news__latest-updates {
  padding: 60px 0;
}

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

.page-news__news-card,
.page-news__insight-card {
  background-color: #ffffff; /* White background for cards */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #333333; /* Dark text for cards */
}

.page-news__news-card:hover,
.page-news__insight-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-news__news-card a,
.page-news__insight-card a {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

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

.page-news__card-content {
  padding: 20px;
}

.page-news__card-title {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #017439; /* Brand color for card titles */
}

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

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

.page-news__read-more {
  color: #017439;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 5px;
}

.page-news__arrow {
  transition: transform 0.3s ease;
}

.page-news__read-more:hover .page-news__arrow {
  transform: translateX(5px);
}

.page-news__cta-section {
  text-align: center;
  margin-top: 50px;
}

.page-news__industry-insights {
  padding: 60px 0;
}

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

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

.page-news__faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.page-news__faq-item {
  background-color: #ffffff;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  color: #333333;
}

.page-news__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.1em;
  color: #017439;
}

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

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

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

.page-news__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 1em;
  color: #555555;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: clamp(2em, 5vw, 2.5em);
  }
}

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

  .page-news__hero-section {
    padding-bottom: 40px;
  }

  .page-news__hero-content-wrapper {
    padding: 0 15px;
  }

  .page-news__main-title {
    font-size: clamp(1.8em, 7vw, 2.2em) !important;
  }

  .page-news__description {
    font-size: 1em;
  }

  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__container {
    padding: 30px 15px;
  }

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

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

  .page-news__news-grid,
  .page-news__insights-grid {
    grid-template-columns: 1fr;
  }

  .page-news__card-image {
    height: 200px; /* Adjust height for mobile cards */
  }

  .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__hero-section,
  .page-news__latest-updates,
  .page-news__industry-insights,
  .page-news__faq-section,
  .page-news__cta-bottom {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__hero-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }

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

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

@media (max-width: 480px) {
  .page-news__main-title {
    font-size: clamp(1.5em, 8vw, 2em) !important;
  }
}