/* ====================================================
   FAQ Page Styles — Clash FAQ dedicated page
   ==================================================== */

/* ---- Page Hero ---- */
.faq-page-hero {
    background: linear-gradient(160deg, #ffffff 0%, #fafafa 100%);
    border-bottom: 1px solid var(--color-border);
    padding: 72px 20px 60px;
    text-align: center;
}

.faq-hero-inner {
    max-width: 820px;
    margin: 0 auto;
}

.faq-page-hero .section-label {
    margin-bottom: 16px;
}

.faq-page-hero h1 {
    font-size: 42px;
    font-weight: 400;
    color: var(--color-text-main);
    margin-bottom: 16px;
    line-height: 1.3;
}

.faq-page-hero h1 em {
    font-style: normal;
    color: var(--color-brand-orange);
}

.faq-hero-desc {
    font-size: 16px;
    color: var(--color-text-muted);
    max-width: 620px;
    margin: 0 auto 36px;
    line-height: 1.75;
}

/* ---- Search Box ---- */
.faq-search-wrap {
    position: relative;
    max-width: 620px;
    margin: 0 auto 28px;
}

.faq-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 15px;
    pointer-events: none;
}

.faq-search-input {
    width: 100%;
    padding: 16px 48px 16px 48px;
    font-size: 15px;
    font-family: var(--font-main);
    color: var(--color-text-main);
    background: #fff;
    border: 2px solid var(--color-border);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.faq-search-input:focus {
    border-color: var(--color-brand-orange);
    box-shadow: 0 0 0 4px rgba(247, 147, 26, 0.1);
}

.faq-search-input::placeholder {
    color: #bbb;
    font-size: 14px;
}

.faq-search-clear {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #bbb;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    display: none;
    transition: color 0.15s;
}

.faq-search-clear:hover {
    color: var(--color-text-muted);
}

.faq-search-clear.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Hero Stats Row ---- */
.faq-hero-stats {
    display: inline-flex;
    gap: 32px;
    background: #f5f5f7;
    border-radius: 10px;
    padding: 14px 28px;
    font-size: 13px;
    color: var(--color-text-muted);
    flex-wrap: wrap;
    justify-content: center;
}

.faq-hero-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.faq-hero-stats i {
    color: var(--color-brand-orange);
}

/* ---- Sticky Tab Bar ---- */
.faq-tabs-wrap {
    position: sticky;
    top: 80px;
    z-index: 90;
    background: #fff;
    border-bottom: 2px solid var(--color-border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.faq-tabs {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 4px;
}

.faq-tabs::-webkit-scrollbar {
    display: none;
}

.faq-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    border: none;
    border-bottom: 3px solid transparent;
    background: none;
    cursor: pointer;
    white-space: nowrap;
    font-family: var(--font-main);
    transition: color 0.2s, border-color 0.2s;
    flex-shrink: 0;
    margin-bottom: -2px;
}

.faq-tab i {
    font-size: 14px;
}

.faq-tab:hover {
    color: var(--color-brand-orange);
}

.faq-tab.active {
    color: var(--color-brand-orange);
    border-bottom-color: var(--color-brand-orange);
    font-weight: 600;
}

/* ---- No Results Message ---- */
.faq-no-results {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
}

.faq-no-results i {
    font-size: 48px;
    color: var(--color-border);
    margin-bottom: 16px;
    display: block;
}

.faq-no-results p {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 8px;
}

.faq-no-results span {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* ---- Category Section ---- */
.faq-category {
    background: #ffffff;
    padding: 72px 20px;
    border-top: 1px solid var(--color-border);
}

.faq-category--alt {
    background: #f9f9f9;
}

.faq-category.hidden {
    display: none;
}

.faq-category-inner {
    max-width: 900px;
    margin: 0 auto;
}

/* ---- Category Header ---- */
.faq-category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.faq-category-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(247, 147, 26, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--color-brand-orange);
    flex-shrink: 0;
}

.faq-category-header > div:nth-child(2) {
    flex: 1;
    min-width: 160px;
}

.faq-category-header h2 {
    font-size: 26px;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 4px;
}

.faq-category-header > div:nth-child(2) p {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.55;
}

.faq-category-count {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ---- FAQ List & Items ---- */
.faq-list {
    display: flex;
    flex-direction: column;
}

.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child {
    border-top: 1px solid var(--color-border);
}

.faq-item.hidden {
    display: none;
}

/* ---- FAQ Question Button ---- */
.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 22px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-main);
    text-align: left;
    gap: 20px;
    font-family: var(--font-main);
    line-height: 1.5;
    transition: color 0.2s;
}

.faq-question:hover {
    color: var(--color-brand-orange);
}

.faq-question:hover .faq-chevron {
    color: var(--color-brand-orange);
}

.faq-item.open .faq-question {
    color: var(--color-brand-orange);
}

.faq-chevron {
    font-size: 13px;
    color: var(--color-text-muted);
    flex-shrink: 0;
    transition: transform 0.3s ease, color 0.2s;
}

.faq-item.open .faq-chevron {
    transform: rotate(-180deg);
    color: var(--color-brand-orange);
}

/* ---- FAQ Answer Panel ---- */
.faq-answer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease;
}

