/*
 Theme Name:   Astra Child - 이루다치과의원
 Theme URI:    http://irudadental.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; }
.ast-above-header-bar, .ast-above-header { display: none; }

/* ─── 사이트 헤더 (메인사이트 동일) ─── */
.wp-col-header { background: #fff; box-shadow: 0px 3px 6px rgba(0,0,0,0.16); position: relative; z-index: 99999; }
.wp-col-header nav { display: flex; align-items: center; justify-content: space-between; height: 100px; padding: 0 50px; }
.wp-col-header .hd-logo img { height: auto; width: auto; display: block; }
.wp-col-header .hd-menu { display: flex; gap: 0; list-style: none; margin: 0; padding: 0; }
.wp-col-header .hd-menu a { font-size: 20px; font-weight: 400; color: #333; text-decoration: none; transition: all 0.2s; display: inline-block; text-align: center; width: 186px; line-height: 100px; letter-spacing: -0.05em; }
.wp-col-header .hd-menu a:hover { color: #fff; background-color: #c9a46e; }
.wp-col-header .mo-toggle { display: none; cursor: pointer; padding: 8px; background: none; border: none; }
.wp-col-header .mo-toggle span { display: block; width: 22px; height: 2px; background: #907d5a; margin: 5px 0; }

/* ─── 태블릿 헤더 (메인사이트 동일) ─── */
@media (max-width: 1600px) {
    .wp-col-header nav { height: 50px; padding: 0 25px; }
    .wp-col-header .hd-logo img { width: 65%; }
    .wp-col-header .hd-menu a { font-size: 16px; line-height: 50px; width: 130px; }
}

/* ─── 닫기 버튼 (PC에서 숨김) ─── */
.wp-col-header .mo-close-wrap { display: none; }

/* ─── 모바일 헤더 ─── */
@media (max-width: 768px) {
    .wp-col-header .hd-menu {
        display: flex !important;
        position: fixed; top: 0; right: -100%;
        width: 75%; max-width: 300px; height: 100vh;
        background: #fff; flex-direction: column; gap: 0;
        padding: 20px 0; z-index: 999999;
        box-shadow: -4px 0 20px rgba(0,0,0,0.1);
        transition: right 0.3s ease; overflow-y: auto;
        visibility: hidden;
    }
    .wp-col-header .hd-menu.open { right: 0; visibility: visible; }
    .wp-col-header .hd-menu li { list-style: none; }
    .wp-col-header .hd-menu a { display: block; padding: 14px 24px; font-size: 16px; border-bottom: 1px solid #f0f0f0; }
    .wp-col-header .mo-close-wrap { display: block; text-align: right; padding: 4px 16px 12px; border-bottom: 1px solid #eee; margin-bottom: 4px; }
    .wp-col-header .mo-close { background: none; border: none; font-size: 24px; color: #333; cursor: pointer; padding: 4px 8px; }
    .wp-col-header .mo-toggle { display: block; position: relative; z-index: 1000000; }
    .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: #363636; 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: #c9a46e; 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 { position: fixed; bottom: 20px; right: 20px; z-index: 9999; }
.wp-col-quick .qm-list { display: none; margin-bottom: 16px; }
.wp-col-quick .qm-list.open { display: block; }
.wp-col-quick .qm-item { display: flex; flex-direction: column; align-items: center; margin-bottom: 16px; text-decoration: none; }
.wp-col-quick .qm-item img { width: 28px; height: 28px; }
.wp-col-quick .qm-item span { margin-top: 4px; font-size: 11px; font-weight: 500; color: rgba(61,66,67,0.7); background: rgba(246,244,236,0.85); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.wp-col-quick .qm-toggle { width: 72px; height: 72px; border-radius: 50%; background: rgba(100,100,100,0.85); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); border: none; cursor: pointer; padding: 4px; display: flex; align-items: center; justify-content: center; }
.wp-col-quick .qm-toggle-inner { width: 100%; height: 100%; border: 1px solid rgba(255,255,255,0.6); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: "Marcellus", serif; font-size: 12px; color: #fff; line-height: 1.3; text-align: center; }
.wp-col-quick .qm-top { display: flex; flex-direction: column; align-items: center; margin-top: 8px; cursor: pointer; background: none; border: none; opacity: 0.7; }
.wp-col-quick .qm-top span { font-family: "Marcellus", serif; font-size: 13px; margin-top: 2px; }

/* ─── 모바일 하단바 ─── */
.wp-col-mobar { display: none; }
@media (max-width: 768px) {
    .wp-col-quick { display: none; }
    .wp-col-mobar { display: block; position: fixed; bottom: 0; left: 0; width: 100%; background: #fff; border-top: 1px solid #eee; z-index: 9999; }
    .wp-col-mobar ul { display: flex; margin: 0; padding: 0; list-style: none; }
    .wp-col-mobar li { flex: 1; }
    .wp-col-mobar a { display: flex; flex-direction: column; align-items: center; padding: 10px 0; text-decoration: none; color: #333; font-size: 11px; }
    .wp-col-mobar img { width: 22px; height: 22px; margin-bottom: 3px; }
}

/* ─── 컨테이너 ─── */
.ast-container { max-width: 1200px; margin: 0 auto; }
.ast-separate-container .ast-article-post,
.ast-plain-container .ast-article-post { background: #fff; border: 1px solid #eee; border-radius: 12px; transition: box-shadow 0.3s ease, transform 0.2s ease; }
.ast-separate-container .ast-article-post:hover,
.ast-plain-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: auto !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: #c9a46e; 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: #c9a46e; }

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

/* ─── 싱글 포스트 ─── */
.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 #c9a46e; }
.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 #c9a46e; 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); 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: 24px 28px; text-decoration: none; color: #555; transition: all 0.25s ease; }
.ast-single-post .nav-links a:hover { background: #faf8f5; color: #c9a46e; }
.ast-single-post .nav-links .nav-next { border-left: 1px solid #eee; }
.ast-single-post .nav-links .nav-next a { flex-direction: row-reverse; text-align: right; }
.ast-single-post .nav-links .ast-post-nav { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: #c9a46e; white-space: nowrap; }
.ast-single-post .nav-links .ast-post-nav svg { width: 14px; height: 14px; fill: #c9a46e; vertical-align: middle; }
.ast-single-post .nav-links a p { margin: 0; font-size: 15px; font-weight: 600; color: #333; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ast-single-post .nav-links a:hover p { color: #c9a46e; }
.ast-single-post .cat-links a { background: #c9a46e; 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; }

/* ─── Astra 기본 푸터 숨김 ─── */
footer#colophon, .site-footer { display: none !important; }

/* ─── Astra 컨테이너 오버라이드 ─── */
.ast-separate-container #primary, .ast-plain-container #primary { background: transparent; border: none; padding: 0; }
.ast-two-container #secondary { display: none !important; }
.ast-two-container #primary { width: 100% !important; float: none !important; }
body.blog .site-content > .ast-container { max-width: 1200px; margin: 0 auto; }

/* ─── 모바일 ─── */
@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 .navigation.post-navigation { margin: 0 16px 30px; }
    .ast-single-post .nav-links { flex-direction: column; }
    .ast-single-post .nav-links a { padding: 18px 20px; }
    .ast-single-post .nav-links .nav-next { border-left: none; border-top: 1px solid #eee; }
    .ast-single-post .nav-links .nav-next a { flex-direction: row-reverse; }
    #primary { margin-bottom: 30px; }

    /* 모바일 그리드 1열 */
    .ast-row { grid-template-columns: 1fr !important; gap: 16px !important; }

    /* 모바일 헤더 z-index 보장 */
    .wp-col-header { position: sticky; top: 0; z-index: 999999; background: #fff; }
    .wp-col-header nav { padding: 12px 16px; }
    .wp-col-header .hd-logo img { height: 30px; }

}