/* Shared FAQ accordion (course pages) */
.faq-section {
  padding: 10px 0 0;
}

.faq-container {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.faq-item {
  margin-bottom: 12px;
  background: transparent;
  border: 1px solid rgba(20, 114, 186, 0.18);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.45s ease, background 0.45s ease, border-color 0.45s ease;
}

.faq-item.active {
  background: #fff;
  border-color: rgba(20, 114, 186, 0.35);
  box-shadow: none;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: transparent !important;
  border: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  cursor: pointer;
  text-align: left;
  font-size: 17px;
  font-weight: 600;
  color: #1a1a1a !important;
  transition: color 0.35s ease;
}

.faq-question:hover {
  color: #1472ba;
}

.faq-question:hover .faq-number {
  color: #1472ba;
}

.faq-question:focus {
  outline: none;
}

.faq-question:focus-visible {
  outline: 2px solid #1472ba;
  outline-offset: 2px;
}

.faq-item.active .faq-question,
.faq-item.active .faq-number {
  color: #1472ba;
}

.faq-question-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
  color: #1a1a1a !important;
}

.faq-number {
  flex-shrink: 0;
  font-weight: 600;
  color: #1a1a1a !important;
  transition: color 0.35s ease;
}

.faq-question-text {
  flex: 1;
  line-height: 1.4;
  color: #1a1a1a !important;
}

.faq-toggle {
  flex-shrink: 0;
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #1472ba;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: rotate(0deg);
  transform-origin: center center;
  transition: background 0.35s ease, box-shadow 0.35s ease, transform 0.55s cubic-bezier(0.34, 1.15, 0.64, 1);
}

.faq-toggle-icon {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.faq-toggle-icon::before,
.faq-toggle-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #fff;
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  transition: transform 0.55s cubic-bezier(0.34, 1.15, 0.64, 1), opacity 0.4s ease 0.08s;
}

.faq-toggle-icon::before {
  width: 14px;
  height: 2px;
}

.faq-toggle-icon::after {
  width: 2px;
  height: 14px;
}

.faq-question:hover .faq-toggle {
  background: #0f5a95;
  box-shadow: none;
}

.faq-item.active .faq-toggle {
  transform: rotate(180deg);
  background: #0f5a95;
}

.faq-item.active .faq-toggle-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  border: none !important;
  border-top: none !important;
  transition: max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.45s ease, transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer-inner {
  padding: 0 22px 18px;
  border: none !important;
  border-top: none !important;
}

.faq-item.active .faq-answer-inner {
  padding-top: 0;
}

.faq-answer p,
.faq-answer li {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: #2c2c2c;
}

.faq-answer p + p,
.faq-answer ul {
  margin-top: 10px;
}

.faq-answer ul {
  padding-left: 20px;
  list-style-position: outside;
}

.faq-answer li {
  margin-bottom: 6px;
}

.faq-item.active .faq-answer {
  max-height: 2400px;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 0.65s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease 0.08s, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.08s;
}

@media (prefers-reduced-motion: reduce) {
  .faq-item,
  .faq-question,
  .faq-number,
  .faq-toggle,
  .faq-toggle-icon::before,
  .faq-toggle-icon::after,
  .faq-answer,
  .faq-item.active .faq-answer {
    transition: none !important;
  }
}

@media (max-width: 980px) {
  .faq-question {
    padding: 16px 14px;
    font-size: 16px;
  }

  .faq-number {
    font-size: 16px;
  }

  .faq-toggle {
    width: 32px;
    height: 32px;
  }

  .faq-toggle-icon {
    width: 12px;
    height: 12px;
  }

  .faq-toggle-icon::before {
    width: 12px;
  }

  .faq-toggle-icon::after {
    height: 12px;
  }

  .faq-answer-inner {
    padding: 0 14px 16px;
  }

  .faq-answer p,
  .faq-answer li {
    font-size: 15px;
  }
}

@media (max-width: 640px) {
  .faq-question {
    font-size: 15px;
    padding: 16px;
  }
}
