/* ==================== 페이지 레이아웃 CSS ==================== */

/* 페이지 헤더 (히어로 섹션) */
.page-header {
    background: linear-gradient(135deg, #9480c5 0%, #b9c9da 100%);
    color: white;
    padding: 80px 0 60px 0;
    text-align: left;
    margin-top: 0; /* 상단 여백 제거 */
}

.page-header h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
}

.page-header p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0;
}

/* 페이지 레이아웃 컨테이너 */
.page-layout {
    padding: 60px 40px;
    background: #ffffff;
    min-height: calc(100vh - 400px);
}

.page-layout > .container {
    max-width: 1440px;
    padding: 0;
}

.layout-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* ==================== 왼쪽 사이드바 ==================== */
.sidebar {
    width: 260px;
    flex-shrink: 0;
}

.sidebar-nav {
    background: white;
    border-radius: 0;
    padding: 24px 16px;
    box-shadow: none;
    position: -webkit-sticky;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    z-index: 10;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    padding: 0 12px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #64748b;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-nav a:hover {
    background: #f1f5f9;
    color: #9480c5;
    transform: translateX(4px);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, #f8f4ff 0%, #f0ebff 100%);
    color: #9480c5;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(148, 128, 197, 0.15);
}

.sidebar-nav a i {
    margin-right: 10px;
    font-size: 14px;
    width: 20px;
    text-align: center;
}

/* ==================== 메인 콘텐츠 ==================== */
.main-content {
    flex: 1;
    min-width: 0;
    overflow-x: hidden;
    background: white;
    border-radius: 0;
    padding: 48px;
    box-shadow: none;
    border-left: 1px solid #e2e8f0;
}

.content-section {
    margin-bottom: 60px;
}

.content-section:last-child {
    margin-bottom: 0;
}

.content-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.content-section h3 {
    font-size: 22px;
    font-weight: 600;
    color: #334155;
    margin-top: 32px;
    margin-bottom: 16px;
}

.content-section p {
    font-size: 16px;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 16px;
}

/* ==================== 드롭다운 네비게이션 ==================== */
/* 드롭다운 스타일은 style.css에서 관리 */

