/* ================================================================
   FAQ — Pusat Bantuan
   Prefix: faq-*
   Layout: Bootstrap 5 (row/col/container/d-*)
   CSS ini HANYA untuk visual styling, bukan layout.
   ================================================================ */

/* ================================================================
   HERO — same structure as regulasi
   ================================================================ */
.faq-hero-wrap {
    position: relative;
    margin-bottom: 48px;
}
.faq-hero {
    position: relative; overflow: hidden;
    background: linear-gradient(170deg, var(--teal-500) 0%, var(--teal-600) 40%, var(--teal-700) 100%);
    padding: 56px 24px 48px;
}
.faq-hero-bg {
    position: absolute; inset: 0; overflow: hidden;
    pointer-events: none; z-index: 0;
}
.faq-orb {
    position: absolute; border-radius: 50%;
    opacity: 0.06; filter: blur(60px);
    animation: faqFloat 16s ease-in-out infinite;
}
.faq-orb-1 { width: 400px; height: 400px; background: #fff; top: -120px; right: -100px; }
.faq-orb-2 { width: 260px; height: 260px; background: #fff; bottom: -80px; left: 3%; animation-delay: -6s; }
.faq-orb-3 { width: 180px; height: 180px; background: #fff; top: 25%; left: 50%; animation-delay: -10s; }
@keyframes faqFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-14px) scale(1.03); }
}

.faq-hero-inner {
    position: relative; z-index: 2;
    max-width: 520px; margin: 0 auto;
    text-align: center;
}
.faq-hero-icon {
    width: 52px; height: 52px; border-radius: 16px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px; font-size: 22px; color: #fff;
}
.faq-hero-eyebrow {
    font-size: 12px; font-weight: 600; letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin: 0 0 12px;
}
.faq-hero-title {
    color: #fff; font-size: 32px; font-weight: 800;
    margin: 0 0 12px; line-height: 1.25;
}
.faq-hero-desc {
    color: rgba(255,255,255,0.7); font-size: 14px;
    margin: 0 0 20px; line-height: 1.7;
    max-width: 460px; margin-left: auto; margin-right: auto;
}

/* ===== SEARCH BAR (overlapping hero bottom) ===== */
.faq-hero-search-wrap {
    position: absolute; bottom: 0; left: 0; right: 0;
    transform: translateY(50%);
    z-index: 10;
}
.faq-hero-search {
    position: relative;
}
.faq-hero-search input {
    width: 100%; padding: 18px 24px 18px 54px;
    border: none; border-radius: 20px;
    font-size: 15px; font-family: 'Poppins', sans-serif;
    background: #fff; color: var(--gray-900);
    outline: none; transition: var(--ease);
    box-shadow: 0 8px 40px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
}
.faq-hero-search input::placeholder { color: var(--gray-400); }
.faq-hero-search input:focus {
    box-shadow: 0 12px 48px rgba(0,0,0,0.12), 0 0 0 4px rgba(44,197,189,0.15);
}
.faq-hero-search > i {
    position: absolute; left: 20px; top: 50%;
    transform: translateY(-50%);
    color: var(--teal-500); font-size: 16px;
}


/* ================================================================
   STICKY CATEGORY BAR
   ================================================================ */
.faq-catbar-sentinel {
    height: 0;
    margin: 0;
}

.faq-catbar {
    position: relative;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 12px 0;
    margin-bottom: 32px;
    transition: box-shadow 0.3s ease;
}

.faq-catbar.is-sticky {
    position: fixed;
    left: 0; right: 0;
    z-index: 1020;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    animation: faqSlideDown 0.25s ease;
}

@keyframes faqSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.faq-catbar-scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE/Edge */
    -webkit-overflow-scrolling: touch;
    padding: 2px 4px;
}
.faq-catbar-scroll::-webkit-scrollbar {
    display: none;                  /* Chrome/Safari */
}

.faq-catbar-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    border: 1px solid var(--teal-200);
    background: linear-gradient(135deg, var(--teal-50) 0%, #fff);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--teal-700);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(.22,1,.36,1);
    flex-shrink: 0;
}

