/*
 * tanca-blog-content-runtime.css
 *
 * Hand-written overrides that complement the auto-generated
 * tanca-blog-content.css. Put interactive behaviors here (accordions,
 * tabs, hover states, ...) so regenerating the big file from
 * public/articles-html/*.html doesn't stomp them.
 *
 * Everything is scoped under `.tanca-article-content`.
 */

/* FAQ accordion — supports both class conventions we see across samples
 * (.faq-q/.faq-a and .faq-question/.faq-answer). Questions become
 * clickable, answers are hidden until the parent `.faq-item` gets `.open`.
 */
.tanca-article-content .faq-item .faq-q,
.tanca-article-content .faq-item .faq-question {
  position: relative;
  padding-right: 56px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
}

.tanca-article-content .faq-item .faq-q:hover,
.tanca-article-content .faq-item .faq-question:hover {
  background-color: rgba(0, 200, 83, 0.06);
}

.tanca-article-content .faq-item .faq-q:focus-visible,
.tanca-article-content .faq-item .faq-question:focus-visible {
  outline: 2px solid var(--green, #00C853);
  outline-offset: -2px;
}

.tanca-article-content .faq-item .faq-q::after,
.tanca-article-content .faq-item .faq-question::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
  color: var(--green, #00C853);
  transition: transform 0.25s ease;
}

.tanca-article-content .faq-item.open .faq-q::after,
.tanca-article-content .faq-item.open .faq-question::after {
  transform: translateY(-50%) rotate(45deg); /* visual "+" → "×" */
}

.tanca-article-content .faq-item .faq-a,
.tanca-article-content .faq-item .faq-answer {
  display: none;
}

.tanca-article-content .faq-item.open .faq-a,
.tanca-article-content .faq-item.open .faq-answer {
  display: block;
  animation: tanca-faq-fade-in 0.2s ease;
}

@keyframes tanca-faq-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
