/*
 Theme Name:   Astra Child - 산본중심치과의원
 Theme URI:    https://xn--vb0b361auxcoxcy0lw9h.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; }

/* ─── 글로벌 리셋 ─── */
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; }

/* ─── Astra 기본 헤더/푸터 숨기기 ─── */
#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; }

/* ─── 사이트 헤더 ─── */
.wp-col-header { position: fixed; top: 0; left: 0; width: 100%; z-index: 99999; background: #fff; font-family: "Pretendard", -apple-system, sans-serif; }
.wp-col-header .hd-bar { height: 72px; display: flex; align-items: stretch; }
.wp-col-header .hd-side { width: 28vw; flex-shrink: 0; display: flex; align-items: center; padding: 0 32px; border-bottom: 1px solid #eee; }
.wp-col-header .hd-side-r { justify-content: flex-end; border-bottom: 1px solid #eee; }
.wp-col-header .promo-slider { height: 2.5vw; overflow: hidden; border-left: 1px solid #ccc; border-right: 1px solid #ccc; }
.wp-col-header .promo-wrapper { animation: slideUp3 12s infinite; }
.wp-col-header .promo-item { height: 2.5vw; padding: 0 1.04vw; display: flex; align-items: center; justify-content: center; gap: 6px; color: #391809; font-size: 16px; font-weight: 400; white-space: nowrap; letter-spacing: -0.1em; }
.wp-col-header .promo-item img { height: 1.6vw; width: auto; }
.wp-col-header .promo-item span { font-weight: 700; }
@keyframes slideUp3 { 0%,30%{transform:translateY(0)} 33%,63%{transform:translateY(-2.5vw)} 66%,96%{transform:translateY(-5vw)} 100%{transform:translateY(-7.5vw)} }

/* ─── 메가메뉴 ─── */
.wp-col-header .mega-menu { position: absolute; top: 72px; left: 0; width: 100%; background: #fff; z-index: 999; box-shadow: 0 8px 24px rgba(0,0,0,0.1); border-top: 1px solid #eee; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s; pointer-events: none; }
.wp-col-header .mega-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.wp-col-header .mega-wrap { display: flex; width: 100%; align-items: stretch; }
.wp-col-header .mega-wrap > .hd-side { border-bottom: none; }
.wp-col-header .mega-inner { flex: 1; min-width: 0; display: flex; }
.wp-col-header .mega-col { flex: 1; min-width: 0; padding: 28px 0; border-right: 1px solid #f0f0f0; text-align: center; transition: background 0.2s; }
.wp-col-header .mega-col:last-child { border-right: none; }
.wp-col-header .mega-col.is-active { background: #391809; }
.wp-col-header .mega-sub-link { display: block; padding: 10px 24px; font-size: 16px; font-weight: 400; color: #555; letter-spacing: -0.1em; white-space: nowrap; text-decoration: none; transition: color 0.15s; }
.wp-col-header .mega-sub-link:hover { color: #391809; font-weight: 600; }
.wp-col-header .mega-col.is-active .mega-sub-link { color: rgba(255,255,255,0.7); }
.wp-col-header .mega-col.is-active .mega-sub-link:hover { color: #fff; font-weight: 700; }
.wp-col-header .gnb-item.is-hover .gnb-link { border-bottom: 3px solid #391809; color: #391809; font-weight: 700; }
.wp-col-header.is-mega-open .hd-side { width: 16vw; }
.wp-col-header .hd-side { transition: width 0.35s ease-in-out; overflow: hidden; }
.wp-col-header .header-overlay { position: fixed; inset: 0; top: 72px; background: rgba(0,0,0,0.25); z-index: 998; opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s; pointer-events: none; }
.wp-col-header .header-overlay.is-show { opacity: 1; visibility: visible; pointer-events: auto; }
.wp-col-header .hd-nav { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; border-bottom: 0.5px solid #eee; }
.wp-col-header .gnb { list-style: none; margin: 0; padding: 0; width: 100%; height: 100%; display: flex; align-items: stretch; justify-content: center; }
.wp-col-header .gnb-item { flex: 1; display: flex; }
.wp-col-header .gnb-link { flex: 1; display: flex; align-items: center; justify-content: center; text-decoration: none; white-space: nowrap; color: #2C2C2C; font-size: 16px; font-weight: 500; letter-spacing: -0.1em; padding: 0 12px; border-bottom: 3px solid transparent; transition: color 0.25s, border-color 0.25s; }
.wp-col-header .gnb-link:hover { color: #391809; border-bottom-color: #391809; font-weight: 700; }
body { padding-top: 72px !important; }

/* PC/모바일 전환 */
.wp-col-header .hd-pc { display: flex; }
.wp-col-header .hd-mo { display: none; }
.wp-col-header .mo-toggle { cursor: pointer; padding: 8px; background: none; border: none; }
.wp-col-header .mo-toggle span { display: block; width: 22px; height: 2px; background: #333; margin: 5px 0; }

/* ─── 모바일 헤더 ─── */
@media (max-width: 1199px) {
    .wp-col-header .hd-pc { display: none; }
    .wp-col-header .hd-mo { display: flex; justify-content: space-between; align-items: center; padding: 0 20px; border-bottom: 1px solid #eee; }
}
.wp-col-header .mo-panel { position: fixed; top: 0; right: -100%; width: 80%; max-width: 360px; height: 100vh; background: #391809; z-index: 999999; transition: right 0.3s ease; overflow-y: auto; }
.wp-col-header .mo-panel.open { right: 0; }
.wp-col-header .mo-panel-head { display: flex; justify-content: flex-end; padding: 24px 20px; }
.wp-col-header .mo-close { background: rgba(255,255,255,0.15); border: none; color: #fff; font-size: 24px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.wp-col-header .mo-menu { list-style: none; margin: 0; padding: 0; }
.wp-col-header .mo-menu a { display: block; padding: 14px 30px; font-size: 18px; font-weight: 400; color: #fff; text-decoration: none; letter-spacing: -0.1em; }
.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: #2C2C2C; 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; filter: brightness(0) invert(1); margin-bottom: 20px; }
.wp-col-footer .ft-info p { font-size: 14px; color: rgba(255,255,255,0.6); 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: #391809; 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 { display: none !important; }

/* ─── 모바일 하단바 (히든) ─── */
.wp-col-mobar { display: none !important; }

/* ─── 컨테이너 ─── */
.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: #391809; 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: #391809; }

/* ─── 메타 ─── */
.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: #391809; color: #fff; border-color: #391809; }

/* ─── 싱글 포스트 ─── */
.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 #391809; }
.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 #391809; 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.06); border: 1px solid #eee; }
.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: 14px; padding: 22px 28px; text-decoration: none; color: #333; transition: background 0.2s, color 0.2s; }
.ast-single-post .nav-links a:hover { background: #f9f7f5; color: #391809; }
.ast-single-post .nav-links .nav-previous a::before { content: '←'; font-size: 18px; color: #999; flex-shrink: 0; }
.ast-single-post .nav-links .nav-next a::after { content: '→'; font-size: 18px; color: #999; flex-shrink: 0; }
.ast-single-post .nav-links .nav-next { border-left: 1px solid #eee; text-align: right; }
.ast-single-post .nav-links .nav-next a { justify-content: flex-end; }
.ast-single-post .nav-links a span.nav-subtitle { display: block; font-size: 12px; font-weight: 400; color: #999; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.ast-single-post .nav-links a p { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.ast-single-post .nav-links a:hover p { color: #391809; }
.ast-single-post .comments-area, .ast-single-post #respond { display: none !important; }
.ast-single-post .ast-post-nav { display: none !important; }
.ast-single-post .cat-links a { background: #391809; 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; }
    .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; }
}