/*
 Theme Name:   Astra Child - 유앤아이치과의원
 Theme URI:    https://column.younident.com/
 Description:  유앤아이치과의원 칼럼용 차일드 테마
 Author:       유앤아이치과의원
 Template:     astra
 Version:      2.0.0
 Text Domain:  astra-child
*/

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

:root {
    --ui-main: #212121;
    --ui-accent: #B08D57;
    --ui-accent-light: rgba(176,141,87,0.08);
    --ui-dark: #181818;
    --ui-light: #f8f7f5;
    --ui-text: #333;
    --ui-text-light: #666;
    --ui-border: #e8e5e0;
    --ui-white: #fff;
    --ui-radius: 12px;
    --ui-footer-bg: #2a2a2a;
}

* { box-sizing: border-box; }

body {
    font-family: 'Pretendard', -apple-system, sans-serif;
    color: var(--ui-text);
    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
    margin: 0;
    line-height: 1.6;
}

a { color: var(--ui-text); text-decoration: none; }
ul, li { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; vertical-align: middle; }

/* ===== PC 헤더 ===== */
.col-pc-header {
    width: 100%;
    background: var(--ui-white);
    border-bottom: 1px solid var(--ui-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.col-pc-header .hd-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 70px;
}
.col-pc-header .hd-logo img { height: 44px; }
.col-pc-header .hd-nav { display: flex; gap: 6px; align-items: center; }
.col-pc-header .hd-nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--ui-text);
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}
.col-pc-header .hd-nav a:hover,
.col-pc-header .hd-nav a.active {
    color: var(--ui-accent);
    background: rgba(0, 220, 224, 0.06);
}
.col-pc-header .hd-nav a.btn-column {
    background: var(--ui-main);
    color: var(--ui-white);
    font-weight: 600;
    padding: 8px 18px;
}
.col-pc-header .hd-nav a.btn-column:hover {
    background: var(--ui-accent);
    color: var(--ui-main);
}

/* ===== 모바일 헤더 ===== */
.col-mo-header {
    display: none;
    width: 100%;
    background: var(--ui-main);
    height: 56px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 101;
    padding: 0 16px;
}
.col-mo-header .hd-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.col-mo-header .hd-logo img { height: 28px; filter: brightness(10); }
.col-mo-header .hd-menu-btn {
    width: 28px; height: 28px;
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    cursor: pointer; background: none; border: none; padding: 0;
}
.col-mo-header .hd-menu-btn span {
    display: block; width: 100%; height: 2px;
    background: #fff; border-radius: 2px; transition: all 0.3s;
}
.col-mo-header .hd-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.col-mo-header .hd-menu-btn.active span:nth-child(2) { opacity: 0; }
.col-mo-header .hd-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.col-mo-nav {
    position: fixed;
    top: 56px; right: -100%; width: 100%;
    height: calc(100vh - 56px);
    background: var(--ui-white);
    z-index: 100;
    transition: right 0.35s ease;
    overflow-y: auto;
    padding: 20px 0;
}
.col-mo-nav.active { right: 0; }
.col-mo-nav a {
    display: block; padding: 14px 24px; font-size: 17px; font-weight: 600;
    color: var(--ui-text); border-bottom: 1px solid var(--ui-border);
}
.col-mo-nav a:last-child { border-bottom: none; }
.col-mo-nav a.active { color: var(--ui-accent); background: rgba(0,220,224,0.04); }

/* ===== 콘텐츠 영역 ===== */
.col-content-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    gap: 40px;
}
.col-main { flex: 1; min-width: 0; }
.col-sidebar { width: 320px; flex-shrink: 0; }

