/*
 Theme Name:   Astra Child - 에티튜드의원
 Theme URI:    https://theattitudeclinic.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; overflow-x: hidden !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 기본 헤더/푸터 숨기기 ─── */
#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: sticky; top: 0; width: 100%; z-index: 99999; background: rgba(251,251,250,0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-family: "Pretendard", -apple-system, sans-serif; }
.wp-col-header .hd-pc { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; padding: 0 40px; height: 73px; }
.wp-col-header .hd-logo { margin: 0; padding: 0; font-size: 0; }
.wp-col-header .hd-logo img { height: 24px; width: auto; display: block; }
.wp-col-header .hd-menu { display: flex; gap: 36px; list-style: none; margin: 0; padding: 0; align-items: center; }
.wp-col-header .hd-menu a { font-size: 15px; font-weight: 500; color: #1C1C43; text-decoration: none; letter-spacing: 0; transition: opacity 0.2s; white-space: nowrap; }
.wp-col-header .hd-menu a:hover { opacity: 0.5; }

/* ─── 모바일 헤더 ─── */
.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: 20px; height: 1.5px; background: #1C1C43; 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 24px; height: 73px; }
}
.wp-col-header .mo-panel { display: none; position: fixed; top: 0; right: 0; width: 80%; max-width: 360px; height: 100vh; background: #1C1C43; z-index: 999999; overflow-y: auto; }
.wp-col-header .mo-panel.open { display: block; }
.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; border-radius: 4px; }
.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: 16px; font-weight: 400; color: rgba(255,255,255,0.85); text-decoration: none; letter-spacing: 0; }
.wp-col-header .mo-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); z-index: 999998; }
.wp-col-header .mo-overlay.open { display: block; }

/* ─── 푸터 ─── */
.wp-col-footer { background: #FDFDFC; padding: 48px 40px; border-top: 1px solid #eee; }
.wp-col-footer .ft-inner { max-width: 1200px; margin: 0 auto; }
.wp-col-footer .ft-logo img { height: 20px; width: auto; margin-bottom: 16px; }
.wp-col-footer .ft-info p { font-size: 13px; color: rgba(0,0,0,0.4); line-height: 1.8; margin: 0; }
@media (max-width: 768px) {
    .wp-col-footer { padding: 30px 20px; }
    .wp-col-footer .ft-info p { font-size: 12px; }
}

/* ─── 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.06); 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: #1C1C43; 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: #1C1C43; }

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

/* ─── 싱글 포스트 ─── */
.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 #1C1C43; }
.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: #f8f8fa; border-left: 4px solid #1C1C43; 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: #f8f8fa; color: #1C1C43; }
.ast-single-post .nav-links .nav-previous a::before { content: '\2190'; font-size: 18px; color: #999; flex-shrink: 0; }
.ast-single-post .nav-links .nav-next a::after { content: '\2192'; 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 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: #1C1C43; }
.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: #1C1C43; 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; }
}
