/*
 Theme Name:   Astra Child - 서울김앤장치과의원
 Theme URI:    https://kimjangdental.com/column/
 Description:  서울김앤장치과의원 워드프레스 칼럼용 차일드 테마 (자체완결형)
 Author:       서울김앤장치과의원
 Template:     astra
 Version:      2.2.0
 Text Domain:  astra-child
*/

/* ─── WP Admin Bar ─── */
@media screen and (max-width: 600px) { #wpadminbar { position: fixed; } }
#ast-scroll-top { display: none !important; }

/* ─── 글로벌 리셋 ─── */
body { margin: 0 !important; padding: 0 !important; padding-top: 80px !important; font-family: "Pretendard", -apple-system, sans-serif; -webkit-font-smoothing: antialiased; word-break: keep-all; }
#page { margin-top: 0 !important; padding-top: 0 !important; }
#page > *:first-child { margin-top: 0 !important; }
.wp-site-blocks > *:first-child { margin-block-start: 0 !important; }
.site-content { margin-top: 0 !important; }
.ast-above-header-bar, .ast-above-header { display: none; }
.site-footer, .ast-footer-overlay, .ast-small-footer, footer.site-footer, .ast-footer-copyright, .site-below-footer-wrap, .ast-hfb-footer { display: none !important; }
#masthead, .ast-primary-header-bar { display: none !important; }
.blind { text-indent: -9999px; line-height: 0; }

/* ─── 사이트 헤더 (메인사이트 동일) ─── */
.wp-col-header { background-color: #2f3032; position: fixed; top: 0; left: 0; width: 100%; z-index: 99999; will-change: transform; transition: all 300ms linear; }
.wp-col-header nav { width: 100%; height: 80px; margin: 0 auto; position: relative; display: flex; align-items: center; justify-content: space-between; padding-left: 240px; padding-right: 86px; }
.wp-col-header nav > a img { height: 36px; width: auto; display: block; }
.wp-col-header nav > ul { display: flex; justify-content: space-between; list-style: none; margin: 0; padding: 0; }
.wp-col-header nav > ul > li > a { color: #fff; font-size: 16px; font-weight: 400; line-height: 80px; display: inline-block; padding: 0 29px; letter-spacing: 0; text-decoration: none; position: relative; }
.wp-col-header nav > ul > li > a::after { content: ''; display: block; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; width: 0; height: 1px; background-color: #ede68a; transition: all 0.5s; }
.wp-col-header nav > ul > li > a:hover::after { width: 43px; }
.wp-col-header nav > ul > li > a:hover, .wp-col-header nav > ul > li > a.active { color: #ede68a; }
.wp-col-header .hd-con { height: 36px; width: auto; }
.wp-col-header .mo-toggle { display: none; cursor: pointer; padding: 8px; background: none; border: none; }
.wp-col-header .mo-toggle span { display: block; width: 20px; height: 2px; background: #fff; margin: 4px 0; transition: all 0.3s; }
.wp-col-header .mo-close { display: none; }

/* ─── 모바일 헤더 ─── */
@media (max-width: 768px) {
    .wp-col-header nav { padding: 0 16px; }
    .wp-col-header .hd-con { display: none; }
    .wp-col-header nav > ul { display: none; position: fixed; top: 0; right: -100%; width: 75%; max-width: 300px; height: auto; max-height: 100vh; background: #2f3032; flex-direction: column; gap: 0; padding: 60px 0 20px; z-index: 999999; box-shadow: -4px 0 20px rgba(0,0,0,0.3); transition: right 0.3s ease; overflow-y: auto; }
    .wp-col-header .mo-close { display: block; position: absolute; top: 14px; right: 14px; background: none; border: none; cursor: pointer; padding: 8px; opacity: 0.6; transition: opacity 0.2s; }
    .wp-col-header .mo-close:hover { opacity: 1; }
    .wp-col-header nav > ul.open { display: flex; right: 0; }
    .wp-col-header nav > ul > li > a { padding: 14px 24px; font-size: 16px; line-height: 1.5; border-bottom: 1px solid rgba(255,255,255,0.1); width: 100%; }
    .wp-col-header .mo-toggle { display: block; }
    .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: 999998; }
    .wp-col-header .mo-overlay.open { display: block; }
}

/* ═══════════════════════════════════════
   푸터
   ═══════════════════════════════════════ */
.wp-col-footer { background-color: #2f3032; padding: 60px 40px 40px; }
.wp-col-footer .ft-inner { max-width: 1200px; margin: 0 auto; }
.wp-col-footer .ft-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 60px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.wp-col-footer .ft-logo img { height: 28px; width: auto; filter: brightness(0) invert(1); }
.wp-col-footer .ft-phone { font-size: 28px; font-weight: 700; color: #fff; margin: 16px 0 20px; letter-spacing: -0.02em; }
.wp-col-footer .ft-sns { display: flex; gap: 12px; }
.wp-col-footer .ft-sns a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); transition: all 0.2s; }
.wp-col-footer .ft-sns a:hover { background: rgba(255,255,255,0.2); color: #ede68a; }
.wp-col-footer .ft-info p { font-size: 14px; color: rgba(255,255,255,0.45); line-height: 2; margin: 0; }
.wp-col-footer .ft-bottom { padding-top: 24px; }
.wp-col-footer .ft-bottom small { font-size: 12px; color: rgba(255,255,255,0.3); letter-spacing: 0.5px; }
@media (max-width: 768px) {
    .wp-col-footer { padding: 40px 20px 30px; }
    .wp-col-footer .ft-top { flex-direction: column; gap: 30px; }
    .wp-col-footer .ft-phone { font-size: 22px; }
}

/* ═══════════════════════════════════════
   Astra 레이아웃 오버라이드
   ═══════════════════════════════════════ */
.ast-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.ast-separate-container #primary { background: transparent; border: none; padding: 0; }
.ast-separate-container #primary, .ast-separate-container .ast-article-post { background: transparent; }
.ast-separate-container .ast-article-post { background: #fff; }
.ast-two-container #secondary { display: none; }
.ast-separate-container #content .ast-container { display: block; }
#primary { margin-top: 48px; margin-bottom: 48px; }
.site-content > .ast-container { padding-top: 0; }
footer#colophon { display: none !important; }

/* ═══════════════════════════════════════
   글 리스트 (카드 그리드)
   ═══════════════════════════════════════ */
.ast-separate-container .ast-article-post { background: #fff; border: none; border-radius: 16px; overflow: hidden; transition: box-shadow 0.3s ease, transform 0.25s ease; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.ast-blog-layout-4-grid .ast-article-inner { box-shadow: none !important; }
.ast-separate-container .ast-article-post:hover { box-shadow: 0 12px 32px rgba(0,0,0,0.1); transform: translateY(-4px); }

/* 3열 그리드 */
.ast-row { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 28px !important; }
.ast-row .ast-grid-common-col { margin-bottom: 0 !important; width: 100% !important; }
@media (max-width: 921px) { .ast-row { grid-template-columns: repeat(2, 1fr) !important; gap: 20px !important; } }
@media (max-width: 544px) { .ast-row { grid-template-columns: 1fr !important; gap: 16px !important; } }

/* 썸네일 */
.post-thumb { overflow: hidden; }
.post-thumb img { width: 100%; height: 220px; object-fit: cover; display: block; transition: transform 0.4s ease; }
.ast-article-post:hover .post-thumb img { transform: scale(1.05); }
.ast-no-thumb .post-thumb { display: none; }

/* 카드 컨텐츠 영역 */
.blog-layout-4 .post-content { padding: 24px; }

/* 카테고리 뱃지 */
.cat-links { margin-bottom: 10px; display: block; }
.cat-links a { background: #073382; color: #fff !important; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: 0.3px; text-decoration: none; display: inline-block; text-transform: uppercase; }

/* 글 제목 */
.blog .entry-title { font-size: 18px; font-weight: 700; line-height: 1.5; margin: 0 0 10px; word-break: keep-all; }
.blog .entry-title a { color: #1a1a1a; text-decoration: none; transition: color 0.2s; }
.blog .entry-title a:hover { color: #073382; }

/* 메타 */
.blog-layout-4 header.entry-header, .ast-article-post header.entry-header { all: unset !important; display: block !important; }
.entry-meta { font-size: 13px; color: #aaa; margin-bottom: 0; display: flex; align-items: center; gap: 8px; }
.entry-meta a { color: #aaa; text-decoration: none; }
.entry-meta .author-name { font-weight: 600; color: #555; }
.entry-meta .posted-on, .entry-meta .byline { display: inline-flex; align-items: center; }

/* 발췌 */
.ast-excerpt-container { font-size: 14px; color: #777; line-height: 1.7; margin-top: 12px; }
.ast-excerpt-container p { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 페이지네이션 */
.ast-pagination { text-align: center; margin: 48px 0 0; }
.ast-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0 3px; border-radius: 50%; font-size: 14px; font-weight: 500; color: #666; text-decoration: none; border: 1px solid #e0e0e0; transition: all 0.2s; }
.ast-pagination .page-numbers:hover { border-color: #073382; color: #073382; }
.ast-pagination .page-numbers.current { background: #073382; color: #fff; border-color: #073382; }
.ast-pagination .page-numbers.next, .ast-pagination .page-numbers.prev { width: auto; padding: 0 16px; border-radius: 20px; }

/* ═══════════════════════════════════════
   싱글 포스트
   ═══════════════════════════════════════ */
.ast-narrow-container .site-content > .ast-container { max-width: 960px !important; padding: 0 24px !important; }
.ast-separate-container .ast-article-single { background: #fff !important; border-radius: 16px; padding: 48px 56px; max-width: 100%; margin: 0 auto; box-shadow: 0 2px 16px rgba(0,0,0,0.05); }
.ast-single-post .entry-header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid #eee; }
.ast-single-post .entry-title { font-size: 32px; font-weight: 800; line-height: 1.4; margin-bottom: 16px; color: #1a1a1a; letter-spacing: -0.02em; }
.ast-single-post .entry-meta { font-size: 14px; color: #999; }
.ast-single-post .cat-links { margin-bottom: 16px; display: block; }
.ast-single-post .cat-links a { background: #073382; color: #fff !important; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; }

/* 본문 타이포 */
.ast-single-post .entry-content { font-size: 17px; line-height: 1.95; color: #333; letter-spacing: -0.01em; }
.ast-single-post .entry-content p { margin-bottom: 1.6em; }
.ast-single-post .entry-content img { border-radius: 12px; max-width: 100%; height: auto; margin: 0.5em 0; }
.ast-single-post .entry-content h2 { font-size: 24px; font-weight: 800; margin: 2.5em 0 0.8em; padding-bottom: 12px; border-bottom: 2px solid #073382; border-left: none; padding-left: 0; color: #1a1a1a; }
.ast-single-post .entry-content h3 { font-size: 19px; font-weight: 700; margin: 2em 0 0.6em; color: #333; }
.ast-single-post .entry-content blockquote { background: #f8f9fb; border-left: 4px solid #073382; padding: 20px 24px; margin: 1.8em 0; border-radius: 0 12px 12px 0; font-size: 16px; color: #555; }
.ast-single-post .entry-content ul, .ast-single-post .entry-content ol { padding-left: 1.5em; margin-bottom: 1.5em; }
.ast-single-post .entry-content li { margin-bottom: 0.5em; line-height: 1.8; }
.ast-single-post .entry-content a { color: #073382; text-decoration: underline; text-underline-offset: 3px; }
.ast-single-post .entry-content a:hover { color: #052461; }

/* 이전/다음 글 */
.ast-single-post .navigation.post-navigation { max-width: 960px; margin: 48px auto; background: #fff; border: 1px solid #eee; border-radius: 16px; padding: 0; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.ast-single-post .nav-links { display: flex; }
.ast-single-post .nav-links > div { flex: 1; position: relative; }
.ast-single-post .nav-links a { display: flex; align-items: center; gap: 16px; padding: 28px 32px; text-decoration: none; color: #555; transition: all 0.25s ease; max-width: 100% !important; width: 100% !important; }
.ast-single-post .nav-links a:hover { background: #f5f7fa; }
.ast-single-post .nav-links a:hover p { color: #073382; }
.ast-single-post .nav-links .nav-next { border-left: 1px solid #eee; }
.ast-single-post .nav-links .nav-next a { flex-direction: row-reverse; text-align: right; }
.ast-single-post .nav-links .ast-post-nav { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: #073382; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.ast-single-post .nav-links .ast-post-nav .ahfb-svg-iconset { display: none; }
.ast-single-post .nav-links .ast-post-nav svg { width: 14px; height: 14px; fill: #073382; flex-shrink: 0; display: none; }
.ast-single-post .nav-links .nav-previous .ast-post-nav::before { content: '←'; margin-right: 4px; }
.ast-single-post .nav-links .nav-next .ast-post-nav::after { content: '→'; margin-left: 4px; }
.ast-single-post .nav-links a p { margin: 0; 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; transition: color 0.2s; }

/* ─── 모바일 ─── */
@media (max-width: 768px) {
    .ast-container { padding: 0 16px; }
    .ast-narrow-container .site-content > .ast-container { padding: 0 12px !important; }
    #primary { margin-top: 24px; margin-bottom: 32px; }
    .blog .entry-title { font-size: 16px; }
    .blog-layout-4 .post-content { padding: 16px; }
    .post-thumb img { height: 180px; }
    .ast-separate-container .ast-article-single { padding: 24px 20px !important; margin: 0; border-radius: 12px; }
    .ast-single-post .entry-title { font-size: 24px; }
    .ast-single-post .entry-content { font-size: 16px; line-height: 1.85; }
    .ast-single-post .entry-content h2 { font-size: 20px; }
    .ast-single-post .navigation.post-navigation { margin: 24px 0; border-radius: 12px; }
    .ast-single-post .nav-links { flex-direction: column; }
    .ast-single-post .nav-links .nav-next { border-left: none; border-top: 1px solid #eee; }
    .ast-single-post .nav-links .nav-next a { flex-direction: row-reverse; }
    .ast-single-post .nav-links a { padding: 20px; }
}
