﻿/*
 * 파일명: integrated-style.css
 * 위치: /blog/assets/css/integrated-style.css
 * 기능: 블로그 통합 스타일시트 (메인 + 블로그)
 * 작성일: 2025-05-23
 * 수정일: 2025-05-23
 */

/* ===================================
* CSS 변수 정의 (모노톤 테마)
* =================================== */
:root {
    /* 메인 컬러 */
    --primary-dark: #5D5D5D;
    --primary-light: #666666;
    --primary-hover: #000000;
    --primary-soft: #999999;
    
    /* 배경 컬러 */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-nav: #D3D3D3;
    --bg-gradient-start: #5D5D5D;
    --bg-gradient-end: #666666;
    
    /* 텍스트 컬러 */
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --text-white: #ffffff;
    
    /* 강조 컬러 */
    --accent-color: #666666;
    --accent-hover: #5D5D5D;
    --favorite-color: #ffc107;
    --hot-color: #dc3545;
    --notice-bg: #e9ecef;
    --notice-border: #ced4da;
    --notice-text: #495057;
    
    /* 보더 & 그림자 */
    --border-color: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.15);
    
    /* 반경 & 전환 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
* 전역 스타일
* =================================== */
body { 
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-secondary);
}

main {
    flex: 1;
    margin-top: 100px;
}

