/* ========================================================
   Frequently Asked Questions (FAQ) Styles — AgenticAim
   ======================================================== */

.faq-section {
    padding: 95px 0 115px;
    background: #f8fafc;
    position: relative;
    border-top: 1px solid rgba(0, 13, 60, 0.06);
    scroll-margin-top: 80px;
}

.faq-container {
    max-width: 840px;
    margin: 0 auto;
}

/* FAQ Header */
.faq-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 50px;
}

.faq-tag {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 12px;
    display: inline-block;
}

.faq-title {
    font-size: 38px;
    font-weight: 800;
    color: var(--color-dark-navy);
    letter-spacing: -0.8px;
    line-height: 1.22;
    margin-bottom: 14px;
    position: relative;
}

.faq-title::after {
    content: '';
    display: block;
    width: 55px;
    height: 4px;
    background: var(--color-primary-gradient);
    border-radius: 2px;
    margin: 12px auto 0;
}

.faq-subtitle {
    font-size: 16.5px;
    color: var(--color-text-muted);
    line-height: 1.62;
    margin-top: 14px;
    font-weight: 400;
}

/* FAQ Accordion Stack */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* Individual FAQ Card */
.faq-card {
    background: #ffffff;
    border: 1px solid rgba(0, 13, 60, 0.08);
    border-radius: 16px;
    box-shadow: 0 3px 12px rgba(0, 13, 60, 0.035);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.faq-card:hover {
    border-color: rgba(139, 61, 255, 0.28);
    box-shadow: 0 8px 24px rgba(139, 61, 255, 0.08), 0 2px 6px rgba(0, 13, 60, 0.03);
    transform: translateY(-2px);
}

.faq-card.is-active {
    border-color: rgba(139, 61, 255, 0.45);
    box-shadow: 0 10px 28px rgba(139, 61, 255, 0.12), 0 2px 8px rgba(0, 13, 60, 0.04);
}

/* Question Trigger Button */
.faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 28px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    color: var(--color-dark-navy);
    font-size: 17.5px;
    font-weight: 600;
    line-height: 1.42;
    letter-spacing: -0.2px;
    transition: color 0.25s ease;
}

.faq-trigger:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
    background: rgba(139, 61, 255, 0.03);
}

.faq-question-text {
    flex: 1;
    transition: color 0.25s ease;
}

.faq-card.is-active .faq-question-text {
    color: var(--color-primary);
}

/* Expand / Collapse Icon */
.faq-icon-wrapper {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: #f1f3f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13.5px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.25s ease, 
                color 0.25s ease;
}

.faq-card:hover .faq-icon-wrapper {
    background: rgba(139, 61, 255, 0.1);
    color: var(--color-primary);
}

.faq-card.is-active .faq-icon-wrapper {
    background: var(--color-primary-gradient);
    color: #ffffff;
    transform: rotate(180deg);
}

/* Smooth Accordion Body (CSS Grid Animation) */
.faq-collapse {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-card.is-active .faq-collapse {
    grid-template-rows: 1fr;
}

.faq-collapse-inner {
    overflow: hidden;
}

.faq-answer {
    padding: 0 28px 24px 28px;
    font-size: 15.5px;
    line-height: 1.72;
    color: #334155;
    border-top: 1px solid rgba(0, 13, 60, 0.05);
    padding-top: 16px;
}

.faq-answer p {
    margin: 0;
}

/* Staggered Scroll Reveal */
.faq-card.reveal-on-scroll[data-index="0"] { transition-delay: 0.05s; }
.faq-card.reveal-on-scroll[data-index="1"] { transition-delay: 0.15s; }
.faq-card.reveal-on-scroll[data-index="2"] { transition-delay: 0.25s; }
.faq-card.reveal-on-scroll[data-index="3"] { transition-delay: 0.35s; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .faq-card,
    .faq-trigger,
    .faq-icon-wrapper,
    .faq-collapse {
        transition: none !important;
        animation: none !important;
    }
}

/* Responsive Breakpoints */
@media (max-width: 860px) {
    .faq-section {
        padding: 75px 0 95px;
    }

    .faq-title {
        font-size: 32px;
    }

    .faq-trigger {
        padding: 20px 22px;
        font-size: 16.5px;
        gap: 16px;
    }

    .faq-answer {
        padding: 14px 22px 20px 22px;
        font-size: 15px;
    }

    .faq-icon-wrapper {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 12.5px;
    }
}

@media (max-width: 480px) {
    .faq-section {
        padding: 60px 0 80px;
    }

    .faq-title {
        font-size: 27px;
    }

    .faq-subtitle {
        font-size: 14.5px;
    }

    .faq-trigger {
        padding: 18px 18px;
        font-size: 15.5px;
        gap: 14px;
    }

    .faq-answer {
        padding: 12px 18px 18px 18px;
        font-size: 14.5px;
        line-height: 1.65;
    }
}
