/* ==========================================================================
   LEGO FAQ COMPONENT – Token alapú, kiterjesztett logikával (2025-10-09)
   --------------------------------------------------------------------------
   Működik LEGO (.tc-archives) és Woo-LEGO (.tc-woo-archive) scope alatt is.
   Token-alapú színek (lásd tokens.css)
   ========================================================================== */

/* ==========================================================================
   TOKENEK – ajánlott (tokens.css-be)
   --------------------------------------------------------------------------
   :root {
     --tc-faq-bg: var(--tc-surface, #f8f9fa);
     --tc-faq-hover: #eef2f5;
     --tc-faq-active: var(--tc-accent, #21867a);
     --tc-faq-text: var(--tc-text, #111);
     --tc-faq-active-text: #fff;
     --tc-faq-border: var(--tc-border, #e0e0e0);
     --tc-faq-shadow: 0 2px 4px rgba(0,0,0,0.05);
     --tc-faq-highlight: #f0f5f4; // utolsó aktív kérdés 
   }
   ========================================================================== */

/* ==========================================================================
   BLOKK KONTAINER
   ========================================================================== */
.tc-archives .tc-faq .faq-accordion,
.tc-woo-archive .tc-faq .faq-accordion {
  max-width: 900px;
  margin: 2rem auto;
  border-top: 1px solid var(--tc-faq-border);
}

/* ==========================================================================
   ELEMEK (faq-item)
   ========================================================================== */
.tc-archives .tc-faq .faq-item,
.tc-woo-archive .tc-faq .faq-item {
  border-bottom: 1px solid var(--tc-faq-border);
  background: var(--tc-faq-bg);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* ==========================================================================
   KÉRDÉS (faq-question)
   ========================================================================== */
.tc-archives .tc-faq .faq-question,
.tc-woo-archive .tc-faq .faq-question {
  width: 100%;
  text-align: left;
  background: var(--tc-faq-bg);
  color: var(--tc-faq-text);
  border: 0;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.25s ease, color 0.25s ease;
  border-radius: 0;
}

/* Hover állapot */
.tc-archives .tc-faq .faq-question:hover,
.tc-woo-archive .tc-faq .faq-question:hover {
  background: var(--tc-faq-hover);
}

/* Nyitott állapot */
.tc-archives .tc-faq .faq-question[aria-expanded="true"],
.tc-woo-archive .tc-faq .faq-question[aria-expanded="true"] {
  background: var(--tc-faq-active);
  color: var(--tc-faq-active-text);
}

/* Utoljára aktív (bezárt, de kiemelt) */
.tc-archives .tc-faq .faq-question.was-active,
.tc-woo-archive .tc-faq .faq-question.was-active {
  background: var(--tc-faq-highlight);
  box-shadow: var(--tc-faq-shadow);
}

/* ==========================================================================
   IKON (faq-icon)
   ========================================================================== */
.tc-archives .tc-faq .faq-icon,
.tc-woo-archive .tc-faq .faq-icon {
  font-size: 1.2rem;
  font-weight: 700;
  margin-left: 0.75rem;
  color: var(--tc-faq-text);
  transition: color 0.25s ease, transform 0.25s ease;
}

/* Aktív ikon */
.tc-archives .tc-faq .faq-question[aria-expanded="true"] .faq-icon,
.tc-woo-archive .tc-faq .faq-question[aria-expanded="true"] .faq-icon {
  color: var(--tc-faq-active-text);
}

/* ==========================================================================
   VÁLASZ (faq-answer)
   ========================================================================== */
.tc-archives .tc-faq .faq-answer,
.tc-woo-archive .tc-faq .faq-answer {
  margin-top: 0.8rem; 
  padding: 0 1rem 1rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--tc-faq-text);
  background: var(--tc-faq-bg); /* korábban: #b73c3c */
  transition: max-height 0.35s ease, padding 0.35s ease;
  overflow: hidden;
  max-height: 0;
}

.tc-archives .tc-faq .faq-question[aria-expanded="true"] + .faq-answer,
.tc-woo-archive .tc-faq .faq-question[aria-expanded="true"] + .faq-answer {
  max-height: 500px;
  padding: 0 1rem 1rem;
}

/* ==========================================================================
   ANIMÁCIÓK
   ========================================================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
