/* faq-detail.css */

/* 전역 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #334155;
}

/* 레이아웃 컨테이너 */
.faq-detail-layout {
    min-height: 100vh;
    padding: 20px;
}

.faq-detail-main {
    max-width: 800px;
    margin: 0 auto;
}

.section-page {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.faq-detail-container {
    padding: 40px;
}

/* 상단 네비게이션 */
.breadcrumb-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb-link {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    background: linear-gradient(to bottom right, #005792, #001A2C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.breadcrumb-separator {
    color: #94a3b8;
}

.breadcrumb-current {
    color: #334155;
    font-weight: 500;
}

.nav-actions {
    display: flex;
    gap: 8px;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 2px solid #e2e8f0;
    color: #64748b;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-button:hover {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(to bottom right, #005792, #001A2C) border-box;
    color: #005792;
}

.back-button svg {
    width: 16px;
    height: 16px;
}

/* FAQ 헤더 */
.faq-header {
    margin-bottom: 40px;
}

.faq-category-badge {
    display: inline-block;
    background: linear-gradient(to bottom right, #005792, #001A2C);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

.faq-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    margin-bottom: 20px;
}

.faq-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #64748b;
}

.meta-item svg {
    width: 16px;
    height: 16px;
}

.helpful-rate {
    color: #059669;
    font-weight: 500;
}

.user-type-indicator {
    background: linear-gradient(135deg, #f0f8ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 20px;
    padding: 6px 12px;
}

.user-type {
    font-size: 12px;
    font-weight: 600;
    color: #0369a1;
}

/* FAQ 내용 */
.faq-content {
    margin-bottom: 40px;
}

.content-summary {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border: 2px solid #bfdbfe;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 32px;
}

.content-summary h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 8px;
}

.content-summary p {
    color: #1e40af;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

.content-body {
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
}

.content-body h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 32px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #f1f5f9;
    background: linear-gradient(to bottom right, #005792, #001A2C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 24px 0 12px 0;
}

.content-body h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 16px 0 8px 0;
}

.content-body p {
    margin: 16px 0;
}

/* 프로세스 플로우 */
.process-flow {
    margin: 32px 0;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.process-flow h3 {
    color: #1e293b;
    margin-bottom: 24px;
    text-align: center;
}

.flow-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px 20px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.flow-step {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
}

.flow-step:hover {
    border-color: #005792;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 87, 146, 0.1);
}

.flow-number {
    background: linear-gradient(to bottom right, #005792, #001A2C);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin: 0 auto 12px auto;
    box-shadow: 0 2px 8px rgba(0, 87, 146, 0.2);
}

.flow-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.flow-content p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.flow-arrow {
    display: none;
}

/* 장점 그리드 */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.benefit-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.benefit-card:hover {
    border-color: #005792;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 87, 146, 0.1);
}

.benefit-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.benefit-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.benefit-card p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* 서브 FAQ */
.sub-faq-list {
    margin: 24px 0;
}

.sub-faq-item {
    background: #f8fafc;
    border-left: 4px solid #005792;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 12px 0;
    transition: all 0.3s ease;
}

.sub-faq-item:hover {
    background: #f0f8ff;
    transform: translateX(4px);
}

.sub-faq-question {
    font-size: 15px;
    color: #1e293b;
    margin-bottom: 8px;
}

.sub-faq-answer {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
}

.sub-faq-question strong,
.sub-faq-answer strong {
    color: #005792;
}

/* 도움 섹션 */
.help-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f0f8ff 100%);
    border-radius: 12px;
    padding: 24px;
    margin: 32px 0;
    border: 2px solid #e2e8f0;
}

.help-section h3 {
    color: #1e293b;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(to bottom right, #005792, #001A2C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.help-options {
    display: grid;
    gap: 12px;
}

.help-option {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.help-option:hover {
    border-color: #005792;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 87, 146, 0.1);
}

.help-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.help-text {
    flex: 1;
}

.help-text strong {
    display: block;
    color: #1e293b;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.help-text span {
    color: #64748b;
    font-size: 13px;
}

/* 하단 액션 */
.faq-footer {
    margin-bottom: 40px;
    padding: 24px 0;
    border-top: 2px solid #f1f5f9;
}

.footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.helpful-section {
    text-align: center;
}

.helpful-question {
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 16px;
}

.helpful-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.helpful-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 2px solid #e2e8f0;
    color: #64748b;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.helpful-button:hover {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(to bottom right, #005792, #001A2C) border-box;
    color: #005792;
}

.helpful-button.yes.active {
    background: linear-gradient(to bottom right, #059669, #047857);
    color: white;
    border: 2px solid transparent;
}

.helpful-button.no.active {
    background: linear-gradient(to bottom right, #dc2626, #b91c1c);
    color: white;
    border: 2px solid transparent;
}

.helpful-button svg {
    width: 18px;
    height: 18px;
}

.navigation-buttons {
    display: flex;
    gap: 8px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 2px solid #e2e8f0;
    color: #64748b;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(to bottom right, #005792, #001A2C) border-box;
    color: #005792;
}

.nav-btn svg {
    width: 16px;
    height: 16px;
}

/* 관련 FAQ */
.related-faqs {
    border-top: 2px solid #f1f5f9;
    padding-top: 32px;
}

.related-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
    background: linear-gradient(to bottom right, #005792, #001A2C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-faq-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid #e2e8f0;
}

.related-faq-item:hover {
    background: #f0f8ff;
    border-left: 3px solid #005792;
    transform: translateX(4px);
}

.related-category {
    background: linear-gradient(to bottom right, #005792, #001A2C);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.related-content {
    flex: 1;
    min-width: 0;
}

.related-question {
    color: #334155;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.4;
}

.related-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #64748b;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .faq-detail-container {
        padding: 20px;
    }
    
    .breadcrumb-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .faq-title {
        font-size: 22px;
    }
    
    .faq-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .meta-left {
        width: 100%;
        justify-content: space-between;
    }
    
    .content-body {
        font-size: 15px;
    }
    
    .content-body h2 {
        font-size: 18px;
    }
    
    .flow-steps {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    

    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .footer-actions {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    
    .navigation-buttons {
        justify-content: space-between;
    }
    
    .helpful-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .faq-detail-container {
        padding: 16px;
    }
    
    .faq-title {
        font-size: 20px;
    }
    
    .meta-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .breadcrumb {
        font-size: 13px;
        flex-wrap: wrap;
    }
    
    .back-button {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .nav-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .helpful-button {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .helpful-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .related-faq-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .related-category {
        align-self: flex-start;
    }
    
    .help-options {
        gap: 8px;
    }
    
    .help-option {
        padding: 12px;
    }
    
    .help-icon {
        font-size: 20px;
        width: 32px;
    }
}

/* 인쇄 스타일 */
@media print {
    body {
        background: white;
    }
    
    .faq-detail-layout {
        padding: 0;
    }
    
    .section-page {
        box-shadow: none;
        border-radius: 0;
    }
    
    .breadcrumb-nav,
    .faq-footer,
    .related-faqs {
        display: none;
    }
    
    .faq-title {
        color: #000;
    }
    
    .content-body h2 {
        color: #000;
    }
    
    .helpful-section {
        display: none;
    }
}

.modal.hidden { display: none; }

.modal-content { background:white; padding:20px; border-radius:8px; }

.modal {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(2, 6, 23, .5);
    backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
}
.modal.hidden { display: flex; opacity: 0; pointer-events: none; }
.modal.show   { opacity: 1; pointer-events: auto; }

.modal__card {
    width: 92%; max-width: 420px;
    background: #fff; border-radius: 16px;
    padding: 24px 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.35);
    transform: translateY(8px);
    transition: transform .2s ease;
}
.modal.show .modal__card { transform: translateY(0); }

.modal__icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    color: #0369a1; font-size: 20px;
}
.modal__title { text-align: center; font-weight: 700; font-size: 18px; color: #0f172a; }
.modal__desc  { text-align: center; font-size: 14px; color: #475569; margin-top: 6px; }

.modal__actions { margin-top: 16px; display: flex; gap: 8px; justify-content: center; }

.btn { appearance: none; border: 0; border-radius: 10px; padding: 10px 14px; font-weight: 600; cursor: pointer; }
.btn-primary { background: linear-gradient(to bottom right, #005792, #001A2C); color: #fff; }
.btn-ghost   { background: #fff; border: 2px solid #e2e8f0; color: #64748b; }
.btn-ghost:hover { border-color: #94a3b8; color: #334155; }

/* 모바일에서 버튼 1열 */
@media (max-width: 480px) {
    .modal__card { padding: 20px 16px; border-radius: 14px; }
    .modal__title { font-size: 16px; }
    .modal__actions { flex-direction: column; }
    .btn { width: 100%; }
}
.modal{
    position:fixed; inset:0;
    display:flex; align-items:center; justify-content:center;
    background:rgba(2,6,23,.55); backdrop-filter:blur(2px);
    opacity:0; pointer-events:none; transition:opacity .2s ease;
    z-index:10000;           /* ← 전체 위로 */
}
.modal.hidden{ display:none; }
.modal.show{ opacity:1; pointer-events:auto; }

.modal__card{
    width:92%; max-width:420px;
    background:#fff; border-radius:16px; padding:24px 20px;
    border:1px solid #e2e8f0; box-shadow:0 25px 50px -12px rgba(0,0,0,.35);
    transform:translateY(8px); transition:transform .2s ease;
    position:relative; z-index:10001;  /* 카드가 확실히 위로 */
}
.modal.show .modal__card{ transform:translateY(0); }