/*
Theme Name: 메디나침반 블로그
Theme URI: https://routinelab.xyz/
Author: Adknowhow
Description: 의료 콘텐츠 허브와 메디컬 마케팅 저널을 위한 모던 블로그 스킨입니다.
Version: 1.0.0
Text Domain: medic-compass-blog
*/

:root {
    --bg: #f4f6f8;
    --paper: #ffffff;
    --ink: #121417;
    --text: #343a40;
    --muted: #747d88;
    --line: #e2e7ee;
    --soft: #eef3f7;
    --brand: #176bff;
    --brand2: #00a78e;
    --dark: #151b28;
    --radius: 8px;
    --shadow: 0 24px 70px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.68;
    letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; height: auto; }
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.sr-only, .skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}
.skip-link:focus {
    width: auto;
    height: auto;
    clip: auto;
    left: 16px;
    top: 16px;
    z-index: 9999;
    background: #fff;
    padding: 10px 12px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: rgba(244, 246, 248, .86);
    border-bottom: 1px solid rgba(226, 231, 238, .72);
    backdrop-filter: blur(18px);
}
.hdr-inner {
    min-height: 76px;
    display: grid;
    grid-template-columns: auto 1fr 230px;
    align-items: center;
    gap: 22px;
}
.logo { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.logo__mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--dark);
    display: grid;
    place-items: center;
    box-shadow: 0 14px 34px rgba(23,107,255,.14);
}
.logo__mark img { width: 44px; height: 44px; object-fit: cover; }
.logo__copy { display: grid; gap: 1px; }
.logo__name { color: var(--ink); font-weight: 900; font-size: 1.05rem; }
.logo__sub { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .12em; }
.gnb { display: flex; justify-content: center; gap: 4px; overflow: hidden; }
.gnb__link {
    padding: 9px 11px;
    border-radius: 999px;
    color: #3d4652;
    font-size: .91rem;
    font-weight: 850;
    white-space: nowrap;
}
.gnb__link.on, .gnb__link:hover { background: #e8f0ff; color: var(--brand); }
.hdr-search {
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}
.hdr-search input {
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0 15px;
    font-size: .92rem;
}
.mob-toggle { display: none; }

.mc-hero {
    padding: 66px 0 46px;
    background:
        radial-gradient(circle at 88% 16%, rgba(23,107,255,.18), transparent 30%),
        radial-gradient(circle at 12% 90%, rgba(0,167,142,.14), transparent 34%),
        linear-gradient(180deg, #fff, var(--bg));
}
.mc-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: end;
}
.mc-kicker {
    display: inline-flex;
    color: var(--brand);
    font-size: .78rem;
    font-weight: 950;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.mc-hero h1 {
    max-width: 780px;
    margin: 14px 0 16px;
    color: var(--ink);
    font-size: clamp(2.45rem, 5.8vw, 5.15rem);
    line-height: 1.02;
    letter-spacing: 0;
}
.mc-hero h1 em {
    color: transparent;
    font-style: normal;
    background: linear-gradient(90deg, var(--brand), var(--brand2));
    -webkit-background-clip: text;
    background-clip: text;
}
.mc-hero p {
    max-width: 690px;
    margin: 0;
    color: #4b5563;
    font-size: 1.08rem;
}
.mc-search {
    width: min(620px, 100%);
    height: 58px;
    display: flex;
    margin-top: 28px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--shadow);
}
.mc-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0 18px;
    font-size: 1rem;
    background: transparent;
}
.mc-search button {
    border: 0;
    border-radius: 999px;
    padding: 0 24px;
    background: var(--ink);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}
.mc-hero__note {
    padding: 24px;
    border: 1px solid rgba(23,107,255,.18);
    border-radius: 8px;
    background: rgba(255,255,255,.78);
    box-shadow: var(--shadow);
}
.mc-hero__note span { color: var(--brand2); font-size: .78rem; font-weight: 950; text-transform: uppercase; letter-spacing: .1em; }
.mc-hero__note strong { display: block; margin: 10px 0; color: var(--ink); font-size: 1.25rem; line-height: 1.35; }
.mc-hero__note p { font-size: .94rem; color: var(--muted); }

