/* 가이드 페이지 전용 스타일 */

/* 기본 변수 및 리셋 */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --background: #ffffff;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
}

/* 메인 컨테이너 */
.main-container {
    display: flex;
    min-height: 100vh;
}

/* 사이드바 */
.sidebar {
    width: 300px;
    min-width: 300px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    height: 100vh;
    overflow-y: auto;
    position: sticky;
    top: 0;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 12px;
}

.sidebar-logo:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-1px);
}

.sidebar-logo-icon {
    width: 32px;
    height: 32px;
}

.sidebar-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.guide-menu-section {
    padding: 1rem 0.75rem;
    flex: 1;
}

.guide-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.guide-section-icon {
    font-size: 1rem;
    color: var(--primary-color);
}

.guide-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.guide-menu-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.guide-menu-item:hover,
.guide-menu-item:focus {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    text-decoration: none;
    transform: translateX(4px);
}

.sidebar-nav {
    padding: 1rem 0.75rem;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.sidebar-nav-item:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary-color);
    text-decoration: none;
}

/* 사이드바 */
.sidebar {
    width: 300px;
    min-width: 300px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    height: 100vh;
    overflow-y: auto;
    position: sticky;
    top: 0;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 12px;
}

.sidebar-logo:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-1px);
}

.sidebar-logo-icon {
    width: 32px;
    height: 32px;
}

.sidebar-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.guide-menu-section {
    padding: 1rem 0.75rem;
    flex: 1;
}

.guide-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.guide-section-icon {
    font-size: 1rem;
    color: var(--primary-color);
}

.guide-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.guide-menu-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.guide-menu-item:hover,
.guide-menu-item:focus {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    text-decoration: none;
    transform: translateX(4px);
}

.sidebar-nav {
    padding: 1rem 0.75rem;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.sidebar-nav-item:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary-color);
    text-decoration: none;
}

/* 메인 콘텐츠 */
.content {
    flex: 1;
    padding: 3rem 4rem;
    max-width: calc(100% - 300px);
    background: #ffffff;
}

/* 네비게이션 바 스타일 제거됨 - 내 마인드맵과 동일한 구조 사용 */

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

/* 중복 스타일 제거됨 - 위에서 이미 정의됨 */

.nav-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    display: block;
    padding: 0.75rem 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.nav-item:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary-color);
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 500;
}

/* 메인 콘텐츠 */
.guide-content {
    flex: 1;
    padding: 3rem;
    max-width: calc(100% - 300px);
}

.guide-section {
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    scroll-margin-top: 20px; /* 적절한 여유 공간 */
}

.guide-section:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.section-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 가이드 스텝 카드 */
.guide-steps {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.step-card {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 2rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.step-card:hover::before {
    transform: scaleX(1);
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

.step-number {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.step-action {
    margin-top: 1rem;
}

/* 콘텐츠 블록 */
.content-block {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--surface);
    border-radius: 1rem;
    border: 1px solid var(--border-light);
}

.content-block h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.content-block p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.content-block ul,
.content-block ol {
    margin-left: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.content-block li {
    margin-bottom: 0.5rem;
}

.content-block li strong {
    color: var(--text-primary);
    font-weight: 600;
}

.numbered-list {
    counter-reset: step-counter;
    list-style: none;
    margin-left: 0;
}

.numbered-list li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1rem;
}

.numbered-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

/* 팁 박스 */
.tips-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 3rem;
}

.tips-box h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tips-box ul {
    margin-left: 1.5rem;
}

.tips-box li {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.tips-box li strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .guide-container {
        flex-direction: column;
    }
    
    .guide-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .guide-content {
        max-width: 100%;
        padding: 2rem 1rem;
    }
    
    .section-header h1 {
        font-size: 2rem;
    }
    
    .step-card {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
}

/* 이미지 플레이스홀더 스타일 */
.image-placeholder {
    background: linear-gradient(135deg, var(--surface) 0%, var(--border-light) 100%);
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    text-align: center;
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder::before {
    content: "🖼️";
    font-size: 2rem;
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.3;
}

.image-placeholder p {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
    margin: 0;
    padding-top: 2rem;
    line-height: 1.5;
}

.image-placeholder em {
    font-weight: 500;
    color: var(--text-primary);
}

/* 다크 테마 지원 */
[data-theme="dark"] .image-placeholder {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: #475569;
}

[data-theme="dark"] .image-placeholder p {
    color: #94a3b8;
}

[data-theme="dark"] .image-placeholder em {
    color: #e2e8f0;
}

/* 스크롤바 스타일링 */
.guide-sidebar::-webkit-scrollbar {
    width: 6px;
}

.guide-sidebar::-webkit-scrollbar-track {
    background: var(--surface);
}

.guide-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.guide-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}