/* ============================================================
   Blok: Akordeon (FAQ)
   motyw-t/akordeon
   ============================================================ */

.t-akordeon {
    margin: 2rem 0;
}

.t-akordeon .faq {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Element listy ── */
.t-faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s;
}

.t-faq-item.t-faq-open {
    border-color: var(--t-color-primary, #1a56a0);
}

/* ── Pytanie ── */
.t-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    color: #1a1a1a;
    background: transparent;
    transition: background 0.2s, color 0.2s;
    user-select: none;
}

.t-faq-question:hover {
    background: #f0f4ff;
    color: var(--t-color-primary, #1a56a0);
}

.t-faq-open .t-faq-question {
    color: var(--t-color-primary, #1a56a0);
    background: #f0f4ff;
}

/* ── Ikona strzałki ── */
.t-faq-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-3px);
    transition: transform 0.25s ease;
    display: block;
}

.t-faq-open .t-faq-icon {
    transform: rotate(-135deg) translateY(-3px);
}

/* ── Odpowiedź — animacja grid-template-rows ── */
.t-faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.28s ease;
}

.t-faq-open .t-faq-answer {
    grid-template-rows: 1fr;
}

/* Wewnętrzny wrapper konieczny do grid-trick */
.t-faq-answer-inner {
    overflow: hidden;
    padding: 0 1.25rem;
    color: #444;
    line-height: 1.7;
    transition: padding 0.28s ease;
}

.t-faq-open .t-faq-answer-inner {
    padding: 0.5rem 1.25rem 1.25rem;
}

.t-faq-answer-inner p:last-child {
    margin-bottom: 0;
}

/* ── Edytor ── */
.t-akordeon-editor {
    font-family: -apple-system, sans-serif;
}
