@charset "utf-8";

/* ─── Reset container ───────────────────────────────────────── */
#container {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

#ctt_himg {
    display: none;
}

/* ─── 읽기 진행 바 ───────────────────────────────────────────── */
.jc-nd-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #F29712 0%, #ff6b35 100%);
    border-radius: 0 2px 2px 0;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ─── 페이지 래퍼 ────────────────────────────────────────────── */
#ctt.jc-newsdetail {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #f8f9fb;
}

/* ─── 기사 헤더 ──────────────────────────────────────────────── */
.jc-nd-head {
    padding: 48px 60px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.jc-nd-hero__breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
}

.jc-nd-hero__breadcrumb a {
    font-size: 13px;
    font-weight: 500;
    color: #6b7c8f;
    text-decoration: none;
    transition: color 0.2s;
}

.jc-nd-hero__breadcrumb a:hover {
    color: #0d1b2a;
}

.jc-nd-hero__breadcrumb-sep {
    font-size: 12px;
    color: #9aa8b6;
}

.jc-nd-hero__cate {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    height: 28px;
    padding: 0 14px;
    border-radius: 9999px;
    background: rgba(242, 151, 18, 0.22);
    border: 1px solid rgba(242, 151, 18, 0.5);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fbbf3a;
    text-transform: uppercase;
}

.jc-nd-hero__title {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.025em;
    color: #0d1b2a;
    word-break: keep-all;
}

.jc-nd-hero__lead {
    margin: 0;
    max-width: 700px;
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    font-weight: 400;
    line-height: 1.75;
    color: #506274;
    word-break: keep-all;
}

.jc-nd-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 20px;
    padding-top: 8px;
    border-top: 1px solid #e8ecf0;
}

.jc-nd-hero__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7c8f;
}

.jc-nd-hero__meta-item svg {
    opacity: 0.7;
    flex: none;
}

/* ─── 본문 레이아웃 ──────────────────────────────────────────── */
.jc-nd-layout {
    width: 100%;
    padding: 96px 40px 100px;
    background: #f8f9fb;
}

.jc-nd-layout__inner {
    width: min(860px, 100%);
    margin: 0 auto;
}

/* ─── 본문 카드 ──────────────────────────────────────────────── */
.jc-nd-body-card {
    position: relative;
    margin-top: 0;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 32px rgba(13, 27, 42, 0.08), 0 1px 4px rgba(0,0,0,0.04);
    overflow: hidden;
}

.jc-nd-head + .jc-nd-article {
    padding-top: 0;
}

/* ─── 히어로 이미지 (인라인) ─────────────────────────────────── */
.jc-nd-thumb {
    width: 100%;
    margin: 0;
    line-height: 0;
}

.jc-nd-thumb img {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: cover;
}

/* ─── 아티클 본문 ────────────────────────────────────────────── */
.jc-nd-article {
    padding: 48px 60px 36px;
}

.jc-nd-article p {
    margin: 0;
    font-size: 1.08rem;
    line-height: 2;
    color: #1e3042;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.jc-nd-article p + p {
    margin-top: 1.1em;
}

.jc-nd-article h1,
.jc-nd-article h2,
.jc-nd-article h3,
.jc-nd-article h4,
.jc-nd-article h5 {
    margin: 1.8em 0 0.65em;
    font-weight: 800;
    line-height: 1.38;
    color: #0d1b2a;
    letter-spacing: -0.02em;
    word-break: keep-all;
}

.jc-nd-article h2 { font-size: 1.45rem; }
.jc-nd-article h3 { font-size: 1.2rem; }
.jc-nd-article h4 { font-size: 1.05rem; }

.jc-nd-article ul,
.jc-nd-article ol {
    margin: 1.1em 0;
    padding-left: 1.4em;
}

.jc-nd-article li {
    font-size: 1.08rem;
    line-height: 1.9;
    color: #1e3042;
    margin-bottom: 0.3em;
}