.text-gradient {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ===================================
* 네비게이션 스타일
* =================================== */
.navbar {
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
    background-color: var(--bg-secondary) !important;
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    color: var(--primary-dark);
}

.navbar-brand i {
    font-size: 1.5rem;
    margin-right: 0.5rem;
    color: var(--primary-light);
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.nav-link:hover {
    background-color: var(--bg-primary);
    color: var(--primary-dark);
}

.nav-link.active {
    color: var(--primary-dark) !important;
    background-color: var(--bg-primary);
}

/* ===================================
* 버튼 스타일
* =================================== */
.btn-primary {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: var(--text-white) !important;
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover, 
.btn-primary:focus {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-outline-primary:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: var(--text-white) !important;
    box-shadow: var(--shadow-md);
}

/* ===================================
* 블로그 카드 스타일
* =================================== */
.blog-post-card { 
    transition: var(--transition);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--bg-secondary);
}


.blog-post-card:hover { 
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ===================================
* 사이드바 스타일
* =================================== */
.sidebar {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.sidebar-title {
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.category-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.category-link:hover {
    color: var(--primary-dark);
}

.sidebar-category {
    transition: var(--transition);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid transparent;
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
}

.sidebar-category:hover {
    background-color: var(--bg-primary);
    transform: translateX(5px);
    border-left-color: var(--primary-light);
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

.sidebar-category.active {
    background-color: var(--bg-primary);
    border-left-color: var(--primary-dark);
    font-weight: 600;
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

.sidebar-category .badge,
.sidebar-category-badge {
    background-color: var(--primary-light);
    color: var(--text-white);
    transition: var(--transition);
    border-radius: 12px;
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.sidebar-category:hover .badge,
.sidebar-category:hover .sidebar-category-badge {
    transform: scale(1.1);
    background-color: var(--primary-dark);
}

.sidebar-category.active .badge,
.sidebar-category.active .sidebar-category-badge {
    background-color: var(--primary-dark);
}

.sidebar-category i {
    margin-right: 8px;
    color: var(--primary-light);
    transition: var(--transition);
}

.sidebar-category:hover i,
.sidebar-category.active i {
    color: var(--primary-dark);
}

.tag {
    display: inline-block;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    margin: 0.25rem;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.tag:hover {
    background-color: var(--primary-dark);
    color: var(--text-white);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}


/* 사이드바 섹션 제목 */
.sidebar-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

/* 사이드바 구분선 */
.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

/* 게시물 탭 스타일 (공간 최적화) */
.post-tabs {
    /* 이중 박스 제거 - 외곽 박스(.sidebar)만 사용 */
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    border: none;
}

.post-tabs-nav {
    border-bottom: 2px solid var(--border-color);
    background: transparent;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
}

.post-tabs-nav .nav-item {
    flex: 1;
    margin: 0;
}

.post-tabs-nav .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    padding: 1rem 0.75rem;
    transition: var(--transition);
    text-align: center;
    width: 100%;
    border-radius: 0;
    position: relative;
    font-size: 0.95rem;
}

.post-tabs-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary-dark);
    transition: width 0.3s ease;
}

.post-tabs-nav .nav-link:hover {
    background: rgba(151, 188, 98, 0.05);
    color: var(--primary-dark);
}

.post-tabs-nav .nav-link:hover::after {
    width: 80%;
}

.post-tabs-nav .nav-link.active {
    background: transparent;
    color: var(--primary-dark);
    border-bottom-color: transparent;
    font-weight: 700;
}

.post-tabs-nav .nav-link.active::after {
    width: 100%;
}

.post-tabs-nav .nav-link i {
    margin-right: 6px;
    font-size: 1.15rem;
    vertical-align: middle;
    transition: var(--transition);
}

.post-tabs-nav .nav-link.active i {
    color: var(--primary-light);
    transform: scale(1.1);
}

.post-tabs-content {
    padding: 0;
    background: transparent;
}

.post-tabs-content .tab-pane {
    padding: 0;
}


/* 게시물 목록 스타일 */
.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-list-item {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.post-list-item:last-child {
    border-bottom: none;
}

.post-list-item:hover {
    background: var(--bg-primary);
}

.post-list-link {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    padding: 1rem 1.25rem;
}

.post-list-link::before {
    content: '';
    width: 4px;
    height: 0;
    background: var(--primary-dark);
    border-radius: 2px;
    transition: height 0.3s ease;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.post-list-item:hover .post-list-link::before {
    height: calc(100% - 2rem);
}

.post-list-content {
    flex: 1;
    min-width: 0;
}

.post-list-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
    transition: var(--transition);
}

.post-list-item:hover .post-list-title {
    color: var(--primary-dark);
}

.post-list-date,
.post-list-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.post-list-meta {
    justify-content: flex-start;
}

.post-list-date i,
.post-list-comments i,
.post-list-views i {
    font-size: 0.85rem;
    margin-right: 3px;
    color: var(--primary-light);
}

.post-list-views {
    color: var(--primary-dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
}

.post-list-views i {
    color: var(--primary-dark);
}

.post-list-comments {
    color: var(--text-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.post-list-comments i {
    color: var(--text-muted);
}

/* 빈 상태 스타일 */
.post-tabs .text-muted.text-center {
    padding: 3rem 1.5rem;
}

.post-tabs .text-muted.text-center i {
    font-size: 3rem;
    color: var(--primary-light);
    opacity: 0.3;
    margin-bottom: 1rem;
    display: block;
}

/* 반응형 */
@media (max-width: 576px) {
    .post-tabs-nav .nav-link {
        padding: 1rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .post-tabs-nav .nav-link i {
        font-size: 1rem;
        margin-right: 4px;
    }
    
    .post-list-link {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }
    
    .post-list-title {
        font-size: 0.9rem;
    }
    
    .post-list-date,
    .post-list-meta {
        font-size: 0.75rem;
        gap: 0.5rem;
    }
    
    .post-list-views,
    .post-list-comments {
        padding: 0.1rem 0.4rem;
    }
}


/* 게시물 목록 스타일 */
.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-list-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.post-list-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.post-list-link {
    display: block;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

.post-list-link:hover {
    background: #FEFEFE;
    color: var(--primary-dark);
    transform: translateX(5px);
}

.post-list-title {
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-list-date,
.post-list-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-list-meta {
    justify-content: space-between;
}

.post-list-date i,
.post-list-comments i,
.post-list-views i {
    font-size: 0.9rem;
    margin-right: 3px;
}

.post-list-views {
    color: var(--primary-dark);
    font-weight: 500;
}

.post-list-views i {
    color: var(--primary-light);
}

.post-list-comments {
    color: var(--text-muted);
}



/* ===================================
* 입력 필드 스타일
* =================================== */
.input-group-text { 
    border-right: none; 
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.form-control { 
    border-left: none;
    padding-left: 0;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(151, 188, 98, 0.25);
}

/* ===================================
* 페이지네이션 스타일
* =================================== */
.pagination .page-link {
    border-radius: var(--radius-sm);
    margin: 0 2px;
    color: var(--primary-dark);
    border-color: var(--border-color);
    transition: var(--transition);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.pagination .page-link:hover {
    color: var(--primary-hover);
    background-color: var(--bg-primary);
    border-color: var(--primary-light);
}

/* ===================================
* 푸터 스타일
* =================================== */
.footer {
    background: var(--primary-dark);
    color: var(--text-white);
    border-top: none;
    padding: 4rem 0 2rem;
    margin-top: 3rem;
}

.footer h5 {
    color: var(--text-white);
    font-weight: 600;
}

.footer .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer a:hover {
    color: var(--text-white);
}

/* ===================================
* 브레드크럼 스타일
* =================================== */
.breadcrumb {
    background: var(--bg-primary);
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    margin-bottom: 0;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--text-muted);
    padding: 0 0.5rem;
    font-weight: bold;
}

.breadcrumb-item a {
    color: var(--primary-dark);
    transition: var(--transition);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.breadcrumb-item a:hover {
    color: var(--primary-hover);
    background-color: var(--bg-secondary);
    transform: translateY(-1px);
}

.breadcrumb-item.active {
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
}

/* ===================================
* 게시물 컨텐츠 스타일
* =================================== */

/* 기본 설정 */
.post-content {
    line-height: 1.6 !important;
    word-break: break-word;
}

/* 모든 p 태그 기본 여백 제거 */
.post-content p {
    margin: 0;
}

/* 연속된 문단 사이 간격 */
.post-content p + p {
    margin-top: 0.1em;
}

/* 빈 줄 처리 */
.post-content p:empty {
    height: 0.5em;
    margin: 0;
}

.post-content p br:only-child {
    display: block;
    content: "";
    margin: 0.4em 0;
}

/* 볼드 제목 스타일 (섹션 구분) */
.post-content p strong {
    color: var(--text-primary, #000);
}

/* 리스트 여백 조정 */
.post-content ul,
.post-content ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}

.post-content li {
    margin: 0.2em 0;
}

/* 실제 제목 태그 */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 1.2em 0 0.6em 0;
    line-height: 1.3;
}

.post-content h1:first-child,
.post-content h2:first-child,
.post-content h3:first-child {
    margin-top: 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1rem 0;
    box-shadow: var(--shadow-md);
}

.post-content blockquote {
    border-left: 4px solid var(--primary-dark);
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    background-color: var(--bg-primary);
    padding: 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.post-meta {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.post-tags {
    margin-top: 1rem;
}



/* ===================================
* 관리자 컨트롤
* =================================== */
.admin-controls {
    position: sticky;
    top: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 2rem;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

/* ===================================
* 관련 게시물 및 태그 클라우드
* =================================== */
.related-posts .card {
    transition: var(--transition);
    border: none;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
}

.related-posts .card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.tag-cloud {
    line-height: 2;
}

.tag-cloud .tag {
    margin: 0.25rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.tag-cloud .tag:hover {
    background-color: var(--primary-dark);
    color: var(--text-white);
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-dark);
}

/* ===================================
* 댓글 섹션 스타일
* =================================== */
.comments-section {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.comment-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-dark);
}

.comment-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.comment-content {
    color: var(--text-primary);
    line-height: 1.7;
}

/* ===================================
* 빈 상태 스타일
* =================================== */
.empty-blog-state,
.empty-search-state,
.empty-category-state,
.empty-tag-state,
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-color);
    margin: 30px 0;
}

.empty-blog-state i,
.empty-search-state i,
.empty-category-state i,
.empty-tag-state i,
.no-results i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-blog-state h2,
.empty-blog-state h3,
.empty-search-state h2,
.empty-search-state h3,
.empty-category-state h3,
.empty-tag-state h3,
.no-results h3 {
    color: var(--text-secondary);
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.empty-blog-state p,
.empty-search-state p,
.empty-category-state p,
.empty-tag-state p,
.no-results p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 20px;
}

/* ===================================
* 알림 메시지 스타일
* =================================== */
.alert {
    border-radius: var(--radius-sm);
    border: none;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert i {
    margin-right: 0.5rem;
}

/* ===================================
* 로딩 애니메이션
* =================================== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: var(--text-white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================
* 스크롤바 커스터마이징
* =================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ===================================
* 접근성 개선
* =================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* ===================================
* 애니메이션
* =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fadeIn {
    animation: fadeIn 0.5s ease-out;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(44, 95, 45, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(44, 95, 45, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(44, 95, 45, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ===================================
* 반응형 조정
* =================================== */
@media (max-width: 991.98px) {
    main {
        margin-top: 90px;
    }
}

@media (max-width: 767.98px) {
    main {
        margin-top: 85px;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .sidebar {
        padding: 1rem;
    }
}

@media (max-width: 575.98px) {
    main {
        margin-top: 80px;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .sidebar {
        padding: 0.75rem;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    .breadcrumb-item + .breadcrumb-item::before {
        padding: 0 0.3rem;
    }
    
    .breadcrumb-item.active {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ===================================
* 프린트 스타일
* =================================== */
@media print {
    .navbar,
    .sidebar,
    .footer,
    .admin-controls,
    .breadcrumb,
    .btn {
        display: none;
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    main {
        margin-top: 0;
    }
}



/* ===================================
* 블로그 레이아웃 스타일
* =================================== */

/* ===================================
* 레이아웃 선택 버튼
* =================================== */
.layout-selector {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.layout-selector .section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.layout-buttons .layout-btn {
    border-color: var(--border-color);
    color: var(--text-secondary);
    transition: var(--transition);
    padding: 0.5rem 1rem;
}

.layout-buttons .layout-btn:hover {
    background-color: var(--bg-secondary);
    border-color: var(--primary-light);
    color: var(--primary-dark);
}

.layout-buttons .layout-btn.active {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--text-white);
}

.layout-buttons .layout-btn i {
    font-size: 1.1rem;
}

/* 반응형 */
@media (max-width: 768px) {
    .layout-selector {
        padding: 0.75rem 1rem;
    }
    
    .layout-selector .d-flex {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch !important;
    }
    
    .layout-buttons {
        width: 100%;
        display: flex;
    }
    
    .layout-buttons .layout-btn {
        flex: 1;
        padding: 0.625rem;
    }
    
    .layout-selector .section-title {
        font-size: 1.1rem;
        text-align: center;
    }
}




/* 공통 썸네일 스타일 */
.post-thumbnail,
.post-thumbnail-grid {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.post-thumbnail:hover,
.post-thumbnail-grid:hover {
    transform: scale(1.05);
}

/* 썸네일 플레이스홀더 */
.post-thumbnail-placeholder,
.post-thumbnail-placeholder-grid {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--primary-soft) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    font-size: 4rem;
}

.post-thumbnail-placeholder {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.post-thumbnail-placeholder-grid {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* 리스트형 레이아웃 (기본 - 변경 없음) */
.blog-post-list {
    /* 기존 스타일 유지 */
}

/* 카드형 레이아웃 (썸네일 + 텍스트) */
.blog-post-card-layout .card {
    overflow: hidden;
}

.blog-post-card-layout .post-thumbnail {
    height: 100%;
    min-height: 250px;
    object-fit: cover;
}

.blog-post-card-layout .rounded-start {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg) !important;
}

.blog-post-card-layout .post-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.blog-post-card-layout .post-title a:hover {
    color: var(--primary-dark);
}

.blog-post-card-layout .post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 그리드형 레이아웃 (썸네일 중심) */
.blog-post-grid {
    height: 100%;
}

.blog-post-grid .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-post-grid .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-post-grid .post-thumbnail-grid {
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.blog-post-grid .post-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.blog-post-grid .post-excerpt-short {
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.blog-post-grid .btn {
    margin-top: auto;
}

/* 그리드형 레이아웃 컨테이너 조정 */
@media (min-width: 768px) {
    .layout-grid-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 992px) {
    .layout-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 카드형 레이아웃 반응형 */
@media (max-width: 767.98px) {
    .blog-post-card-layout .row {
        flex-direction: column;
    }
    
    .blog-post-card-layout .post-thumbnail {
        height: 200px;
        min-height: 200px;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    }
    
    .blog-post-card-layout .rounded-start {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    }
    
    .blog-post-card-layout .post-title {
        font-size: 1.25rem;
    }
}

/* 썸네일 이미지 최적화 */
.post-thumbnail,
.post-thumbnail-grid {
    background-color: var(--bg-primary);
    background-image: linear-gradient(135deg, var(--bg-primary) 0%, var(--primary-soft) 100%);
}

/* 로딩 애니메이션 */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.post-thumbnail-placeholder,
.post-thumbnail-placeholder-grid {
    background: linear-gradient(
        90deg,
        var(--bg-primary) 0%,
        var(--primary-soft) 50%,
        var(--bg-primary) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* 호버 효과 개선 */
.blog-post-card-layout:hover .post-thumbnail,
.blog-post-grid:hover .post-thumbnail-grid {
    transform: scale(1.05);
}

.blog-post-card-layout:hover,
.blog-post-grid:hover {
    transform: translateY(-5px);
}

/* 메타 정보 스타일 개선 */
.post-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.post-meta i {
    margin-right: 0.25rem;
}

/* 더보기 버튼 스타일 개선 */
.blog-post-card-layout .btn-primary,
.blog-post-grid .btn-outline-primary {
    transition: var(--transition);
}

.blog-post-card-layout .btn-primary:hover {
    transform: translateX(5px);
}

.blog-post-grid .btn-outline-primary:hover {
    transform: translateY(-2px);
}


/* ===================================
* 모션 감소 설정 지원
* =================================== */
@media (prefers-reduced-motion: reduce) {
    .fadeIn,
    .pulse,
    .loading-spinner {
        animation: none;
    }
    
    .blog-post-card,
    .related-posts .card,
    .tag,
    .btn,
    .nav-link,
    .sidebar-category {
        transition: none;
    }
}


/* ===================================
* 네비게이션 헤더 스타일 (반응형 햄버거 메뉴)
* =================================== */
.main-header {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.main-header.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
    position: relative;
}

.header-logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    white-space: nowrap;
    transition: var(--transition);
    flex-shrink: 0;
    z-index: 1031;
}

.header-logo:hover {
    color: var(--primary-light);
    transform: translateY(-2px);
}

.header-logo i {
    font-size: 1.5rem;
    margin-right: 0.5rem;
    color: var(--primary-light);
}

/* 햄버거 메뉴 버튼 (기본 숨김) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1031;
    position: relative;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: var(--primary-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* 모바일 메뉴 오버레이 */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1029;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* 메인 네비게이션 */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) var(--bg-primary);
    padding: 0.25rem 5px;
}

.main-nav::-webkit-scrollbar {
    height: 4px;
}

.main-nav::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.main-nav::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
    text-decoration: none;
    font-size: 0.95rem;
}

.nav-item:hover {
    background: var(--bg-nav);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.nav-item.active {
    background: var(--primary-dark);
    color: var(--text-white);
    box-shadow: var(--shadow-sm);
}

.nav-item i {
    font-size: 1rem;
}

.admin-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    color: var(--text-white);
    background: var(--primary-dark);
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
    text-decoration: none;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.admin-link:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.admin-link i {
    font-size: 1rem;
}

/* 모바일에서 관리자 링크 숨김 (메뉴 안에 표시) */
.admin-nav-item {
    display: none;
}

.header-spacer {
    height: 80px;
}

/* ===================================
* 네비게이션 반응형
* =================================== */
@media (max-width: 991.98px) {
    /* 햄버거 메뉴 버튼 표시 */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* 데스크톱 관리자 링크 숨김 */
    .admin-link {
        display: none;
    }
    
    /* 모바일 메뉴 안에 관리자 링크 표시 */
    .admin-nav-item {
        display: flex;
        background: var(--primary-dark);
        color: var(--text-white);
    }
    
    .admin-nav-item:hover {
        background: var(--primary-hover);
        color: var(--text-white);
    }
    
    /* 메인 네비게이션 모바일 스타일 */
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 80px 0 20px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        transition: right 0.3s ease;
        z-index: 1030;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .nav-item {
        padding: 1rem 1.5rem;
        border-radius: 0;
        border-bottom: 1px solid var(--border-color);
        font-size: 1rem;
    }
    
    .nav-item:hover {
        transform: none;
        background: var(--bg-primary);
    }
    
    .nav-item.active {
        border-left: 4px solid var(--primary-dark);
        background: var(--bg-primary);
        color: var(--primary-dark);
    }
    
    .header-spacer {
        height: 75px;
    }
}

@media (max-width: 767.98px) {
    .header-content {
        gap: 0.75rem;
    }
    
    .header-logo {
        font-size: 1.3rem;
    }
    
    .header-logo i {
        font-size: 1.2rem;
    }
    
    .main-nav {
        width: 260px;
    }
    
    .header-spacer {
        height: 70px;
    }
}

@media (max-width: 575.98px) {
    .header-content {
        padding: 0.75rem 0;
        gap: 0.5rem;
    }
    
    .header-logo {
        font-size: 1.2rem;
    }
    
    .header-logo i {
        font-size: 1.1rem;
        margin-right: 0.35rem;
    }
    
    .main-nav {
        width: 240px;
        padding-top: 70px;
    }
    
    .nav-item {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .header-spacer {
        height: 65px;
    }
}

/* 데스크톱에서 스크롤바 스타일 유지 */
@media (min-width: 992px) {
    .main-nav {
        overflow-x: auto;
    }
}
