/* ==========================================================================
   FAQ - akordeon (ratur.pl)
   ========================================================================== */

.wnt-faq-title {
    color: #2c3e50;
    font-weight: 700;
}

.wnt-faq-item {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 16px 20px;
    background-color: #ffffff;
    margin-bottom: 16px;
    transition: box-shadow 0.3s ease;
}

.wnt-faq-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.wnt-faq-question-text {
    font-size: 1.1rem;
    color: #2c3e50;
    cursor: pointer;
    position: relative;
    padding-right: 40px;
    /* miejsce na strzałkę */
    margin: 0 !important;
    /* nadpisuje inline margin z HTML */
    line-height: 1.4;
    transition: color 0.2s ease;
}

.wnt-faq-question-text:hover {
    color: #007bff;
}

.wnt-faq-question-text:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 4px;
    border-radius: 4px;
}

/* Strzałka */
.wnt-faq-question-text::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 12px;
    height: 12px;
    border-right: 2px solid #2c3e50;
    border-bottom: 2px solid #2c3e50;
    transform: translateY(-50%) rotate(-45deg);
    transform-origin: center;
    transition: transform 0.3s ease;
}

/* Obrót strzałki gdy pytanie jest aktywne (rozwinięte) */
.wnt-faq-item.active .wnt-faq-question-text::after {
    transform: translateY(-70%) rotate(45deg);
}

/* Ukrycie i animacja odpowiedzi */
.wnt-faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease;
}

.wnt-faq-item.active .wnt-faq-answer {
    max-height: 500px;
    /* wystarczająco duża wartość na tekst odpowiedzi */
    opacity: 1;
    margin-top: 16px;
}

.wnt-faq-answer p {
    margin: 0;
    color: #555555;
    line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {

    .wnt-faq-item,
    .wnt-faq-question-text,
    .wnt-faq-question-text::after,
    .wnt-faq-answer {
        transition: none;
    }
}