/* 전체 리셋 및 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 취업·자격증 테마 색상 */
    --primary-color: #2563EB;
    --primary-light: #DBEAFE;
    --primary-dark: #1E40AF;
    --secondary-color: #10B981;
    --accent-color: #F59E0B;
    --text-color: #1F2937;
    --text-light: #6B7280;
    --background-color: #F9FAFB;
    --card-color: #FFFFFF;
    --border-color: #E5E7EB;
    --success-color: #059669;
    --warning-color: #DC2626;
    --info-color: #3B82F6;
    --border-radius: 12px;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    word-break: keep-all;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* 티스토리 기본 아이콘 제거 */
img[src*="new_ico"],
.post-title img,
h1 img,
h2 img,
h3 img {
    display: none !important;
}

/* 컨테이너 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 헤더 */
.header {
    background-color: var(--card-color);
    padding: 30px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.header-inner {
    text-align: center;
}

.blog-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.blog-title a {
    color: var(--primary-color);
    font-weight: 700;
}

.blog-description {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 25px;
}

/* 검색 */
.search-form {
    display: flex;
    align-items: center;
    background-color: var(--background-color);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 400px;
    margin: 0 auto;
}

.search-form input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    font-size: 14px;
    background: transparent;
    outline: none;
}

.search-form button {
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-form button:hover {
    background-color: var(--primary-dark);
}

/* 내비게이션 */
.navigation {
    background-color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navigation ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 0;
}

.navigation li {
    margin: 0;
}

.navigation a {
    display: block;
    padding: 18px 25px;
    color: white;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.navigation a:hover {
    background-color: var(--primary-dark);
    color: white;
}

/* 콘텐츠 래퍼 */
.content-wrapper {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
}

/* 메인 콘텐츠 */
.main-content {
    flex: 1;
}

/* 포스트 아이템 */
.post-item {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 25px;
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

/* 썸네일 */
.post-thumbnail {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-item:hover .post-thumbnail img {
    transform: scale(1.1);
}

.category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.post-info {
    padding: 25px;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.post-title a {
    color: var(--text-color);
    font-weight: 700;
}

.post-excerpt {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 15px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.6;
}

.post-meta {
    font-size: 0.9rem;
    color: #999;
    display: flex;
    gap: 15px;
}

/* 개별 포스트 */
.post-full {
    background-color: var(--card-color);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.post-header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.post-full .post-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--text-color);
    line-height: 1.3;
}

.post-full .post-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.post-meta svg {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    fill: var(--text-light);
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

.post-content h2 {
    font-size: 1.8rem;
    margin: 50px 0 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-light);
    color: var(--primary-dark);
}

.post-content h3 {
    font-size: 1.4rem;
    margin: 35px 0 20px;
    color: var(--primary-color);
}

.post-content p {
    margin-bottom: 20px;
}

.post-content img {
    margin: 30px 0;
    border-radius: 8px;
    max-width: 100%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.post-content ul,
.post-content ol {
    margin: 25px 0;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 12px;
}

.post-content blockquote {
    border-left: 5px solid var(--primary-color);
    padding: 20px 25px;
    margin: 30px 0;
    background-color: var(--primary-light);
    border-radius: 0 8px 8px 0;
}

.post-content pre {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 25px 0;
}

.post-content code {
    background-color: #f5f5f5;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: monospace;
}

/* 합격 팁 박스 */
.success-tip {
    background-color: #ECFDF5;
    border-left: 5px solid var(--secondary-color);
    padding: 25px;
    margin: 40px 0;
    border-radius: 0 10px 10px 0;
}

.tip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.icon-trophy {
    fill: var(--accent-color);
}

.tip-header h3 {
    color: var(--secondary-color);
    margin: 0;
}

.success-tip p {
    margin: 0;
    color: var(--text-color);
}

/* 태그 */
.post-tags {
    margin: 40px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.icon-tag {
    width: 20px;
    height: 20px;
    fill: var(--text-light);
}

.post-tags a {
    display: inline-block;
    background-color: var(--background-color);
    color: var(--primary-dark);
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.post-tags a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 사이드바 */
.sidebar {
    width: 350px;
    flex-shrink: 0;
}

.widget {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.widget-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
}

/* 프로필 위젯 */
.profile {
    text-align: center;
}

.profile-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-light);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h3 {
    margin-bottom: 12px;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.profile-description {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.social-icon:hover {
    background-color: var(--primary-color);
}

.social-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--text-color);
}

.social-icon:hover svg {
    fill: white;
}

/* 계층형 카테고리 스타일 - 심플하게 수정 */
.category-list ul {
    list-style: none;
    padding: 0;
}

.category-list > ul > li {
    margin-bottom: 8px;
}

.category-list a {
    display: block;
    padding: 8px 0;
    color: var(--text-color);
    transition: all 0.3s;
    position: relative;
    text-decoration: none;
}

/* 상위 카테고리 */
.category-list > ul > li > a {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1rem;
}

/* 하위 카테고리 */
.category-list ul ul {
    margin-left: 20px;
    margin-top: 5px;
}

.category-list ul ul li {
    margin: 5px 0;
}

.category-list ul ul a {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-light);
}

/* 하위 카테고리 하이픈 표시 */
.category-list ul ul a::before {
    content: "- ";
    color: var(--text-light);
}

/* 호버 효과 */
.category-list a:hover {
    color: var(--primary-color);
}

/* 상위 카테고리 호버시 약간 이동 */
.category-list > ul > li > a:hover {
    padding-left: 5px;
}

/* 카테고리 카운트 스타일 */
.category-list .c_cnt {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-left: 5px;
}

/* 인기글 위젯 */
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.post-rank {
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.popular-info {
    flex: 1;
}

.popular-info a {
    display: block;
    color: var(--text-color);
    margin-bottom: 5px;
    font-weight: 500;
}

.popular-info .post-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* 합격률 위젯 */
.stats-widget {
    background-color: var(--card-color);
}

.stats-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-name {
    font-weight: 500;
    color: var(--text-color);
    width: 100px;
}

.stat-bar {
    flex: 1;
    height: 20px;
    background-color: var(--background-color);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 1s ease;
}

.stat-percent {
    font-weight: 700;
    color: var(--primary-color);
    width: 50px;
    text-align: right;
}

/* 태그 클라우드 위젯 */
.tag-cloud-widget {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud-widget a {
    display: inline-block;
    background-color: var(--background-color);
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.tag-cloud-widget a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 50px 0;
}

.pagination a,
.pagination span {
    padding: 10px 18px;
    background-color: var(--card-color);
    border-radius: 8px;
    color: var(--text-color);
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.pagination a:hover,
.pagination .selected {
    background-color: var(--primary-color);
    color: white;
}

.pagination .prev,
.pagination .next {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 푸터 */
.footer {
    background-color: var(--text-color);
    color: white;
    padding: 50px 0 20px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    margin-bottom: 30px;
}

.footer-logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.footer-desc {
    margin-top: 15px;
    color: #BDC3C7;
    line-height: 1.6;
}

.footer h4 {
    margin-bottom: 20px;
    color: white;
}

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

.footer-nav li {
    margin-bottom: 12px;
}

.footer-nav a {
    color: #BDC3C7;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: white;
}

.footer .social-links {
    display: flex;
    gap: 15px;
}

.footer .social-link {
    padding: 8px 16px;
    background-color: var(--primary-color);
    border-radius: 25px;
    color: white;
    transition: all 0.3s;
}

.footer .social-link:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #34495E;
    color: #BDC3C7;
}

/* 목차 스타일 */
.article-toc {
    background-color: #f8f9fa;
    border: 2px solid var(--primary-light);
    border-radius: 10px;
    padding: 25px;
    margin: 0 0 40px 0;
    position: relative;
}

.article-toc:empty {
    display: none;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.toc-header h4 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary-dark);
    font-weight: 700;
}

.toc-toggle {
    background: none;
    border: 2px solid var(--primary-color);
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    border-radius: 6px;
    color: var(--primary-color);
    transition: all 0.3s;
}

.toc-toggle:hover {
    background-color: var(--primary-color);
    color: white;
}

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

.toc-item {
    margin: 10px 0;
}

.toc-h2 {
    font-weight: 600;
}

.toc-h3 {
    margin-left: 25px;
    font-size: 0.95em;
    font-weight: 400;
}

.toc-link {
    color: var(--text-color);
    text-decoration: none;
    display: block;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.toc-link:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    padding-left: 15px;
}

/* 반응형 */
@media (max-width: 768px) {
    .blog-title {
        font-size: 2rem;
    }
    
    .search-form {
        width: 90%;
    }
    
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .post-thumbnail {
        height: 200px;
    }
    
    .post-full {
        padding: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer .social-links {
        justify-content: center;
    }
    
    .navigation ul {
        flex-wrap: wrap;
    }
    
    .navigation a {
        padding: 12px 15px;
    }
}

/* 관리자 버튼 */
.admin-buttons {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 2px solid var(--border-color);
}

.btn-edit,
.btn-delete {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-edit {
    background-color: var(--primary-color);
    color: white;
}

.btn-edit:hover {
    background-color: var(--primary-dark);
    color: white;
}

.btn-delete {
    background-color: var(--warning-color);
    color: white;
}

.btn-delete:hover {
    background-color: #B91C1C;
    color: white;
}



.post-comments {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid #e5e7eb;
}
.comments-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 20px;
}
.comment-list {
    margin-top: 30px;
}
.comment-item {
    border-bottom: 1px solid #e5e7eb;
    padding: 20px 0;
}
.comment-author {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}
.comment-date {
    font-size: 0.85rem;
    color: var(--text-light);
}
.comment-content {
    margin-top: 10px;
    font-size: 1rem;
    color: var(--text-color);
}
.comment-form {
    margin-top: 40px;
    padding: 30px;
    background-color: var(--background-color);
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}
.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    resize: vertical;
    font-size: 1rem;
    margin-bottom: 15px;
}
.comment-form button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}
.comment-form button:hover {
    background-color: var(--primary-dark);
}

/* btn-hover.color 공통 CSS 시작 */ 
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
 
.buttons {
    margin: 10%;
    text-align: center;
}
 
.btn-hover {
    min-width: 300px; /* 버튼 최소 폭 */
    padding: 0px 40px; /* 내부 여백 */
    font-size: 16px; /* 폰트 크기 */
    font-weight: 600; /* 폰트 굵기 */
    color: #fff !important; /* 글꼴 색상 */
    cursor: pointer;
    margin: 20px;
    height: 55px;
    text-align:center;
    border: none;
    background-size: 300% 100%;
 
    border-radius: 50px;
    moz-transition: all .4s ease-in-out;
    -o-transition: all .4s ease-in-out;
    -webkit-transition: all .4s ease-in-out;
    transition: all .4s ease-in-out;
}
 
.btn-hover:hover {
    background-position: 100% 0;
    moz-transition: all .4s ease-in-out;
    -o-transition: all .4s ease-in-out;
    -webkit-transition: all .4s ease-in-out;
    transition: all .4s ease-in-out;
}
 
.btn-hover:focus {
    outline: none;
}
/* btn-hover.color 공통 CSS 끝 */

/* CSS 버튼6 */
.btn-hover.color-6 {
    background-image: linear-gradient(to right, #667eea, #764ba2, #6B8DD6, #8E37D7);
    box-shadow: 0 4px 15px 0 rgba(116, 79, 168, 0.75);
}
/* CSS 버튼6 끝 */


/* 본문 HR: 에디터(style1, style6 등) 배경·패딩 완전 제거 + 동일 스타일 강제 */
#article-view > .tt_article_useless_p_margin.contents_style hr,
#article-view > .tt_article_useless_p_margin.contents_style hr[data-ke-style],
#article-view > .tt_article_useless_p_margin.contents_style hr[data-ke-type="horizontalRule"]{
  /* 에디터가 넣은 점선/패턴/띠 배경 싹 제거 */
  background: none !important;
  background-image: none !important;
  background-position: initial !important;
  background-size: auto !important;
  background-repeat: no-repeat !important;

  /* 폭/높이/여백 고정 → CLS 안전 */
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: 1px !important;
  margin: 28px 0 !important;

  /* 패딩/보더로 인해 띠처럼 두꺼워지는 현상 방지 */
  padding: 0 !important;
  border: 0 !important;
  box-sizing: border-box;

  /* 원하는 회색 단색 라인 */
  background-color: #cfd7e6 !important;
}

/* 혹시 p 안으로 들어간 경우도 풀폭 라인으로 통일 */
#article-view > .tt_article_useless_p_margin.contents_style p > hr{
  background: none !important;
  background-image: none !important;
  padding: 0 !important;
  border: 0 !important;
  height: 1px !important;
  width: 100% !important;
  background-color: #cfd7e6 !important;
}

/* 연속 hr 실수 방지(선택) */
#article-view > .tt_article_useless_p_margin.contents_style hr + hr{ display:none; }

/* 문서 맨 위/아래에 붙은 hr 간격 보정(선택) */
#article-view > .tt_article_useless_p_margin.contents_style hr:first-child{ margin-top:12px !important; }
#article-view > .tt_article_useless_p_margin.contents_style hr:last-child { margin-bottom:12px !important; }

.entry-content img[width][height]{ max-width:100%; height:auto; }