/*--------------------------------------------------------------
# FAQ Section — Glassmorphic + Modern Accordion
--------------------------------------------------------------*/
.faq {
    padding: 40px 20px;
    text-align: center;
}

/* Section Title */
.faq h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
}

.faq .highlight-text {
    background: linear-gradient(135deg, #423dfc, #7271fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    display: inline-block;
}

.faq p {
    font-size: 18px;
    color: #666;
    margin: 0 0 18px 0;
}

/* FAQ Container */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

/* -------------------------
   FAQ Item — Glass card
-------------------------- */
.faq-item {
    position: relative;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(11, 18, 32, 0.10);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-radius: 20px;
    padding: 22px 56px 22px 20px;
    margin-bottom: 16px;
    cursor: pointer;
    box-shadow:
        0 8px 26px rgba(0, 0, 0, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition:
        transform .18s ease,
        box-shadow .25s ease,
        border-color .25s ease,
        background .25s ease;
    overflow: hidden;
}

/* Glossy inner stroke */
.faq-item::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .15));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Soft exterior glow */
.faq-item::after {
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: inherit;
    background: radial-gradient(70% 60% at 50% 120%, rgba(66, 77, 254, .18), transparent 70%);
    filter: blur(18px);
    z-index: -1;
    pointer-events: none;
    opacity: .55;
}