/* 글 목록 카드 */
.col-post-card {
    display: flex;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--ui-border);
}
.col-post-card:first-child { padding-top: 0; }
.col-post-card .card-thumb {
    width: 200px; height: 140px;
    border-radius: var(--ui-radius);
    overflow: hidden; flex-shrink: 0;
    background: var(--ui-light);
}
.col-post-card .card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.col-post-card .card-body {
    flex: 1; display: flex; flex-direction: column;
    justify-content: center; min-width: 0;
}
.col-post-card .card-cat {
    font-size: 12px; font-weight: 700;
    color: var(--ui-accent); margin-bottom: 8px; text-transform: uppercase;
}
.col-post-card .card-title {
    font-size: 18px; font-weight: 700; line-height: 1.4; margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.col-post-card .card-title a { color: var(--ui-text); }
.col-post-card .card-title a:hover { color: var(--ui-accent); }
.col-post-card .card-excerpt {
    font-size: 14px; color: var(--ui-text-light); line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 8px;
}
.col-post-card .card-meta { font-size: 12px; color: #999; display: flex; gap: 12px; }

/* ===== 사이드바 ===== */
.col-sidebar-box {
    background: var(--ui-white);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    padding: 24px;
    margin-bottom: 20px;
}
.col-sidebar-box .sb-title {
    font-size: 16px; font-weight: 700; color: var(--ui-main);
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 2px solid var(--ui-main);
}
.col-sidebar-box .sb-cta {
    display: block; width: 100%; padding: 16px;
    background: var(--ui-main); color: var(--ui-white);
    text-align: center; border-radius: 10px;
    font-size: 17px; font-weight: 700; margin-bottom: 12px;
    transition: all 0.25s; letter-spacing: 0.5px;
}
.col-sidebar-box .sb-cta:hover { background: var(--ui-accent); color: var(--ui-white); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(176,141,87,0.3); }
.col-sidebar-box .sb-cta-sub { text-align: center; font-size: 13px; color: var(--ui-text-light); margin-bottom: 20px; }
.col-sidebar-box .sb-hours-grid { display: flex; flex-direction: column; gap: 0; }
.col-sidebar-box .sb-hour-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; border-radius: 8px; transition: background 0.15s;
}
.col-sidebar-box .sb-hour-row:hover { background: var(--ui-accent-light); }
.col-sidebar-box .sb-hour-row + .sb-hour-row { border-top: 1px solid var(--ui-border); }
.col-sidebar-box .sb-hour-day { font-size: 14px; font-weight: 600; color: var(--ui-text); display: flex; align-items: center; gap: 6px; }
.col-sidebar-box .sb-hour-day .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ui-accent); }
.col-sidebar-box .sb-hour-time { font-size: 14px; color: var(--ui-text); font-weight: 500; }
.col-sidebar-box .sb-hour-row.highlight .sb-hour-time { font-weight: 700; color: var(--ui-accent); }
.col-sidebar-box .sb-hour-row.closed .sb-hour-time { color: #d94848; font-weight: 600; }
.col-sidebar-box .sb-hour-row.closed .dot { background: #d94848; }
.col-sidebar-box .sb-break { margin-top: 12px; padding: 10px 14px; background: var(--ui-light); border-radius: 8px; font-size: 13px; color: var(--ui-text-light); display: flex; align-items: center; gap: 6px; }
.col-sidebar-box .sb-break svg { flex-shrink: 0; }
/* legacy table fallback */
.col-sidebar-box .sb-hours { width: 100%; border-collapse: collapse; }
.col-sidebar-box .sb-hours td { padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--ui-border); }
.col-sidebar-box .sb-hours td:first-child { font-weight: 600; width: 100px; }
.col-sidebar-box .sb-hours td.closed { color: #d94848; font-weight: 600; }

.col-sidebar-box .sb-doctor { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.col-sidebar-box .sb-doctor-icon {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--ui-light); display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.col-sidebar-box .sb-doctor-name { font-weight: 600; font-size: 14px; }
.col-sidebar-box .sb-doctor-spec { font-size: 12px; color: var(--ui-text-light); }
.col-sidebar-box .sb-location p { font-size: 14px; margin: 4px 0; }
.col-sidebar-box .sb-faq details { border-bottom: 1px solid var(--ui-border); }
.col-sidebar-box .sb-faq summary { padding: 10px 0; font-size: 14px; font-weight: 600; cursor: pointer; }
.col-sidebar-box .sb-faq details p { font-size: 13px; color: var(--ui-text-light); padding: 0 0 10px; margin: 0; }

/* 인기글 */
.sb-popular { list-style: none; padding: 0; margin: 0; }
.sb-popular li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--ui-border); }
.sb-popular li:last-child { border-bottom: none; }
.sb-popular .sp-rank {
    flex-shrink: 0; width: 22px; height: 22px; border-radius: 4px;
    background: var(--ui-main); color: #fff; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.sb-popular a {
    font-size: 13px; line-height: 1.4; color: var(--ui-text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sb-popular a:hover { color: var(--ui-accent); }

/* ===== 싱글 페이지 ===== */
.col-breadcrumb {
    font-size: 13px; color: var(--ui-text-light);
    margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--ui-border);
}
.col-breadcrumb a { color: var(--ui-text-light); }
.col-breadcrumb a:hover { color: var(--ui-accent); }
.col-breadcrumb .sep { margin: 0 6px; color: #ccc; }
.col-breadcrumb .current { color: var(--ui-text); font-weight: 500; }

.col-single-header { margin: 0 0 24px; }
.col-single-header .cat-badge {
    display: inline-block; padding: 4px 12px;
    background: rgba(0,220,224,0.1); color: var(--ui-accent);
    font-size: 12px; font-weight: 700; border-radius: 20px; margin-bottom: 12px;
}
.col-single-header h1 { font-size: 28px; font-weight: 800; line-height: 1.4; margin: 0 0 12px; }
.col-single-header .meta {
    font-size: 13px; color: #999; display: flex; gap: 12px;
    padding-bottom: 20px; border-bottom: 1px solid var(--ui-border);
}

.entry-content { margin: 0 !important; font-size: 16px; line-height: 1.9; color: var(--ui-text); }
.entry-content p { margin-bottom: 1.5em; }
.entry-content img { border-radius: 8px; }
.entry-content h2 {
    font-size: 22px; font-weight: 700; margin: 2em 0 0.8em;
    padding-left: 14px; border-left: 4px solid var(--ui-accent); color: #444;
}
.entry-content h3 { font-size: 18px; font-weight: 700; margin: 1.5em 0 0.6em; color: #444; }
.entry-content blockquote {
    background: var(--ui-light); border-left: 4px solid var(--ui-accent);
    padding: 16px 20px; margin: 1.5em 0; border-radius: 0 8px 8px 0;
}

.col-post-nav {
    display: flex; justify-content: space-between;
    padding: 24px 0; border-top: 1px solid var(--ui-border); margin-top: 40px; font-size: 14px;
}
.col-post-nav a { color: var(--ui-text-light); }
.col-post-nav a:hover { color: var(--ui-accent); }

/* 관련 글 */
.col-related { margin-top: 48px; padding-top: 32px; border-top: 2px solid var(--ui-border); }
.col-related-title { font-size: 18px; font-weight: 700; margin: 0 0 20px; color: var(--ui-text); }
.col-related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.col-related-item {
    display: block; border-radius: var(--ui-radius); overflow: hidden;
    border: 1px solid var(--ui-border); transition: box-shadow 0.2s;
}
.col-related-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.col-related-item .ri-thumb { background: var(--ui-light); }
.col-related-item .ri-thumb img { width: 100%; height: 120px; object-fit: cover; }
.col-related-item .ri-title {
    padding: 12px 14px 4px; font-size: 14px; font-weight: 600;
    color: var(--ui-text); line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.col-related-item .ri-date { padding: 0 14px 12px; font-size: 12px; color: #999; }

/* ===== 푸터 ===== */
.col-footer {
    background: var(--ui-footer-bg);
    color: rgba(255,255,255,0.6);
    padding: 40px 20px;
    margin-top: 60px;
}
.col-footer .ft-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
}
.col-footer .ft-logo img { height: 36px; filter: brightness(10); margin-bottom: 12px; }
.col-footer .ft-info p { font-size: 13px; line-height: 1.8; margin: 0; }

/* ===== 퀵메뉴 ===== */
.wp-col-quick {
    position: fixed; right: 20px; bottom: 100px; z-index: 99;
    display: flex; flex-direction: column; gap: 10px;
}
.wp-col-quick a {
    display: flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(33,33,33,0.85); color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15); transition: all 0.2s;
}
.wp-col-quick a:hover { background: var(--ui-main); transform: scale(1.1); }
.wp-col-quick a svg {
    width: 22px; height: 22px; fill: none; stroke: #fff;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.wp-col-quick .top-btn { background: rgba(0,0,0,0.4); cursor: pointer; }

/* ===== 페이지네이션 ===== */
.col-pagination { display: flex; justify-content: center; gap: 4px; padding: 40px 0; }
.col-pagination a, .col-pagination span {
    display: flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 8px;
    border-radius: 6px; font-size: 14px; font-weight: 500;
    color: var(--ui-text-light); transition: all 0.2s;
}
.col-pagination a:hover { background: var(--ui-light); color: var(--ui-accent); }
.col-pagination .current { background: var(--ui-main); color: #fff; }

/* ===== Astra 오버라이드 ===== */
.ast-container { max-width: 100% !important; padding: 0 !important; }
.entry-content { margin: 0 !important; }
#primary { margin: 0 !important; padding: 0 !important; }
.ast-single-post .entry-header { display: none; }
.ast-archive-description { display: none; }
.ast-pagination { display: none; }
#ast-scroll-top { display: none !important; }
#masthead, .site-header, .main-header-bar, .ast-above-header-bar, .ast-above-header,
.ast-mobile-header-wrap, .ast-main-header-bar-alignment { display: none !important; }
.site-footer, .ast-small-footer, .site-below-footer-wrap, .ast-footer-copyright,
.ast-footer-overlay, .site-below-footer-col-1, #colophon,
footer.entry-footer { display: none !important; }
.ast-site-identity, .site-title, .site-description { display: none !important; }
.site-content { margin-top: 0 !important; }
#page { margin-top: 0 !important; padding-top: 0 !important; }
@media screen and (max-width: 600px) { #wpadminbar { display: none !important; } }

/* ===== 반응형 ===== */
@media (max-width: 960px) {
    .col-pc-header { display: none; }
    .col-mo-header { display: block; }
    .col-content-wrap { flex-direction: column; padding: 20px 16px; gap: 24px; }
    .col-sidebar { width: 100%; }
    .col-post-card { flex-direction: column; gap: 12px; padding: 16px 0; }
    .col-post-card .card-thumb { width: 100%; height: 180px; }
    .col-post-card .card-title { font-size: 16px; }
    .col-single-header h1 { font-size: 22px; }
    .col-related-grid { grid-template-columns: 1fr; }
    .col-footer .ft-inner { flex-direction: column; text-align: center; }
    .wp-col-quick { right: 12px; bottom: 80px; }
    .wp-col-quick a { width: 44px; height: 44px; }
    .wp-col-quick a svg { width: 18px; height: 18px; }
    body { padding-top: 56px; }
}