.cat-nav {
    background: rgba(255,255,255,.88);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.cat-nav__inner {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 64px;
    overflow-x: auto;
    scrollbar-width: none;
}
.cat-nav__inner::-webkit-scrollbar { display: none; }
.cat-nav__link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 900;
}
.cat-nav__link span,
.cat-nav__count {
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--soft);
    color: var(--brand);
    font-size: .78rem;
}
.cat-nav__link.on,
.cat-nav__link:hover {
    background: #e8f0ff;
    color: var(--brand);
}

.mc-featured {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1fr);
    gap: 0;
    overflow: hidden;
    margin: 36px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
}
.mc-featured__media {
    min-height: 360px;
    background: linear-gradient(135deg, #111827, #176bff);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 2.1rem;
    font-weight: 950;
    line-height: 1.05;
    letter-spacing: .02em;
}
.mc-featured__media img { width: 100%; height: 100%; object-fit: cover; }
.mc-featured__body {
    padding: 34px;
    display: flex;
    flex-direction: column;
    gap: 13px;
}
.mc-chip,
.post-card__cat a,
.post-single__cat {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e8f0ff;
    color: var(--brand);
    font-size: .82rem;
    font-weight: 950;
}
.mc-featured h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.75rem, 3vw, 2.75rem);
    line-height: 1.18;
}
.mc-featured p { margin: 0; color: var(--muted); }
.mc-meta,
.post-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 750;
}
.post-card__meta-left { display: flex; flex-wrap: wrap; gap: 12px; }

.mc-section,
.mc-archive {
    padding: 0 0 70px;
}
.mc-section__head,
.mc-archive__head {
    margin: 0 0 20px;
}
.mc-section__head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
}
.mc-section__head h2,
.mc-archive__head h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.8rem, 3.4vw, 3rem);
    line-height: 1.12;
}
.mc-section__head span,
.mc-archive__head p { color: var(--muted); }
.mc-archive { padding-top: 42px; }
.mc-archive__head {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}
.mc-archive__head p { margin: 8px 0 0; }

.mc-post-grid,
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.post-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.post-card:hover {
    transform: translateY(-3px);
    border-color: rgba(23,107,255,.35);
    box-shadow: var(--shadow);
}
.post-card__thumb {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #176bff);
}
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.post-card:hover .post-card__thumb img { transform: scale(1.035); }
.post-card__thumb-ph {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.7rem;
}
.post-card__body { padding: 18px; display: grid; gap: 10px; }
.post-card__title {
    margin: 0;
    color: var(--ink);
    font-size: 1.13rem;
    line-height: 1.36;
}
.post-card__excerpt {
    margin: 0;
    color: var(--muted);
    font-size: .94rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mc-empty {
    padding: 42px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,.62);
    color: var(--muted);
    text-align: center;
}