.jc-nd-article blockquote {
    margin: 1.6em 0;
    padding: 20px 24px;
    border-left: 4px solid #F29712;
    background: #fff8f0;
    border-radius: 0 12px 12px 0;
    color: #3a4d62;
    font-style: italic;
}

.jc-nd-article blockquote p {
    color: #3a4d62;
    font-size: 1.08rem;
}

.jc-nd-article img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 0.6em 0;
}

.jc-nd-article a {
    color: #e07d00;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.jc-nd-article a:hover {
    color: #c06600;
}

.jc-nd-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    font-size: 0.95rem;
}

.jc-nd-article th,
.jc-nd-article td {
    padding: 10px 14px;
    border: 1px solid #e8ecf0;
    text-align: left;
    line-height: 1.6;
}

.jc-nd-article th {
    background: #f4f6f8;
    font-weight: 700;
    color: #0d1b2a;
}

.jc-nd-article hr {
    display: block;
    margin: 2em 0;
    border: 0;
    border-top: 1px solid #eaeef2;
}


/* ─── 관련 뉴스 ──────────────────────────────────────────────── */
.jc-nd-related {
    margin: 32px 60px 0;
}

.jc-nd-related__title {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 800;
    color: #0d1b2a;
    letter-spacing: -0.02em;
}

.jc-nd-related__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.jc-nd-related__item a {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 16px;
    border: 1px solid #eaeef2;
    border-radius: 14px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    color: inherit;
}

.jc-nd-related__item a:hover {
    border-color: #ffc07a;
    box-shadow: 0 4px 16px rgba(242, 151, 18, 0.12);
    transform: translateY(-2px);
}

.jc-nd-related__subject {
    font-size: 13px;
    font-weight: 700;
    color: #1e3042;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jc-nd-related__date {
    font-size: 11px;
    font-weight: 500;
    color: #8899aa;
    margin-top: auto;
}

/* ─── 이전/다음 글 네비게이션 ────────────────────────────────── */
.jc-nd-nav {
    margin: 32px 60px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jc-nd-nav__item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 80px;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid #eaeef2;
    border-radius: 14px;
    background: #fff;
    color: #1e3042;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.jc-nd-nav__item:hover {
    border-color: #ffc07a;
    background: #fff8f0;
    box-shadow: 0 2px 12px rgba(242, 151, 18, 0.1);
}

.jc-nd-nav__dir {
    font-size: 11px;
    font-weight: 700;
    color: #F29712;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.jc-nd-nav__item.is-prev .jc-nd-nav__dir::before {
    content: '←  ';
}

.jc-nd-nav__item.is-next .jc-nd-nav__dir::after {
    content: '  →';
}

.jc-nd-nav__subject {
    font-size: 14px;
    font-weight: 600;
    color: #1e3042;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jc-nd-nav__date {
    font-size: 12px;
    font-weight: 500;
    color: #8899aa;
    text-align: right;
    white-space: nowrap;
}

