/* FAQ 공통 스타일 */
.faq-section {
    padding: 60px 0;
    background: #f8f9fa;
}



.back-link {
    display: inline-block;
    color: #4a90e2;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 12px 24px;
    border: 2px solid #4a90e2;
    border-radius: 25px;
    transition: all 0.3s ease;
    background: white;
}

.back-link:hover {
    background: #4a90e2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

/* 페이지 끝까지 FAQ 배경색 적용을 위한 wrapper */
.faq-wrapper {
    background: #f8f9fa;
    min-height: 100vh;
    padding-bottom: 0;
}

/* FAQ 섹션이 있는 페이지의 body 하단 배경 */
body:has(.faq-section) {
    background: #f8f9fa;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    font-size: 2rem;
    font-weight: 700;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.faq-question {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    transition: all 0.3s ease;
    user-select: none;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.faq-question:hover {
    background: linear-gradient(135deg, #357abd 0%, #2968a3 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.faq-question h3 {
    color: white;
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.5;
    flex: 1;
    padding-right: 20px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.faq-toggle {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    min-width: 28px;
    text-align: center;
    transition: all 0.3s ease;
    transform-origin: center;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.3);
}

.faq-item.active .faq-question {
    background: linear-gradient(135deg, #28a745 0%, #20893d 100%);
    border-bottom-color: rgba(255,255,255,0.2);
}

.faq-item.active .faq-question h3 {
    color: white;
}

.faq-item.active .faq-toggle {
    color: white;
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.4);
    transform: rotate(45deg);
}

.faq-answer {
    display: none;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    min-height: 80px;
}

.faq-answer[style*="block"] {
    display: flex !important;
    align-items: center;
}

.faq-answer p {
    margin: 0;
    line-height: 1.6;
    color: #333;
}

/* 애니메이션 효과 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 500px;
        opacity: 1;
    }
}

/* FAQ 답변 애니메이션 제거 - 안정성을 위해 */

/* FAQ 답변 내용 스타일링 */
.faq-answer strong {
    color: #007bff;
    font-weight: 600;
}

.faq-answer ul {
    margin: 10px 0;
    padding-left: 20px;
}

.faq-answer li {
    margin: 5px 0;
    color: #555;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .faq-section {
        padding: 40px 0;
    }
    
    .faq-section h2 {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
    
    .faq-question {
        padding: 20px 25px;
    }
    
    .faq-question h3 {
        font-size: 1rem;
        padding-right: 15px;
    }
    
    .faq-answer {
        padding: 25px;
        min-height: 70px;
    }
    
    .faq-toggle {
        font-size: 1.6rem;
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .faq-question {
        padding: 18px 20px;
    }
    
    .faq-question h3 {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .faq-answer {
        padding: 20px;
        min-height: 60px;
    }
    
    .faq-answer p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .faq-toggle {
        font-size: 1.4rem;
        width: 26px;
        height: 26px;
    }
}

/* 접근성 향상 */
.faq-question:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.faq-question:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* 키보드 네비게이션 지원 */
.faq-item[tabindex="0"]:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* FAQ 특별 아이콘 스타일 */
.faq-question .icon {
    margin-right: 10px;
    color: #007bff;
}

.faq-item.active .faq-question .icon {
    color: white;
}

/* 다크 테마 지원 */
@media (prefers-color-scheme: dark) {
    .faq-section {
        background: #1a1a1a;
    }
    
    .faq-item {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .faq-question {
        background: #2d2d2d;
        color: #e0e0e0;
    }
    
    .faq-question:hover {
        background: #3d3d3d;
    }
    
    .faq-question h3 {
        color: #e0e0e0;
    }
    
    .faq-toggle {
        color: #b0b0b0;
    }
    
    .faq-answer {
        background: #2d2d2d;
        border-top-color: #404040;
    }
    
    .faq-answer p {
        color: #c0c0c0;
    }
    
    .faq-answer strong {
        color: #4da6ff;
    }
    
    .faq-answer li {
        color: #c0c0c0;
    }
}

/* FAQ 이후 페이지 끝까지 배경색 적용 */
.faq-section-container {
    background: #f8f9fa;
    min-height: calc(100vh - 200px);
}


/* 페이지 하단 여백 제거 */
main {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* footer도 FAQ 배경색으로 */
footer {
    background: #f8f9fa !important;
    border-top: 1px solid rgba(0,0,0,0.1);
    margin-top: 0 !important;
    padding: 20px 0 40px 0;
}

/* HTML과 body 전체를 FAQ 색상으로 */
html {
    background: #f8f9fa;
}

/* 프린트 스타일 */
@media print {
    .faq-section {
        background: white;
        padding: 20px 0;
    }
    
    .faq-item {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
        margin-bottom: 15px;
    }
    
    .faq-toggle {
        display: none;
    }
    
    .faq-answer {
        display: block !important;
        padding: 10px 15px;
    }
    
    .faq-question {
        padding: 10px 15px;
        background: #f5f5f5 !important;
    }
    
    /* 프린트 시에는 흰색 배경 */
    html, body, .faq-section ~ *, .related-links, footer {
        background: white !important;
    }
} 