/* naonax\static\css\blog\blog.css */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
    color: #18212f;
    background: #f5f7fb;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.blog-page-wrap {
    min-height: 100vh;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

/* ------------------------------------------------------------------
   상단 공통 헤더
------------------------------------------------------------------ */
.blog-site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #dde4ef;
}

.blog-site-header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.blog-logo-link {
    display: inline-flex;
    align-items: center;
}

.blog-logo {
    height: 28px;
    width: auto;
}

.blog-logo-text {
    display: none;
    align-items: center;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #173e86;
}

.blog-top-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.blog-top-link {
    font-size: 15px;
    font-weight: 700;
    color: #32445e;
}

.blog-top-link:hover,
.blog-top-link.active {
    color: #0f3b82;
}

/* ------------------------------------------------------------------
   홈 상단 히어로
------------------------------------------------------------------ */
.blog-main {
    padding-bottom: 18px;
}

.blog-hero-section {
    padding: 48px 0 22px;
}

.blog-hero-box {
    background: linear-gradient(135deg, #ffffff 0%, #f5f8ff 100%);
    border: 1px solid #dce4f0;
    border-radius: 28px;
    padding: 52px 48px;
    box-shadow: 0 18px 40px rgba(27, 46, 89, 0.06);
}

.blog-eyebrow,
.section-label,
.blog-summary-kicker,
.list-kicker,
.side-label {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: #5473a1;
    text-transform: uppercase;
}

.blog-hero-box h1,
.blog-header h1 {
    margin: 0;
    font-size: 46px;
    line-height: 1.25;
    color: #10233f;
    letter-spacing: -0.03em;
    word-break: keep-all;
}

.blog-hero-desc,
.page-desc {
    max-width: 760px;
    margin: 22px 0 0;
    font-size: 18px;
    color: #53657f;
    word-break: keep-all;
}

.blog-hero-actions,
.blog-link-actions,
.content-actions {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.blog-btn,
.comment-submit-btn,
.comment-reply-toggle-btn,
.comment-delete-btn,
.post-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.blog-btn.primary,
.comment-submit-btn {
    color: #ffffff;
    background: #163d86;
    border-color: #163d86;
}

.blog-btn.primary:hover,
.comment-submit-btn:hover {
    background: #102f69;
    border-color: #102f69;
}

.blog-btn.secondary,
.comment-reply-toggle-btn,
.comment-delete-btn {
    color: #234372;
    background: #ffffff;
    border: 1px solid #cfd9e8;
}

.blog-btn.secondary:hover,
.comment-reply-toggle-btn:hover,
.comment-delete-btn:hover {
    background: #f3f7fc;
}

/* ------------------------------------------------------------------
   요약 카드 / 연결 카드
------------------------------------------------------------------ */
.blog-summary-section,
.blog-link-section,
.post-section,
.related-section,
.comment-section,
.detail-hero-section {
    padding: 34px 0;
}

.blog-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.blog-summary-card,
.blog-link-panel,
.post-card,
.content-card,
.info-panel,
.comment-form,
.comment-item,
.comment-empty,
.secret-unlock-box,
.detail-hero-box,
.detail-image-wrap {
    background: #ffffff;
    border: 1px solid #dbe4ef;
    border-radius: 24px;
    box-shadow: 0 10px 28px rgba(16, 35, 63, 0.05);
}

.blog-summary-card {
    padding: 26px 24px;
}

.blog-summary-card h2,
.blog-link-panel h2,
.section-title,
.section-head h2,
.admin-note-card h3 {
    margin: 0;
    font-size: 32px;
    line-height: 1.35;
    color: #14233a;
    letter-spacing: -0.03em;
    word-break: keep-all;
}

.blog-summary-card h2,
.blog-link-panel h2,
.section-head h2 {
    font-size: 24px;
}

.blog-summary-card p,
.blog-link-panel p,
.section-desc,
.section-head p,
.content-card p,
.panel-text,
.guide-list,
.post-excerpt,
.comment-content,
.comment-empty,
.secret-help-text,
.secret-text,
.deleted-text {
    color: #4c607d;
    font-size: 15px;
    line-height: 1.75;
    word-break: keep-all;
}

.blog-link-panel {
    padding: 30px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

/* ------------------------------------------------------------------
   목록 / 상세 공통
------------------------------------------------------------------ */
.blog-header {
    padding: 42px 0 18px;
}

.top-breadcrumb {
    margin-bottom: 14px;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    color: #6b7c94;
    font-size: 13px;
}

.breadcrumb-list li::after {
    content: '/';
    margin-left: 8px;
    color: #cbd5e1;
}

.breadcrumb-list li:last-child::after {
    display: none;
}

.list-intro {
    max-width: 860px;
}

.section-head {
    margin-bottom: 22px;
}

.section-head-center {
    text-align: center;
}

.section-title {
    font-size: 34px;
}

.post-grid,
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.post-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    border-color: #b8c8df;
    box-shadow: 0 18px 34px rgba(16, 35, 63, 0.10);
}

.post-card-empty {
    grid-column: 1 / -1;
}

.post-thumb-link {
    display: block;
    margin-bottom: 14px;
}

.post-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid #dce4f0;
    background: #ffffff;
}

.post-meta,
.detail-meta,
.list-intro-meta,
.comment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.post-meta,
.detail-meta,
.list-intro-meta {
    color: #6b7c94;
    font-size: 13px;
}

.category,
.secret-badge,
.reply-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.category,
.reply-badge {
    background: #edf3fb;
    color: #46638f;
}

.secret-badge {
    background: #fff7ed;
    color: #9a3412;
}

.post-title,
.detail-hero-text {
    margin: 12px 0 10px;
    font-size: 24px;
    line-height: 1.4;
    color: #10233b;
    letter-spacing: -0.02em;
    word-break: keep-all;
}

.post-card-bottom {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.post-stat,
.comment-date,
.date {
    color: #6b7c94;
    font-size: 13px;
}

.post-link {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
    color: #1f4f9d;
    background: #eff5ff;
    border: 1px solid #d7e4fb;
}

.post-link:hover {
    background: #e7f0ff;
}

.detail-top-link {
    margin: 0 0 14px;
    font-size: 14px;
}

.detail-top-link a {
    color: #4b607d;
}

.detail-hero-box {
    min-height: 280px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f8ff 100%);
    padding: 30px;
}

.detail-article {
    max-width: 860px;
    padding: 10px 0 24px;
}

.detail-article p {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.9;
    color: #374151;
    word-break: keep-all;
}

.detail-image-wrap {
    overflow: hidden;
}

.detail-hero-image {
    width: 100%;
}

/* ------------------------------------------------------------------
   댓글 / 비밀글 / 답글
------------------------------------------------------------------ */
.comment-section,
.detail-article,
.related-section {
    max-width: 1180px;
    margin: 0 auto;
}

.comment-form {
    padding: 22px;
    margin-bottom: 20px;
}

.comment-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.comment-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-form-group.full {
    grid-column: 1 / -1;
}

.comment-form-group label {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

.comment-form-group input,
.comment-form-group textarea,
.comment-delete-form input[type="password"],
.secret-password-wrap input[type="password"],
.secret-view-form input[type="password"] {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #d1d9e7;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    background: #ffffff;
}

.comment-form-group textarea {
    resize: vertical;
}

.comment-form-bottom {
    margin-top: 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.comment-form-bottom-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 220px;
}

.secret-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4b607d;
    font-size: 14px;
}

.comment-alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid transparent;
}

