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

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

/* ─── 글로벌 리셋 ─── */
body { margin: 0 !important; padding: 0 !important; font-family: "Pretendard", -apple-system, sans-serif; }
#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; }

/* ─── 사이트 헤더 ─── */
.wp-col-header { width: 100%; position: fixed; z-index: 99999; top: 0; left: 0; background: #fff; box-shadow: 0 2px 7px rgba(0,0,0,0.16); transition: all 0.5s; }
.wp-col-header .hd-wrap { max-width: 100%; margin: 0 auto; }
.wp-col-header .hd-top { border-bottom: 1px solid #d4d4d4; }
.wp-col-header .hd-top-inner { display: flex; justify-content: space-between; align-items: center; height: 100px; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.wp-col-header .hd-icon { display: flex; }
.wp-col-header .hd-icon a:first-child { margin-right: 12px; }
.wp-col-header .hd-icon img { filter: grayscale(1); transition: all 0.2s; }
.wp-col-header .hd-icon a:hover img { filter: none; }
.wp-col-header .hd-logo { margin: 0; padding: 0; }
.wp-col-header .hd-logo img { height: auto; width: auto; display: block; }
.wp-col-header .hd-tel p { font-size: 14px; font-weight: 700; color: #5a5a5a; margin: 0; font-family: 'Roboto', sans-serif; }
.wp-col-header .hd-tel a { font-size: 36px; font-weight: 700; color: #5b77a8; text-decoration: none; transition: all 0.2s; font-family: 'Roboto', sans-serif; }
.wp-col-header .hd-tel a:hover { opacity: 0.7; }
.wp-col-header .hd-menu { display: flex; justify-content: center; list-style: none; margin: 0; padding: 0; }
.wp-col-header .hd-menu li a { color: #333; font-size: 16px; font-weight: 400; line-height: 60px; display: inline-block; padding: 0 22px; transition: all 0.2s; text-decoration: none; letter-spacing: -0.3px; }
.wp-col-header .hd-menu li a:hover { color: #7dc9f0; }
.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: #333; margin: 4px 0; }
.wp-col-header .mo-close-wrap { display: none; }
#page { padding-top: 160px !important; }

/* ─── 모바일 헤더 ─── */
@media (max-width: 768px) {
    .wp-col-header .hd-top-inner { height: 60px; padding: 0 16px; }
    .wp-col-header .hd-icon { display: none; }
    .wp-col-header .hd-tel { display: none; }
    .wp-col-header .hd-logo img { height: 28px; }
    .wp-col-header .hd-menu { display: none; position: fixed; top: 0; right: -100%; width: 75%; max-width: 300px; height: 100vh; background: #fff; flex-direction: column; justify-content: flex-start; padding: 0; z-index: 999999; box-shadow: -4px 0 20px rgba(0,0,0,0.1); transition: right 0.3s ease; overflow-y: auto; }
    .wp-col-header .hd-menu.open { display: flex; right: 0; }
    .wp-col-header .hd-menu li a { padding: 14px 24px; font-size: 16px; line-height: 1.4; border-bottom: 1px solid #f0f0f0; width: 100%; }
    .wp-col-header .mo-close-wrap { display: flex; justify-content: flex-end; padding: 12px 16px; }
    .wp-col-header .mo-close { background: none; border: none; font-size: 28px; color: #333; cursor: pointer; padding: 4px 8px; line-height: 1; }
    .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; }
    #page { padding-top: 60px !important; }
}

/* ─── 푸터 ─── */
.wp-col-footer { background: #f9f9f9; padding: 40px 20px; }
.wp-col-footer .ft-inner { max-width: 1440px; margin: 0 auto; display: flex; align-items: flex-start; justify-content: flex-start; gap: 50px; }
.wp-col-footer .ft-logo img { height: 30px; width: auto; margin-bottom: 20px; }
.wp-col-footer .ft-info p { font-size: 14px; color: rgba(0,0,0,0.5); line-height: 1.8; margin: 0; }
.wp-col-footer .ft-price { margin-top: 20px; }
.wp-col-footer .ft-price a { display: inline-flex; align-items: center; justify-content: center; background: #5b77a8; color: #fff; text-decoration: none; padding: 12px 28px; border-radius: 100px; font-size: 15px; font-weight: 500; }
@media (max-width: 768px) {
    .wp-col-footer { padding: 30px 20px 100px; }
    .wp-col-footer .ft-inner { flex-direction: column; gap: 20px; }
    .wp-col-footer .ft-info p { font-size: 13px; }
}

/* ─── PC 퀵메뉴 ─── */
.wp-col-quick { position: fixed; bottom: 20px; right: 20px; z-index: 9999; }
.wp-col-quick .qm-list { display: none; margin-bottom: 16px; }
.wp-col-quick .qm-list.open { display: block; }
.wp-col-quick .qm-item { display: flex; flex-direction: column; align-items: center; margin-bottom: 16px; text-decoration: none; }
.wp-col-quick .qm-item img { width: 28px; height: 28px; }
.wp-col-quick .qm-item span { margin-top: 4px; font-size: 11px; font-weight: 500; color: rgba(61,66,67,0.7); background: rgba(246,244,236,0.85); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.wp-col-quick .qm-toggle { width: 72px; height: 72px; border-radius: 50%; background: rgba(91,119,168,0.85); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); border: none; cursor: pointer; padding: 4px; display: flex; align-items: center; justify-content: center; }
.wp-col-quick .qm-toggle-inner { width: 100%; height: 100%; border: 1px solid rgba(255,255,255,0.6); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: "Marcellus", serif; font-size: 12px; color: #fff; line-height: 1.3; text-align: center; }
.wp-col-quick .qm-top { display: flex; flex-direction: column; align-items: center; margin-top: 8px; cursor: pointer; background: none; border: none; opacity: 0.7; }
.wp-col-quick .qm-top span { font-family: "Marcellus", serif; font-size: 13px; margin-top: 2px; }

/* ─── 모바일 하단바 ─── */
.wp-col-mobar { display: none; }
@media (max-width: 768px) {
    .wp-col-quick { display: none; }
    .wp-col-mobar { display: block; position: fixed; bottom: 0; left: 0; width: 100%; background: #fff; border-top: 1px solid #eee; z-index: 9999; }
    .wp-col-mobar ul { display: flex; margin: 0; padding: 0; list-style: none; }
    .wp-col-mobar li { flex: 1; }
    .wp-col-mobar a { display: flex; flex-direction: column; align-items: center; padding: 10px 0; text-decoration: none; color: #333; font-size: 11px; }
    .wp-col-mobar img { width: 22px; height: 22px; margin-bottom: 3px; }
}

/* ─── 컨테이너 ─── */
.ast-container { max-width: 1200px; margin: 0 auto; }
.ast-separate-container .ast-article-post { background: #fff; border: 1px solid #eee; border-radius: 12px; overflow: hidden; transition: box-shadow 0.3s ease, transform 0.2s ease; }
.ast-separate-container .ast-article-post:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }

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

/* ─── 썸네일 ─── */
.post-thumb img { width: 100%; height: 200px; object-fit: cover; border-radius: 12px 12px 0 0; }
.ast-no-thumb .post-thumb { display: none; }

/* ─── 카테고리 뱃지 ─── */
.cat-links { margin-top: 16px; display: block; }
.cat-links a { background: #5b77a8; color: #fff !important; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; letter-spacing: 0.5px; text-decoration: none; display: inline-block; }

/* ─── 글 제목 ─── */
.blog .entry-title { font-size: 18px; font-weight: 700; line-height: 1.4; margin: 12px 0 8px; }
.blog .entry-title a { color: #222; text-decoration: none; }
.blog .entry-title a:hover { color: #5b77a8; }

/* ─── 메타 ─── */
.blog-layout-4 header.entry-header, .ast-article-post header.entry-header { all: unset !important; display: block !important; }
.entry-meta { font-size: 13px; color: #999; margin-bottom: 8px; }
.entry-meta a { color: #999; text-decoration: none; }
.entry-meta .author-name { font-weight: 600; color: #444; }

/* ─── 발췌 ─── */
.ast-excerpt-container { font-size: 14px; color: #666; line-height: 1.6; }
.ast-excerpt-container p { margin: 0; }
.blog-layout-4 .post-content { padding: 20px; }

/* ─── 페이지네이션 ─── */
.ast-pagination { text-align: center; margin: 40px 0; }
.ast-pagination .page-numbers { display: inline-block; padding: 8px 14px; margin: 0 4px; border-radius: 8px; font-size: 14px; color: #666; text-decoration: none; border: 1px solid #ddd; }
.ast-pagination .page-numbers.current { background: #5b77a8; color: #fff; border-color: #5b77a8; }

/* ─── 싱글 포스트 ─── */
.ast-single-post .ast-article-single { background: #fff; border-radius: 12px; padding: 40px; max-width: 860px; margin: 30px auto; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.ast-single-post .entry-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.ast-single-post .entry-title { font-size: 28px; font-weight: 800; line-height: 1.4; margin-bottom: 12px; color: #222; }
.ast-single-post .entry-content { font-size: 16px; line-height: 1.9; color: #333; }
.ast-single-post .entry-content p { margin-bottom: 1.5em; }
.ast-single-post .entry-content img { border-radius: 8px; max-width: 100%; height: auto; }
.ast-single-post .entry-content h2 { font-size: 22px; font-weight: 700; margin: 2em 0 0.8em; padding-left: 14px; border-left: 4px solid #5b77a8; }
.ast-single-post .entry-content h3 { font-size: 18px; font-weight: 700; margin: 1.5em 0 0.6em; color: #444; }
.ast-single-post .entry-content blockquote { background: #f7f8f6; border-left: 4px solid #5b77a8; padding: 16px 20px; margin: 1.5em 0; border-radius: 0 8px 8px 0; }
.ast-single-post .navigation.post-navigation { max-width: 860px; margin: 0 auto 30px; background: #fff; border-radius: 12px; 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; }
.ast-single-post .nav-links a { display: flex; align-items: center; gap: 12px; padding: 20px 24px; text-decoration: none; color: #333; transition: background 0.2s; }
.ast-single-post .nav-links a:hover { background: #f7f8f6; }
.ast-single-post .nav-links .nav-next { border-left: 1px solid #eee; }
.ast-single-post .nav-links a p { margin: 0; font-size: 15px; font-weight: 600; }
.ast-single-post .cat-links a { background: #5b77a8; color: #fff !important; padding: 4px 12px; border-radius: 20px; font-size: 12px; }

#primary { margin-top: 30px; margin-bottom: 30px; }
.site-content > .ast-container { padding-top: 0; }

@media (max-width: 768px) {
    .ast-container { padding: 0 16px; }
    .blog .entry-title { font-size: 16px; }
    .ast-single-post .ast-article-single { padding: 20px; margin: 16px; }
    .ast-single-post .entry-title { font-size: 22px; }
    .ast-single-post .nav-links { flex-direction: column; }
    .ast-single-post .nav-links .nav-next { border-left: none; border-top: 1px solid #eee; }
    #primary { margin-bottom: 80px; }
}