/* ===== FAQ Page Styles ===== */
/* Styles specific to faq.html */

.faq {
    margin-top: 55px;
    margin-bottom: 80px;
}

.faq__header {
    margin-bottom: 32px;
}

.faq__title {
    font-family: 'Neue Machina', sans-serif;
    font-weight: 700;
    font-size: 48px;
    line-height: 52px;
    color: #ffffff;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
    min-height: 52px;
}

/* Fix spacing during scramble animation */
.faq__title .scramble-wrapper {
    letter-spacing: normal;
    margin: 0 -1px;
}

/* FAQ scramble animation */
.faq-scramble-char {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    color: transparent;
    -webkit-text-stroke: 0.6px #ffffff;
}

.faq-placeholder {
    visibility: hidden;
}

.faq__subtitle {
    font-family: 'Neue Machina', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    color: #606061;
    margin: 0;
}

/* FAQ Categories */
.faq__categories {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
    background: #050508;
    padding: 4px 4px 4px 0;
    margin-bottom: 24px;
    position: relative;
    width: fit-content;
    margin-left: 0;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.faq__categories::-webkit-scrollbar {
    display: none;
}

.faq__category {
    font-family: 'Neue Machina', sans-serif;
    font-weight: 500;
    font-size: 13px;
    line-height: 16px;
    height: 32px;
    padding: 0 16px;
    background: transparent;
    border: none;
    color: #606061;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
    z-index: 1;
    white-space: nowrap;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
}

.faq__category:focus {
    outline: none;
}

.faq__category:hover {
    color: #b9b9b9;
}

.faq__category--active {
    color: #b9b9b9;
}

/* Sliding indicator */
.faq__category-slider {
    position: absolute;
    height: 32px;
    background: #171825;
    transition: left 0.25s ease, width 0.25s ease;
    pointer-events: none;
    z-index: 0;
    top: 4px;
}

/* FAQ Search */
.faq__search {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 32px;
}

.faq__search-input {
    width: 100%;
    max-width: 480px;
    height: 48px;
    padding: 0 48px 0 20px;
    background-color: #0a0a10;
    border: 2px solid #171825;
    font-family: 'Google Sans Mono', monospace;
    font-weight: 500;
    font-size: 14px;
    color: #b9b9b9;
    outline: none;
    transition: border-color 0.2s ease;
}

.faq__search-input::placeholder {
    font-family: 'Neue Machina', sans-serif;
    color: #353538;
}

.faq__search-input:focus {
    border-color: #34354e;
}

.faq__search-icon-wrapper {
    position: absolute;
    left: 448px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Moved to responsive section at bottom of file */

.faq__search-icon {
    width: 16px;
    height: 16px;
    opacity: 0.5;
}

/* FAQ List */
.faq__list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* FAQ Item */
.faq__item {
    border: 2px solid #171825;
    background-color: #0a0a10;
    margin-top: -2px;
    transition: border-color 0.2s ease;
}

.faq__item:first-child {
    margin-top: 0;
}

.faq__item:hover {
    border-color: #252640;
    position: relative;
    z-index: 1;
}

.faq__item--open {
    border-color: #252640;
    position: relative;
    z-index: 1;
}

/* FAQ Question Button */
.faq__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}

.faq__question-text {
    font-family: 'Neue Machina', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 22px;
    color: #b9b9b9;
    transition: color 0.2s ease;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.faq__item:hover .faq__question-text,
.faq__item--open .faq__question-text {
    color: #ffffff;
}

.faq__question-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #606061;
    transition: transform 0.25s ease, color 0.2s ease;
}

.faq__item--open .faq__question-icon {
    transform: rotate(180deg);
    color: #a0a4fe;
}

/* FAQ Answer - smooth height animation */
.faq__answer {
    height: 0;
    overflow: hidden;
    transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: height;
}

.faq__answer-content {
    padding: 0 24px 24px 24px;
    font-family: 'Neue Machina', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
    color: #888888;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.faq__answer-content strong {
    color: #b9b9b9;
    font-weight: 500;
}

.faq__answer-content code {
    font-family: 'Google Sans Mono', monospace;
    font-size: 13px;
    background-color: #171825;
    padding: 2px 6px;
    color: #a0a4fe;
    display: inline-block;
    white-space: pre-wrap;
}

.faq__answer-content a {
    color: #a0a4fe;
    text-decoration: none;
    transition: color 0.15s ease;
    word-break: break-all;
}

.faq__answer-content a:hover {
    color: #c4c7ff;
    text-decoration: underline;
}

/* No Results / Error */
.faq__no-results,
.faq__error {
    font-family: 'Google Sans Mono', monospace;
    font-size: 14px;
    color: #606061;
    text-align: center;
    padding: 60px 20px;
}

/* ===== Responsive - Small screens (600px) ===== */
@media (max-width: 600px) {
    .faq {
        margin-top: 40px;
        margin-bottom: 60px;
    }

    .faq__title {
        font-size: 36px;
        line-height: 40px;
        min-height: 40px;
    }

    .faq__subtitle {
        font-size: 14px;
        line-height: 18px;
    }

    /* Remove iOS default styling */
    .faq__search-input {
        max-width: 100%;
        border-radius: 0;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    .faq__search-icon-wrapper {
        right: 16px;
        left: auto;
    }

    .faq__question {
        padding: 16px 20px;
        gap: 16px;
    }

    .faq__question-text {
        font-size: 15px;
        line-height: 20px;
    }

    .faq__answer-content {
        padding: 0 20px 20px 20px;
        font-size: 13px;
        line-height: 20px;
    }
}

/* ===== Responsive - Mobile (480px) ===== */
@media (max-width: 480px) {
    .faq {
        margin-top: 32px;
        margin-bottom: 48px;
    }

    .faq__header {
        margin-bottom: 24px;
    }

    .faq__title {
        font-size: 28px;
        line-height: 32px;
        min-height: 64px; /* Space for 2 lines to prevent layout shift */
        margin-bottom: 12px;
    }

    .faq__subtitle {
        font-size: 13px;
    }

    .faq__categories {
        margin-bottom: 20px;
        padding: 3px 3px 3px 0;
    }

    .faq__category {
        font-size: 12px;
        height: 28px;
        padding: 0 12px;
    }

    .faq__category-slider {
        height: 28px;
        top: 3px;
    }

    .faq__search {
        margin-bottom: 24px;
    }

    .faq__search-input {
        height: 44px;
        font-size: 13px;
        padding: 0 44px 0 16px;
    }

    .faq__question {
        padding: 14px 16px;
        gap: 12px;
    }

    .faq__question-text {
        font-size: 14px;
        line-height: 19px;
    }

    .faq__question-icon {
        width: 20px;
        height: 20px;
    }

    .faq__answer-content {
        padding: 0 16px 16px 16px;
        font-size: 13px;
        line-height: 19px;
    }

    .faq__no-results,
    .faq__error {
        padding: 40px 16px;
        font-size: 13px;
    }
}
