/* style/resources-faq.css */

:root {
  --primary-color: #0A2463;
  --secondary-color: #FFD700;
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #0a0a0a;
  --bg-light-card: rgba(255, 255, 255, 0.1);
  --border-color: #e0e0e0;
}

.page-resources-faq {
  font-family: 'Arial', sans-serif;
  color: var(--text-light); /* Body background is dark, so use light text */
  background-color: var(--bg-dark); /* Ensure main content respects body background */
  line-height: 1.6;
  padding-top: 120px; /* Account for fixed header on desktop */
}

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

/* --- Hero Banner Section --- */
.page-resources-faq__hero-banner {
  text-align: center;
  padding: 60px 0;
  background: var(--primary-color);
  color: var(--text-light);
}

.page-resources-faq__title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: var(--secondary-color);
  font-weight: bold;
  line-height: 1.2;
}

.page-resources-faq__subtitle {
  font-size: 1.3em;
  margin-bottom: 30px;
  opacity: 0.9;
}

.page-resources-faq__hero-image {
  max-width: 800px;
  width: 100%;
  height: auto;
  display: block;
  margin: 40px auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* --- CTA Button General --- */
.page-resources-faq__cta-button {
  display: inline-block;
  padding: 15px 35px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: 2px solid var(--secondary-color);
}

.page-resources-faq__cta-button:hover {
  background: darken(var(--secondary-color), 10%);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-resources-faq__cta-button--secondary {
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--text-light);
  margin-left: 20px;
}

.page-resources-faq__cta-button--secondary:hover {
  background: var(--text-light);
  color: var(--primary-color);
  border-color: var(--text-light);
}

/* --- FAQ Section --- */
.page-resources-faq__faq-section {
  padding: 80px 0;
  background-color: #f8f8f8; /* Light background for FAQ content */
  color: var(--text-dark);
}

.page-resources-faq__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-weight: bold;
}

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

.page-resources-faq__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-resources-faq__faq-item {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.page-resources-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-resources-faq__faq-item.active .page-resources-faq__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.page-resources-faq__faq-question:hover {
  background-color: #f0f0f0;
  border-color: #d0d0d0;
}

.page-resources-faq__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary-color);
  pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-resources-faq__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 20px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-resources-faq__faq-item.active .page-resources-faq__faq-toggle {
  transform: rotate(45deg);
  color: var(--secondary-color);
}

.page-resources-faq__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.3s ease;
  padding: 0 25px;
  opacity: 0;
  background-color: #f9f9f9;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.page-resources-faq__faq-item.active .page-resources-faq__faq-answer {
  max-height: 2000px !important; /* Ensure enough height for content */
  padding: 20px 25px !important;
  opacity: 1;
}

.page-resources-faq__faq-answer p {
  margin-bottom: 15px;
  line-height: 1.7;
  color: var(--text-dark);
}

.page-resources-faq__faq-answer p:last-child {
  margin-bottom: 0;
}

.page-resources-faq__faq-answer ul {
  list-style: disc inside;
  margin: 15px 0;
  padding-left: 20px;
}

.page-resources-faq__faq-answer li {
  margin-bottom: 8px;
  color: var(--text-dark);
}

.page-resources-faq__faq-answer a {
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: bold;
}

.page-resources-faq__faq-answer a:hover {
  color: var(--secondary-color);
}

.page-resources-faq__content-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* --- CTA Section at Bottom --- */
.page-resources-faq__cta-section {
  text-align: center;
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary-color), #051a4a);
  color: var(--text-light);
}

.page-resources-faq__cta-title {
  font-size: 2.8em;
  margin-bottom: 15px;
  color: var(--secondary-color);
  font-weight: bold;
}

.page-resources-faq__cta-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  opacity: 0.9;
}

/* --- Utility Classes for Color Contrast --- */
.page-resources-faq__dark-section {
  background: var(--primary-color);
  color: var(--text-light);
}

.page-resources-faq__light-bg {
  background: #f8f8f8;
  color: var(--text-dark);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-resources-faq__title {
    font-size: 2.8em;
  }
  .page-resources-faq__section-title {
    font-size: 2.2em;
  }
  .page-resources-faq__cta-title {
    font-size: 2.4em;
  }
}

@media (max-width: 768px) {
  .page-resources-faq {
    padding-top: 100px !important; /* Account for fixed header on mobile */
    font-size: 16px;
    line-height: 1.6;
  }

  .page-resources-faq__container {
    padding: 0 15px;
  }

  .page-resources-faq__title {
    font-size: 2.2em;
  }

  .page-resources-faq__subtitle {
    font-size: 1em;
  }

  .page-resources-faq__hero-banner,
  .page-resources-faq__faq-section,
  .page-resources-faq__cta-section {
    padding: 50px 0;
  }

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

  .page-resources-faq__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-resources-faq__faq-question {
    padding: 18px 20px;
    flex-wrap: wrap;
  }

  .page-resources-faq__faq-question h3 {
    font-size: 1em;
    width: calc(100% - 40px);
  }

  .page-resources-faq__faq-toggle {
    margin-left: 10px;
    width: 28px;
    height: 28px;
    font-size: 24px;
  }

  .page-resources-faq__faq-answer {
    padding: 0 20px;
  }

  .page-resources-faq__faq-item.active .page-resources-faq__faq-answer {
    padding: 15px 20px !important;
  }

  .page-resources-faq__cta-title {
    font-size: 2em;
  }

  .page-resources-faq__cta-description {
    font-size: 1em;
  }

  .page-resources-faq__cta-button {
    display: block;
    width: 100%;
    margin-left: 0;
    margin-bottom: 15px;
  }

  .page-resources-faq__cta-button:last-child {
    margin-bottom: 0;
  }

  /* Ensure all images are responsive and prevent overflow */
  .page-resources-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .page-resources-faq__hero-image,
  .page-resources-faq__content-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    border-radius: 5px !important;
  }
}

@media (max-width: 480px) {
  .page-resources-faq__title {
    font-size: 1.8em;
  }
  .page-resources-faq__section-title {
    font-size: 1.6em;
  }
  .page-resources-faq__cta-title {
    font-size: 1.8em;
  }
  .page-resources-faq__faq-question h3 {
    font-size: 0.95em;
  }
}