/**
 * FAQ
 *
 * Премиальный блок вопросов и ответов
 *
 * @package Magic_Jewelry
 */


/* =========================================================
   SECTION
   ========================================================= */

.faq-section {
    position: relative;

    width: 100%;

    padding: 82px 0 92px;

    background:
        radial-gradient(
            circle at 8% 20%,
            rgba(201, 162, 58, 0.055),
            transparent 32%
        ),
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fbf9fa 100%
        );

    overflow: hidden;
}


.faq-section::before {
    content: "";

    position: absolute;

    top: -180px;
    right: -180px;

    width: 420px;
    height: 420px;

    border-radius: 50%;

    background: rgba(92, 26, 79, 0.025);

    pointer-events: none;
}


/* =========================================================
   INNER
   ========================================================= */

.faq-inner {
    position: relative;

    z-index: 1;

    width: min(1180px, calc(100% - 40px));

    margin: 0 auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.faq-header {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 40px;

    margin-bottom: 36px;
}


.faq-heading {
    max-width: 620px;
}


/* =========================================================
   KICKER
   ========================================================= */

.faq-kicker {
    display: block;

    margin-bottom: 10px;

    color: #cca444;

    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;

    letter-spacing: 0.14em;
    text-transform: uppercase;
}


/* =========================================================
   TITLE ROW
   ========================================================= */

.faq-heading-row {
    display: flex;

    align-items: center;

    gap: 30px;
}


.faq-title {
    margin: 0;

    color: #5c1a4f;

    font-family: Arial, sans-serif;
    font-size: 38px;
    line-height: 1.15;
    font-weight: 700;
}


/* =========================================================
   ALL QUESTIONS LINK
   ========================================================= */

.faq-all-link {
    display: inline-flex;

    align-items: center;

    gap: 9px;

    color: #5e1d53;

    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;

    letter-spacing: 0.04em;

    white-space: nowrap;

    text-decoration: none;

    transition:
        color 0.3s ease,
        transform 0.3s ease;
}


.faq-all-link:hover {
    color: #cca444;
}


.faq-all-link-arrow {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;

    border: 1px solid #cca444;
    border-radius: 50%;

    color: #cca444;

    font-size: 16px;
    line-height: 1;

    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease;
}


.faq-all-link:hover .faq-all-link-arrow {
    background-color: #cca444;

    color: #ffffff;

    transform: translate(3px, -3px);
}


/* =========================================================
   INTRO
   ========================================================= */

.faq-intro {
    max-width: 560px;

    margin: 14px 0 0;

    color: #5c4b57;

    font-family: Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
}


/* =========================================================
   CATEGORIES
   ========================================================= */

.faq-categories {
    display: flex;

    flex-wrap: wrap;
    align-items: center;

    gap: 8px;

    margin-top: 25px;
}


.faq-category {
    appearance: none;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 38px;

    padding: 7px 16px;

    border: 1px solid rgba(92, 26, 79, 0.18);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.58);

    color: #5c1a4f;

    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;

    line-height: 1.2;

    text-decoration: none;

    cursor: pointer;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}


.faq-category:hover {
    border-color: #cca444;

    background: rgba(255, 255, 255, 0.72);

    color: #5c1a4f;

    transform: translateY(-1px);
}


.faq-category.is-active {
    border-color: #cca444;

    background: #5c1a4f;

    color: #ffffff;
}


.faq-category.is-active:hover {
    border-color: #cca444;

    background: #5c1a4f;

    color: #ffffff;
}


/* =========================================================
   FAQ LIST
   ========================================================= */

.faq-list {
    width: 100%;

    border-top: 1px solid rgba(92, 26, 79, 0.10);
}


/* =========================================================
   ITEM
   ========================================================= */

.faq-item {
    position: relative;

    width: 100%;

    border-bottom: 1px solid rgba(92, 26, 79, 0.10);

    transition:
        background 0.25s ease,
        border-color 0.25s ease;
}


.faq-item:hover {
    background: rgba(92, 26, 79, 0.018);
}


.faq-item.is-hidden {
    display: none;
}


/* =========================================================
   QUESTION
   ========================================================= */

