/* ============================================================
   FAQ PAGE — faq.css
   Cyberskins design language. --cs-* tokens from layout.css.
   Secondary page rules: no min-height, no label above heading,
   heading max 2 lines, centered hero.
   ============================================================ */


/* ══════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════ */
.faq-hero {
    position: relative;
    background: var(--cs-bg-0) url('../img/other-hero-bg.png') center / cover no-repeat;
    padding-top: calc(var(--header-h, 80px) + 80px);
    padding-bottom: 80px;
    overflow: hidden;
    text-align: center;
}

/* Red radial glow at top center */
.faq-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 700px; height: 460px;
    background: radial-gradient(ellipse at top, rgba(245,34,45,0.12) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

/* Scan-line texture */
.faq-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255,255,255,0.010) 2px,
        rgba(255,255,255,0.010) 4px
    );
    pointer-events: none;
    z-index: 0;
}

.faq-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

/* Heading — slide up on load + periodic glitch */
.faq-hero__heading {
    font-family: 'Barlow Condensed', 'Rajdhani', sans-serif;
    font-weight: 800;
    font-size: clamp(52px, 8vw, 96px);
    line-height: 0.9;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--cs-txt);
    margin-bottom: 28px;
    animation: faqHeadIn .85s cubic-bezier(0.16, 1, 0.3, 1) both,
               faqGlitch 9s 1.5s infinite;
}

.faq-hero__heading em {
    color: var(--cs-red);
    font-style: normal;
}

/* Subtitle fade up */
.faq-hero__sub {
    font-size: 16px;
    line-height: 1.65;
    color: var(--cs-txt2);
    max-width: 520px;
    margin: 0 auto;
    animation: faqFadeUp .85s .25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── Hero animations ── */
@keyframes faqHeadIn {
    from {
        opacity: 0;
        transform: translateY(24px) skewX(-2deg);
        letter-spacing: 0.12em;
    }
    to {
        opacity: 1;
        transform: none;
        letter-spacing: 0.02em;
    }
}

@keyframes faqFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

/* Glitch: periodic RGB-split + translate on heading */
@keyframes faqGlitch {
    0%,  83%, 100% {
        transform: none;
        text-shadow: none;
        filter: none;
    }
    84% {
        transform: translateX(-3px);
        text-shadow: 3px 0 rgba(245,34,45,0.55), -3px 0 rgba(0,200,255,0.4);
        filter: contrast(1.05);
    }
    85% {
        transform: translateX(3px);
        text-shadow: -3px 0 rgba(245,34,45,0.55), 3px 0 rgba(0,200,255,0.4);
    }
    86% {
        transform: translateX(-1px) skewX(-0.5deg);
        text-shadow: 1px 0 rgba(245,34,45,0.3);
        filter: none;
    }
    87% {
        transform: none;
        text-shadow: none;
    }
    /* second micro-glitch */
    88% {
        transform: translateX(2px);
        text-shadow: -2px 0 rgba(245,34,45,0.35);
    }
    89% {
        transform: none;
        text-shadow: none;
    }
}


/* ══════════════════════════════════════════════
   CATEGORY TABS — sticky below header
   ══════════════════════════════════════════════ */
.faq-tabs-wrap {
    background: var(--cs-bg-1);
    border-bottom: 1px solid var(--cs-bdr);
    position: sticky;
    top: var(--header-h, 80px);
    z-index: 20;
}

.faq-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
}

.faq-tabs::-webkit-scrollbar { display: none; }

.faq-tab {
    flex-shrink: 0;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--cs-txt3);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 16px 22px;
    cursor: pointer;
    position: relative;
    transition: color .2s ease, border-color .2s ease;
}

.faq-tab:hover {
    color: var(--cs-txt2);
}

.faq-tab.is-active {
    color: var(--cs-txt);
    border-bottom-color: var(--cs-red);
}

/* Red dot indicator on active tab */
.faq-tab.is-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--cs-red);
    border-radius: 50%;
}


/* ══════════════════════════════════════════════
   ACCORDION BODY
   ══════════════════════════════════════════════ */
.faq-body {
    background: var(--cs-bg-0);
    padding: 64px 0 88px;
}

.faq-groups {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 52px;
}

/* ── Group ── */
.faq-group {
    display: flex;
    flex-direction: column;
}

/* Group label — horizontal rule with text (not an eyebrow/heading label) */
.faq-group__label {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--cs-txt3);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.faq-group__label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--cs-bdr);
}

/* ── Accordion list ── */
.faq-list {
    display: flex;
    flex-direction: column;
}

/* ── Item ── */
.faq-item {
    border-bottom: 1px solid var(--cs-bdr);
    position: relative;
    transition: border-color .25s ease;
}

