/*
 Theme Name:   서울백년치과 칼럼
 Theme URI:    https://seoul100dent.com/column/
 Description:  서울백년치과의원 대표원장 칼럼 워드프레스 테마
 Version:      1.0.0
 Author:       서울백년치과의원
 Text Domain:  seoul100dent-column
*/

/* ─── 글로벌 리셋 ─── */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding: 0; font-family: "Pretendard", -apple-system, BlinkMacSystemFont, sans-serif; color: #333; background: #f9fafb; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; height: auto; }

@media screen and (max-width: 600px) { #wpadminbar { position: fixed !important; } }

/* ─── 사이트 헤더 ─── */
.wp-col-header { background: #fff; box-shadow: 0 1px 8px rgba(0,0,0,0.08); position: relative; z-index: 99999; }
.wp-col-header nav { display: flex; align-items: center; justify-content: space-between; height: 70px; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wp-col-header .hd-logo img { height: auto; width: auto; display: block; }
.wp-col-header .hd-menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; align-items: center; }
.wp-col-header .hd-menu a {
    font-size: 15px; font-weight: 500; color: #555; text-decoration: none;
    transition: color 0.2s, background 0.2s;
    display: inline-block; text-align: center; padding: 10px 20px;
    letter-spacing: -0.03em; border-radius: 8px; line-height: 1.4;
}
.wp-col-header .hd-menu a:hover { color: #1a6e3a; background: #edf7f1; }
.wp-col-header .hd-menu .hd-cta a {
    color: #fff; font-weight: 600; background: #1a6e3a;
    border-radius: 100px; padding: 10px 24px;
}
.wp-col-header .hd-menu .hd-cta a:hover { background: #155a30; color: #fff; }
.wp-col-header .mo-toggle { display: none; cursor: pointer; padding: 8px; background: none; border: none; }
.wp-col-header .mo-toggle span { display: block; width: 22px; height: 2px; background: #555; margin: 5px 0; transition: all 0.2s; border-radius: 2px; }
.wp-col-header .mo-overlay { display: none; }

/* 태블릿 헤더 */
@media (max-width: 1600px) {
    .wp-col-header nav { height: 60px; padding: 0 20px; }
    .wp-col-header .hd-logo img { height: 24px; }
    .wp-col-header .hd-menu a { font-size: 13px; padding: 8px 14px; }
    .wp-col-header .hd-menu .hd-cta a { padding: 8px 18px; }
}

/* 모바일 헤더 */
@media (max-width: 960px) {
    .wp-col-header nav { height: 56px; padding: 0 16px; }
    .wp-col-header .hd-logo img { max-height: 28px; width: auto; }
    .wp-col-header .mo-toggle { display: block; }
    .wp-col-header .hd-menu {
        position: fixed; top: 0; right: 0; width: 300px; height: 100vh;
        flex-direction: column; align-items: stretch;
        background: #fff; padding: 0; gap: 0; z-index: 100001;
        transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
        will-change: transform; overflow-y: auto; -webkit-overflow-scrolling: touch;
        box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    }
    .wp-col-header .hd-menu.open { transform: translateX(0); }
    .wp-col-header .hd-menu li { width: 100%; border-bottom: 1px solid #f0f0f0; }
    .wp-col-header .hd-menu a {
        display: block; width: 100%; box-sizing: border-box; text-align: left;
        padding: 16px 24px; font-size: 15px; border-radius: 0;
    }
    .wp-col-header .hd-menu a:active { background: #edf7f1; }
    .wp-col-header .hd-menu .hd-cta { padding: 16px 24px; border-bottom: none; }
    .wp-col-header .hd-menu .hd-cta a {
        display: block; text-align: center; border-radius: 100px;
        padding: 14px 20px; font-size: 15px; max-width: 200px; margin: 0 auto;
        box-shadow: 0 2px 8px rgba(26,110,58,0.3);
    }
    .wp-col-header .mo-overlay {
        display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.4); z-index: 100000;
        opacity: 0; transition: opacity 0.3s;
    }
    .wp-col-header .mo-overlay.open { display: block; opacity: 1; }
    .wp-col-header .hd-menu .mo-close-wrap {
        display: flex; align-items: center; justify-content: space-between;
        padding: 0 16px; height: 56px;
        border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
    }
    .wp-col-header .hd-menu .mo-close-wrap a { padding: 0; }
    .wp-col-header .hd-menu .mo-close-wrap .mo-logo img { height: 24px; width: auto; }
    .wp-col-header .hd-menu .mo-close { background: none; border: none; font-size: 22px; color: #999; cursor: pointer; padding: 8px; line-height: 1; }
    .wp-col-header .hd-menu .mo-contact {
        padding: 12px 24px; border-bottom: none; max-width: 200px; margin: 8px auto 16px;
    }
    .wp-col-header .hd-menu .mo-contact a {
        display: flex; align-items: center; justify-content: center; gap: 8px;
        background: #f8f9fa; border-radius: 100px; padding: 12px 20px;
        color: #333; font-weight: 600; font-size: 15px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
        white-space: nowrap;
    }
    .wp-col-header .hd-menu .mo-contact a:active { background: #edf7f1; }
    .wp-col-header .hd-menu .mo-contact a svg { flex-shrink: 0; }
}

/* PC 모바일 전용 요소 숨김 */
@media (min-width: 961px) {
    .wp-col-header .hd-menu .mo-close-wrap { display: none; }
    .wp-col-header .hd-menu .mo-contact { display: none; }
}

/* ─── 메인 레이아웃 ─── */
.site-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.site-content { display: flex; gap: 40px; margin-top: 40px; }
.content-area { flex: 1; min-width: 0; }

@media (max-width: 960px) {
    .site-content { flex-direction: column; gap: 0; }
}

/* ─── 블로그 카드 그리드 ─── */
.columns-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 960px) { .columns-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (max-width: 600px) { .columns-grid { grid-template-columns: 1fr; gap: 16px; } }

/* 카드 */
.column-card {
    border-radius: 14px; overflow: hidden; background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1px solid #eee;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex; flex-direction: column;
}
.column-card:hover {
    transform: translateY(-6px); box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

/* 썸네일 */
.card-thumb { display: block; aspect-ratio: 16/9; overflow: hidden; text-decoration: none; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.column-card:hover .card-thumb img { transform: scale(1.05); }
.card-no-thumb {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #edf7f1 0%, #d4edda 100%);
    display: flex; align-items: center; justify-content: center; color: #1a6e3a;
}
.card-no-thumb svg { width: 48px; height: 48px; opacity: 0.5; }

/* 카드 본문 */
.card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.card-cat {
    display: inline-block; padding: 4px 12px; border-radius: 100px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
    background: #edf7f1; color: #1a6e3a; text-decoration: none;
    align-self: flex-start; margin-bottom: 10px;
}
.card-title {
    font-size: 17px; font-weight: 700; line-height: 1.5;
    letter-spacing: -0.03em; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-title a { color: #222; text-decoration: none; transition: color 0.2s; }
.card-title a:hover { color: #1a6e3a; }
.card-meta { font-size: 12px; color: #bbb; margin-top: 8px; }
.card-excerpt {
    font-size: 14px; color: #888; line-height: 1.7; margin: 12px 0 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* 페이지네이션 */
.pagination { margin-top: 32px; text-align: center; }
.pagination .nav-links { display: flex; justify-content: center; gap: 4px; }
.pagination .page-numbers { display: inline-block; padding: 8px 14px; border-radius: 8px; font-size: 14px; color: #555; text-decoration: none; }
.pagination .page-numbers.current { background: #1a6e3a; color: #fff; font-weight: 600; }
.pagination .page-numbers:hover:not(.current) { background: #edf7f1; color: #1a6e3a; }

/* ─── 싱글 포스트 ─── */
.single-header { text-align: center; margin-bottom: 40px; }
.single-cat {
    display: inline-block; padding: 4px 14px; border-radius: 100px;
    font-size: 12px; font-weight: 600; background: #edf7f1; color: #1a6e3a;
    margin-bottom: 16px;
}
.single-title { font-size: 28px; font-weight: 700; line-height: 1.4; margin: 0 0 12px; letter-spacing: -0.03em; color: #111; }
.single-meta { font-size: 14px; color: #999; }

.single-content { font-size: 17px; line-height: 2; color: #333; }
.single-content h2 { font-size: 22px; font-weight: 700; margin: 48px 0 16px; padding-bottom: 12px; border-bottom: 2px solid #1a6e3a; color: #1a1a1a; }
.single-content h3 { font-size: 19px; font-weight: 600; margin: 32px 0 12px; color: #333; }
.single-content p { margin-bottom: 20px; }
.single-content img { border-radius: 8px; height: auto; }
.single-content blockquote {
    border-left: 4px solid #1a6e3a; background: #f6faf7; padding: 20px 24px;
    margin: 24px 0; border-radius: 0 8px 8px 0; font-style: normal;
}
.single-content ul, .single-content ol { padding-left: 24px; margin-bottom: 20px; }
.single-content li { margin-bottom: 8px; line-height: 1.8; }

/* 이전/다음 글 */
.col-post-nav {
    margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 0;
    border: 1px solid #f0f0f0; border-radius: 12px; overflow: hidden;
    background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.col-nav-item {
    padding: 24px 28px; text-decoration: none; display: flex; flex-direction: column; gap: 8px;
    transition: background 0.2s;
}
.col-nav-prev { border-right: 1px solid #f0f0f0; }
.col-nav-item:hover { background: #f6faf7; }
.col-nav-label { font-size: 12px; color: #1a6e3a; font-weight: 600; letter-spacing: 0.03em; }
.col-nav-title {
    font-size: 15px; font-weight: 600; color: #333; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.col-nav-item:hover .col-nav-title { color: #1a6e3a; }
.col-nav-next { text-align: right; align-items: flex-end; }
.col-nav-empty { min-height: 1px; }
@media (max-width: 600px) {
    .col-post-nav { grid-template-columns: 1fr; }
    .col-nav-prev { border-right: none; border-bottom: 1px solid #f0f0f0; }
    .col-nav-next { text-align: left; align-items: flex-start; }
}

/* 관련 칼럼 */
.related-posts { margin-top: 48px; }
.related-title {
    font-size: 20px; font-weight: 700; color: #222; margin: 0 0 20px;
    padding-bottom: 12px; border-bottom: 2px solid #1a6e3a; display: inline-block;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card {
    text-decoration: none; border: 1px solid #f0f0f0; border-radius: 12px;
    overflow: hidden; background: #fff; transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.related-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.related-thumb { aspect-ratio: 16/9; overflow: hidden; }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-no-thumb {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #edf7f1 0%, #d4edda 100%); color: #1a6e3a;
}
.related-body { padding: 16px; }
.related-date { font-size: 12px; color: #aaa; display: block; margin-bottom: 6px; }
.related-post-title {
    font-size: 15px; font-weight: 600; color: #333; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.related-card:hover .related-post-title { color: #1a6e3a; }
@media (max-width: 768px) { .related-grid { grid-template-columns: 1fr; } }

/* ─── 사이드바 ─── */
.wp-col-sidebar { width: 280px; flex-shrink: 0; }
@media (max-width: 960px) { .wp-col-sidebar { width: 100%; } }
.wp-col-sidebar .sb-widget {
    background: #fff; border: 1px solid #f0f0f0; border-radius: 12px;
    padding: 24px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.wp-col-sidebar .sb-title {
    font-size: 16px; font-weight: 700; color: #333; margin: 0 0 16px;
    display: flex; align-items: center; gap: 8px;
}
.wp-col-sidebar .sb-icon { font-size: 18px; }

/* 진료예약 */
.wp-col-sidebar .sb-phone {
    display: block; text-align: center; font-family: "Marcellus", serif;
    font-size: 28px; font-weight: 400; color: #1a6e3a; text-decoration: none;
    padding: 12px 0; border: 2px solid #1a6e3a; border-radius: 10px;
    transition: background 0.2s, color 0.2s; letter-spacing: 0.02em;
}
.wp-col-sidebar .sb-phone:hover { background: #1a6e3a; color: #fff; }
.wp-col-sidebar .sb-cta { text-align: center; font-size: 13px; color: #999; margin-top: 10px; }
.wp-col-sidebar .sb-hours { margin-top: 14px; }
.wp-col-sidebar .sb-hours .sb-hour-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; border-bottom: 1px solid #f5f5f5; }
.wp-col-sidebar .sb-hours .sb-hour-row:last-of-type { border-bottom: none; }
.wp-col-sidebar .sb-hours .sb-day { font-weight: 600; color: #333; }
.wp-col-sidebar .sb-hours .sb-day em { font-style: normal; font-size: 11px; font-weight: 700; color: #1a6e3a; background: #edf7f1; padding: 1px 6px; border-radius: 4px; margin-left: 2px; vertical-align: middle; }
.wp-col-sidebar .sb-hours .sb-time { color: #666; }
.wp-col-sidebar .sb-hours .sb-hour-note { font-size: 12px; color: #999; margin-top: 8px; }

/* 의료진 */
.wp-col-sidebar .sb-doctor {
    display: flex; align-items: center; gap: 12px; padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}
.wp-col-sidebar .sb-doctor:last-child { border-bottom: none; }
.wp-col-sidebar .sb-doctor-icon {
    width: 44px; height: 44px; border-radius: 50%;
    background: #edf7f1; display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.wp-col-sidebar .sb-doctor-name { font-size: 15px; font-weight: 600; color: #333; }
.wp-col-sidebar .sb-doctor-spec { font-size: 13px; color: #999; }

/* 인기글 */
.wp-col-sidebar .sb-popular { list-style: none; padding: 0; margin: 0; }
.wp-col-sidebar .sb-popular li {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid #f5f5f5;
}
.wp-col-sidebar .sb-popular li:last-child { border-bottom: none; }
.wp-col-sidebar .sb-rank {
    width: 24px; height: 24px; border-radius: 6px;
    background: #1a6e3a; color: #fff; font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.wp-col-sidebar .sb-popular li:nth-child(n+4) .sb-rank { background: #ccc; }
.wp-col-sidebar .sb-popular a { font-size: 14px; color: #555; text-decoration: none; line-height: 1.5; }
.wp-col-sidebar .sb-popular a:hover { color: #1a6e3a; }

/* 오시는길 */
.wp-col-sidebar .sb-location-item { font-size: 14px; color: #555; padding: 6px 0; line-height: 1.6; }
.wp-col-sidebar .sb-location-label {
    display: inline-block; font-size: 12px; font-weight: 600; color: #1a6e3a;
    background: #edf7f1; padding: 1px 8px; border-radius: 4px; margin-right: 6px;
}

/* FAQ */
.wp-col-sidebar .sb-faq-item { padding: 12px 0; border-bottom: 1px solid #f5f5f5; }
.wp-col-sidebar .sb-faq-item:last-child { border-bottom: none; }
.wp-col-sidebar .sb-faq-q { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 6px; }
.wp-col-sidebar .sb-faq-a { font-size: 13px; color: #777; line-height: 1.6; }

/* ─── 푸터 ─── */
.wp-col-footer { background: #1a1a1a; color: rgba(255,255,255,0.6); padding: 40px 0 24px; margin-top: 60px; }
.wp-col-footer .ft-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wp-col-footer .ft-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.wp-col-footer .ft-logo img { height: 32px; width: auto; }
.wp-col-footer .ft-info { font-size: 13px; line-height: 1.8; }
.wp-col-footer .ft-info strong { color: rgba(255,255,255,0.85); }
.wp-col-footer .ft-bottom { text-align: center; padding-top: 20px; font-size: 12px; color: rgba(255,255,255,0.4); }
@media (max-width: 768px) {
    .wp-col-footer .ft-top { flex-direction: column; gap: 20px; }
}

/* ─── 의료검증 블록 ─── */
.medical-verify {
    margin-top: 2em; padding: 16px 20px; background: #f8f9fa;
    border-radius: 8px; border-left: 4px solid #1a6e3a;
    font-size: 14px; color: #555;
}
.medical-verify strong { color: #333; }
.medical-verify a { color: #1a6e3a; }
