/* Frequently Asked Questions Section Styling */
.faq-section {
  padding: 80px 0;
  /* background-color: #fafbfe; */
  position: relative;
}

.faq-title span {
  color: #5460f9;
}

/* Category Accordion Header styling */
.faq-category-wrapper {
  margin-bottom: 24px;
}

.faq-category-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #5460f9 0%, #03a9f4 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 22px 28px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: clamp(22px, 2.5vw + 0.5rem, 30px) !important;
  line-height: 30px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(84, 96, 249, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.faq-category-header.collapsed {
  background: linear-gradient(90deg, #5460f9 0%, #5460f9 100%);
}

.faq-category-icon {
  width: 42px;
  height: 42px;
  transition: transform 0.3s ease;
}

/* Category Body */
.faq-category-body {
  background-color: #ffffff;
  border: 1px solid #e5eaf4;
  border-radius: 12px;
  margin-top: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.02);
}

/* Question Items */
.faq-question-item {
  border: 1px solid transparent;
  border-bottom: 1px solid #f0f4fc;
  padding: 20px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  border-radius: 0;
}

.faq-question-item:last-child {
  border-bottom: 1px solid transparent;
}

.faq-question-item.active {
  border-color: #5460f9 !important;
  padding: 20px;
  background-color: #ffffff;
  box-shadow: 0 8px 25px rgba(84, 96, 249, 0.05);
  position: relative;
  z-index: 2;
}

.faq-question-item.active:first-child {
  border-radius: 10px 10px 0 0;
}

.faq-question-item.active:last-child {
  border-radius: 0 0 10px 10px;
}

.faq-question-item.active:not(:first-child):not(:last-child) {
  border-radius: 0;
}

/* Remove border bottom on item above active item dynamically or handle via css */
.faq-question-item.active+.faq-question-item {
  border-top: none;
}

.faq-question-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: none;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: clamp(18px, 1.8vw + 0.4rem, 24px);
  line-height: 24px;
  color: #131415;
  text-align: left;
  cursor: pointer;
  padding: 0;
  gap: 20px;
}

.faq-question-item.active .faq-question-header {
  font-weight: 600;
}

.faq-question-item.active .faq-question-header span {
  background: linear-gradient(90deg, #5460f9 0%, #12b3eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.faq-question-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.faq-question-answer {
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    margin-top 0.3s ease;
  font-family: "Inter", sans-serif;
  font-size: clamp(16px, 1.5vw + 0.3rem, 20px);
  line-height: 1.6;
  font-weight: 400;
  color: #131415;
  padding-right: 40px;
}

.faq-question-item.active .faq-question-answer {
  margin-top: 16px;
}

/* Table of Contents Card */
.faq-toc-sidebar {
  position: sticky;
  top: 100px;
}

.faq-toc-card {
  background-color: #ffffff;
  border: 1px solid #e5eaf4;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.02);
}

.faq-toc-title {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: clamp(22px, 2vw + 0.5rem, 32px);
  line-height: 36px !important;
  color: #131415;
  margin-bottom: 24px;
}

.faq-toc-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-toc-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #131415;
  text-decoration: none;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: clamp(16px, 1.2vw + 0.3rem, 20px);
  line-height: 26px;
  transition: color 0.3s ease;
  cursor: pointer;
}

.faq-toc-item:hover,
.faq-toc-item.active {
  color: #5460f9;
}

.faq-toc-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Sticky Category Dropdown for Responsive */
.faq-mobile-toc {
  display: none;
  position: fixed;
  top: 84px;
  /* Adjust based on navbar height */
  left: 0;
  width: 100%;
  background-color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  z-index: 999;
  padding: 12px 16px;
  flex-direction: column;
}

.faq-mobile-toc-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #5460f9;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(84, 96, 249, 0.1);
  transition: all 0.3s ease;
}

.faq-mobile-toc-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.faq-mobile-toc.open .faq-mobile-toc-arrow {
  transform: rotate(180deg);
}

.faq-mobile-toc-dropdown {
  display: none;
  position: absolute;
  top: calc(100% - 4px);
  left: 16px;
  right: 16px;
  background-color: #ffffff;
  border: 1px solid #e5eaf4;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  max-height: 280px;
  overflow-y: auto;
  z-index: 1000;
  padding: 8px 0;
}

.faq-mobile-toc.open .faq-mobile-toc-dropdown {
  display: block;
}

.faq-mobile-toc-item {
  display: block;
  padding: 12px 20px;
  color: #555555;
  text-decoration: none;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f7fafc;
}

.faq-mobile-toc-item:last-child {
  border-bottom: none;
}

.faq-mobile-toc-item:hover,
.faq-mobile-toc-item.active {
  background-color: #f1f4ff;
  color: #5460f9;
}

@media (max-width: 991.98px) {
  .faq-mobile-toc.sticky-visible {
    display: flex;
  }
}