/* ==================== 반응형 디자인 ==================== */
@media (max-width: 968px) {
    .page-header {
        padding: 60px 20px 40px 20px;
    }

    .page-header h1 {
        font-size: 32px;
    }

    .page-header p {
        font-size: 16px;
    }

    .page-layout {
        padding: 40px 10px;
    }

    .page-layout > .container {
        max-width: 1440px;
        padding: 0;
    }

    .layout-wrapper {
        flex-direction: column;
        gap: 24px;
        align-items: stretch;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .sidebar-nav {
        position: static;
        display: flex;
        overflow-x: auto;
        gap: 4px;
        padding: 12px 8px;
        -webkit-overflow-scrolling: touch;
        justify-content: space-between;
    }

    .sidebar-title {
        display: none;
    }
    
    .sidebar-nav a {
        white-space: nowrap;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    /* STEP 네비게이션 모바일: 아이콘 + 한글만 */
    .step-nav-link {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px 6px !important;
        font-size: 12px !important;
        min-width: 0;
        flex: 1;
    }

    .step-nav-link i {
        font-size: 18px;
    }

    .step-label-text {
        display: none !important;
    }

    .step-br {
        display: none;
    }

    .step-name {
        font-size: 11px !important;
        font-weight: 500;
        color: #64748b;
    }

    .step-nav-link.active .step-name {
        color: #9480c5;
        font-weight: 700;
    }

    .sidebar-nav a:hover {
        transform: translateX(0);
    }

    .main-content {
        padding: 32px 24px;
        border-left: none;
    }

    .content-section h2 {
        font-size: 24px;
    }

    /* 드롭다운 메뉴 모바일 */
    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        border-radius: 0;
        padding: 8px 0;
        margin-top: 0;
        background: #f8f9fa;
    }

    .nav-item.has-dropdown.active .dropdown-menu {
        display: block;
    }

    /* STEP 5 모바일 최적화 */
    .step5-wrap {
        padding: 16px !important;
    }

    .step5-wrap h2 {
        font-size: 18px !important;
    }

    .step5-wrap h3 {
        font-size: 15px !important;
        margin-bottom: 16px !important;
    }

    .step5-wrap h4 {
        font-size: 14px !important;
        margin-bottom: 12px !important;
    }

    .step5-wrap p {
        font-size: 13px !important;
    }

    .step5-wrap pre {
        font-size: 12px !important;
    }

    .step5-wrap i.fa-lock,
    .step5-wrap i.fa-hourglass-half,
    .step5-wrap i.fa-rocket {
        font-size: 40px !important;
    }

    .step5-wrap div[style*="padding: 32px"] {
        padding: 14px !important;
    }

    .step5-wrap div[style*="padding: 24px"] {
        padding: 14px !important;
    }

    .step5-wrap div[style*="padding: 20px"] {
        padding: 12px !important;
    }

    .step5-wrap div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .step5-wrap a[style*="padding: 16px 32px"] {
        padding: 10px 20px !important;
        font-size: 13px !important;
    }

    .step5-wrap a[style*="font-size: 18px"] {
        font-size: 14px !important;
    }

    .step5-wrap div[style*="margin-bottom: 32px"] {
        margin-bottom: 16px !important;
    }

    .step5-wrap div[style*="margin-bottom: 24px"] {
        margin-bottom: 14px !important;
    }
}

@media (max-width: 640px) {
    .page-header h1 {
        font-size: 28px;
    }

    .main-content {
        padding: 24px 20px;
    }

    .content-section h2 {
        font-size: 22px;
    }

    .content-section h3 {
        font-size: 18px;
    }
}

/* ==================== 유틸리티 클래스 ==================== */
.text-center {
    text-align: center;
}

.mt-32 {
    margin-top: 32px;
}

.mb-32 {
    margin-bottom: 32px;
}

.highlight-box {
    background: #f8f4ff;
    border-left: 4px solid #9480c5;
    padding: 20px 24px;
    border-radius: 8px;
    margin: 24px 0;
}

.highlight-box p {
    margin: 0;
    color: #5b21b6;
}

/* ==================== 후기 상세 콘텐츠 스타일 통일 ==================== */
/* 마이그레이션된 글의 인라인 스타일을 강제로 오버라이드 */
.review-detail-content,
.review-detail-content * {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, sans-serif !important;
    line-height: 1.8 !important;
    color: #334155 !important;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.review-detail-content {
    font-size: 15px !important;
    font-weight: 400 !important;
}

.review-detail-content p,
.review-detail-content div,
.review-detail-content span,
.review-detail-content li,
.review-detail-content td,
.review-detail-content th,
.review-detail-content dd,
.review-detail-content dt {
    font-size: 15px !important;
    font-weight: 400 !important;
}

.review-detail-content h1,
.review-detail-content h2,
.review-detail-content h3,
.review-detail-content h4,
.review-detail-content h5,
.review-detail-content h6 {
    font-weight: 600 !important;
    color: #1e293b !important;
    margin-top: 24px;
    margin-bottom: 12px;
}

.review-detail-content h1 { font-size: 22px !important; }
.review-detail-content h2 { font-size: 20px !important; }
.review-detail-content h3 { font-size: 18px !important; }
.review-detail-content h4 { font-size: 16px !important; }

.review-detail-content a {
    color: #9480c5 !important;
    text-decoration: underline;
}

.review-detail-content a:hover {
    color: #7d6aad !important;
}

.review-detail-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin: 16px 0;
}

.review-detail-content table {
    width: 100% !important;
    border-collapse: collapse;
    margin: 16px 0;
}

.review-detail-content table td,
.review-detail-content table th {
    border: 1px solid #e2e8f0;
    padding: 10px 12px;
}

.review-detail-content blockquote {
    border-left: 4px solid #9480c5;
    padding: 12px 20px;
    margin: 16px 0;
    background: #f8f4ff;
    border-radius: 0 8px 8px 0;
}

.review-detail-content ul,
.review-detail-content ol {
    padding-left: 24px;
    margin: 12px 0;
}

.review-detail-content li {
    margin-bottom: 6px;
}

/* 불필요한 인라인 배경색 제거 */
.review-detail-content * {
    background-color: transparent !important;
}

/* 이미지/미디어는 배경 투명 예외 처리 불필요 (이미 transparent) */
/* 테이블 헤더 등 특수 케이스 */
.review-detail-content table th {
    background-color: #f8fafc !important;
}
