﻿/* =========================================================
   상세 페이지
   ========================================================= */

.detail-page {
    width: 100%;
    min-height: calc(100vh - 80px);
    background: #ffffff;
    color: #222;
}


/* =========================================================
   본문 전체 폭
   ========================================================= */

.detail-container {
    width: 760px;
    max-width: calc(100% - 40px);
    margin: 0 auto;
}


/* =========================================================
   Breadcrumb
   ========================================================= */

.detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 34px;
    margin-bottom: 22px;
    font-size: 12px;
    color: #999;
}

    .detail-breadcrumb a {
        color: #777;
        text-decoration: none;
    }

        .detail-breadcrumb a:hover {
            color: #222;
        }

    .detail-breadcrumb span:first-of-type {
        color: #bbb;
    }


/* =========================================================
   게시글
   ========================================================= */

.detail-post {
    width: 100%;
}


/* =========================================================
   HEADER
   ========================================================= */

.detail-header {
    padding-bottom: 24px;
    border-bottom: 1px solid #e7e7e7;
}


/* 제목 */

.detail-title {
    margin: 0 0 14px 0;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -1px;
    color: #171717;
}

    .detail-title::selection {
        background: #dcecff;
    }


/* 설명 */

.detail-description {
    margin: 0 0 22px 0;
    font-size: 13px;
    line-height: 1.8;
    color: #777;
}


/* =========================================================
   작성자 META
   ========================================================= */

.detail-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.detail-author {
    display: flex;
    align-items: center;
    gap: 9px;
}


.author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}


.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}


    .author-info strong {
        font-size: 13px;
        font-weight: 600;
        color: #222;
    }


    .author-info span {
        font-size: 11px;
        color: #aaa;
    }


.detail-meta-right {
    font-size: 11px;
    color: #aaa;
}


/* =========================================================
   본문 내용
   ========================================================= */

.detail-content {
    width: 100%;
    padding: 30px 0 25px 0;
    font-size: 14px;
    line-height: 1.9;
    color: #333;
    word-break: break-word;
}


    /*
    Summernote / HTML Editor에서 들어온 이미지
*/

    .detail-content img {
        display: block;
        max-width: 100%;
        height: auto;
        margin: 28px auto;
    }


    /*
    본문 첫 이미지가 콘텐츠 폭을
    꽉 채우도록 처리
*/

    .detail-content p {
        margin: 0 0 18px 0;
    }


    .detail-content h1,
    .detail-content h2,
    .detail-content h3,
    .detail-content h4 {
        margin-top: 30px;
        margin-bottom: 15px;
        color: #222;
        font-weight: 700;
    }


    .detail-content h2 {
        font-size: 20px;
    }

    .detail-content h3 {
        font-size: 18px;
    }

    .detail-content h4 {
        font-size: 16px;
    }


    .detail-content ul,
    .detail-content ol {
        padding-left: 24px;
        margin-bottom: 20px;
    }


    .detail-content blockquote {
        margin: 25px 0;
        padding: 14px 18px;
        border-left: 3px solid #222;
        background: #fafafa;
        color: #777;
    }


/* =========================================================
   태그
   ========================================================= */

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 4px 0 25px 0;
    border-bottom: 1px solid #e7e7e7;
}


.detail-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid #e1e1e1;
    border-radius: 20px;
    background: #fff;
    color: #777;
    font-size: 11px;
    text-decoration: none;
    transition: all .15s ease;
}


    .detail-tag:hover {
        border-color: #222;
        color: #222;
    }


/* =========================================================
   관리자 버튼
   ========================================================= */

.detail-admin {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    padding-top: 18px;
}


.detail-edit-button,
.detail-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 13px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
}


.detail-edit-button {
    border: 1px solid #ddd;
    background: #fff;
    color: #555;
}


    .detail-edit-button:hover {
        background: #f7f7f7;
        color: #222;
    }


.detail-delete-button {
    border: 1px solid #222;
    background: #222;
    color: #fff;
}


    .detail-delete-button:hover {
        background: #000;
        color: #fff;
    }


/* =========================================================
   목록 버튼
   ========================================================= */

.detail-navigation {
    display: flex;
    justify-content: center;
    padding: 28px 0 42px 0;
}


.detail-list-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #444;
    background: #fff;
    font-size: 12px;
    text-decoration: none;
    transition: all .15s ease;
}


    .detail-list-button:hover {
        border-color: #222;
        color: #222;
        background: #fafafa;
    }


/* =========================================================
   공통 Section Header
   ========================================================= */

