/**
 * FAQ Frontend CSS - Dark Theme
 * Matches homepage dark theme: #080b12 background system
 */

/* ---- Variables ---- */
:root {
    --faq-bg:           #0f1117;
    --faq-card-bg:      #1a1d27;
    --faq-card-border:  #2a2d3a;
    --faq-card-active:  #1f2233;
    --faq-accent:       #4f8ef7;
    --faq-accent-2:     #7c5ef8;
    --faq-text:         #f0f2f8;
    --faq-text-muted:   #9aa0b8;
    --faq-answer-text:  #b8bfce;
    --faq-badge-bg:     rgba(79,142,247,0.12);
    --faq-badge-border: rgba(79,142,247,0.3);
    --faq-glow:         rgba(79,142,247,0.18);
}

body { background: #0f1117 !important; }

/* ---- Page Wrapper ---- */
.faq-frontend-container {
    background: var(--faq-bg);
    min-height: 100vh;
    padding: 0 0 80px 0;
    box-sizing: border-box;
}

/* ---- Section Header ---- */
.faq-section-header {
    text-align: center;
    padding: 72px 20px 48px;
}

.faq-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--faq-badge-bg);
    border: 1px solid var(--faq-badge-border);
    border-radius: 20px;
    padding: 7px 18px;
    font-size: 12px;
    font-weight: 600;
    color: var(--faq-accent);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.faq-badge i { font-size: 12px; }

.faq-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--faq-text);
    margin: 0 0 12px 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.faq-title span {
    background: linear-gradient(135deg, var(--faq-accent) 0%, var(--faq-accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.faq-subtitle {
    font-size: 17px;
    color: var(--faq-text-muted);
    margin: 0 0 32px 0;
    line-height: 1.5;
}

/* ---- Search ---- */
.faq-search-container {
    margin-bottom: 20px;
}

.faq-search-box {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

.faq-search-box::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--faq-text-muted);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.faq-search-input {
    width: 100%;
    padding: 14px 20px 14px 46px;
    background: var(--faq-card-bg);
    border: 1px solid var(--faq-card-border);
    border-radius: 12px;
    font-size: 15px;
    color: var(--faq-text);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-search-input::placeholder { color: var(--faq-text-muted); }

.faq-search-input:focus {
    border-color: var(--faq-accent);
    box-shadow: 0 0 0 3px rgba(79,142,247,0.15);
}

/* ---- Category Chips ---- */
.faq-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
}

.faq-chip {
    appearance: none;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--faq-text-muted);
    padding: 7px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.08s;
    letter-spacing: 0.5px;
}

.faq-chip:hover {
    background: rgba(79,142,247,0.1);
    border-color: rgba(79,142,247,0.3);
    color: var(--faq-accent);
}

.faq-chip:active { transform: translateY(1px); }

.faq-chip.active {
    background: var(--faq-accent);
    border-color: var(--faq-accent);
    color: #fff;
}

/* ---- Main Content ---- */
.faq-main-background {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Grid ---- */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 0;
    align-items: start;
}

/* ---- FAQ Item (Accordion Card) ---- */
.faq-item {
    background: var(--faq-card-bg);
    border: 1px solid var(--faq-card-border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.faq-item:hover {
    border-color: rgba(79,142,247,0.4);
}

.faq-item.active {
    border-color: var(--faq-accent);
    box-shadow: 0 0 0 1px var(--faq-accent), 0 4px 20px var(--faq-glow);
}

/* Top accent line on active */
.faq-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--faq-accent), var(--faq-accent-2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.faq-item.active::before { transform: scaleX(1); }

/* ---- Question Row ---- */
.faq-question {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
    background: transparent;
    border: none;
    border-radius: 14px 14px 0 0;
    position: relative;
    z-index: 1;
}

.faq-question:hover { background: rgba(255,255,255,0.02); }

.faq-item.active .faq-question { background: rgba(79,142,247,0.04); }

.faq-question h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--faq-text);
    line-height: 1.45;
    flex: 1;
    padding-right: 16px;
}

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

/* Toggle icon */
.faq-toggle-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--faq-card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    color: var(--faq-text-muted);
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.3s;
    font-style: normal;
}

.faq-item.active .faq-toggle-icon {
    background: var(--faq-accent);
    border-color: var(--faq-accent);
    color: #fff;
    transform: rotate(45deg);
}

/* ---- Answer Panel ---- */
.faq-answer {
    display: none;
    padding: 0 24px;
    border-top: 1px solid var(--faq-card-border);
    background: rgba(0,0,0,0.18);
}

.faq-answer.active {
    display: block;
    padding: 18px 24px 22px;
}

.faq-answer-content {
    color: var(--faq-answer-text);
    font-size: 15px;
    line-height: 1.75;
}

.faq-answer-content p { margin: 0 0 12px 0; }
.faq-answer-content p:last-child { margin-bottom: 0; }
.faq-answer-content strong { color: var(--faq-text); font-weight: 600; }
.faq-answer-content a { color: var(--faq-accent); text-decoration: none; }
.faq-answer-content a:hover { text-decoration: underline; }

.faq-answer-content ul,
.faq-answer-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.faq-answer-content li { margin-bottom: 6px; }

/* ---- No Results ---- */
.faq-no-results {
    text-align: center;
    padding: 56px 20px;
    background: var(--faq-card-bg);
    border: 1px solid var(--faq-card-border);
    border-radius: 14px;
    margin-top: 12px;
}

.faq-no-results p {
    margin: 0;
    font-size: 16px;
    color: var(--faq-text-muted);
    font-style: italic;
}

/* ---- Empty State ---- */
.faq-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--faq-card-bg);
    border: 1px solid var(--faq-card-border);
    border-radius: 18px;
}

.faq-empty-icon {
    font-size: 64px;
    color: var(--faq-text-muted);
    opacity: 0.35;
    margin-bottom: 18px;
}

.faq-empty-title {
    font-size: 22px;
    color: var(--faq-text);
    margin: 0 0 10px 0;
    font-weight: 600;
}

.faq-empty-text {
    color: var(--faq-text-muted);
    font-size: 15px;
    margin: 0 0 28px 0;
    line-height: 1.5;
}

.faq-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--faq-accent);
    color: #fff;
    padding: 11px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.faq-back-btn:hover {
    background: #3a7ae0;
    box-shadow: 0 6px 20px rgba(79,142,247,0.38);
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

/* ---- Animations ---- */
@keyframes faqCardIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.faq-item.faq-fade-in { animation: faqCardIn 0.35s ease both; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .faq-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .faq-title { font-size: 30px; }
    .faq-section-header { padding: 48px 16px 36px; }
    .faq-main-background { padding: 0 12px; }
    .faq-grid { gap: 10px; }
    .faq-question { padding: 16px 18px; }
    .faq-question h3 { font-size: 15px; }
    .faq-answer.active { padding: 14px 18px 18px; }
    .faq-answer-content { font-size: 14px; }
}

@media (max-width: 480px) {
    .faq-title { font-size: 26px; }
    .faq-section-header { padding: 36px 12px 28px; }
    .faq-grid { gap: 8px; }
    .faq-question h3 { font-size: 14px; }
    .faq-chips { gap: 6px; }
    .faq-chip { padding: 6px 12px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    .faq-item, .faq-chip { transition: none; }
    .faq-item.faq-fade-in { animation: none; opacity: 1; }
}