.comment-alert.success {
    background: #edf8f0;
    border-color: #b8e0c2;
    color: #216b3a;
}

.comment-alert.error {
    background: #fff3f3;
    border-color: #f0c2c2;
    color: #b23b3b;
}

.comment-list,
.comment-reply-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment-item,
.comment-reply-item {
    padding: 18px;
}

.comment-item-deleted {
    background: #fafafa;
}

.comment-head-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-writer {
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
}

.comment-writer.deleted {
    color: #6b7280;
}

.comment-action-row,
.comment-delete-form,
.secret-unlock-box,
.secret-view-form {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.reply-form-wrap {
    margin-top: 14px;
}

.reply-form {
    margin-bottom: 0;
    background: #f8fbff;
}

.reply-form-title {
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

.comment-reply-item {
    background: #f8fbff;
    border: 1px solid #dbe4ef;
}

.comment-reply-inner {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.comment-reply-marker {
    flex: 0 0 auto;
    font-size: 18px;
    line-height: 1.3;
    color: #94a3b8;
    padding-top: 2px;
}

.comment-reply-body {
    flex: 1 1 auto;
    min-width: 0;
}

.secret-password-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 320px;
}

.reply-delete-form {
    margin-top: 10px;
}

/* ------------------------------------------------------------------
   푸터
------------------------------------------------------------------ */
.blog-footer {
    margin-top: 18px;
    border-top: 1px solid #dde4ef;
    background: #ffffff;
}

.blog-footer-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.blog-footer-inner p {
    margin: 0;
    font-size: 14px;
    color: #71829a;
}

.blog-footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.blog-footer-links a {
    font-size: 14px;
    font-weight: 700;
    color: #314966;
}

.blog-footer-links a:hover {
    color: #163d86;
}

/* ------------------------------------------------------------------
   반응형
------------------------------------------------------------------ */
@media (max-width: 1024px) {
    .post-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .blog-summary-grid {
        grid-template-columns: 1fr;
    }

    .blog-link-panel {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-hero-box h1,
    .blog-header h1 {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    .container {
        width: min(100%, calc(100% - 28px));
    }

    .blog-site-header-inner {
        min-height: 66px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 12px 0;
    }

    .blog-top-nav {
        gap: 14px;
    }

    .blog-hero-section,
    .blog-summary-section,
    .blog-link-section,
    .post-section,
    .related-section,
    .comment-section,
    .detail-hero-section {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .blog-hero-box,
    .blog-link-panel,
    .blog-summary-card,
    .post-card,
    .comment-form,
    .comment-item,
    .comment-empty,
    .detail-hero-box {
        padding: 24px 20px;
        border-radius: 20px;
    }

    .blog-hero-box h1,
    .blog-header h1 {
        font-size: 33px;
    }

    .blog-hero-desc,
    .page-desc,
    .section-desc,
    .section-head p,
    .blog-summary-card p,
    .blog-link-panel p,
    .post-excerpt,
    .detail-article p,
    .comment-content {
        font-size: 15px;
    }

    .section-title,
    .section-head h2,
    .blog-summary-card h2,
    .blog-link-panel h2,
    .post-title,
    .detail-hero-text {
        font-size: 28px;
    }

    .post-grid,
    .related-grid,
    .comment-form-grid {
        grid-template-columns: 1fr;
    }

    .post-card-bottom,
    .comment-delete-form,
    .secret-view-form,
    .comment-form-bottom,
    .comment-reply-inner,
    .blog-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-submit-btn,
    .blog-btn,
    .post-link,
    .comment-reply-toggle-btn,
    .comment-delete-btn {
        width: 100%;
    }

    .blog-footer-inner {
        min-height: auto;
        padding: 18px 0;
    }
}
