/* style/faqs.css */
.page-faqs {
  font-family: 'Arial', sans-serif;
  color: #333333;
  line-height: 1.6;
  background-color: #f1f3f5; /* Light grey background for content sections */
}

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

/* Fixed header spacing */
.page-faqs__faq-section {
  padding-top: 120px; /* Desktop: Adjust based on fixed header height */
  padding-bottom: 40px;
}

.page-faqs__main-title {
  font-size: 36px;
  font-weight: 700;
  color: #333333;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-faqs__intro-text {
  font-size: 17px;
  line-height: 1.7;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: #555555;
}

.page-faqs__section-title {
  font-size: 28px;
  font-weight: 700;
  color: #333333;
  text-align: center;
  margin-top: 50px;
  margin-bottom: 30px;
}

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

.page-faqs__faq-item {
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

.page-faqs__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 25px;
  opacity: 0;
  background: #f9f9f9;
  color: #444444;
  font-size: 15px;
  line-height: 1.7;
}

.page-faqs__faq-item.active .page-faqs__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to contain content */
  padding: 20px 25px !important;
  opacity: 1;
  border-top: 1px solid #e0e0e0;
}

.page-faqs__faq-answer p {
  margin-bottom: 15px;
}

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

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

.page-faqs__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
  color: #1E90FF; /* Highlight on hover */
}

.page-faqs__faq-question:active {
  background: #eeeeee;
}

.page-faqs__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Allow click event on parent */
  color: inherit;
}

.page-faqs__faq-toggle {
  font-size: 28px;
  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; /* Allow click event on parent */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-faqs__faq-item.active .page-faqs__faq-toggle {
  color: #FF4500; /* Primary color when active */
  transform: rotate(45deg); /* Rotate to form an 'X' or 'minus' visual */
}

/* Related Resources Section */
.page-faqs__related-resources {
  background-color: #f1f3f5;
  padding: 60px 0;
}

.page-faqs__resource-intro {
  font-size: 16px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #555555;
}

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

.page-faqs__resource-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-faqs__resource-image {
  max-width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 20px;
  display: block;
}

.page-faqs__resource-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 15px;
  line-height: 1.3;
  flex-grow: 1; /* Allow title to take up available space */
}

.page-faqs__resource-card h3 a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

.page-faqs__resource-card h3 a:hover {
  color: #FF4500;
}

.page-faqs__resource-card p {
  font-size: 15px;
  color: #555555;
  margin-bottom: 20px;
  line-height: 1.6;
}

.page-faqs__btn-read-more {
  display: inline-block;
  padding: 10px 25px;
  background: #1E90FF;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 15px;
  font-weight: bold;
  transition: all 0.3s ease;
  margin-top: auto; /* Push button to bottom */
}

.page-faqs__btn-read-more:hover {
  background: #FF4500;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

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

  .page-faqs__section-title {
    font-size: 26px;
  }

  .page-faqs__faq-question h3 {
    font-size: 17px;
  }

  .page-faqs__faq-answer {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .page-faqs__faq-section {
    padding-top: 100px !important; /* Mobile: Adjust based on fixed header height */
    padding-bottom: 30px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faqs__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-faqs__main-title {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .page-faqs__intro-text {
    font-size: 15px;
    margin-bottom: 30px;
  }

  .page-faqs__section-title {
    font-size: 22px;
    margin-top: 40px;
    margin-bottom: 25px;
  }

  .page-faqs__faq-question {
    padding: 15px 20px;
    flex-wrap: wrap;
  }

  .page-faqs__faq-question h3 {
    font-size: 16px;
    width: calc(100% - 40px);
  }

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

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

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

  .page-faqs__resource-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-faqs__related-resources {
    padding: 40px 15px;
  }

  .page-faqs__resource-image {
    height: 200px;
  }

  .page-faqs__resource-card h3 {
    font-size: 18px;
  }

  .page-faqs__resource-card p {
    font-size: 14px;
  }

  .page-faqs img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-faqs__section,
  .page-faqs__card,
  .page-faqs__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Contrast Fixes - Ensure WCAG AA */
.page-faqs__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}

.page-faqs__faq-answer a,
.page-faqs__resource-card h3 a,
.page-faqs__btn-read-more {
  color: #1E90FF; /* Auxiliary color for links */
}

.page-faqs__btn-read-more {
  background: #1E90FF;
  color: #ffffff;
}

.page-faqs__btn-read-more:hover {
  background: #FF4500;
}

.page-faqs__faq-item.active .page-faqs__faq-toggle {
  color: #FF4500; /* Primary color when active */
}