.faq-question {
    appearance: none;

    display: flex;

    align-items: center;
    justify-content: space-between;

    width: 100%;

    margin: 0;

    padding: 21px 2px;

    border: 0;
    outline: none;

    background: transparent;

    color: #171717;

    font-family: Arial, sans-serif;
    font-size: 17px;
    line-height: 1.45;
    font-weight: 600;

    letter-spacing: -0.01em;

    text-align: left;

    cursor: pointer;

    transition:
        color 0.25s ease,
        padding-left 0.25s ease;
}


.faq-question:hover {
    color: #5c1a4f;
}


.faq-question:focus-visible {
    outline: 1px solid rgba(201, 162, 58, 0.55);

    outline-offset: -1px;
}


.faq-item.is-open .faq-question {
    color: #5c1a4f;
}


/* =========================================================
   QUESTION TITLE
   ========================================================= */

.faq-question-title {
    display: block;

    min-width: 0;

    padding-right: 24px;
}


/* =========================================================
   CHEVRON
   ========================================================= */

.faq-question-icon {
    position: relative;

    flex: 0 0 18px;

    width: 18px;
    height: 18px;

    margin-left: 18px;

    transform: rotate(0deg);

    transition:
        transform 0.3s ease;
}


.faq-question-icon svg {
    display: block;

    width: 18px;
    height: 18px;

    fill: none;

    stroke: #c9a23a;

    stroke-width: 1.5;

    stroke-linecap: round;
    stroke-linejoin: round;

    transition:
        stroke 0.25s ease;
}


.faq-question:hover .faq-question-icon svg {
    stroke: #5c1a4f;
}


.faq-question[aria-expanded="true"] .faq-question-icon {
    transform: rotate(180deg);
}


.faq-question[aria-expanded="true"] .faq-question-icon svg {
    stroke: #c9a23a;
}


/* =========================================================
   ANSWER
   ========================================================= */

.faq-answer {
    display: grid;

    grid-template-rows: 0fr;

    overflow: hidden;

    transition:
        grid-template-rows 0.35s ease;
}


.faq-item.is-open .faq-answer {
    grid-template-rows: 1fr;
}


.faq-answer-inner {
    min-height: 0;

    overflow: hidden;
}


/* =========================================================
   ANSWER LINK
   ========================================================= */

.faq-answer-link {
    position: relative;

    display: block;

    padding:
        0
        48px
        24px
        2px;

    color: #777777;

    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.65;
    font-weight: 400;

    text-decoration: none;

    transition:
        color 0.25s ease,
        padding-left 0.25s ease;
}


.faq-answer-link::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0.72em;

    width: 0;
    height: 1px;

    background: #c9a23a;

    transition:
        width 0.25s ease;
}


.faq-answer-link:hover {
    padding-left: 12px;

    color: #5c1a4f;
}


.faq-answer-link:hover::before {
    width: 6px;
}


/* =========================================================
   FAQ PAGE
   ========================================================= */

.faq-page-section {
    position: relative;

    width: 100%;

    padding: 92px 0 105px;

    background:
        radial-gradient(
            circle at 8% 20%,
            rgba(201, 162, 58, 0.055),
            transparent 32%
        ),
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fbf9fa 100%
        );

    overflow: hidden;
}


.faq-page-section::before {
    content: "";

    position: absolute;

    top: -180px;
    right: -180px;

    width: 420px;
    height: 420px;

    border-radius: 50%;

    background: rgba(92, 26, 79, 0.025);

    pointer-events: none;
}


/* =========================================================
   PAGE INNER
   ========================================================= */

.faq-page-inner {
    position: relative;

    z-index: 1;

    width: min(1180px, calc(100% - 40px));

    margin: 0 auto;
}


/* =========================================================
   PAGE HEADER
   ========================================================= */

.faq-page-header {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 40px;

    margin-bottom: 36px;
}


.faq-page-heading {
    max-width: 620px;
}


.faq-page-kicker {
    display: block;

    margin-bottom: 10px;

    color: #cca444;

    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;

    letter-spacing: 0.14em;
    text-transform: uppercase;
}


.faq-page-title {
    margin: 0;

    color: #5c1a4f;

    font-family: Arial, sans-serif;
    font-size: 38px;
    line-height: 1.15;
    font-weight: 700;
}


/* =========================================================
   PAGE CATEGORIES
   ========================================================= */

.faq-page-header .faq-categories {
    margin-top: 25px;
}


.faq-page-header .faq-category {
    text-decoration: none;
}


/* =========================================================
   PAGE LIST
   ========================================================= */

.faq-page-list {
    width: 100%;
}


/* =========================================================
   EMPTY
   ========================================================= */

