/*
 * 찬이작업실 – 네이버 블로그 스타일
 * Frontend: 글 목록 + 단일 글 + 에디터 공통
 */

/* ============================================================
   1. 구글 폰트 – 나눔고딕 (한국어 최적화)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Nanum+Gothic:wght@400;700;800&display=swap');

/* ============================================================
   2. 전역 폰트 & 기본 설정
   ============================================================ */
body,
.ct-site-content-wrapper,
.entry-content,
.entry-title,
.entry-meta,
.widget,
input, textarea, select, button {
    font-family: 'Nanum Gothic', 'Apple SD Gothic Neo', '맑은 고딕', Malgun Gothic, -apple-system, sans-serif !important;
    word-break: keep-all;
    word-wrap: break-word;
}

/* ============================================================
   3. 단일 글 (Single Post) – 네이버 블로그 레이아웃
   ============================================================ */

/* 글 전체 카드 래퍼 */
.single .hentry {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    padding: 0;
    margin-bottom: 40px;
    overflow: hidden;
}

/* 썸네일 이미지 */
.single .post-thumbnail {
    margin: 0;
    padding: 0;
    overflow: hidden;
    max-height: 420px;
}
.single .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px 12px 0 0;
    margin: 0 !important;
    box-shadow: none !important;
}

/* 글 헤더 영역 */
.single .entry-header {
    padding: 32px 40px 16px;
    border-bottom: 1px solid #f0f0f0;
}

/* 카테고리 배지 */
.single .entry-header .category-list,
.single .entry-header .cat-links {
    margin-bottom: 12px;
}
.single .entry-header .category-list a,
.single .entry-header .cat-links a {
    display: inline-block;
    background: #03c75a;
    color: #fff !important;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    text-decoration: none !important;
    letter-spacing: 0.3px;
    margin-right: 4px;
}
.single .entry-header .category-list a:hover,
.single .entry-header .cat-links a:hover {
    background: #02b351;
}

/* 글 제목 */
.single .entry-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.5;
    color: #1a1a1a;
    margin: 0 0 16px;
    letter-spacing: -0.5px;
}

/* 작성자 / 날짜 메타 */
.single .entry-meta {
    font-size: 13px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.single .entry-meta a {
    color: #888 !important;
    text-decoration: none !important;
}
.single .entry-meta .byline::before {
    content: '✍ ';
}
.single .entry-meta .posted-on::before {
    content: '📅 ';
}

/* ============================================================
   4. 본문 콘텐츠 (entry-content) – 네이버 블로그 본문 스타일
   ============================================================ */
.single .entry-content {
    padding: 36px 40px;
    font-size: 16px;
    line-height: 1.95;
    color: #333;
    max-width: 100%;
}

/* 문단 */
.single .entry-content p {
    margin-bottom: 22px;
    line-height: 1.95;
    color: #333;
}

/* 소제목 h2 */
.single .entry-content h2 {
    font-size: 21px;
    font-weight: 800;
    color: #111;
    margin: 44px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #03c75a;
    letter-spacing: -0.3px;
}

/* 소제목 h3 */
.single .entry-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin: 32px 0 12px;
    padding-left: 12px;
    border-left: 4px solid #03c75a;
}

/* h4 */
.single .entry-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 24px 0 10px;
}

/* 이미지 */
.single .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    margin: 8px auto 24px;
    display: block;
}
.single .entry-content figure {
    margin: 24px 0;
    text-align: center;
}
.single .entry-content figcaption {
    font-size: 13px;
    color: #888;
    margin-top: 8px;
    text-align: center;
}

/* 인용구 (blockquote) */
.single .entry-content blockquote {
    border-left: 4px solid #03c75a;
    background: #f8fff8;
    margin: 24px 0;
    padding: 16px 24px;
    border-radius: 0 8px 8px 0;
    font-style: normal;
    color: #444;
    font-size: 15px;
    line-height: 1.8;
}
.single .entry-content blockquote p {
    margin-bottom: 0;
}
.single .entry-content blockquote cite {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #888;
}

/* 코드 */
.single .entry-content code {
    background: #f5f5f5;
    color: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Courier New', Consolas, monospace;
}
.single .entry-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px 24px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 24px 0;
    font-size: 14px;
    line-height: 1.6;
}
.single .entry-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

/* 목록 */
.single .entry-content ul,
.single .entry-content ol {
    padding-left: 24px;
    margin-bottom: 20px;
}
.single .entry-content ul li,
.single .entry-content ol li {
    margin-bottom: 8px;
    line-height: 1.8;
}
.single .entry-content ul {
    list-style: none;
    padding-left: 0;
}
.single .entry-content ul li::before {
    content: '▸ ';
    color: #03c75a;
    font-size: 13px;
    margin-right: 4px;
}

/* 구분선 */
.single .entry-content hr {
    border: none;
    border-top: 2px dashed #e0e0e0;
    margin: 32px 0;
}

/* 링크 */
.single .entry-content a {
    color: #03c75a;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 700;
}
.single .entry-content a:hover {
    color: #02a44a;
}

/* 표 (table) */
.single .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
}
.single .entry-content th {
    background: #f0fdf4;
    color: #1a1a1a;
    font-weight: 700;
    padding: 12px 16px;
    border: 1px solid #d1fae5;
    text-align: left;
}
.single .entry-content td {
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    color: #444;
}
.single .entry-content tr:nth-child(even) td {
    background: #fafafa;
}

