@charset "UTF-8";

/* ==========================================================================
   화천(HWACHEON) FAQ / Q&A 페이지
   ========================================================================== */

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: #ffffff !important;
    color: #111111;
    font-family: 'Jost', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.main-container {
    width: 100%;
    overflow-x: hidden;
    padding-top: 4.5rem;
    box-sizing: border-box;
}

.max-layout-width {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.main-section-padding {
    padding: 5rem 0 8rem;
}

/* ──────────────────────────────────────────────────────────────────────────
   1. 서브 히어로 배너
   ────────────────────────────────────────────────────────────────────────── */
.sub-hero-banner {
    width: 100%;
    background: #fafafa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 5rem 2rem 4.5rem;
    text-align: center;
    box-sizing: border-box;
}

.banner-inner {
    max-width: 800px;
    margin: 0 auto;
}

.sub-category-tag {
    font-family: 'Jost', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    color: #888888;
    display: block;
    margin-bottom: 0.8rem;
}

.sub-page-title {
    font-family: 'Jost', sans-serif;
    font-size: 2.8rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #111111;
    margin: 0 0 1rem 0;
}

.sub-page-desc {
    font-size: 0.98rem;
    color: #666666;
    margin: 0;
    word-break: keep-all;
}

/* ──────────────────────────────────────────────────────────────────────────
   2. 상단 액션바
   ────────────────────────────────────────────────────────────────────────── */
.faq-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.faq-count {
    font-size: 0.95rem;
    color: #555555;
}

.faq-count strong {
    color: #111111;
    font-weight: 600;
}

.btn-write-qna {
    display: inline-block;
    padding: 0.65rem 1.6rem;
    background: #111111;
    color: #ffffff;
    border: none;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-write-qna:hover {
    background: #333333;
}

/* ──────────────────────────────────────────────────────────────────────────
   3. 카드 그리드 & 아코디언 답변 스타일
   ────────────────────────────────────────────────────────────────────────── */
.faq-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: flex-start;
}

.faq-card {
    background: #ffffff;
    border: 1px solid #e2e2e2;
    border-radius: 16px;
    padding: 2rem;
    box-sizing: border-box;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
}

.faq-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
    border-color: #111111;
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.status-badge {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
}

.status-pending {
    background: #f4f4f4;
    color: #777777;
}

.status-done {
    background: #111111;
    color: #ffffff;
}

.card-date {
    font-size: 0.85rem;
    color: #888888;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.card-writer {
    font-size: 0.82rem;
    color: #999999;
}

.card-title {
    font-size: 1.02rem;
    font-weight: 600;
    color: #111111;
    margin: 0;
    line-height: 1.5;
    word-break: keep-all;
}

.faq-card.is-private {
    background: #fafafa;
    border-style: dashed;
}

.faq-card.is-private .card-title {
    color: #888888;
}

.icon-lock {
    font-size: 0.9rem;
    margin-right: 0.2rem;
}

.card-answer {
    display: none;
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid #eeeeee;
    font-size: 0.92rem;
    color: #444444;
    line-height: 1.65;
}

.card-answer p {
    margin: 0;
}

.card-answer strong {
    color: #111111;
}

.faq-card.active .card-answer {
    display: block;
}

.faq-card.active {
    border-color: #111111;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* ──────────────────────────────────────────────────────────────────────────
   4. 1:1 문의하기 작성 팝업 모달
   ────────────────────────────────────────────────────────────────────────── */
.faq-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.faq-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.faq-modal-container {
    position: relative;
    width: 90%;
    max-width: 580px;
    background: #ffffff;
    border-radius: 12px;
    padding: 3rem 2.5rem;
    box-sizing: border-box;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.faq-modal-overlay.is-open .faq-modal-container {
    transform: translateY(0);
}

.btn-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.8rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #888888;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.btn-modal-close:hover {
    color: #111111;
}

.write-modal-header {
    border-bottom: 1px solid #e2e2e2;
    padding-bottom: 1.2rem;
    margin-bottom: 1.8rem;
}

.write-modal-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #111111;
    margin: 0 0 0.4rem 0;
}

.write-modal-sub {
    font-size: 0.88rem;
    color: #777777;
    margin: 0;
}

.write-qna-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #111111;
}

.writer-badge-box {
    display: flex;
    align-items: center;
}

.writer-id-text {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: #111111;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 4px;
}

.writer-id-text.is-guest {
    background: #666666;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: #111111;
    border-color: #111111;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: bold;
}

.checkbox-text {
    font-size: 0.88rem;
    color: #444444;
}

.form-input, .form-textarea {
    width: 100%;
    border: 1px solid #e2e2e2;
    padding: 0.75rem 0.9rem;
    font-size: 0.92rem;
    color: #111111;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.form-input:focus, .form-textarea:focus {
    border-color: #111111;
}

.form-textarea {
    resize: vertical;
}

.write-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.btn-cancel {
    padding: 0.75rem 1.6rem;
    background: #f4f4f4;
    color: #555555;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-cancel:hover {
    background: #e2e2e2;
}

.btn-submit {
    padding: 0.75rem 2rem;
    background: #111111;
    color: #ffffff;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-submit:hover {
    background: #333333;
}

/* ──────────────────────────────────────────────────────────────────────────
   5. 페이지네이션
   ────────────────────────────────────────────────────────────────────────── */
.pagination-wrapper {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #e2e2e2;
    color: #555555;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.page-link:hover:not(.disabled) {
    border-color: #111111;
    color: #111111;
}

.page-link.active {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
}

.page-link.disabled {
    opacity: 0.3;
    cursor: default;
}

.reveal-element {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-element.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1023px) {
    .faq-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .sub-page-title {
        font-size: 2.1rem;
    }
    .faq-card-grid {
        grid-template-columns: 1fr;
    }
}