/*==========================================
  Desiwood — FAQ accordion (resources/views/frontend/components/faq.blade.php)
  Scoped to .dw-faq. Behaviour: public/frontend/js/dw-faq.js.
==========================================*/

.dw-faq {
    --faq-surface: #170b28;
    --faq-surface-open: #1d0f33;
    --faq-line: rgba(255, 255, 255, .08);
    --faq-line-strong: rgba(255, 255, 255, .16);
    --faq-text: #bdb4cc;
    --faq-accent: #ff8a00;
    --faq-accent-2: #ff006e;
    --faq-speed: .32s;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 88px 0;
    background: #0b0416;
}

/* Corner glows as fixed-size layers: a background sized in % of the section
   would be repainted on every frame while an answer opens and the section grows. */
.dw-faq::before,
.dw-faq::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 720px;
    height: 620px;
    pointer-events: none;
    will-change: transform;
}

.dw-faq::before {
    top: -120px;
    left: -220px;
    background: radial-gradient(closest-side, rgba(110, 30, 160, .38), transparent);
}

.dw-faq::after {
    right: -220px;
    bottom: -120px;
    background: radial-gradient(closest-side, rgba(70, 0, 110, .38), transparent);
}

.dw-faq--embedded {
    overflow: visible;
    padding: 0;
    background: none;
}

.dw-faq--embedded::before,
.dw-faq--embedded::after {
    content: none;
}

.dw-faq__inner {
    max-width: 860px;
    margin: 0 auto;
}

.dw-faq--embedded .dw-faq__inner {
    max-width: none;
}

/*------------------------------------------
  Heading
------------------------------------------*/

.dw-faq__head {
    margin-bottom: 32px;
    text-align: center;
}

.dw-faq__title {
    margin: 0;
    color: #fff;
    font-family: var(--default-font, "Poppins", sans-serif);
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
    text-wrap: balance;
}

