/* ============================================================
   faq.css — FAQ 페이지 전용 스타일
   hive.css 변수 사용. 폰트 사이즈는 var(--t-*) 변수만 사용.
   ============================================================ */

/* ===== FAQ 히어로 ===== */
.faq-hero {
    position: relative;

    display: flex;
    align-items: center;
    overflow: hidden;

}



.faq-hero .grain {
    z-index: 1;
    opacity: 0.05;
}

.faq-hero .hive_b {
    position: relative;
    z-index: 2;
}

.faq-hero-inner {
    padding: 0;
}

.faq-hero-label {
    font-size: var(--t-label);
    letter-spacing: 0.22em;
    color: var(--point);
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 16px;
    overflow: hidden;
}

.faq-hero-label .reveal-wrap {
    overflow: hidden;
    display: block;
}

.faq-hero-heading {
    font-family: 'Pretendard', sans-serif;
    font-size: var(--t-heading);
    font-weight: 700;
    color: var(--heading);
    letter-spacing: -0.03em;
    line-height: 1.15;
    overflow: hidden;
}

.faq-hero-heading .reveal-wrap {
    overflow: hidden;
    display: block;
}

/* ===== 검색 섹션 ===== */
.faq-search-section {
    background: #000;
    border-bottom: 1px solid var(--line);
    padding: 28px 0;
}

.faq-search-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.faq-search-title {
    display: none;
}

.faq-search-box {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.faq-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text3);
    font-size: 20px;
    pointer-events: none;
    transition: color 0.22s var(--ease-smooth);
}

.faq-search-input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: var(--heading);
    font-family: 'Pretendard', sans-serif;
    font-size: var(--t-body);
    font-weight: 400;
    letter-spacing: -0.01em;
    outline: none;
    transition: border-color 0.22s var(--ease-smooth);
}

.faq-search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.faq-search-input:focus {
    border-color: var(--point);
}

.faq-search-input:focus ~ .faq-search-icon,
.faq-search-box:focus-within .faq-search-icon {
    color: var(--point);
}

.faq-result-count {
    font-size: var(--t-caption);
    color: var(--text3);
    letter-spacing: 0.02em;
    min-height: 0;
    transition: color 0.2s var(--ease-smooth);
}

.faq-result-count:empty {
    display: none;
}

.faq-result-count.has-results {
    color: var(--text2);
}

/* ===== FAQ 바디 섹션 ===== */
.faq-body-section {
    padding: 72px 0 100px;
}

.faq-body {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

/* 카테고리 탭 */
.faq-cats {
    flex: 0 0 180px;
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.faq-cats-title {
    font-size: var(--t-caption);
    color: var(--text3);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 12px;
    font-weight: 500;
}

.faq-cat-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-left: 2px solid transparent;
    padding: 10px 14px;
    font-family: 'Pretendard', sans-serif;
    font-size: var(--t-body);
    font-weight: 400;
    color: var(--text2);
    cursor: pointer;
    letter-spacing: -0.01em;
    transition: color 0.22s var(--ease-smooth),
                border-color 0.22s var(--ease-smooth),
                opacity 0.22s var(--ease-smooth);
    border-radius: 0 4px 4px 0;
}

.faq-cat-btn:hover {
    color: var(--text);
}

.faq-cat-btn.active {
    color: var(--point);
    border-left-color: var(--point);
    font-weight: 500;
}

.faq-cat-count {
    font-size: var(--t-caption);
    color: var(--text3);
    margin-left: 6px;
    font-weight: 400;
}

.faq-cat-btn.active .faq-cat-count {
    color: rgba(217, 119, 87, 0.5);
}

/* FAQ 목록 래퍼 */
.faq-list-wrap {
    flex: 1;
    min-width: 0;
}

/* 결과 개수 (목록 내) */
.faq-list-count {
    font-size: var(--t-caption);
    color: var(--text3);
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
    letter-spacing: 0.01em;
}

/* 카테고리 그룹 */
.faq-group {
    margin-bottom: 48px;
}

.faq-group-title {
    font-size: var(--t-caption);
    letter-spacing: 0.18em;
    color: var(--point);
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

/* 아코디언 아이템 */
.faq-item {
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s var(--ease-smooth),
                transform 0.5s var(--ease-smooth);
}

.faq-item.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* 질문 헤더 */
.faq-q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 22px 0;
    cursor: pointer;
    user-select: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: 'Pretendard', sans-serif;
    color: var(--text);
    transition: color 0.22s var(--ease-smooth);
}

.faq-q:hover {
    color: var(--heading);
}

.faq-q-text {
    font-size: var(--t-body);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.5;
    flex: 1;
    text-align: left;
}

.faq-q-icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text3);
    font-size: 20px;
    transform: rotate(0deg);
    transition: transform 0.32s var(--ease-smooth),
                color 0.22s var(--ease-smooth);
}

