/* ==========================================================================
   HEditor Content Styles (Refactored)
   ========================================================================== */

/* 1. 에디터 영역 기본 설정 */
.he-content, .heditor-content {
    font-family: 'Notosans KR', 'Malgun Gothic', dotum, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    text-align: left;
    word-break: break-all;
    box-sizing: border-box;
}

/* 2. 제목 (Headings) - 구체적인 선택자로 우선순위 확보 */
.heditor-content h1 { display: block; font-size: 2em; font-weight: bold; margin: 0.67em 0; line-height: 1.2; border-bottom: none; }
.heditor-content h2 { display: block; font-size: 1.5em; font-weight: bold; margin: 0.83em 0; line-height: 1.3; }
.heditor-content h3 { display: block; font-size: 1.17em; font-weight: bold; margin: 1em 0; }
.heditor-content h4 { display: block; font-size: 1em; font-weight: bold; margin: 1.33em 0; }

/* 3. 본문 및 텍스트 스타일 */
.heditor-content p {
    margin: 0 0 1em 0;
    padding: 0;
    line-height: 1.6;
    min-height: 1em;
}

/* 텍스트 꾸밈 */
.heditor-content strong, .heditor-content b { font-weight: bold; }
.heditor-content em, .heditor-content i { font-style: italic; }
.heditor-content u { text-decoration: underline; }
.heditor-content s, .heditor-content strike { text-decoration: line-through; }

/* 4. 리스트 (Lists) */
.heditor-content ul, .heditor-content ol {
    margin: 15px 0;
    padding-left: 40px;
    background: transparent;
    border: none;
}
.heditor-content ul { list-style: disc outside; }
.heditor-content ol { list-style: decimal outside; }
.heditor-content li { margin: 5px 0; line-height: 1.6; }

/* 5. 인용구 */
.heditor-content blockquote {
    margin: 1.5em 10px;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-left: 5px solid #ddd;
    color: #555;
}

/* 6. 링크 */
.heditor-content a { color: #007bff; text-decoration: underline; cursor: pointer; }
.heditor-content a:hover { color: #0056b3; }

/* 7. 이미지 */
.heditor-content img { max-width: 100%; height: auto; display: inline-block; vertical-align: middle; }

/* 8. 표 (Table) */
.heditor-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 15px 0;
    border: 1px solid #ddd;
    table-layout: fixed;
}
.heditor-content th { background-color: #f4f4f4; font-weight: bold; text-align: center; }
.heditor-content td, .heditor-content th {
    border: 1px solid #ddd;
    padding: 8px 10px;
    vertical-align: top;
}

/* ==========================================================================
   HEditor Link Card (Mobile Optimized)
   ========================================================================== */
.he-link-card {
    display: block;
    margin: 20px 0;
    max-width: 480px;
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none !important; /* 링크 밑줄 제거 */
}
.he-link-card:hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(0,0,0,0.1); }

/* 썸네일: 비율 유지하며 모바일 대응 */
.he-link-thumb {
    width: 100%;
    height: 0;
    padding-bottom: 52.5%; /* 1.9:1 비율 유지 */
    background-color: #f4f4f4;
    background-size: cover;
    background-position: center;
}

.he-link-text { padding: 15px; text-align: left; }
.he-link-title { font-size: 16px; font-weight: bold; color: #333; margin-bottom: 8px; line-height: 1.3; }
.he-link-desc { font-size: 13px; color: #666; margin-bottom: 12px; line-height: 1.5; }
.he-link-domain { font-size: 11px; color: #999; text-transform: uppercase; font-weight: 500; }

.he-link-card.no-image .he-link-thumb { display: none; }

/* 모바일 대응 */
@media (max-width: 500px) {
    .he-link-card { max-width: 100%; }
}