.mc-single {
    width: min(860px, 100%);
    margin: 46px auto 80px;
}
.mc-single__head {
    padding: 0 0 26px;
    border-bottom: 1px solid var(--line);
}
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.mc-single h1 {
    margin: 14px 0 16px;
    color: var(--ink);
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.08;
}
.mc-single__hero {
    margin: 28px 0;
    overflow: hidden;
    border-radius: 8px;
    background: var(--soft);
}
.mc-single__hero img { width: 100%; max-height: 520px; object-fit: cover; }
.post-content {
    padding-top: 10px;
    color: #27313b;
    font-size: 1.08rem;
    word-break: keep-all;
}
.post-content h2 {
    margin: 2.3em 0 .8em;
    color: var(--ink);
    font-size: 1.75rem;
    line-height: 1.28;
}
.post-content h3 {
    margin: 2em 0 .65em;
    color: var(--ink);
    font-size: 1.34rem;
}
.post-content p { margin: 0 0 1.15em; }
.post-content ul,
.post-content ol { padding-left: 1.25em; }
.post-content blockquote {
    margin: 24px 0;
    padding: 20px 22px;
    border-left: 4px solid var(--brand);
    border-radius: 0 8px 8px 0;
    background: #eef5ff;
}
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    background: #fff;
    border: 1px solid var(--line);
}
.post-content th,
.post-content td {
    border: 1px solid var(--line);
    padding: 12px;
    vertical-align: top;
}
.post-content th { background: var(--soft); color: var(--ink); }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0; }
.post-tag {
    padding: 7px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--brand);
    font-weight: 850;
}
.mc-author {
    margin-top: 34px;
    padding: 24px;
    border-radius: 8px;
    background: var(--dark);
    color: rgba(255,255,255,.78);
}
.mc-author span {
    display: block;
    color: #8db3ff;
    font-size: .76rem;
    font-weight: 950;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.mc-author strong { display: block; margin-top: 8px; color: #fff; font-size: 1.2rem; }
.mc-author p { margin: 8px 0 0; }

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}
.pagination .page-numbers {
    min-width: 38px;
    min-height: 38px;
    display: grid;
    place-items: center;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-weight: 850;
}
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

.site-footer {
    padding: 38px 0;
    background: #0d111a;
    color: rgba(255,255,255,.72);
}
.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
}
.footer-grid strong { display: block; color: #fff; font-size: 1.15rem; }
.footer-grid p { margin: 6px 0 0; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.footer-grid a { color: rgba(255,255,255,.72); font-weight: 750; }
#go-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 80;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.mob-overlay,
.mob-menu { display: none; }

@media (max-width: 1050px) {
    .hdr-inner { grid-template-columns: 1fr auto; }
    .gnb, .hdr-search { display: none; }
    .mob-toggle {
        width: 42px;
        height: 42px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
    }
    .mob-toggle span { width: 18px; height: 2px; background: var(--ink); }
    .mob-overlay.open {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 100;
        background: rgba(0,0,0,.35);
    }
    .mob-menu {
        display: block;
        position: fixed;
        z-index: 101;
        top: 0;
        right: 0;
        width: min(360px, 88vw);
        height: 100dvh;
        background: #fff;
        transform: translateX(100%);
        transition: transform .22s ease;
        box-shadow: -20px 0 60px rgba(0,0,0,.16);
    }
    .mob-menu.open { transform: translateX(0); }
    .mob-menu__head {
        min-height: 70px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 18px;
        border-bottom: 1px solid var(--line);
        color: var(--ink);
        font-weight: 900;
    }
    .mob-menu__close {
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 8px;
        background: var(--soft);
    }
    .mob-nav__link {
        display: block;
        padding: 15px 18px;
        border-bottom: 1px solid var(--line);
        color: var(--ink);
        font-weight: 850;
    }
}

@media (max-width: 900px) {
    .mc-hero__inner,
    .mc-featured {
        grid-template-columns: 1fr;
    }
    .mc-featured__media { min-height: 260px; }
    .mc-post-grid, .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .container { width: min(100% - 28px, 1120px); }
    .hdr-inner { min-height: 68px; }
    .logo__mark { width: 40px; height: 40px; border-radius: 12px; }
    .logo__mark img { width: 40px; height: 40px; }
    .logo__name { font-size: .98rem; }
    .logo__sub { font-size: .6rem; }
    .mc-hero { padding: 38px 0 30px; }
    .mc-search { height: auto; border-radius: 8px; display: grid; padding: 8px; }
    .mc-search input { min-height: 42px; }
    .mc-search button { min-height: 42px; border-radius: 8px; }
    .mc-post-grid, .posts-grid { grid-template-columns: 1fr; }
    .mc-featured__body { padding: 24px; }
    .mc-single { margin-top: 32px; }
    .post-content { font-size: 1rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-grid nav { justify-content: flex-start; }
}
