/* style/news.css */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-dark: #0a0a0a; /* From shared.css body background */
  --login-color: #EA7C07;
}

/* Base styles for the news page, ensuring text visibility on dark body background */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Light text on dark body background */
  background-color: transparent; /* Body background handled by shared.css */
}

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

.page-news__section-title,
.page-news__main-title,
.page-news__cta-title {
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-light);
}

.page-news__section-description,
.page-news__description,
.page-news__cta-description {
  text-align: center;
  margin-bottom: 30px;
  color: var(--text-light);
}

/* Hero Section */
.page-news__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
  background: linear-gradient(135deg, rgba(38, 169, 224, 0.3), rgba(0, 0, 0, 0.8));
  position: relative;
  overflow: hidden;
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-width: 1920px;
  margin-bottom: 30px;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.page-news__hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  text-align: center;
  padding: 0 20px;
}

.page-news__main-title {
  font-size: clamp(2em, 5vw, 3.5em);
  margin-bottom: 15px;
  line-height: 1.2;
}

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

/* Buttons */
.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;
  box-sizing: border-box;
  max-width: 100%; /* Ensure responsiveness */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

.page-news__btn-primary {
  background-color: var(--primary-color);
  color: var(--text-light);
  border: 2px solid var(--primary-color);
}

.page-news__btn-primary:hover {
  background-color: #1e87b7; /* Darken primary color */
  border-color: #1e87b7; /* Darken primary color */
}

.page-news__btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-news__btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-news__btn-lg {
  padding: 15px 30px;
  font-size: 1.1em;
}

/* Latest Articles Section */
.page-news__latest-articles {
  padding: 60px 0;
  background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter dark background */
}

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

.page-news__article-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);
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

.page-news__article-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-news__article-title a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__article-title a:hover {
  color: var(--primary-color);
}

.page-news__article-meta {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
}

.page-news__article-excerpt {
  font-size: 1em;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  align-self: flex-start;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: #1e87b7; /* Darken primary color */
}

.page-news__view-all-wrapper {
  text-align: center;
  margin-top: 50px;
}

/* Industry Insights Section */
.page-news__industry-insights {
  padding: 60px 0;
  background-color: var(--secondary-color);
  color: var(--text-dark); /* Dark text on light background */
}

.page-news__industry-insights .page-news__section-title,
.page-news__industry-insights .page-news__section-description {
  color: var(--text-dark);
}

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

.page-news__insight-item {
  background-color: #f8f8f8;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-news__insight-title {
  font-size: 1.4em;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.page-news__insight-date {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 15px;
}

.page-news__insight-text {
  font-size: 1em;
  color: var(--text-dark);
}

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
  background-color: rgba(38, 169, 224, 0.1);
}

.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.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1em;
  font-weight: bold;
  color: var(--text-light);
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.page-news__faq-question::marker {
  display: none;
}

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

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

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

.page-news__faq-answer {
  padding: 15px 25px 20px;
  font-size: 1em;
  color: rgba(255, 255, 255, 0.8);
}

/* Call to Action Section */
.page-news__cta-section {
  padding: 80px 0;
  background-color: var(--secondary-color);
  color: var(--text-dark);
  text-align: center;
}

.page-news__cta-section .page-news__cta-title,
.page-news__cta-section .page-news__cta-description {
  color: var(--text-dark);
}

.page-news__cta-title {
  font-size: clamp(1.8em, 4vw, 2.8em);
  margin-bottom: 20px;
}

.page-news__cta-description {
  font-size: 1.1em;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 40px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__hero-section {
    padding-bottom: 40px;
  }

  .page-news__main-title {
    font-size: clamp(1.8em, 4.5vw, 3em);
  }

  .page-news__articles-grid,
  .page-news__insights-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

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

  .page-news__hero-section {
    padding: 10px 0 30px 0;
  }

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

  .page-news__main-title {
    font-size: clamp(1.5em, 6vw, 2.5em);
  }

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

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-news__view-all-wrapper {
    padding: 0 15px;
  }

  .page-news__section-title,
  .page-news__cta-title {
    font-size: clamp(1.5em, 5vw, 2em);
    padding: 0 15px;
  }

  .page-news__section-description,
  .page-news__cta-description {
    font-size: 0.95em;
    padding: 0 15px;
  }

  .page-news__article-image {
    height: 180px;
  }

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

  .page-news__articles-grid,
  .page-news__insights-grid {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }

  .page-news__latest-articles,
  .page-news__industry-insights,
  .page-news__faq-section,
  .page-news__cta-section {
    padding: 40px 0;
  }

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

  /* Image responsive */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__hero-image-wrapper,
  .page-news__article-card,
  .page-news__insight-item,
  .page-news__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  
  /* FAQ specific adjustments for mobile */
  .page-news__faq-question {
    padding: 15px 20px;
  }
  .page-news__faq-answer {
    padding: 10px 20px 15px;
  }
}