/*
 Theme Name:   Astra Child - 서울공감치과의원 면목점
 Theme URI:    http://seoulgonggam.com/mm/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: 'Spoqa Han Sans', "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 { 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; }

/* ════════════════════════════════════════
   PC 헤더 (메인사이트와 동일)
   ════════════════════════════════════════ */
.wp-col-header--mo { display: none; }
.wp-col-header--pc { background: rgba(255,255,255,0.8); width: 100%; height: 112px; z-index: 999; position: relative; }
.wp-col-header--pc #header_con { padding-top: 26px; height: 83px; border-bottom: 3px solid #fff; max-width: 1400px; margin: 0 auto; }
.wp-col-header--pc #header_con h1 { float: left; width: 20%; height: 86px; display: flex; align-items: center; margin: 0; }
.wp-col-header--pc #header_con h1 img { max-height: 40px; width: auto; }
.wp-col-header--pc #header_kakao { position: absolute; top: 40px; right: 40px; }
.wp-col-header--pc #header_kakao img { height: 40px; width: auto; }
.wp-col-header--pc nav { float: right; position: relative; }
.wp-col-header--pc nav > ul { text-align: center; list-style: none; margin: 0; padding: 0; }
.wp-col-header--pc nav > ul > li { position: relative; float: left; text-align: center; margin-right: 50px; }
.wp-col-header--pc nav > ul > li > a { display: block; font-size: 18px; font-family: 'Spoqa Han Sans', sans-serif; font-weight: 600; letter-spacing: -1px; line-height: 83px; color: #555; text-decoration: none; border-bottom: 3px solid #fff; }
.wp-col-header--pc nav > ul > li:hover > a { color: #00adef; }

/* ════════════════════════════════════════
   모바일 헤더 (메인사이트 m/ 스타일 복제)
   ════════════════════════════════════════ */
@media (max-width: 768px) {
    .wp-col-header--pc { display: none; }
    .wp-col-header--mo { display: block; position: fixed; top: 0; left: 0; z-index: 9999; width: 100%; }

    .mo-header-wrap { background: #fff; text-align: center; padding: 10px 0; position: relative; }
    .mo-header-wrap .mo-logo img { width: 100%; max-width: 200px; height: auto; }
    .mo-header-wrap .mo-kakao { position: absolute; top: 10px; right: 5%; }
    .mo-header-wrap .mo-kakao img { width: 40px; height: auto; }

    .mo-nav { border-top: 3px solid #00a1e9; background: #333; }
    .mo-nav ul { overflow: hidden; list-style: none; margin: 0; padding: 0; }
    .mo-nav ul li { float: left; width: 33.33%; box-sizing: border-box; }
    .mo-nav ul li a { display: block; font-size: 13px; font-weight: 500; color: #fff; letter-spacing: -1px; padding: 10px 0; text-align: center; text-decoration: none; }

    #page, #primary { padding-top: 0; }
    .site-content { margin-top: 0 !important; }
    body { padding-top: 120px !important; }
}

/* ─── 푸터 ─── */
.wp-col-footer { background: #000; padding: 20px 10px; text-align: center; }
.wp-col-footer .ft-inner { max-width: 1440px; margin: 0 auto; }
.wp-col-footer .ft-logo { padding-bottom: 10px; }
.wp-col-footer .ft-logo img { width: 150px; height: auto; }
.wp-col-footer .ft-info p { font-size: 13px; color: #ccc; line-height: 1.8; margin: 0; }
@media (max-width: 768px) {
    .wp-col-footer { padding: 20px 10px 80px; }
}

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

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

/* ─── 싱글 포스트 ─── */
.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 #00adef; }
.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 #00adef; padding: 16px 20px; margin: 1.5em 0; border-radius: 0 8px 8px 0; }
.ast-single-post .cat-links a { background: #00adef; 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; }
    #primary { margin-bottom: 20px; }
}
