body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #ffffff;
    color: #333333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a:hover {
    color: #ffffff;
    text-decoration: none;
}

#main_top { background: #ffffff; }

/* 이미지 스타일 */
.post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 블로그 상세 페이지 스타일 */
.blog-detail {
    padding: 40px 0;
    background-color: #ffffff;
}

.blog-detail-header {
    margin-bottom: 40px;
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666666;
}

.breadcrumb a {
    color: #ff5d1a;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.blog-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.blog-detail-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.blog-detail-image {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.detail-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.blog-detail-content {
    margin-bottom: 60px;
}

.sample-content {
    margin-top: 30px;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #ff5d1a;
}

.more-posts-bottom {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.more-posts-bottom h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 30px;
}

.more-grid-bottom {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.more-post-bottom {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.more-post-bottom:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.more-post-bottom img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.more-post-bottom h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #2c2c2c;
    margin: 15px 15px 10px 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.more-post-date {
    font-size: 0.8rem;
    color: #999999;
    margin: 0 15px 15px 15px;
    display: block;
}

/* 404 페이지 스타일 */
.blog-not-found {
    padding: 100px 0;
    text-align: center;
    background-color: #f8f9fa;
}

.not-found-content h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 20px;
}

.not-found-content p {
    font-size: 1.1rem;
    color: #666666;
    margin-bottom: 30px;
}

.back-to-blog-btn {
    display: inline-block;
    background-color: #ff5d1a;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-to-blog-btn:hover {
    background-color: #e55a2b;
    transform: translateY(-2px);
    text-decoration: none;
    color: #ffffff;
}

/* 블로그 상세 페이지 컨테이너 */
.blog-detail-container {
    padding: 3% 0 10% 0; /* 하단 패딩을 10%로 증가하여 푸터와 충분한 간격 확보 */
    background-color: #ffffff;
    min-height: 100vh;
    padding-bottom: 150px; /* 푸터 높이만큼 하단 여백 추가 */
}

.blog-detail-container .container {
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    gap: 90px;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 좌측 사이드바 */
.left-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-content {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.sidebar-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c2c2c;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1.5px solid #ff5d1a;
}

/* 목차 스타일 */
.table-of-contents {
    margin-bottom: 24px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 8px;
}

.toc-list a {
    color: #666666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: block;
    padding: 6px 12px;
    border-radius: 6px;
    position: relative;
    border-left: 3px solid transparent;
}

.toc-list a:hover {
    color: #ff5d1a;
    background-color: #f8f9fa;
    transform: translateX(4px);
}

.toc-list a.active {
    background-color: #f8f9fa;
    font-weight: 500;
}

/* 목차 레벨별 스타일 */
.toc-list a[data-level="1"] {
    font-weight: 600;
    color: #2c2c2c;
}

.toc-list a[data-level="2"] {
    font-weight: 500;
    color: #444444;
}

.toc-list a[data-level="3"] {
    font-weight: 400;
    color: #666666;
}

/* 목차가 없을 때 숨김 */
.table-of-contents:not(:has(.toc-list li)) {
    display: none;
}


.share-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.share-btn.facebook {
    background-color: #1877f2;
    color: white;
}

.share-btn.twitter {
    background-color: #1da1f2;
    color: white;
}

.share-btn.linkedin {
    background-color: #0077b5;
    color: white;
}

.share-btn.kakao {
    background-color: #fee500;
    color: #3c1e1e;
}

.share-btn.copy {
    background-color: #6c757d;
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 메인 콘텐츠 */
.main-content {
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden; /* 메인 콘텐츠 영역을 벗어나지 않도록 */
    word-wrap: break-word; /* 긴 단어가 컨테이너를 벗어나지 않도록 */
}


/* 헤더 정보 */
.blog-detail-header {
    margin-bottom: 40px;
    position: relative;
}

/* 수정/삭제 버튼을 헤더 상단 오른쪽에 배치 */
.blog-detail-header .post-actions {
    display: flex;
    gap: 8px;
    justify-content: start;
    margin-bottom: 30px;
}

.blog-detail-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

/*.author-avatar {*/
/*    width: 40px;*/
/*    height: 40px;*/
/*    border-radius: 50%;*/
/*    object-fit: cover;*/
/*}*/

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #2c2c2c;
    font-size: 0.9rem;
}

.publish-date {
    font-size: 0.8rem;
    color: #666666;
}

.post-stats {
    display: flex;
    align-items: center;
}

.post-stats {
    display: flex;
    align-items: center;
    gap: 20px;
}


.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.edit-btn {
    background-color: #fa6629;
    color: white;
}

.edit-btn:hover {
    background-color: #ef5013;
}

.delete-btn {
    background-color: #6c757d;
    color: white;
}

.delete-btn:hover {
    background-color: #4f565c;
}

.post-stats .share-buttons {
    display: flex;
    gap: 8px;
}

.blog-detail-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.blog-detail-subtitle {
    font-size: 1.2rem;
    color: #666666;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.category-tag-detail {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tag {
    background-color: #ff5b16;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid #ff4b00;
    margin-right: 8px;
    margin-bottom: 8px;
    display: inline-block;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

/* 메인 이미지 */
.blog-detail-image {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.detail-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* 본문 내용 */
.blog-detail-content {
    margin-bottom: 100px; /* 하단 여백을 늘려서 푸터와 충분한 간격 확보 */
}

.content-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333333;
    overflow: hidden; /* 내용이 컨테이너를 벗어나지 않도록 */
}

/* 본문 내 모든 이미지가 컨테이너를 벗어나지 않도록 */
.content-text img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.content-text p {
    margin-bottom: 20px;
}

.content-text ul, .content-text ol {
    margin: 20px 0;
    padding-left: 30px;
}

.content-text li {
    margin-bottom: 8px;
}

/* 우측 사이드바 */
.right-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* 카테고리 */
.category-list {
    margin-bottom: 24px;
}

.category-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-items li {
    margin-bottom: 8px;
}

.category-link {
    color: #666666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    display: block;
    padding: 4px 0;
}

.category-link:hover {
    color: #ff5d1a;
}

/* 다른 게시글 */
.more-posts {
    margin-bottom: 24px;
}

.more-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.more-item {
    display: flex;
    gap: 12px;
}

.more-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 12px;
    transition: transform 0.3s ease;
}

.more-link:hover {
    text-decoration: none;
    color: inherit;
    transform: translateX(4px);
}

.more-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.more-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    overflow: hidden; /* 내용이 컨테이너를 벗어나지 않도록 */
}

.more-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c2c2c;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
    word-wrap: break-word; /* 긴 단어가 컨테이너를 벗어나지 않도록 줄바꿈 */
    word-break: break-word; /* 단어 경계에서 줄바꿈 */
    hyphens: auto; /* 하이픈으로 단어 분리 (지원하는 브라우저에서) */
}