.faq-catbar-item:hover {
    background: var(--teal-50);
    border-color: var(--teal-200);
    color: var(--teal-700);
}

.faq-catbar-item.active {
    background: var(--teal-500);
    border-color: var(--teal-500);
    color: #fff;
    box-shadow: 0 2px 8px rgba(44,197,189,0.3);
}

.faq-catbar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    width: 18px;
    flex-shrink: 0;
}

.faq-catbar-label {
    line-height: 1;
}

.faq-catbar-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    background: var(--teal-600);
    color: #FFF;
    transition: background 0.25s ease;
}

.faq-catbar-item.active .faq-catbar-count {
    background: rgba(255,255,255,0.2);
}


/* ================================================================
   SEARCH RESULTS
   ================================================================ */
.faq-search-results {
    margin-bottom: 32px;
    padding-top: 8px;
}
.faq-search-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
    font-size: 13px; color: var(--gray-500);
}
.faq-search-header strong { color: var(--gray-900); }
.faq-search-clear {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 14px; border-radius: 100px;
    background: var(--gray-100); border: 1px solid var(--gray-200);
    font-size: 12px; font-weight: 600; color: var(--gray-500);
    cursor: pointer; transition: var(--ease);
    font-family: 'Poppins', sans-serif;
}
.faq-search-clear:hover {
    background: #fef2f2; color: #dc2626; border-color: #fecaca;
}
.faq-search-list {
    display: flex; flex-direction: column; gap: 8px;
}
.faq-search-item {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 16px 20px; border-radius: var(--r-md);
    background: var(--white); border: 1px solid var(--gray-200);
    cursor: pointer; transition: var(--ease);
}
.faq-search-item:hover {
    border-color: var(--teal-300);
    box-shadow: 0 4px 16px rgba(44,197,189,0.08);
    transform: translateY(-1px);
}
.faq-search-item-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--teal-100); color: var(--teal-700);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
}
.faq-search-item-content { flex: 1; min-width: 0; }
.faq-search-item-q {
    font-size: 14px; font-weight: 600; color: var(--gray-900);
    margin-bottom: 4px; line-height: 1.4;
}
.faq-search-item-q mark {
    background: var(--teal-100); color: var(--teal-800);
    border-radius: 3px; padding: 0 2px;
}
.faq-search-item-cat {
    font-size: 11px; font-weight: 600; color: var(--gray-500);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.faq-search-empty {
    text-align: center; padding: 48px 24px;
}
.faq-search-empty i {
    font-size: 40px; color: var(--gray-200); margin-bottom: 14px; display: block;
}
.faq-search-empty h5 {
    font-size: 15px; font-weight: 700; color: var(--gray-700); margin-bottom: 6px;
}
.faq-search-empty p {
    font-size: 13px; color: var(--gray-500); margin: 0;
}


/* ================================================================
   SECTION HEADERS
   ================================================================ */
.faq-sec-header {
    text-align: center; margin-bottom: 24px;
}
.faq-sec-title {
    font-size: 20px; font-weight: 800; color: var(--gray-900); margin: 0 0 4px;
}
.faq-sec-desc {
    font-size: 12px; color: var(--gray-400); font-weight: 500;
}


/* ================================================================
   POPULAR BADGE
   ================================================================ */
.faq-popular-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 14px; border-radius: 100px;
    background: linear-gradient(135deg, var(--teal-100), var(--teal-200));
    border: 1px solid var(--teal-300);
    font-size: 12px; font-weight: 700; color: var(--teal-800);
    margin-bottom: 10px;
}
.faq-popular-badge i { font-size: 11px; }


/* ================================================================
   CATEGORY SECTION HEADER
   ================================================================ */
.faq-cat-section-header {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gray-100);
}
.faq-cat-section-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
    background: var(--teal-100); color: var(--teal-700);
}
.faq-cat-section-title {
    font-size: 18px; font-weight: 800; color: var(--gray-900);
    margin: 0 0 2px;
}
.faq-cat-section-desc {
    font-size: 12px; color: var(--gray-500); margin: 0;
}