.faq-item.open .faq-q-icon {
    transform: rotate(45deg);
    color: var(--point);
}

.faq-item.open .faq-q {
    color: var(--heading);
}

/* 답변 */
.faq-a-wrap {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.open .faq-a-wrap {
    max-height: 600px;
}

.faq-a {
    padding: 0 0 24px 0;
    font-size: var(--t-body);
    color: var(--text2);
    line-height: 1.8;
    letter-spacing: -0.01em;
}

.faq-a mark {
    background: rgba(217, 119, 87, 0.2);
    color: var(--point);
    border-radius: 2px;
    padding: 0 2px;
}

/* 검색어 하이라이트 (질문) */
.faq-q-text mark {
    background: rgba(217, 119, 87, 0.2);
    color: var(--point);
    border-radius: 2px;
    padding: 0 2px;
}

/* 빈 결과 */
.faq-empty {
    padding: 60px 0;
    text-align: center;
    color: var(--text3);
    font-size: var(--t-body);
    letter-spacing: -0.01em;
}

.faq-empty i {
    font-size: 40px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.5;
}

.faq-empty-sub {
    font-size: var(--t-caption);
    color: var(--text3);
    margin-top: 8px;
}

/* ===== CTA 섹션 ===== */
.faq-cta {
    background: var(--bg2);
    border-top: 1px solid var(--line);
    padding: 80px 0;
}

.faq-cta-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
}

.faq-cta-label {
    font-size: var(--t-label);
    letter-spacing: 0.22em;
    color: var(--point);
    text-transform: uppercase;
    font-weight: 500;
}

.faq-cta-heading {
    font-size: var(--t-heading);
    font-weight: 700;
    color: var(--heading);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.faq-cta-sub {
    font-size: var(--t-lead);
    color: var(--text2);
    letter-spacing: -0.01em;
    max-width: 480px;
}

.faq-cta-btns {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

/* ===== 모바일 (max-width: 900px) ===== */
@media (max-width: 900px) {
    .faq-hero {
        height: auto;
       
        max-height: none;
        
    }

    .faq-hero-heading {
        font-size: clamp(28px, 6vw, 40px);
    }

    .faq-search-section {
        padding: 20px 0;
    }

    .faq-search-input {
        font-size: var(--t-caption);
        padding: 14px 16px 14px 46px;
    }

    .faq-body-section {
        padding: 40px 0 72px;
    }

    .faq-body {
        flex-direction: column;
        gap: 32px;
    }

    /* 모바일 가로 스크롤 탭 */
    .faq-cats {
        flex: none;
        width: 100%;
        position: static;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: visible;
        gap: 4px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

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

    .faq-cats-title {
        display: none;
    }

    .faq-cat-btn {
        flex: 0 0 auto;
        border-left: none;
        border-bottom: 2px solid transparent;
        border-radius: 4px 4px 0 0;
        padding: 8px 16px;
        font-size: var(--t-caption);
        white-space: nowrap;
    }

    .faq-cat-btn.active {
        border-bottom-color: var(--point);
        border-left-color: transparent;
    }

    .faq-cta {
        padding: 56px 0;
    }

    .faq-cta-heading {
        font-size: clamp(26px, 5vw, 36px);
    }

    .faq-cta-sub {
        font-size: var(--t-body);
    }
}

/* ===== prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .faq-item {
        opacity: 1;
        transform: none;
    }
}
