/* style/news.css */
/* BEM naming convention: .page-news__element-name */

/* Custom color variables */
:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --background-color: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green: #0A4B2C;
}

/* Base styles for the news page, inheriting body's dark background and light text */
.page-news {
  background-color: var(--background-color); /* Fallback if var not set */
  color: var(--text-main); /* Main text color */
  font-family: Arial, sans-serif; /* Example font */
  line-height: 1.6;
}

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

.page-news__section-title {
  font-size: 2.5em;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 30px;
  font-weight: bold;
}

.page-news__section-description {
  font-size: 1.1em;
  color: var(--text-secondary);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px auto;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding as body handles header offset */
  background-color: var(--background-color);
  overflow: hidden; /* Ensure content doesn't overflow */
}

.page-news__hero-section .page-news__container {
    display: flex;
    flex-direction: column; /* Stack image and content vertically */
    align-items: center;
    gap: 40px;
}

.page-news__hero-image {
    width: 100%;
    max-width: 1000px; /* Adjust as needed */
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    display: block;
    margin-bottom: 20px;
}

.page-news__hero-content {
  text-align: center;
  max-width: 800px;
}

.page-news__main-title {
  font-size: clamp(2.2em, 4vw, 3.5em); /* Responsive H1 font size */
  color: var(--text-main);
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: bold;
}

.page-news__hero-description {
  font-size: 1.2em;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.page-news__hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* 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: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  text-align: center;
}

.page-news__btn-primary {
  background: var(--button-gradient);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-news__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

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

.page-news__btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Latest News Section */
.page-news__latest-news {
  padding: 80px 0;
  background-color: var(--card-bg); /* Using card bg for this section */
  color: var(--text-main);
}

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

.page-news__news-card {
  background-color: var(--background-color); /* Darker background for cards */
  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__news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

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

.page-news__card-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  font-weight: bold;
}

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

.page-news__card-title a:hover {
  color: var(--glow-color);
}

.page-news__card-meta {
  font-size: 0.9em;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.page-news__card-excerpt {
  font-size: 1em;
  color: var(--text-secondary);
  margin-bottom: 20px;
  flex-grow: 1;
}

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

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

.page-news__view-all-button {
  text-align: center;
  margin-top: 40px;
}

/* Featured Update Section */
.page-news__featured-update {
  padding: 80px 0;
  background-color: var(--background-color); /* Dark background */
  color: var(--text-main);
}

.page-news__update-content {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-news__update-image {
  width: 50%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.page-news__update-text {
  flex-grow: 1;
}

.page-news__update-text .page-news__text-secondary {
    margin-bottom: 15px;
    display: block;
}

.page-news__update-text .page-news__text-main {
    margin-bottom: 20px;
}

/* Industry Insights Section */
.page-news__industry-insights {
  padding: 80px 0;
  background-color: var(--card-bg); /* Using card bg for this section */
  color: var(--text-main);
}

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

.page-news__insight-item {
  background-color: var(--background-color); /* Darker background for insights */
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__insight-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-news__insight-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

.page-news__insight-title {
  font-size: 1.3em;
  color: var(--text-main);
  margin-bottom: 15px;
  font-weight: bold;
}

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

/* FAQ Section */
.page-news__faq-section {
  padding: 80px 0;
  background-color: var(--background-color); /* Dark background */
  color: var(--text-main);
}

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

.page-news__faq-item {
  background-color: var(--card-bg); /* Card background for FAQ items */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.page-news__faq-item summary {
  list-style: none; /* Hide default marker */
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.1em;
  color: var(--text-main);
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--divider-color);
}

.page-news__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit */
}

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

.page-news__faq-qtext {
    flex-grow: 1;
    color: var(--text-main);
}

.page-news__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
  color: var(--glow-color);
  line-height: 1;
}

.page-news__faq-item[open] .page-news__faq-toggle {
  content: "−"; /* Change to minus when open */
}

.page-news__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  color: var(--text-secondary);
  background-color: var(--background-color); /* Slightly darker for answer content */
}

/* Call to Action Section */
.page-news__cta-section {
  padding: 80px 0;
  background-color: var(--card-bg); /* Using card bg for this section */
  color: var(--text-main);
  text-align: center;
}

.page-news__cta-content {
  max-width: 800px;
}

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

/* Responsive Styles */
@media (max-width: 992px) {
  .page-news__hero-image {
    max-width: 800px;
  }

  .page-news__update-content {
    flex-direction: column;
    text-align: center;
  }

  .page-news__update-image {
    width: 80%;
    margin-bottom: 30px;
  }

  .page-news__insight-item {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .page-news__section-title {
    font-size: 2em;
  }

  .page-news__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important; /* body handles header offset, small decorative padding */
  }

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

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

  .page-news__hero-buttons {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 15px;
  }

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

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

  .page-news__container {
    padding: 0 15px; /* Add padding for mobile content */
  }

  .page-news__news-grid,
  .page-news__insights-grid {
    grid-template-columns: 1fr; /* Single column for cards on mobile */
  }

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

  .page-news__update-image {
    width: 100%;
  }

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

  /* All containers with images/videos/buttons must be responsive */
  .page-news__hero-section,
  .page-news__latest-news,
  .page-news__featured-update,
  .page-news__industry-insights,
  .page-news__faq-section,
  .page-news__cta-section,
  .page-news__news-card,
  .page-news__insight-item,
  .page-news__faq-item,
  .page-news__hero-buttons,
  .page-news__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Ensure no overflow */
  }

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

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