/* FAQ 메인 섹션 */
.faq-main-section {
    padding: 80px 0;
    background-color: #fff;
    min-height: 100vh;
}

/* 상단 제목 */
.faq-header {
    text-align: left;
    margin-bottom: 20px;
}

.faq-main-title {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin: 0 0 30px 0;
    font-family: 'Noto Sans KR', sans-serif;
}

/* 메인 컨텐츠 영역 */
.faq-content-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 60px;
    margin-bottom: 60px;
    min-height: 400px;
}

/* 좌측 영역 (타이틀 + 검색) */
.faq-left-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 200px;
}

/* 검색 영역 */
.faq-search-area {
    position: relative;
    top: 0;
    height: auto;
    width: 100%;
    background: #fff;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.faq-search-box {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.faq-search-box input {
    width: 100% !important;
    padding: 15px 45px 15px 15px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: #333 !important;
    background-color: #fff !important;
    transition: border-color 0.3s ease !important;
    box-sizing: border-box !important;
    outline: none !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.faq-search-box input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.faq-search-box input::placeholder {
    color: #9ca3af !important;
}

.faq-search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
    pointer-events: none;
    z-index: 10;
}

/* 우측 Q&A 목록 영역 */
.faq-list-area {
    width: 100%;
}

.faq-items {
    border-top: 1px solid #000;
}

/* 검색 결과 없음 */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results p {
    font-size: 16px;
    margin: 0;
}

/* 검색어 하이라이트 */
mark {
    background-color: #ffeb3b;
    color: #333;
    padding: 2px 4px;
    border-radius: 3px;
}

.faq-item {
    border-bottom: 1px solid #000;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background-color: #f8f9fa;
    padding-left: 10px;
    padding-right: 10px;
}

.faq-question span {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
    flex: 1;
    margin-right: 20px;
}

.faq-toggle {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
    font-style: normal;
    flex-shrink: 0;
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 0 0 20px 0;
    border-top: 1px solid #000;
    margin-top: 10px;
}

.faq-item.active .faq-answer {
    display: block;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.faq-answer p {
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.6;
    color: #555;
}

.faq-answer p:first-child {
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

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

/* 페이지네이션 */
.faq-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-bottom: 40px;
}

.page-btn.prev,
.page-btn.next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border: none;
    background-color: transparent;
    color: #999;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    transition: all 0.3s ease;
}

.page-btn:not(.prev):not(.next) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border: none;
    background-color: transparent;
    color: #999;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
}

.page-btn.active {
    background-color: #2563eb;
    color: #fff;
    border: 2px solid #2563eb;
    font-weight: 700;
    border-radius: 6px;
}

.page-btn.prev:hover,
.page-btn.next:hover,
.page-btn:hover {
    color: #2563eb;
    background-color: #f8fafc;
}

/* 글쓰기 버튼 */
.faq-write-section {
    text-align: center;
}

.write-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #2563eb;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.write-button:hover {
    background-color: #1d4ed8;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .faq-main-title {
        font-size: 28px;
    }
    
    .faq-content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .faq-header {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .faq-search-area {
        position: static;
        order: 1;
        margin-bottom: 30px;
    }
    
    .faq-list-area {
        order: 2;
    }
    
    .faq-question span {
        font-size: 14px;
    }
    
    .faq-answer p {
        font-size: 13px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .faq-main-section {
        padding: 40px 0;
    }
}

@media (max-width: 480px) {
    .faq-main-title {
        font-size: 24px;
    }
    
    .faq-pagination {
        gap: 3px;
    }
    
    .page-btn.prev,
    .page-btn.next,
    .page-btn:not(.prev):not(.next) {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}