/* ─── 목록 / 수정 버튼 영역 ──────────────────────────────────── */
.jc-nd-actions {
    padding: 32px 60px 52px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.jc-nd-list-btn {
    --jc-btn-min-width: 200px;
    --jc-btn-height: 48px;
    --jc-btn-font-weight: 700;
}

.jc-nd-edit-btn {
    --jc-btn-min-width: 140px;
    --jc-btn-height: 48px;
    --jc-btn-font-weight: 700;
    gap: 8px;
}

/* ─── 에러 상태 ──────────────────────────────────────────────── */
.jc-nd-empty {
    padding: 80px 40px;
    text-align: center;
}

.jc-nd-empty__text {
    margin: 0 0 24px;
    font-size: 16px;
    font-weight: 500;
    color: #4f6278;
}

/* ─── Tablet ≤ 1024px ────────────────────────────────────────── */
@media (max-width: 1024px) {
    .jc-nd-layout {
        padding: 80px 32px 80px;
    }

    .jc-nd-head {
        padding: 40px 44px 28px;
    }

    .jc-nd-article {
        padding: 40px 44px 28px;
    }

    .jc-nd-share,
    .jc-nd-files,
    .jc-nd-related,
    .jc-nd-nav {
        margin-left: 44px;
        margin-right: 44px;
    }

    .jc-nd-actions {
        padding-left: 44px;
        padding-right: 44px;
    }

    .jc-nd-related__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .jc-nd-related__grid .jc-nd-related__item:nth-child(n+3) {
        display: none;
    }
}

/* ─── Mobile ≤ 768px ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .jc-nd-head {
        padding: 32px 24px 24px;
        gap: 14px;
    }

    .jc-nd-hero__title {
        font-size: clamp(1.5rem, 5.5vw, 2rem);
    }

    .jc-nd-layout {
        padding: 72px 20px 72px;
    }

    .jc-nd-body-card {
        border-radius: 16px;
    }

    .jc-nd-article {
        padding: 28px 24px 20px;
    }

    .jc-nd-article p,
    .jc-nd-article li {
        font-size: 1rem;
        line-height: 1.9;
    }

    .jc-nd-share {
        margin: 0 24px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 18px 20px;
    }

    .jc-nd-files {
        margin: 20px 24px 0;
    }

    .jc-nd-related {
        margin: 28px 24px 0;
    }

    .jc-nd-related__grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .jc-nd-related__grid .jc-nd-related__item:nth-child(n+3) {
        display: flex;
    }

    .jc-nd-nav {
        margin: 24px 24px 0;
    }

    .jc-nd-nav__item {
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 10px;
    }

    .jc-nd-nav__date {
        display: none;
    }

    .jc-nd-actions {
        padding: 28px 24px 44px;
    }

    .jc-nd-list-btn,
    .jc-nd-edit-btn {
        flex: 1 1 auto;
        --jc-btn-min-width: unset;
    }
}

@media (max-width: 640px) {
    .jc-nd-layout__inner {
        width: 100%;
        max-width: var(--jc-mobile-content-width, 360px);
        margin-left: auto;
        margin-right: auto;
        min-width: 0;
    }

    .jc-nd-head {
        padding-left: clamp(20px, 6.67vw, 24px);
        padding-right: clamp(20px, 6.67vw, 24px);
    }

    .jc-nd-layout {
        padding-left: clamp(20px, 6.67vw, 24px);
        padding-right: clamp(20px, 6.67vw, 24px);
    }

    .jc-nd-body-card,
    .jc-nd-article,
    .jc-nd-related,
    .jc-nd-nav,
    .jc-nd-actions,
    .jc-nd-actions > *,
    .jc-nd-related__item,
    .jc-nd-related__item a,
    .jc-nd-nav__item,
    .jc-nd-nav__subject {
        min-width: 0;
        max-width: 100%;
    }

    .jc-nd-article,
    .jc-nd-article a,
    .jc-nd-article th,
    .jc-nd-article td {
        overflow-wrap: anywhere;
    }

    .jc-nd-article table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ─── Mobile ≤ 480px ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .jc-nd-head {
        padding: 28px 20px 24px;
    }

    .jc-nd-hero__title {
        font-size: 1.45rem;
        letter-spacing: -0.02em;
    }

    .jc-nd-layout {
        padding: 60px 16px 60px;
    }

    .jc-nd-article {
        padding: 24px 20px 16px;
    }

    .jc-nd-share {
        margin: 0 20px 0;
    }

    .jc-nd-files,
    .jc-nd-related,
    .jc-nd-nav {
        margin-left: 20px;
        margin-right: 20px;
    }

    .jc-nd-actions {
        padding-left: 20px;
        padding-right: 20px;
    }

    .jc-nd-share__btn {
        font-size: 12px;
        padding: 0 12px;
        height: 32px;
    }
}