/* ================================================================
   ACCORDION
   ================================================================ */
.faq-accordion-wrap {
    display: flex; flex-direction: column;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--sh-sm);
}
.faq-accordion-item {
    border-bottom: 1px solid var(--gray-100);
}
.faq-accordion-item:last-child {
    border-bottom: none;
}
.faq-accordion-btn {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; gap: 16px;
    padding: 18px 22px;
    background: transparent; border: none;
    cursor: pointer; transition: var(--ease);
    text-align: left;
    font-family: 'Poppins', sans-serif;
}
.faq-accordion-btn:hover {
    background: var(--gray-50);
}
.faq-accordion-q {
    font-size: 14px; font-weight: 600;
    color: var(--gray-900); line-height: 1.5;
    flex: 1;
}
.faq-accordion-icon {
    width: 30px; height: 30px;
    border-radius: 8px;
    background: var(--gray-100);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; color: var(--gray-500);
    flex-shrink: 0;
    transition: all 0.35s cubic-bezier(.22,1,.36,1);
}
.faq-accordion-item.active .faq-accordion-icon {
    background: var(--teal-500);
    color: #fff;
    transform: rotate(45deg);
    box-shadow: 0 2px 8px rgba(44,197,189,0.3);
}
.faq-accordion-item.active .faq-accordion-btn {
    background: var(--teal-50);
}

/* Body */
.faq-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(.22,1,.36,1),
                padding 0.3s ease;
}
.faq-accordion-item.active .faq-accordion-body {
    max-height: 600px;
}
.faq-accordion-answer {
    padding: 0 22px 20px 22px;
    font-size: 14px; line-height: 1.8;
    color: var(--gray-500);
}
.faq-accordion-answer a {
    color: var(--teal-700); font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.faq-accordion-answer a:hover {
    color: var(--teal-500);
}


/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes faqFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.faq-anim {
    animation: faqFadeUp 0.5s ease forwards; opacity: 0;
}


/* ================================================================
   MOBILE
   ================================================================ */
@media (max-width: 575.98px) {
    .faq-hero { padding: 40px 16px 40px; }
    .faq-hero-wrap { margin-bottom: 56px; }
    .faq-hero-icon { width: 44px; height: 44px; font-size: 18px; border-radius: 12px; }
    .faq-hero-title { font-size: 22px; }
    .faq-hero-desc { font-size: 13px; }
    .faq-hero-eyebrow { font-size: 10px; }
    .faq-hero-search input {
        padding: 15px 16px 15px 46px;
        font-size: 16px; border-radius: 16px;
    }
    .faq-hero-search > i { left: 16px; font-size: 14px; }

    .faq-sec-title { font-size: 18px; }

    .faq-catbar { padding: 10px 0; margin-bottom: 24px; }
    .faq-catbar-scroll { gap: 6px; padding: 2px 0; }
    .faq-catbar-item { padding: 7px 12px; font-size: 12px; gap: 6px; }
    .faq-catbar-icon { font-size: 12px; width: 16px; }
    .faq-catbar-count { min-width: 18px; height: 18px; font-size: 10px; padding: 0 5px; }

    .faq-cat-section-header { gap: 12px; }
    .faq-cat-section-icon { width: 38px; height: 38px; font-size: 16px; }
    .faq-cat-section-title { font-size: 16px; }

    .faq-accordion-btn { padding: 16px 16px; gap: 12px; }
    .faq-accordion-q { font-size: 13px; }
    .faq-accordion-icon { width: 28px; height: 28px; font-size: 11px; }
    .faq-accordion-answer { padding: 0 16px 16px; font-size: 13px; }

    .faq-search-item { padding: 14px 16px; gap: 12px; }
    .faq-search-item-icon { width: 32px; height: 32px; font-size: 13px; }
    .faq-search-item-q { font-size: 13px; }
}