/* Hover lift + brighter ring */
.faq-item:hover {
    transform: translateY(-4px);
    border-color: rgba(66, 77, 254, 0.25);
    box-shadow:
        0 16px 40px rgba(66, 77, 254, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

/* Question text */
.faq-item h3.faq-question {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #444;
    /* dark grey instead of black */
    transition: color .25s ease;
    padding-right: 0;
}

.faq-toggle {
    position: absolute;
    right: 16px;
    top: 22px;
    /* pin to top */
    transform: none;
    /* remove translateY(-50%) */
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    transition: transform .25s ease, color .25s ease, background .25s ease;
    color: rgb(66, 77, 254);
    background: rgba(66, 77, 254, 0.08);
    pointer-events: none;
    /* clicks still land on the card */
}

/* -------------------------
   Modern Accordion Content
   (no max-height; no lag)
-------------------------- */

/* Collapsed by default */
.faq-content {
    display: grid;
    grid-template-rows: 0fr;
    /* collapses intrinsically */
    transition:
        grid-template-rows .35s cubic-bezier(.2, .75, .25, 1),
        opacity .28s ease,
        transform .35s cubic-bezier(.2, .75, .25, 1);
    opacity: 0;
    transform: translateY(-4px);
    padding-top: 12px;
    /* stable spacing */
}

/* Clip inner flow during collapse/expand */
.faq-content>* {
    overflow: hidden;
}

/* Content text */
.faq-content p {
    font-size: 16px;
    color: rgba(11, 18, 32, .80);
    margin: 0;
}

/* Open state */
.faq-item.active .faq-content {
    grid-template-rows: 1fr;
    opacity: 1;
    transform: translateY(0);
}

/* -------------------------
   Active (open) card styles
-------------------------- */
.faq-item.active {
    background: linear-gradient(135deg, #423dfc, #7271fb);
    color: #fff;
    border: 1px solid #7271fb;
    box-shadow: 0 16px 36px rgba(66, 77, 254, 0.25);
}

.faq-item.active h3.faq-question {
    color: #fff;
}

.faq-item.active .faq-content p {
    color: #fff;
}

/* Toggle becomes an × */
.faq-item.active .faq-toggle {
    transform: rotate(45deg);
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
}

/* -------------------------
   Focus states (keyboard)
-------------------------- */
.faq-item:focus-within {
    outline: 2px solid rgba(66, 77, 254, .35);
    outline-offset: 2px;
}

/* -------------------------
   Reduced motion
-------------------------- */
@media (prefers-reduced-motion: reduce) {

    .faq-item,
    .faq-item:hover {
        transition: none;
        transform: none;
    }

    .faq-content {
        transition: none;
        grid-template-rows: 1fr;
        /* always readable */
        opacity: 1;
        transform: none;
    }
}

/* -------------------------
   Responsive tweaks
-------------------------- */
@media (max-width: 768px) {
    .faq {
        padding: 40px 20px;
    }

    .faq-item {
        padding: 18px 48px 18px 16px;
    }

    .faq-item h3.faq-question {
        font-size: 18px;
    }

    .faq-toggle {
        right: 12px;
        top: 18px;
        width: 26px;
        height: 26px;
        font-size: 18px;
    }
}

/* === Open FAQ item uses the same background as the footer ================== */
.faq-item.active {
    /* Footer background */
    background:
        radial-gradient(60% 90% at 85% 20%, rgba(66, 77, 254, .25), transparent 60%),
        radial-gradient(50% 70% at 0% 100%, rgba(15, 120, 255, .18), transparent 60%),
        var(--benefit-bg, #211c42);
    color: var(--ink, #eaf1ff);

    /* Subtle ring + depth (matches footer vibe) */
    border-color: rgba(255, 255, 255, .18);
    box-shadow:
        0 16px 36px rgba(66, 77, 254, .25),
        inset 0 1px 0 rgba(255, 255, 255, .12);
}

/* Keep the glossy stroke, just tone it for dark */
.faq-item.active::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, .06));
}

/* Gentle purple bloom outside */
.faq-item.active::after {
    background: radial-gradient(70% 60% at 50% 120%, rgba(66, 77, 254, .22), transparent 70%);
    opacity: .6;
}

/* Text & links readable on dark */
.faq-item.active h3.faq-question,
.faq-item.active .faq-content p,
.faq-item.active a {
    color: var(--ink, #eaf1ff);
}

/* Toggle pill matches dark state */
.faq-item.active .faq-toggle {
    color: #fff;
    background: rgba(255, 255, 255, .22);
    transform: rotate(45deg);
}

/* Optional: smoother background transition */
.faq-item {
    transition:
        transform .18s ease,
        box-shadow .25s ease,
        border-color .25s ease,
        background .35s ease;
    /* <— keep this */
}

/* Strong outer glow for the active FAQ (like Privacy tiles) */
.faq-item.active {
    overflow: visible;
    /* let the glow spill outside */
    z-index: 1;
    /* sit above neighbors */
}

/* replace your current .faq-item.active::after with this */
.faq-item.active::after {
    content: "";
    position: absolute;
    inset: -10px;
    /* extend beyond edges */
    border-radius: inherit;
    pointer-events: none;
    z-index: -1;
    /* behind the card */
    background:
        radial-gradient(60% 80% at 20% 0%,
            color-mix(in oklab, var(--ai-c1, #423dfc) 40%, transparent) 0%,
            transparent 70%),
        radial-gradient(60% 80% at 100% 100%,
            color-mix(in oklab, var(--ai-c2, #7271fb) 35%, transparent) 0%,
            transparent 75%);
    filter: blur(14px);
    opacity: .6;
}

/* keep the glossy inner stroke toned for dark */
.faq-item.active::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, .06));
}

/* ===== Make the active glow louder & wider ===== */
.faq-item {
    isolation: isolate;
}

/* keep aura contained */
.faq,
.faq-container,
.faq-item.active {
    overflow: visible;
}

.faq-item.active {
    /* richer dark background (same vibe as footer, but boosted) */
    background:
        radial-gradient(60% 90% at 85% 20%, rgba(66, 77, 254, .38), transparent 60%),
        radial-gradient(50% 70% at 0% 100%, rgba(15, 120, 255, .28), transparent 60%),
        var(--benefit-bg, #211c42);
    border-color: rgba(255, 255, 255, .22);
    box-shadow:
        /* bright edge ring */
        0 0 0 1px color-mix(in oklab, var(--ai-c2, #7271fb) 70%, transparent),
        /* close glow */
        0 14px 40px rgba(66, 77, 254, .35),
        0 0 60px rgba(114, 113, 251, .40),
        /* far halo */
        0 0 120px rgba(114, 113, 251, .32),
        inset 0 1px 0 rgba(255, 255, 255, .16);
}

/* multi-layer outer aura (bigger spread + brighter) */
.faq-item.active::after {
    content: "";
    position: absolute;
    inset: -28px;
    /* larger spill */
    border-radius: inherit;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(70% 65% at 25% -10%,
            color-mix(in oklab, var(--ai-c1, #423dfc) 85%, transparent) 0%,
            transparent 70%),
        radial-gradient(70% 70% at 100% 110%,
            color-mix(in oklab, var(--ai-c2, #7271fb) 75%, transparent) 0%,
            transparent 75%),
        radial-gradient(120% 120% at 50% 120%,
            rgba(175, 170, 255, .28) 0%,
            transparent 60%);
    filter: blur(28px) saturate(120%);
    opacity: .9;
    /* was ~.6 */
    animation: faqAuraPulse 2.4s ease-in-out infinite alternate;
}

/* slightly brighter glossy inner stroke on dark */
.faq-item.active::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, .08));
}

/* optional: bump when hovering the open item */
.faq-item.active:hover::after {
    opacity: 1;
    filter: blur(30px) saturate(130%);
}

.faq-item.active:hover {
    box-shadow:
        0 0 0 1px color-mix(in oklab, var(--ai-c2, #7271fb) 80%, transparent),
        0 16px 46px rgba(66, 77, 254, .40),
        0 0 72px rgba(114, 113, 251, .46),
        0 0 140px rgba(114, 113, 251, .34),
        inset 0 1px 0 rgba(255, 255, 255, .18);
}

/* gentle pulse (disable for reduced motion) */
@keyframes faqAuraPulse {
    from {
        opacity: .82;
        filter: blur(26px) saturate(115%);
    }

    to {
        opacity: .95;
        filter: blur(30px) saturate(135%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .faq-item.active::after {
        animation: none;
    }
}