/* ===== Editor.js Frontend Rendering ===== */

.article-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.75;
    color: #1f2937;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Paragraphs */
.article-content p {
    margin: 0 0 1.2em;
}

/* Headings */
.article-content h2 {
    font-size: 26px;
    margin: 1.8em 0 0.6em;
    font-weight: 700;
}

.article-content h3 {
    font-size: 22px;
    margin: 1.6em 0 0.6em;
    font-weight: 600;
}

.article-content h4 {
    font-size: 18px;
    margin: 1.4em 0 0.6em;
}

/* Lists */
.article-content ul,
.article-content ol {
    margin: 0 0 1.2em 1.5em;
}

.article-content li {
    margin-bottom: 0.5em;
}

/* Quotes */
.article-content blockquote {
    border-left: 4px solid #2563eb;
    padding-left: 1em;
    margin: 1.5em 0;
    color: #374151;
    font-style: italic;
}

/* Images */
.article-content img {
    max-width: 100%;
    display: block;
    margin: 1.5em auto;
    border-radius: 10px;
}

/* Tables */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

/* Divider */
.article-content hr {
    margin: 2.5em 0;
}

/* Featured Image (Blog Cover Image) */
.featured-image {
    width: 100%;
    max-width: 900px;
    max-height: 420px;
    object-fit: cover;
    border-radius: 14px;
    margin: 20px auto 30px;
    display: block;
}

/* ===== LINK PREVIEW (FINAL) ===== */

.article-content .link-preview {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin: 24px 0;
    background: #ffffff;
    transition: all 0.2s ease;
}

.article-content .link-preview a {
    display: flex;
    text-decoration: none;
    color: inherit;
    align-items: stretch;
}

.article-content .link-preview:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* Image */
.article-content .link-img {
    flex-shrink: 0;
}

.article-content .link-img img {
    width: 160px;
    height: 100%;
    object-fit: cover;
}

/* Content */
.article-content .link-content {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

/* Title */
.article-content .link-title {
    font-weight: 600;
    font-size: 16px;
    line-height: 1.4;
}

/* Hover effect */
.article-content .link-title:hover {
    text-decoration: underline;
}

/* Description */
.article-content .link-desc {
    font-size: 14px;
    color: #4b5563;
}

/* Domain */
.article-content .link-domain {
    font-size: 12px;
    color: #9ca3af;
}

/* ===== DARK MODE FIX (REAL FINAL) ===== */

.dark .link-preview,
body.dark .link-preview,
body.dark-mode .link-preview {
    background: rgba(255,255,255,0.05);
    border: 1px solid #2a2f3a;
    color: #9ca3af;
}

.dark .link-preview:hover,
body.dark .link-preview:hover,
body.dark-mode .link-preview:hover {
    background: rgba(255,255,255,0.08);
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
    .article-content .link-preview a {
        flex-direction: column;
    }

    .article-content .link-img img {
        width: 100%;
        height: 200px;
    }
}



@media (max-width: 768px) {
    .article-content {
        font-size: 16px;
        padding: 0 10px;
    }

    .article-content h2 {
        font-size: 22px;
    }

    .article-content h3 {
        font-size: 20px;
    }
}

