/* =================================================== */
/* FAQ — akordeon beranimasi                           */
/* Dipakai di /faq, beranda, dan halaman layanan.      */
/* Semua aturan di-scope di bawah .faq-* agar tidak    */
/* bentrok dengan layanan-acc.css yang selektornya     */
/* global (.item, .title, .content, input[type=radio]) */
/* =================================================== */

.faq-accordion,
.faq-toolbar,
.faq-cta {
    --faq-primary: #0d2c4a;
    --faq-accent: #f0a500;
}

/* ---------- Toolbar: pencarian + pil kategori ---------- */

.faq-search-wrap {
    position: relative;
    max-width: 560px;
    margin: 0 auto 24px;
}

.faq-search-wrap .faq-search-icon {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    color: #9aa5b1;
    pointer-events: none;
}

.faq-search {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: 1px solid rgba(13, 44, 74, 0.15);
    border-radius: 50px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.faq-search:focus {
    border-color: var(--faq-primary, #0d2c4a);
    box-shadow: 0 0 0 4px rgba(13, 44, 74, 0.1);
}

.faq-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.faq-pill {
    padding: 8px 20px;
    border: 2px solid rgba(13, 44, 74, 0.15);
    border-radius: 50px;
    background: transparent;
    color: var(--faq-primary, #0d2c4a);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-pill:hover {
    border-color: var(--faq-primary, #0d2c4a);
}

.faq-pill.active {
    background: var(--faq-primary, #0d2c4a);
    border-color: var(--faq-primary, #0d2c4a);
    color: #fff;
}

.faq-count {
    text-align: center;
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 28px;
}

/* ---------- Kartu pertanyaan ---------- */

/*
 * Animasi masuk memakai keyframes, BUKAN AOS. AOS di situs ini diinisialisasi
 * dengan once:true pada event load, sehingga item yang belum pernah masuk
 * viewport akan tetap transparan ketika filter memindahkannya ke atas.
 * Delay bertingkat dibaca dari variabel --i yang di-set ulang oleh faq.js.
 */
@keyframes faqIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.faq-accordion .faq-item {
    border: 1px solid rgba(13, 44, 74, 0.08);
    border-radius: 16px !important;
    overflow: hidden;
    margin-bottom: 14px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.faq-accordion .faq-item.faq-animate {
    animation: faqIn 0.45s ease both;
    animation-delay: calc(var(--i, 0) * 60ms);
}

.faq-accordion .faq-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(13, 44, 74, 0.12);
}

.faq-accordion .faq-question {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 20px 24px;
    background: #fff;
    color: var(--faq-primary, #0d2c4a);
    font-size: 1.02rem;
    font-weight: 600;
    text-align: left;
    box-shadow: none;
    transition: all 0.35s ease;
}

.faq-accordion .faq-question:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 44, 74, 0.2);
}

/* Bootstrap memasang chevron SVG sendiri lewat ::after — dimatikan
   karena kita memakai ikon Bootstrap Icons yang bisa diputar sendiri. */
.faq-accordion .faq-question::after {
    display: none !important;
}

.faq-accordion .faq-question:not(.collapsed) {
    background: linear-gradient(45deg, var(--faq-primary, #0d2c4a), #1a4a7a);
    color: #fff;
}

.faq-number {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(13, 44, 74, 0.08);
    color: var(--faq-primary, #0d2c4a);
    font-size: 14px;
    font-weight: 700;
    transition: all 0.35s ease;
}

.faq-accordion .faq-question:not(.collapsed) .faq-number {
    background: rgba(255, 255, 255, 0.15);
    color: var(--faq-accent, #f0a500);
}

.faq-question-text {
    flex-grow: 1;
}

.faq-chevron {
    flex-shrink: 0;
    font-size: 18px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-accordion .faq-question:not(.collapsed) .faq-chevron {
    transform: rotate(180deg);
}

/* Isi jawaban menyelinap masuk setelah panel selesai membuka */
.faq-accordion .faq-answer {
    padding: 20px 24px 24px;
    color: #55606b;
    line-height: 1.75;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.35s ease 0.1s, transform 0.35s ease 0.1s;
}

.faq-accordion .accordion-collapse.show .faq-answer {
    opacity: 1;
    transform: translateY(0);
}

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

.faq-accordion .faq-answer a {
    color: var(--faq-primary, #0d2c4a);
    font-weight: 600;
    text-decoration: underline;
}

/* ---------- Empty state ---------- */

.faq-no-results {
    display: none;
    text-align: center;
    padding: 48px 20px;
    color: #6c757d;
}

.faq-no-results i {
    font-size: 42px;
    color: rgba(13, 44, 74, 0.25);
    display: block;
    margin-bottom: 12px;
}

/* ---------- CTA ---------- */

.faq-cta {
    margin-top: 48px;
    padding: 40px;
    border-radius: 16px;
    background: linear-gradient(45deg, var(--faq-primary, #0d2c4a), #1a4a7a);
    color: #fff;
    box-shadow: 0 15px 40px rgba(13, 44, 74, 0.2);
}

.faq-cta-title {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.faq-cta-text {
    opacity: 0.9;
}

.faq-cta-btn {
    display: inline-block;
    margin: 6px 8px 0 0;
    padding: 11px 26px;
    border: 2px solid var(--faq-accent, #f0a500);
    border-radius: 50px;
    color: var(--faq-accent, #f0a500);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.faq-cta-btn:hover,
.faq-cta-btn:focus {
    background: var(--faq-accent, #f0a500);
    color: var(--faq-primary, #0d2c4a);
}

/* ---------- Responsif ---------- */

@media (max-width: 767.98px) {
    .faq-accordion .faq-question {
        padding: 16px 18px;
        gap: 12px;
        font-size: 0.96rem;
    }

    /* Nomor urut disembunyikan agar teks pertanyaan dapat ruang lebih lega */
    .faq-number {
        display: none;
    }

    .faq-accordion .faq-answer {
        padding: 16px 18px 20px;
    }

    /* Pil kategori digeser horizontal, bukan menumpuk ke bawah */
    .faq-pills {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }

    .faq-pill {
        flex: 0 0 auto;
    }

    .faq-cta {
        padding: 28px 20px;
        text-align: center;
    }

    .faq-cta-title {
        font-size: 21px;
    }

    .faq-cta-btn {
        display: block;
        margin: 10px 0 0;
        text-align: center;
    }
}
