/* style/news-industry-trends.css */

/* Base styles for the page content */
.page-news-industry-trends {
  /* Assuming shared.css does NOT set body { padding-top: ... } to prevent double padding. */
  /* If shared.css DOES set it for body, change this to padding-top: 0; */
  padding-top: var(--header-offset, 120px);
  background-color: var(--bg-dark, #0d0d0d); /* Default dark background for the main content */
  color: #ffffff; /* Default text color for dark background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* Container for consistent content width */
.page-news-industry-trends__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Section styling */
.page-news-industry-trends__section {
  padding: 60px 0;
}

.page-news-industry-trends__dark-section {
  background-color: #1a1a1a; /* A slightly lighter dark for better contrast with text */
  color: #ffffff;
}

/* Main content sections (light background for contrast) */
.page-news-industry-trends__section:nth-child(even):not(.page-news-industry-trends__dark-section) {
  background-color: #f8f8f8; /* Light background for alternating sections */
  color: #333333;
}

/* Titles */
.page-news-industry-trends__main-title {
  font-size: 38px;
  font-weight: bold;
  color: #FFD700; /* Gold color for main title */
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-news-industry-trends__intro-text {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

.page-news-industry-trends__section-title {
  font-size: 32px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #CC0000; /* Red color for section titles */
}

.page-news-industry-trends__dark-section .page-news-industry-trends__section-title {
  color: #FFD700; /* Gold color on dark sections */
}

.page-news-industry-trends__sub-title {
  font-size: 24px;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #CC0000; /* Red for sub-titles */
}

.page-news-industry-trends__dark-section .page-news-industry-trends__sub-title {
  color: #FFD700; /* Gold for sub-titles on dark sections */
}

.page-news-industry-trends__content-block p {
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.7;
}

/* Image styling */
.page-news-industry-trends__main-image {
  width: 100%;
  height: auto;
  max-width: 800px;
  min-width: 200px; /* Min size requirement */
  min-height: 200px; /* Min size requirement */
  display: block;
  margin: 0 auto 40px auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  object-fit: cover;
}

.page-news-industry-trends__content-image {
  width: 100%;
  height: auto;
  max-width: 1000px;
  min-width: 200px; /* Min size requirement */
  min-height: 200px; /* Min size requirement */
  display: block;
  margin: 30px auto;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  object-fit: cover;
}

/* CTA Section */
.page-news-industry-trends__cta-section {
  background: linear-gradient(90deg, #CC0000, #FFD700);
  padding: 80px 0;
  text-align: center;
  color: #ffffff;
}

.page-news-industry-trends__cta-content {
  max-width: 800px;
}

.page-news-industry-trends__cta-title {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-news-industry-trends__cta-description {
  font-size: 18px;
  margin-bottom: 40px;
  color: #f0f0f0;
}

.page-news-industry-trends__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-news-industry-trends__btn-primary,
.page-news-industry-trends__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text breaking */
  max-width: 100%;
  box-sizing: border-box;
  min-width: 150px; /* Ensure buttons are not too small */
}

.page-news-industry-trends__btn-primary {
  background-color: #CC0000;
  color: #ffffff;
  border: 2px solid #CC0000;
}

.page-news-industry-trends__btn-primary:hover {
  background-color: #a30000;
  border-color: #a30000;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-news-industry-trends__btn-secondary {
  background-color: #ffffff;
  color: #CC0000;
  border: 2px solid #CC0000;
}

.page-news-industry-trends__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #a30000;
  border-color: #a30000;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* FAQ Section */
.page-news-industry-trends__faq-section {
  padding: 60px 0;
  background-color: #f8f8f8; /* Light background for FAQ */
  color: #333333; /* Dark text for light background */
}

.page-news-industry-trends__faq-section .page-news-industry-trends__section-title {
  color: #CC0000;
}

.page-news-industry-trends__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-news-industry-trends__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.page-news-industry-trends__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 15px;
  opacity: 0;
}

.page-news-industry-trends__faq-item.active .page-news-industry-trends__faq-answer {
  max-height: 2000px !important; /* 🚨 Using !important ensures priority, value is large enough to contain any content */
  padding: 20px 15px !important;
  opacity: 1;
  background: #eeeeee; /* Slightly darker light background for answer */
  border-radius: 0 0 5px 5px;
  color: #333333; /* Dark text for light background */
}

.page-news-industry-trends__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-news-industry-trends__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-news-industry-trends__faq-question:active {
  background: #eeeeee;
}

.page-news-industry-trends__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click events */
  color: #333333; /* Dark text for light background */
}

.page-news-industry-trends__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-news-industry-trends__faq-item.active .page-news-industry-trends__faq-toggle {
  color: #333;
}


/* Responsive Design */
@media (max-width: 1024px) {
  .page-news-industry-trends__main-title {
    font-size: 32px;
  }

  .page-news-industry-trends__intro-text {
    font-size: 16px;
  }

  .page-news-industry-trends__section-title {
    font-size: 28px;
  }

  .page-news-industry-trends__sub-title {
    font-size: 22px;
  }

  .page-news-industry-trends__cta-title {
    font-size: 30px;
  }

  .page-news-industry-trends__cta-description {
    font-size: 16px;
  }

  .page-news-industry-trends__btn-primary,
  .page-news-industry-trends__btn-secondary {
    padding: 12px 25px;
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .page-news-industry-trends {
    padding-top: var(--header-offset-mobile, 80px) !important; /* Adjust for mobile header offset */
    font-size: 16px;
    line-height: 1.6;
  }

  .page-news-industry-trends__container {
    padding: 0 15px;
  }

  .page-news-industry-trends__section {
    padding: 40px 0;
  }

  .page-news-industry-trends__main-title {
    font-size: 28px;
    text-align: left;
  }

  .page-news-industry-trends__intro-text {
    font-size: 15px;
    text-align: left;
  }

  .page-news-industry-trends__section-title {
    font-size: 24px;
    text-align: left;
    margin-bottom: 30px;
  }

  .page-news-industry-trends__sub-title {
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 10px;
  }

  .page-news-industry-trends__content-block p {
    font-size: 15px;
  }

  /* All images responsive */
  .page-news-industry-trends img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
    /* No filter allowed */
    filter: none !important;
  }
  
  /* Ensure all image containers are responsive and prevent overflow */
  .page-news-industry-trends__hero-content-section,
  .page-news-industry-trends__section,
  .page-news-industry-trends__content-block,
  .page-news-industry-trends__cta-content,
  .page-news-industry-trends__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden; /* Prevent horizontal scroll */
  }

  /* CTA Section responsive */
  .page-news-industry-trends__cta-section {
    padding: 50px 0;
  }

  .page-news-industry-trends__cta-title {
    font-size: 26px;
    text-align: left;
  }

  .page-news-industry-trends__cta-description {
    font-size: 15px;
    text-align: left;
  }

  .page-news-industry-trends__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-news-industry-trends__btn-primary,
  .page-news-industry-trends__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 20px;
    font-size: 17px;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin: 0 auto; /* Center buttons if they are block level */
  }

  /* FAQ responsive */
  .page-news-industry-trends__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-news-industry-trends__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-news-industry-trends__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-news-industry-trends__faq-answer {
    padding: 0 15px;
  }
  
  .page-news-industry-trends__faq-item.active .page-news-industry-trends__faq-answer {
    padding: 15px !important;
  }
}