.faq-answer.open {
    max-height: 1200px;
}

.faq-answer-body {
    padding: 4px 4px 28px;
}

.faq-answer-body p {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.85;
    margin-bottom: 14px;
}

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

/* ---- Tip / Info Callout ---- */
.faq-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(59, 130, 246, 0.04);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 6px;
    padding: 14px 16px;
    font-size: 13px;
    color: #1e40af;
    line-height: 1.65;
    margin-top: 16px;
}

.faq-tip i {
    flex-shrink: 0;
    margin-top: 1px;
}

.faq-tip--green {
    background: rgba(16, 185, 129, 0.04);
    border-color: rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.faq-tip--blue {
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.2);
    color: #1e3a8a;
}

.faq-tip--warn {
    background: rgba(245, 158, 11, 0.05);
    border-color: rgba(245, 158, 11, 0.25);
    border-left: 4px solid #f59e0b;
    color: #78350f;
}

/* ---- Unordered and Ordered Lists ---- */
.faq-ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}

.faq-ul li {
    font-size: 14px;
    color: var(--color-text-muted);
    padding-left: 16px;
    position: relative;
    line-height: 1.7;
}

.faq-ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--color-brand-orange);
    font-size: 11px;
    top: 4px;
}

.faq-ul--numbered {
    counter-reset: faq-counter;
    gap: 10px;
}

.faq-ul--numbered li {
    counter-increment: faq-counter;
    padding-left: 28px;
}

.faq-ul--numbered li::before {
    content: counter(faq-counter);
    background: var(--color-brand-orange);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 2px;
}

.faq-ol {
    list-style: decimal;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}

.faq-ol li {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.75;
    padding-left: 4px;
}

.faq-ol li strong {
    color: var(--color-text-main);
}

/* ---- Inline Link ---- */
.faq-link {
    color: var(--color-brand-orange);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
}

.faq-link:hover {
    color: var(--color-brand-orange-hover);
}

/* ---- Comparison Grid ---- */
.faq-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}

.faq-compare-item {
    background: #f9f9f9;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 18px 20px;
}

.faq-compare-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-muted);
    background: #ebebeb;
    padding: 3px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.faq-compare-label--orange {
    background: rgba(247, 147, 26, 0.12);
    color: #c45f00;
}

.faq-compare-item ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.faq-compare-item ul li {
    font-size: 13px;
    color: var(--color-text-muted);
    padding-left: 14px;
    position: relative;
    line-height: 1.6;
}

.faq-compare-item ul li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--color-brand-orange);
    font-weight: 700;
}

/* ---- Platform Grid ---- */
.faq-platform-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
}

.faq-platform-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: #f5f5f7;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 16px 24px;
    text-align: center;
    min-width: 130px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-platform-item:hover {
    border-color: var(--color-brand-orange);
    box-shadow: 0 4px 12px rgba(247, 147, 26, 0.08);
}

.faq-platform-item i {
    font-size: 28px;
    color: var(--color-text-main);
}

.faq-platform-item strong {
    font-size: 13px;
    color: var(--color-text-main);
}

.faq-platform-item span {
    font-size: 11px;
    color: var(--color-text-muted);
    line-height: 1.4;
}

/* ---- Alt Options Grid ---- */
.faq-alt-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0;
}

.faq-alt-item {
    background: #f9f9f9;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 14px 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.faq-alt-item--recommend {
    border-color: var(--color-brand-orange);
    background: rgba(247, 147, 26, 0.03);
}