/* ============================================================
   5. 글 푸터 – 태그 + 공유
   ============================================================ */
.single .entry-footer {
    padding: 20px 40px 32px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}

/* 태그 */
.single .entry-footer .tags-links,
.single .entry-footer .post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 0;
}
.single .entry-footer .tags-links a,
.single .entry-footer .post-tags a {
    display: inline-block;
    background: #fff;
    border: 1px solid #d1d5db;
    color: #555 !important;
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 20px;
    text-decoration: none !important;
    transition: all 0.2s;
}
.single .entry-footer .tags-links a:hover,
.single .entry-footer .post-tags a:hover {
    background: #03c75a;
    border-color: #03c75a;
    color: #fff !important;
}
.single .entry-footer .tags-links::before {
    content: '🏷 태그: ';
    font-size: 13px;
    color: #888;
    white-space: nowrap;
}

/* ============================================================
   6. 이전글/다음글 네비게이션
   ============================================================ */
.post-navigation {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 0;
    margin-bottom: 32px;
    overflow: hidden;
}
.post-navigation .nav-links {
    display: flex;
}
.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
    padding: 20px 28px;
    transition: background 0.2s;
}
.post-navigation .nav-previous {
    border-right: 1px solid #f0f0f0;
}
.post-navigation .nav-previous:hover,
.post-navigation .nav-next:hover {
    background: #f8fff8;
}
.post-navigation .nav-subtitle {
    font-size: 12px;
    color: #aaa;
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.post-navigation .nav-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
}
.post-navigation a {
    text-decoration: none !important;
    display: block;
}
.post-navigation a:hover .nav-title {
    color: #03c75a;
}

/* ============================================================
   7. 글 목록 카드 스타일 (홈, 아카이브)
   ============================================================ */

/* 카드 */
.ct-post-wrapper article.post {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: box-shadow 0.25s, transform 0.25s;
    margin-bottom: 28px;
}
.ct-post-wrapper article.post:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

/* 목록 썸네일 */
.ct-post-wrapper .post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

/* 목록 카드 헤더 */
.ct-post-wrapper .entry-header {
    padding: 18px 22px 10px;
}

/* 목록 카테고리 배지 */
.ct-post-wrapper .entry-header .category-list a {
    display: inline-block;
    background: #03c75a;
    color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    text-decoration: none !important;
    margin-bottom: 8px;
}

/* 목록 글 제목 */
.ct-post-wrapper .entry-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
    color: #1a1a1a;
    margin: 6px 0 8px;
}
.ct-post-wrapper .entry-title a {
    color: inherit !important;
    text-decoration: none !important;
}
.ct-post-wrapper .entry-title a:hover {
    color: #03c75a !important;
}

/* 목록 메타 */
.ct-post-wrapper .entry-meta {
    font-size: 12px;
    color: #999;
    padding: 0 22px;
}

/* 목록 발췌문 */
.ct-post-wrapper .entry-summary {
    padding: 8px 22px 20px;
    font-size: 14px;
    color: #555;
    line-height: 1.7;
}
.ct-post-wrapper .entry-summary p {
    margin: 0;
}

/* 더 읽기 버튼 */
.ct-post-wrapper .more-link {
    display: inline-block;
    margin: 4px 22px 20px;
    padding: 7px 18px;
    background: #f0fdf4;
    color: #03c75a !important;
    border: 1px solid #d1fae5;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s;
}
.ct-post-wrapper .more-link:hover {
    background: #03c75a;
    color: #fff !important;
    border-color: #03c75a;
}

/* ============================================================
   8. 사이드바 위젯
   ============================================================ */
.ct-sidebar .widget {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    padding: 22px 22px;
    margin-bottom: 24px;
}
.ct-sidebar .widget-title,
.ct-sidebar .widgettitle {
    font-size: 15px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #03c75a;
}
.ct-sidebar .widget ul li {
    padding: 6px 0;
    border-bottom: 1px dashed #f0f0f0;
    font-size: 14px;
}
.ct-sidebar .widget ul li:last-child {
    border-bottom: none;
}
.ct-sidebar .widget ul li a {
    color: #444 !important;
    text-decoration: none !important;
}
.ct-sidebar .widget ul li a:hover {
    color: #03c75a !important;
}

/* 태그 클라우드 위젯 */
.ct-sidebar .widget.widget_tag_cloud a {
    display: inline-block;
    background: #f5f5f5;
    color: #555 !important;
    font-size: 13px !important;
    padding: 4px 12px;
    border-radius: 20px;
    margin: 3px 2px;
    text-decoration: none !important;
    transition: all 0.2s;
}
.ct-sidebar .widget.widget_tag_cloud a:hover {
    background: #03c75a;
    color: #fff !important;
}

/* ============================================================
   9. 반응형
   ============================================================ */
@media (max-width: 768px) {
    .single .entry-header,
    .single .entry-content,
    .single .entry-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    .single .entry-title {
        font-size: 21px;
    }
    .single .entry-content {
        font-size: 15px;
    }
    .post-navigation .nav-links {
        flex-direction: column;
    }
    .post-navigation .nav-previous {
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }
}
