@charset "UTF-8";

/* ==========================================================================
   Read Page Styles
   ========================================================================== */
.zzan-post-read { max-width: 100%; margin: 60px auto; padding: 0; }
.read-header, .read-footer { max-width: 800px; margin-left: auto !important; margin-right: auto !important; padding-left: 20px; padding-right: 20px; }
.read-body > * { max-width: 800px; margin-left: auto !important; margin-right: auto !important; padding-left: 20px; padding-right: 20px; }

/* 에디터 스트레치 이미지 복구 및 반응형 대응 😊🖼️ */
@media (min-width: 1000px) {
    .read-body .ce-block--stretched, 
    .read-body .zzan-image--stretched { 
        max-width: 1000px !important; 
        width: 1000px !important; 
        margin-left: calc(50% - 500px) !important; 
        margin-right: calc(50% - 500px) !important; 
        padding: 0 !important; 
        display: flex !important; 
        flex-direction: column !important; 
        align-items: center !important; 
        overflow: hidden; 
    }
    /* 스트레치 이미지 내부 이미지도 부모 너비(1000px)에 꽉 차도록 설정하여 일관성 확보 */
    .read-body .ce-block--stretched img,
    .read-body .zzan-image--stretched img {
        width: 100% !important;
        height: auto !important;
        max-width: none !important;
    }
}
@media (max-width: 999px) {
    .read-body .ce-block--stretched, 
    .read-body .zzan-image--stretched { 
        max-width: 100% !important; 
        width: 100% !important; 
        margin-left: 0 !important; 
        margin-right: 0 !important; 
    }
    .read-body .ce-block--stretched img,
    .read-body .zzan-image--stretched img {
        width: 100% !important;
        height: auto !important;
    }
}

/* 뱃지 내 SVG 아이콘 정렬 */
.topic-badge .badge-overlay button svg {
    display: block;
    margin: 0 auto;
}

/* ==========================================================================
   Read Page - Refined UI 😊📖
   ========================================================================== */
.read-header {
    padding-bottom: 40px;
    border-bottom: 1px solid #F0F0F0;
    margin-bottom: 60px;
}

.read-header .category-area {
    margin-bottom: 15px;
}

.read-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--zp-black);
    line-height: 1.2;
    margin-bottom: 25px;
    letter-spacing: -0.02em;
}

.read-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--zp-gray-500);
    font-size: 14px;
}

.read-meta .author {
    color: var(--zp-black);
    font-weight: 600;
}

.read-meta .dot {
    width: 3px;
    height: 3px;
    background: #DDD;
    border-radius: 50%;
}

/* 본문 이미지 라운드 처리 및 중앙 정렬 🖼️✨ */
.read-body img,
.read-body .zzan-image-wrapper img,
.read-body .ce-block__content img,
.read-body .zzan-uploaded-image {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* 이미지 컨테이너가 좁을 경우를 대비한 중앙 정렬 보강 */
.read-body .zzan-image-wrapper,
.read-body .ce-block__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 이미지 캡션(설명) 중앙 정렬 📝✨ */
.read-body .image-tool__caption,
.read-body .cdx-simple-image__caption,
.read-body .zzan-image-figure figcaption,
.read-body .ce-block__content [contenteditable][data-placeholder] {
    width: 100% !important;
    text-align: center !important;
    margin-top: 10px !important;
    font-size: 14px;
    color: #787774;
}

/* 본문 텍스트 스타일 가독성 강화 */
.read-body {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    word-break: break-all;
    overflow-wrap: break-word;
}

.read-body p {
    margin-bottom: 1.2em; /* 문단 하단 여백 추가 */
}

/* 빈 문단이나 스페이스만 있는 문단도 높이를 가지도록 처리 */
.read-body p:empty::before,
.read-body p > br:only-child::before {
    content: "\00a0";
    display: inline-block;
}

.read-body .ce-header { color: var(--zp-black); line-height: 1.3; margin-top: 2em; margin-bottom: 0.5em; }
.read-body h1.ce-header { font-size: 2em; font-weight: 800; }
.read-body h2.ce-header { font-size: 1.6em; font-weight: 700; }
.read-body h3.ce-header { font-size: 1.3em; font-weight: 700; }

.zzan-progress-wrap {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.05);
    z-index: 9999;
}
.zzan-progress-wrap .progress-bar {
    width: 0%;
    height: 100%;
    background: var(--zp-electric-blue);
    transition: width 0.1s ease-out;
}

/* PhotoSwipe(이미지 확대) 레이어 z-index 최상위 고정 🚀 */
.pswp {
    z-index: 100000 !important;
}

/* PhotoSwipe가 열릴 때 사이트의 다른 요소(GNB 등) 제어 */
body.pswp-open .reveal-fade-up {
    transform: none !important;
    transition: none !important;
}

/* 이미지 확대 시 GNB가 위로 올라오는 현상 방지 */
body.pswp-open #dynamic-gnb, 
body.pswp-open .gnb,
body.pswp-open header {
    z-index: 1 !important;
    display: none !important; /* 확대 시에는 GNB를 아예 숨김 처리하여 버그 방지 */
}

/* 하단 태그 리스트 스타일 Labeling 😊🏷️ */
.tag-area {
    margin: 80px 0 40px 0;
    padding-top: 40px;
    border-top: 1px solid #F0F0F0;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
}

.tag-list li a {
    display: inline-block;
    padding: 6px 14px;
    background: var(--zp-gray-50);
    color: #666;
    border-radius: 50px;
    font-size: 13px;
    text-decoration: none;
    transition: 0.2s;
}

.tag-list li a:hover {
    background: var(--zp-electric-blue);
    color: #FFF;
    transform: translateY(-2px);
}

.tag-list li a::before {
    content: '# ';
    opacity: 0.5;
}

.btn-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
}

@media (max-width: 767px) {
    .read-title { font-size: 32px; }
    .zzan-post-read { margin: 40px auto; }
    .read-body .ce-block--stretched, .read-body .zzan-image--stretched { max-width: 100% !important; width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
}