.faq-item:first-child {
    border-top: 1px solid var(--cs-bdr);
}

/* Red left bar when open */
.faq-item.is-open {
    border-bottom-color: rgba(245,34,45,0.15);
}

.faq-item.is-open::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: var(--cs-red);
    box-shadow: 0 0 14px rgba(245,34,45,0.5);
}

/* Question button */
.faq-item__q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 20px 22px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: 'Manrope', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--cs-txt2);
    letter-spacing: 0.01em;
    line-height: 1.45;
    transition: color .2s ease, background .2s ease;
}

.faq-item:hover .faq-item__q {
    color: var(--cs-txt);
}

.faq-item.is-open .faq-item__q {
    color: var(--cs-txt);
    background: rgba(245,34,45,0.03);
}

/* Plus → minus icon (pure CSS) */
.faq-item__icon {
    width: 26px;
    height: 26px;
    border: 1.5px solid var(--cs-bdr2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    color: var(--cs-txt3);
    transition: border-color .25s ease, color .25s ease,
                background .25s ease, box-shadow .25s ease;
}

/* Horizontal bar */
.faq-item__icon::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 1.5px;
    background: currentColor;
    border-radius: 1px;
    transition: background .25s ease;
}

/* Vertical bar */
.faq-item__icon::after {
    content: '';
    position: absolute;
    width: 1.5px;
    height: 10px;
    background: currentColor;
    border-radius: 1px;
    transition: opacity .3s ease, transform .3s ease;
}

.faq-item.is-open .faq-item__icon {
    border-color: var(--cs-red);
    color: var(--cs-red);
    background: rgba(245,34,45,0.08);
    box-shadow: 0 0 12px rgba(245,34,45,0.22);
}

.faq-item.is-open .faq-item__icon::after {
    opacity: 0;
    transform: rotate(90deg);
}

/* Answer panel — JS sets inline max-height */
.faq-item__a {
    max-height: 0;
    overflow: hidden;
    transition: max-height .42s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item__a-inner {
    padding: 0 20px 24px 20px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    line-height: 1.78;
    color: var(--cs-txt2);
}

.faq-item__a-inner a {
    color: var(--cs-red);
    text-decoration: none;
    border-bottom: 1px solid rgba(245,34,45,0.3);
    transition: border-color .2s ease;
}

.faq-item__a-inner a:hover {
    border-color: var(--cs-red);
}


/* ── Scroll-in animation for groups ── */
.faq-group {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .55s ease, transform .55s ease;
}

.faq-group.is-visible {
    opacity: 1;
    transform: none;
}


/* ══════════════════════════════════════════════
   CTA CARD — "Still have questions?"
   ══════════════════════════════════════════════ */
.faq-cta {
    margin-top: 60px;
    padding: 36px 40px;
    background: var(--cs-bg-card);
    border: 1px solid var(--cs-bdr);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    position: relative;
    overflow: hidden;
    /* scroll-in starts hidden */
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .55s .1s ease, transform .55s .1s ease,
                border-color .3s ease, box-shadow .3s ease;
}

.faq-cta.is-visible {
    opacity: 1;
    transform: none;
}

/* Top gradient line on hover */
.faq-cta::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cs-red), transparent);
    opacity: 0;
    transition: opacity .35s ease;
}

/* Scan-line texture inside CTA */
.faq-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255,255,255,0.007) 2px,
        rgba(255,255,255,0.007) 4px
    );
    pointer-events: none;
}

.faq-cta:hover {
    border-color: rgba(245,34,45,0.22);
    box-shadow: 0 0 40px rgba(245,34,45,0.07);
}

.faq-cta:hover::before {
    opacity: 1;
}

.faq-cta__content {
    position: relative;
    z-index: 1;
}

.faq-cta__title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 30px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--cs-txt);
    line-height: 1;
    margin-bottom: 6px;
}

.faq-cta__sub {
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    color: var(--cs-txt2);
    line-height: 1.5;
}

.faq-cta__action {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}


/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .faq-hero { padding-bottom: 60px; }
    .faq-hero__sub { font-size: 14.5px; }

    .faq-tabs-wrap { top: 0; }
    .faq-tab { padding: 14px 16px; font-size: 11px; letter-spacing: 0.1em; }

    .faq-body { padding: 48px 0 64px; }
    .faq-groups { gap: 40px; }

    .faq-item__q { padding: 18px 14px; font-size: 14px; }
    .faq-item__a-inner { padding: 0 14px 20px; }

    .faq-cta {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
        padding: 28px 24px;
    }

    .btn-cs,
    .btn-cs-ghost { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .faq-hero__heading { font-size: clamp(40px, 12vw, 60px); }
    .faq-tab { padding: 13px 12px; }
}