.faq-alt-badge {
    position: absolute;
    top: -1px;
    right: 14px;
    background: var(--color-brand-orange);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 0 0 6px 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.faq-alt-item strong {
    font-size: 14px;
    color: var(--color-text-main);
    font-weight: 600;
}

.faq-alt-item span {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.55;
}

/* ---- Mode Comparison Table ---- */
.faq-mode-table {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    font-size: 14px;
}

.faq-mode-row {
    display: grid;
    grid-template-columns: 200px 1fr 160px 100px;
    border-bottom: 1px solid var(--color-border);
}

.faq-mode-row:last-child {
    border-bottom: none;
}

.faq-mode-head {
    background: #f5f5f7;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
}

.faq-mode-row > div {
    padding: 14px 16px;
    border-right: 1px solid var(--color-border);
    line-height: 1.55;
    color: var(--color-text-muted);
}

.faq-mode-row > div:last-child {
    border-right: none;
}

.faq-mode-row > div strong {
    color: var(--color-text-main);
}

.faq-mode-row:not(.faq-mode-head):hover > div {
    background: #fafafa;
}

/* ---- Badges ---- */
.faq-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: #ebebeb;
    color: var(--color-text-muted);
}

.faq-badge--green {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.faq-badge--blue {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ---- Code Snippet ---- */
.faq-code {
    background: var(--color-darker-bg);
    border: 1px solid var(--color-border-dark);
    border-left: 3px solid var(--color-brand-orange);
    border-radius: 4px;
    padding: 12px 16px;
    font-family: 'Courier New', 'Consolas', 'Menlo', monospace;
    font-size: 13px;
    color: #f7931a;
    margin-top: 10px;
    overflow-x: auto;
    white-space: nowrap;
}

/* ---- CTA Section ---- */
.faq-cta {
    background: linear-gradient(135deg, var(--color-darker-bg) 0%, #1c1206 100%);
    border-top: 1px solid rgba(247, 147, 26, 0.18);
    padding: 80px 20px;
}

.faq-cta-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.faq-cta-text .section-label {
    margin-bottom: 12px;
}

.faq-cta-text h2 {
    font-size: 32px;
    font-weight: 400;
    color: #fff;
    margin-bottom: 14px;
}

.faq-cta-text p {
    color: var(--color-text-light-muted);
    font-size: 15px;
    max-width: 480px;
    line-height: 1.75;
}

.faq-cta-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

.faq-cta-actions .btn {
    min-width: 220px;
    justify-content: center;
}

/* ---- Search Highlight ---- */
.faq-highlight {
    background: rgba(247, 147, 26, 0.18);
    color: var(--color-text-main);
    border-radius: 2px;
    padding: 0 2px;
    font-weight: 600;
}

/* ====================================================
   Responsive Design
   ==================================================== */
@media (max-width: 992px) {
    .faq-page-hero h1 {
        font-size: 34px;
    }

    .faq-compare-grid {
        grid-template-columns: 1fr;
    }

    .faq-mode-row {
        grid-template-columns: 180px 1fr 1fr;
    }

    .faq-mode-row > div:nth-child(4) {
        display: none;
    }

    .faq-cta-inner {
        flex-direction: column;
        text-align: center;
    }

    .faq-cta-text p {
        margin: 0 auto;
    }

    .faq-cta-actions {
        width: 100%;
        max-width: 360px;
    }
}

@media (max-width: 768px) {
    .faq-page-hero {
        padding: 52px 20px 44px;
    }

    .faq-page-hero h1 {
        font-size: 28px;
    }

    .faq-hero-desc {
        font-size: 15px;
    }

    .faq-hero-stats {
        gap: 16px;
        padding: 12px 20px;
        font-size: 12px;
    }

    .faq-search-input {
        font-size: 14px;
        padding: 14px 44px 14px 44px;
    }

    .faq-tabs {
        padding: 0 12px;
        gap: 0;
    }

    .faq-tab {
        padding: 14px 12px;
        font-size: 12px;
    }

    .faq-tab i {
        font-size: 15px;
    }

    .faq-category {
        padding: 52px 16px;
    }

    .faq-category-header {
        gap: 12px;
        margin-bottom: 28px;
    }

    .faq-category-header h2 {
        font-size: 22px;
    }

    .faq-question {
        font-size: 14px;
        padding: 18px 4px;
    }

    .faq-mode-table {
        overflow-x: auto;
    }

    .faq-mode-row {
        grid-template-columns: 160px 1fr;
        min-width: 480px;
    }

    .faq-mode-row > div:nth-child(3),
    .faq-mode-row > div:nth-child(4) {
        display: none;
    }

    .faq-platform-grid {
        gap: 8px;
    }

    .faq-platform-item {
        min-width: 110px;
        padding: 14px 16px;
    }

    .faq-cta-actions .btn {
        width: 100%;
    }

    .faq-cta-text h2 {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .faq-tab span {
        display: none;
    }

    .faq-tab {
        padding: 14px 10px;
    }

    .faq-tab i {
        font-size: 17px;
    }

    .faq-platform-grid {
        justify-content: center;
    }
}
