/**
 * FAQ — sekcja pytan na produkcie ([roza_faq]) oraz akordeon strony FAQ (.rfaq).
 *
 * Wyniesione ze style.css motywu. Reguly bez zmian.
 */

/* ═══════════════════════════════════════════
   ROZA FAQ — sekcja pytań i odpowiedzi
   ═══════════════════════════════════════════ */

.roza-faq {
    margin: 0;
    padding: 0;
}

.roza-faq__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Pojedynczy element Q&A */
.roza-faq__item {
    border-bottom: 1px solid #e0e0e0;
    padding: 16px 0;
    border-radius: 6px;
    padding-left: 12px;
    padding-right: 12px;
    margin-left: -12px;
    margin-right: -12px;
    transition: background-color 0.2s ease;
}

.roza-faq__item:first-child {
    padding-top: 0;
}

.roza-faq__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Pytanie */
.roza-faq__question {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    padding: 0;
    line-height: 1.45;
    cursor: default;
}

/* Odpowiedź */
.roza-faq__answer {
    margin: 0;
    padding: 0 0 0 16px;
    border-left: 3px solid #c8a84b; /* złoty akcent – dostosuj do palety roza.pl */
    color: #444;
}

.roza-faq__answer div p {
    margin: 0 0 6px 0;
    font-size: 14px;
    line-height: 1.65;
    color: #444;
}

.roza-faq__answer div p:last-child {
    margin-bottom: 0;
}

.roza-faq__answer div ul,
.roza-faq__answer div ol {
    margin: 6px 0 6px 18px;
    padding: 0;
}

.roza-faq__answer div li {
    font-size: 14px;
    line-height: 1.65;
    color: #444;
    margin-bottom: 3px;
}

/* Responsywność */
@media (max-width: 768px) {
    .roza-faq__item {
        padding: 14px 0;
    }

    .roza-faq__question {
        font-size: 14px;
    }

    .roza-faq__answer {
        padding-left: 12px;
    }
}

/* Hover na parze Q&A */
.roza-faq__item:hover {
    background-color: #f9f6ee; /* ciepły kremowy – pasuje do złotego akcentu */
}

.roza-faq__item:hover .roza-faq__question {
    color: #c8a84b; /* pytanie rozjaśnia się do koloru akcentu */
}

.roza-faq__item:hover .roza-faq__answer {
    border-left-color: #a8882e; /* lewy border ciemnieje przy hoverze */
}

/* ═══════════════════════════════════════════════════════════════
   RFAQ — Accordion FAQ (strona FAQ globalna)
   ═══════════════════════════════════════════════════════════════ */

.rfaq {
    margin: 0;
    padding: 0;
}

/* ── pojedynczy item ── */
.rfaq__item {
    border: 1px solid #e0e0e0;
    margin-bottom: 8px;
    border-radius: 3px;
    overflow: hidden;
    background: #f5f5f5;
    transition: background 0.2s ease;
}

.rfaq__item[data-open="true"] {
    background: #ffffff;
    border-color: #d0d0d0;
}

/* ── przycisk pytania ── */
.rfaq__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 16px;
    transition: background 0.15s ease;
}

.rfaq__btn:hover {
    background: rgba(0, 0, 0, 0.03);
}

.rfaq__btn:focus-visible {
    outline: 2px solid #c0392b;
    outline-offset: -2px;
}

/* ── tekst pytania ── */
.rfaq__question {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.rfaq__item[data-open="true"] .rfaq__question {
    color: #c0392b;
}

.rfaq__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #c0392b;
    position: relative;
    transition: transform 0.25s ease;
}

.rfaq__icon::before,
.rfaq__icon::after {
    content: '';
    position: absolute;
    background: #ffffff;
    border-radius: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.rfaq__icon::before {
    width: 12px;
    height: 2px;
}

.rfaq__icon::after {
    width: 2px;
    height: 12px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.rfaq__item[data-open="true"] .rfaq__icon::after {
    transform: translate(-50%, -50%) scaleY(0);
    opacity: 0;
}

/* ── panel odpowiedzi ── */
.rfaq__panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.rfaq__panel[hidden] {
    display: block !important; 
    max-height: 0;
    visibility: hidden;
}

.rfaq__panel:not([hidden]) {
    max-height: 1200px;
    visibility: visible;
}

.rfaq__answer {
    padding: 4px 20px 20px 20px;
    border-top: 1px solid #e8e8e8;
}

.rfaq__answer p {
    font-size: 16px;
    line-height: 1.7;
    color: #555555;
    margin: 12px 0 0 0;
}

.rfaq__answer p:first-child {
    margin-top: 12px;
}

.rfaq__answer a {
    color: #c0392b;
    text-decoration: underline;
}

.rfaq__answer a:hover {
    color: #922b21;
}

/* ── responsywność ── */
@media (max-width: 768px) {
    .rfaq__btn {
        padding: 14px 16px;
    }

    .rfaq__question {
        font-size: 14px;
    }

    .rfaq__answer {
        padding: 4px 16px 16px 16px;
    }

    .rfaq__icon {
        width: 24px;
        height: 24px;
    }
}