.detail-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 13px;
    border-bottom: 1px solid #222;
}


    .detail-section-header h2 {
        margin: 0;
        font-size: 17px;
        font-weight: 700;
        letter-spacing: -0.4px;
    }


    .detail-section-header > span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 20px;
        height: 20px;
        border-radius: 10px;
        background: #f2f2f2;
        color: #777;
        font-size: 10px;
    }


/* =========================================================
   댓글
   ========================================================= */

.detail-comments {
    padding-top: 10px;
}


.comment-list {
    width: 100%;
}


.comment-item {
    padding: 18px 4px;
    border-bottom: 1px solid #ededed;
}


.comment-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
}


.comment-author {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 4px;
    background: #f1f1f1;
    font-size: 12px;
    font-weight: 600;
    color: #666;
}


.comment-date {
    font-size: 10px;
    color: #aaa;
}


.comment-content {
    font-size: 13px;
    line-height: 1.7;
    color: #555;
}


.comment-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 35px 0;
    color: #aaa;
}


    .comment-empty i {
        margin-bottom: 8px;
        font-size: 24px;
    }


    .comment-empty p {
        margin: 0;
        font-size: 12px;
    }


/* =========================================================
   댓글 작성
   ========================================================= */

.comment-form-box {
    margin-top: 28px;
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    background: #fafafa;
}


.comment-form-title {
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 600;
    color: #222;
}


.comment-form-row {
    margin-bottom: 16px;
}


    .comment-form-row label {
        display: block;
        margin-bottom: 7px;
        font-size: 12px;
        font-weight: 600;
        color: #555;
    }


.detail-input,
.detail-textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    color: #333;
    outline: none;
}


.detail-input {
    height: 38px;
    padding: 0 11px;
}


.detail-textarea {
    padding: 10px 11px;
    resize: vertical;
    line-height: 1.6;
}


    .detail-input:focus,
    .detail-textarea:focus {
        border-color: #888;
    }


.detail-error {
    margin-top: 5px;
    font-size: 11px;
    color: #d33;
}


.comment-submit-wrap {
    display: flex;
    justify-content: flex-end;
}


.comment-submit-button {
    height: 36px;
    padding: 0 15px;
    border: 0;
    border-radius: 4px;
    background: #222;
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}


    .comment-submit-button:hover {
        background: #000;
    }


/* =========================================================
   관련 글
   ========================================================= */

.related-section {
    padding-top: 48px;
    padding-bottom: 70px;
}


.related-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}


.related-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 105px;
    padding: 17px;
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    background: #fff;
    color: #222;
    text-decoration: none;
    transition: all .15s ease;
}


    .related-item:hover {
        border-color: #222;
    }


.related-item-content {
    min-width: 0;
}


.related-date {
    margin-bottom: 8px;
    font-size: 10px;
    color: #aaa;
}


.related-item h3 {
    overflow: hidden;
    margin: 0 0 11px 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    text-overflow: ellipsis;
}


.related-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}


    .related-tags span {
        font-size: 10px;
        color: #999;
    }


.related-arrow {
    flex-shrink: 0;
    margin-left: 15px;
    font-size: 18px;
    color: #aaa;
}


.related-item:hover .related-arrow {
    color: #222;
}


.related-empty {
    padding: 30px 0;
    text-align: center;
    color: #aaa;
    font-size: 12px;
}


/* =========================================================
   Footer
   ========================================================= */

.detail-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 760px;
    max-width: calc(100% - 40px);
    margin: 0 auto;
    padding: 20px 0;
    border-top: 1px solid #ededed;
    color: #aaa;
    font-size: 10px;
}


.detail-footer-links {
    display: flex;
    gap: 15px;
}


    .detail-footer-links a {
        color: #999;
        text-decoration: none;
    }


        .detail-footer-links a:hover {
            color: #222;
        }


/* =========================================================
   모바일
   ========================================================= */

@media (max-width: 768px) {

    .detail-container {
        max-width: calc(100% - 28px);
    }


    .detail-breadcrumb {
        padding-top: 22px;
        margin-bottom: 17px;
    }


    .detail-title {
        font-size: 23px;
        line-height: 1.45;
        letter-spacing: -0.7px;
    }


    .detail-description {
        font-size: 12px;
        line-height: 1.7;
    }


    .detail-content {
        padding-top: 22px;
        font-size: 13px;
        line-height: 1.8;
    }


        .detail-content img {
            margin: 20px auto;
        }


    .author-info {
        gap: 7px;
    }


        .author-info strong {
            font-size: 12px;
        }


        .author-info span {
            font-size: 10px;
        }


    .detail-meta-right {
        display: none;
    }


    .related-list {
        grid-template-columns: 1fr;
    }


    .comment-form-box {
        padding: 15px;
    }


    .detail-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        max-width: calc(100% - 28px);
    }
}