.dw-faq__title span {
    background: linear-gradient(90deg, var(--faq-accent), var(--faq-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dw-faq__subtitle {
    max-width: 600px;
    margin: 10px auto 0;
    color: var(--faq-text);
    font-size: 15.5px;
    line-height: 1.6;
    text-wrap: balance;
}

/*------------------------------------------
  Items
------------------------------------------*/

.dw-faq__list {
    display: grid;
    gap: 12px;
}

.dw-faq__item {
    background: var(--faq-surface);
    border: 1px solid var(--faq-line);
    border-radius: 14px;
    transition: background-color var(--faq-speed) ease, border-color var(--faq-speed) ease, box-shadow var(--faq-speed) ease;
}

.dw-faq__item:hover {
    border-color: var(--faq-line-strong);
}

.dw-faq__item.is-open {
    background: var(--faq-surface-open);
    border-color: rgba(255, 138, 0, .28);
    box-shadow: 0 18px 40px -28px rgba(255, 0, 110, .55);
}

.dw-faq__item[hidden] {
    display: none;
}

.dw-faq__item.is-revealed {
    animation: dwFaqReveal .35s ease both;
}

@keyframes dwFaqReveal {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
}

.dw-faq__heading {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
}

/* The whole row is the button. */
.dw-faq__toggle {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    min-height: 68px;
    margin: 0;
    padding: 14px 18px 14px 18px;
    background: none;
    border: 0;
    border-radius: 14px;
    color: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.dw-faq__toggle:focus {
    outline: none;
}

.dw-faq__toggle:focus-visible {
    outline: 2px solid var(--faq-accent);
    outline-offset: 2px;
}

.dw-faq__num {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    background: rgba(255, 138, 0, .08);
    border: 1px solid rgba(255, 138, 0, .22);
    border-radius: 10px;
    color: #ffa24a;
    font-size: 12.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
    transition: background var(--faq-speed) ease, border-color var(--faq-speed) ease, color var(--faq-speed) ease;
}

.dw-faq__item.is-open .dw-faq__num {
    background: linear-gradient(135deg, var(--faq-accent), var(--faq-accent-2));
    border-color: transparent;
    color: #fff;
}

.dw-faq__question {
    flex: 1 1 auto;
    min-width: 0;
    color: #f3eef8;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.45;
}

.dw-faq__item.is-open .dw-faq__question {
    color: #fff;
}

/* Plus drawn with two bars; the vertical one folds away into a minus. */
.dw-faq__icon {
    position: relative;
    flex: none;
    width: 32px;
    height: 32px;
    border: 1px solid var(--faq-line-strong);
    border-radius: 50%;
    transition: border-color var(--faq-speed) ease, background-color var(--faq-speed) ease, transform var(--faq-speed) ease;
}

.dw-faq__icon::before,
.dw-faq__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    margin: -1px 0 0 -6px;
    border-radius: 2px;
    background: #fff;
    transition: transform var(--faq-speed) ease, opacity var(--faq-speed) ease, background-color var(--faq-speed) ease;
}

.dw-faq__icon::after {
    transform: rotate(90deg);
}

.dw-faq__toggle:hover .dw-faq__icon {
    border-color: rgba(255, 138, 0, .5);
    background: rgba(255, 138, 0, .08);
}

.dw-faq__item.is-open .dw-faq__icon {
    border-color: rgba(255, 0, 110, .55);
    background: rgba(255, 0, 110, .12);
    transform: rotate(180deg);
}

.dw-faq__item.is-open .dw-faq__icon::before,
.dw-faq__item.is-open .dw-faq__icon::after {
    background: #ff4d97;
}

.dw-faq__item.is-open .dw-faq__icon::after {
    opacity: 0;
    transform: rotate(0deg);
}

/*------------------------------------------
  Answer: height via grid rows, no JS measuring
------------------------------------------*/

.dw-faq__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows var(--faq-speed) ease;
}

.dw-faq__item.is-open .dw-faq__panel {
    grid-template-rows: 1fr;
}

.dw-faq__panel-inner {
    min-height: 0;
    overflow: hidden;
    /* Closed answers leave the accessibility tree once the collapse has finished. */
    visibility: hidden;
    transition: visibility 0s linear var(--faq-speed);
}

.dw-faq__item.is-open .dw-faq__panel-inner {
    visibility: visible;
    transition-delay: 0s;
}

.dw-faq__answer {
    padding: 0 66px 18px 68px;
    color: var(--faq-text);
    font-size: 14.5px;
    line-height: 1.7;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity var(--faq-speed) ease, transform var(--faq-speed) ease;
}

.dw-faq__item.is-open .dw-faq__answer {
    opacity: 1;
    transform: none;
}

.dw-faq__answer p {
    margin: 0 0 10px;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.dw-faq__answer > :last-child {
    margin-bottom: 0;
}

.dw-faq__answer ul {
    display: grid;
    gap: 4px;
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
}

.dw-faq__answer li {
    position: relative;
    padding-left: 16px;
}

.dw-faq__answer li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .72em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--faq-accent);
}

/*------------------------------------------
  View All
------------------------------------------*/

.dw-faq__more {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.dw-faq__more[hidden] {
    display: none;
}

.dw-faq__more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    margin: 0;
    padding: 0 22px;
    background:
        linear-gradient(var(--faq-surface), var(--faq-surface)) padding-box,
        linear-gradient(90deg, var(--faq-accent), var(--faq-accent-2)) border-box;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #fff;
    font: inherit;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.dw-faq__more-btn i {
    font-size: 17px;
    line-height: 1;
    transition: transform .25s ease;
}

.dw-faq__more-btn:hover {
    background:
        linear-gradient(90deg, var(--faq-accent), var(--faq-accent-2)) padding-box,
        linear-gradient(90deg, var(--faq-accent), var(--faq-accent-2)) border-box;
    box-shadow: 0 12px 26px -14px rgba(255, 0, 110, .7);
    transform: translateY(-1px);
}

.dw-faq__more-btn:hover i {
    transform: translateY(2px);
}

.dw-faq__more-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/*------------------------------------------
  Responsive
------------------------------------------*/

@media (max-width: 991.98px) {
    .dw-faq {
        padding: 64px 0;
    }

    .dw-faq__inner {
        max-width: 720px;
    }

    .dw-faq__title {
        font-size: 32px;
    }
}

@media (max-width: 575.98px) {
    .dw-faq {
        padding: 52px 0;
    }

    .dw-faq__head {
        margin-bottom: 24px;
    }

    .dw-faq__title {
        font-size: 26px;
    }

    .dw-faq__subtitle {
        font-size: 14.5px;
    }

    .dw-faq__list {
        gap: 10px;
    }

    .dw-faq__toggle {
        align-items: flex-start;
        gap: 12px;
        min-height: 60px;
        padding: 14px;
    }

    .dw-faq__num {
        width: 30px;
        height: 30px;
        border-radius: 9px;
        font-size: 12px;
    }

    .dw-faq__question {
        padding-top: 4px;
        font-size: 15px;
    }

    .dw-faq__icon {
        width: 30px;
        height: 30px;
    }

    .dw-faq__answer {
        padding: 0 14px 16px 56px;
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dw-faq__item,
    .dw-faq__panel,
    .dw-faq__panel-inner,
    .dw-faq__answer,
    .dw-faq__num,
    .dw-faq__icon,
    .dw-faq__icon::before,
    .dw-faq__icon::after,
    .dw-faq__more-btn,
    .dw-faq__more-btn i {
        transition: none;
    }

    .dw-faq__item.is-revealed {
        animation: none;
    }
}