.faq-page .faq-empty {
    padding: 50px 20px;

    border-top: 1px solid rgba(92, 26, 79, 0.10);
    border-bottom: 1px solid rgba(92, 26, 79, 0.10);

    color: #777777;

    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;

    text-align: center;
}


/* =========================================================
   PAGINATION
   ========================================================= */

.faq-pagination {
    display: flex;

    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 45px;
}


.faq-pagination .page-numbers {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 38px;
    height: 38px;

    padding: 0 10px;

    border: 1px solid #5e1d53;
    border-radius: 4px;

    background: #ffffff;

    color: #5e1d53;

    font-family: Arial, sans-serif;
    font-size: 13px;

    text-decoration: none;

    box-sizing: border-box;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}


.faq-pagination .page-numbers:hover {
    background: #5e1d53;

    color: #ffffff;
}


.faq-pagination .page-numbers.current {
    background: #5e1d53;

    color: #ffffff;
}


.faq-pagination .page-numbers.dots {
    border-color: transparent;

    background: transparent;

    color: #5e1d53;
}


.faq-pagination .page-numbers.dots:hover {
    background: transparent;

    color: #5e1d53;
}


.faq-pagination .page-numbers.prev,
.faq-pagination .page-numbers.next {
    padding-left: 15px;
    padding-right: 15px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .faq-section {
        padding: 70px 0 82px;
    }


    .faq-inner {
        width: min(100% - 30px, 720px);
    }


    .faq-header {
        display: block;
    }


    .faq-heading {
        max-width: none;
    }


    .faq-title {
        font-size: 30px;
    }


    .faq-all-link {
        margin-top: 25px;
    }


    .faq-categories {
        justify-content: flex-start;

        margin-top: 25px;
    }


    .faq-question {
        padding: 19px 0;

        font-size: 16px;
    }


    .faq-answer-link {
        padding-right: 34px;
    }


    .faq-page-section {
        padding: 70px 0 82px;
    }


    .faq-page-inner {
        width: min(100% - 30px, 720px);
    }


    .faq-page-header {
        display: block;
    }


    .faq-page-heading {
        max-width: none;
    }


    .faq-page-title {
        font-size: 30px;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .faq-section {
        padding: 54px 0 62px;
    }


    .faq-inner {
        width: calc(100% - 24px);
    }


    .faq-header {
        margin-bottom: 28px;
    }


    .faq-kicker {
        margin-bottom: 7px;

        font-size: 12px;
    }


    .faq-title {
        font-size: 26px;

        line-height: 1.2;
    }


    .faq-all-link {
        margin-top: 20px;

        font-size: 13px;
    }


    .faq-all-link-arrow {
        width: 26px;
        height: 26px;

        font-size: 15px;
    }


    .faq-categories {
        gap: 6px;

        margin-top: 18px;
    }


    .faq-category {
        min-height: 32px;

        padding: 7px 13px;

        font-size: 12px;
    }


    .faq-question {
        padding: 17px 0;

        font-size: 16px;

        line-height: 1.4;
    }


    .faq-question-icon,
    .faq-question-icon svg {
        width: 16px;
        height: 16px;
    }


    .faq-question-icon {
        flex-basis: 16px;

        margin-left: 12px;
    }


    .faq-answer-link {
        padding:
            0
            28px
            19px
            0;

        font-size: 13px;

        line-height: 1.6;
    }


    .faq-answer-link:hover {
        padding-left: 10px;
    }


    .faq-page-section {
        padding: 54px 0 62px;
    }


    .faq-page-inner {
        width: calc(100% - 24px);
    }


    .faq-page-header {
        margin-bottom: 28px;
    }


    .faq-page-title {
        font-size: 26px;

        line-height: 1.2;
    }


    .faq-page-header .faq-categories {
        gap: 6px;

        margin-top: 18px;
    }


    .faq-pagination {
        gap: 6px;

        margin-top: 30px;
    }


    .faq-pagination .page-numbers {
        min-width: 34px;
        height: 34px;

        padding: 0 9px;
    }


    .faq-pagination .page-numbers.prev,
    .faq-pagination .page-numbers.next {
        padding-left: 12px;
        padding-right: 12px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .faq-section *,
    .faq-section *::before,
    .faq-section *::after,
    .faq-page-section *,
    .faq-page-section *::before,
    .faq-page-section *::after {
        transition: none !important;
    }
}