/*
 Theme Name:   Astra Child - 오남플란트치과의원
 Theme URI:    https://onamplant.co.kr/column/
 Description:  오남플란트치과의원 워드프레스 칼럼용 차일드 테마
 Author:       오남플란트치과의원
 Template:     astra
 Version:      2.1.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; }
.ast-above-header-bar, .ast-above-header { display: none; }

/* ─── 이전글/다음글 네비게이션 숨기기 ─── */
.ast-post-nav, .navigation.post-navigation { display: none !important; }

/* ─── 브레드크럼 숨기기 ─── */
.ast-breadcrumbs-wrapper, .ast-breadcrumbs, nav.ast-breadcrumbs { display: none !important; }

/* ─── 카테고리 중복 제거 (entry-meta 안의 cat-links 숨김) ─── */
.entry-meta .cat-links { display: none !important; }

/* ─── Astra 기본 헤더/푸터 완전 숨기기 (커스텀으로 대체) ─── */
#masthead, .site-header, #ast-desktop-header, #ast-mobile-header,
.main-header-bar-wrap, .ast-primary-header-bar,
.ast-mobile-header-wrap, .ast-mobile-header-content { display: none !important; }
.site-footer, .ast-small-footer, #colophon { display: none !important; }

/* ─── 사이드바 완전 제거 ─── */
#secondary, .widget-area, .sidebar-main { display: none !important; }
.ast-right-sidebar #primary, .ast-left-sidebar #primary,
#primary { width: 100% !important; float: none !important; margin-right: 0 !important; margin-left: 0 !important; }
.ast-right-sidebar .ast-container, .ast-left-sidebar .ast-container { max-width: 1200px; }

/* ─── 컨테이너 ─── */
.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; width: 100% !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: #E66B24; 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: #E66B24; }

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

/* ─── 싱글 포스트 ─── */
.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 #E66B24; }
.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 #E66B24; 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; min-width: 0; }
.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-previous a::before { content: '←'; font-size: 18px; color: #E66B24; 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 .nav-next a::after { content: '→'; font-size: 18px; color: #E66B24; flex-shrink: 0; }
.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 .ast-left-arrow, .ast-single-post .nav-links .ast-right-arrow { display: none; }
.ast-single-post .nav-links a .title-with-arrow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ast-single-post .cat-links a { background: #E66B24; 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; }
}
