/*
 Theme Name:   Astra Child - 서울클리어치과교정과치과의원 하남미사점
 Theme URI:    https://seoulclear-misa.com/column/
 Description:  서울클리어치과교정과치과의원 하남미사점 워드프레스 칼럼용 차일드 테마 (자체완결형)
 Author:       서울클리어치과교정과치과의원 하남미사점
 Template:     astra
 Version:      2.1.0
 Text Domain:  astra-child
*/

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

/* ─── 글로벌 리셋 ─── */
body { margin: 0 !important; padding-top: 95px !important; font-family: "Pretendard", "Noto Sans KR", -apple-system, sans-serif; background-color: #f9fafb !important; }
#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 기본 요소 전부 제거 ─── */
.ast-above-header-bar, .ast-above-header,
#ast-mobile-header, .ast-mobile-header-wrap,
.ast-main-header-wrap, .main-header-bar-wrap,
.ast-primary-header-bar, .site-primary-header-wrap,
#masthead, .site-header,
.ast-small-footer, .site-below-footer-wrap, .ast-footer-copyright, .ast-small-footer-wrap,
.site-footer .ast-builder-layout-element { display: none !important; }
.site-footer { padding: 0 !important; margin: 0 !important; }

/* ─── 헤더 오버라이드 (메인사이트 header.css 로드됨, #header 선택자 사용) ─── */
.hd_wrap > .pc_con > li > a { margin-left: 40px; }
.m_nav { display: none; }
@media (max-width: 768px) {
    .m_nav { display: flex; z-index: 9999 !important; }
    #header { z-index: 10000 !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: #4aacc6; 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: #4aacc6; }

/* ─── 메타 ─── */
.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; }

/* ─── 발췌 ─── */
.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: #4aacc6; color: #fff; border-color: #4aacc6; }

/* ─── 싱글 포스트 본문 ─── */
.ast-single-post .ast-article-single { background: #fff; border-radius: 16px; padding: 48px 52px; max-width: 860px; margin: 0 auto 30px; box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.ast-single-post .entry-header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 2px solid #f0f0f0; text-align: center; }
.ast-single-post .entry-title { font-size: 32px; font-weight: 800; line-height: 1.35; margin-bottom: 16px; color: #111; letter-spacing: -0.5px; }
.ast-single-post .entry-meta { margin-top: 12px; font-size: 14px; color: #888; }
.ast-single-post .cat-links { margin-bottom: 16px; }
.ast-single-post .entry-content { font-size: 17px; line-height: 1.95; color: #333; }
.ast-single-post .entry-content p { margin-bottom: 1.6em; }
.ast-single-post .entry-content img { border-radius: 10px; max-width: 100%; height: auto; margin: 1em 0; }
.ast-single-post .entry-content h2 { font-size: 24px; font-weight: 700; margin: 2.2em 0 0.8em; padding-left: 16px; border-left: 4px solid #4aacc6; color: #111; }
.ast-single-post .entry-content h3 { font-size: 19px; font-weight: 700; margin: 1.8em 0 0.6em; color: #333; }
.ast-single-post .entry-content blockquote { background: #f0f8fb; border-left: 4px solid #4aacc6; padding: 20px 24px; margin: 1.8em 0; border-radius: 0 10px 10px 0; font-size: 16px; color: #444; }
.ast-single-post .cat-links a { background: #4aacc6; color: #fff !important; padding: 4px 12px; border-radius: 20px; font-size: 12px; }

/* ─── 네비게이션 ─── */
.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; min-width: 0; }
.ast-single-post .nav-links a { display: flex; align-items: center; gap: 14px; padding: 24px 28px; text-decoration: none; color: #222; transition: background 0.2s; }
.ast-single-post .nav-links a:hover { background: #f0f2f5; }
.ast-single-post .nav-links a span.nav-subtitle { display: none !important; }
.ast-single-post .nav-links a span.nav-title,
.ast-single-post .nav-links a p { margin: 0; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ast-single-post .nav-links .nav-previous a::before { content: "←"; font-size: 20px; color: #4aacc6; flex-shrink: 0; }
.ast-single-post .nav-links .nav-next a::after { content: "→"; font-size: 20px; color: #4aacc6; flex-shrink: 0; }
.ast-single-post .nav-links .nav-previous .ast-left-arrow,
.ast-single-post .nav-links .nav-next .ast-right-arrow,
.ast-single-post .nav-links .ast-post-nav { display: none !important; }
.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; }

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

@media (max-width: 768px) {
    body { padding-top: 60px !important; }
    .ast-container { padding: 0 16px; }
    .blog .entry-title { font-size: 16px; }
    .ast-single-post .ast-article-single { padding: 24px 20px; margin: 0; border-radius: 12px; }
    .ast-single-post .entry-title { font-size: 24px; }
    .ast-single-post .entry-content { font-size: 16px; }
    .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; }
}