.more-date {
    font-size: 0.8rem;
    color: #999999;
}

/* 본문 내 이미지 스타일 */
.content-image {
    margin: 40px 0;
    text-align: center;
}

.inline-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.inline-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.image-caption {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #666666;
    font-style: italic;
    line-height: 1.4;
}


/* 관련 포스트 */
.related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.related-posts h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 30px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.related-post {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.related-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-link:hover {
    text-decoration: none;
    color: inherit;
}

.related-post img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-post h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #2c2c2c;
    margin: 15px 15px 10px 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-date {
    font-size: 0.8rem;
    color: #999999;
    margin: 0 15px 15px 15px;
    display: block;
}

/* 삭제 확인 모달 스타일 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c2c2c;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: #f8f9fa;
    color: #333;
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin: 0 0 12px 0;
    color: #333;
    line-height: 1.5;
}

.warning-text {
    color: #dc3545;
    font-weight: 500;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #eee;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-cancel {
    background-color: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* 반응형 디자인 - 블로그 상세 페이지 */
@media (max-width: 1200px) {
    .blog-detail-container .container {
        grid-template-columns: 200px 1fr 250px;
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .blog-detail-container .container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .left-sidebar,
    .right-sidebar {
        position: static;
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .sidebar-content {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .blog-detail-container {
        padding: 20px 0 120px 0; /* 모바일에서도 푸터와 충분한 간격 확보 */
    }
    
    .blog-detail-container .container {
        padding: 0 15px;
    }
    
    /* 모바일에서 좌측 사이드바(목차) 숨김 */
    .left-sidebar {
        display: none;
    }
    
    /* 모바일에서 우측 사이드바(더 읽을거리) 숨김 */
    .right-sidebar {
        display: none;
    }
    
    .blog-detail-title {
        font-size: 2rem;
    }
    
    .blog-detail-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .detail-img {
        height: 250px;
    }
    
    .content-text {
        font-size: 1rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar-content {
        padding: 16px;
    }
    
    .post-stats .share-buttons {
        justify-content: center;
    }
    
    .post-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    /* 모바일에서 수정/삭제 버튼 위치 조정 */
    .blog-detail-header .post-actions {
        position: static;
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .action-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    /* 본문 이미지 반응형 */
    .content-image {
        margin: 30px 0;
    }
    
    .inline-image {
        border-radius: 8px;
        max-width: 100%;
        height: auto;
    }
    
    .image-caption {
        font-size: 0.8rem;
        margin-top: 10px;
    }
    
    /* 모바일에서 본문 이미지 추가 제어 */
    .content-text img {
        max-width: 100%;
        height: auto;
        margin: 15px auto;
    }
}
