/* faq-accordion block — BEM stylesheet for ioann-presnya template */

/* ─── Section wrapper ───────────────────────────────────────────────── */
.faq-accordion {
    margin: 0 auto 60px;
}

/* ─── Section title ─────────────────────────────────────────────────── */
.faq-accordion__title {
    font-family: var(--ip-font-title);
    font-weight: 700;
    font-size: 36px;
    line-height: 1.1;
    text-transform: uppercase;
    text-align: center;
    color: var(--ip-text);
    margin: 0 0 24px;
}

/* ─── List container ────────────────────────────────────────────────── */
.faq-accordion__list {
    border-top: 1px solid #cecece; /* top edge of the first row */
}

/* ─── Individual accordion item ─────────────────────────────────────── */
.faq-accordion__item {
    background: #ffffff;
    border-bottom: 1px solid #cecece;
}

/* ─── Suppress native disclosure triangle (both engines) ────────────── */
.faq-accordion__question {
    list-style: none;
}

.faq-accordion__question::-webkit-details-marker {
    display: none;
}

/* ─── Summary / question row ─────────────────────────────────────────── */
.faq-accordion__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    padding: 28px 36px;
    cursor: pointer;
    user-select: none;
    font-family: var(--ip-font-title);
    font-weight: 700;
    font-size: 24px;
    line-height: 1.05;
    color: #333;
}

/* Ensure question text occupies remaining space so chevron is pushed right */
.faq-accordion__question-text {
    flex: 1 1 auto;
}

/* ─── Chevron (CSS border-trick, no inline SVG) ──────────────────────── */
.faq-accordion__chevron {
    width: 10px;
    height: 10px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    /* Points up when closed (arrow tip points towards content) */
    transform: rotate(-135deg) translateY(2px);
    transition: transform .2s ease;
    flex: 0 0 auto;
}

/* Points down when open */
details[open] .faq-accordion__chevron {
    transform: rotate(45deg) translateY(-2px);
}

/* ─── Answer body ────────────────────────────────────────────────────── */
.faq-accordion__answer {
    padding: 0 36px 28px 36px;
    font-family: var(--ip-font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

/* Inline elements inside answer body — mirrors .text-columns__col-body */
.faq-accordion__answer p {
    margin: 0 0 0.75em;
}

.faq-accordion__answer p:last-child {
    margin-bottom: 0;
}

.faq-accordion__answer ul,
.faq-accordion__answer ol {
    margin: 0 0 0.75em 1.25em;
    padding: 0;
}

.faq-accordion__answer li {
    margin-bottom: 0.25em;
}

.faq-accordion__answer a {
    color: inherit;
    text-decoration: underline;
}

.faq-accordion__answer a:hover {
    text-decoration: none;
}

/* ─── Mobile (≤767.99 px) ────────────────────────────────────────────── */
@media (max-width: 767.99px) {
    .faq-accordion {
        margin-bottom: 40px;
    }

    .faq-accordion__title {
        font-size: 26px;
        margin-bottom: 16px;
    }

    /* Question row: flush to wrapper gutter, guaranteed ≥44px tap target */
    .faq-accordion__question {
        padding: 14px 0;
        min-height: 44px;
        font-size: 20px;
        gap: 16px;
    }

    /* Allow question text to shrink/wrap so long strings don't overflow */
    .faq-accordion__question-text {
        min-width: 0;
        overflow-wrap: break-word;
    }

    /* Answer body: aligned flush with question text and gutter edge */
    .faq-accordion__answer {
        padding: 0 0 20px 0;
        font-size: 15px;
        overflow-wrap: break-word;
    }
}
