.article-cover {
    margin-top: 1rem;
    margin-bottom: 2.5rem;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: var(--bg-card);
}

.article-cover img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 1px solid var(--border-light);
    border-radius: 8px;
}

.article-cover figcaption {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--fg-muted);
    text-align: center;
    font-style: italic;
    padding: 0 1rem;
}

.article-toc {
    display: block !important;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 3.5rem;
}

.toc-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
    width: 100%;
}

.toc-header h2 {
    font-size: 1rem;
    margin: 0;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
}

.toc-header i {
    color: var(--fg-muted);
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: block;
    width: 100%;
}

.toc-list li {
    margin-bottom: 1.25rem;
    position: relative;
    padding-left: 1.5rem;
}

.toc-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    top: 0.1rem;
    color: var(--fg-faint);
    font-size: 0.9rem;
    line-height: 1.6;
    transition: color 0.2s;
}

.toc-list li:last-child {
    margin-bottom: 0;
}

.toc-list a {
    color: var(--fg-muted);
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.6;
    transition: color 0.2s ease;
    display: inline-block;
}

.toc-list li:hover::before {
    color: var(--accent);
}

.toc-list a:hover {
    color: var(--accent);
}

.toc-list ul {
    padding-left: 1.5rem;
    margin-top: 1.25rem;
}


.page-content.article-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    border-left: 4px solid var(--accent);
    background: var(--bg-card);
    border-radius: 0 8px 8px 0;
}

.page-content.article-content blockquote p {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--fg);
    margin-bottom: 0.5rem;
}

.page-content.article-content blockquote p:last-child {
    margin-bottom: 0;
}

.page-content.article-content cite {
    font-size: 0.9rem;
    color: var(--fg-muted);
    font-style: normal;
    display: block;
    margin-top: 1rem;
}

.page-content.article-content cite::before {
    content: '— ';
}

.page-content.article-content pre {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 2rem 0;
}

.page-content.article-content pre code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--fg);
}

.page-content.article-content code {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--accent);
}

.page-content.article-content pre>code {
    border: none;
    padding: 0;
    background: transparent;
    color: inherit;
}

.article-list {
    margin: 1.5rem 0 2rem 1.5rem;
    color: var(--fg);
}

.article-list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.article-list li:last-child {
    margin-bottom: 0;
}

.article-list ul,
.article-list ol {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.article-image {
    margin: 2.5rem 0;
    text-align: center;
}

.article-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.article-image.sm img {
    max-width: 60%;
}

.article-image figcaption {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--fg-muted);
    text-align: center;
    padding: 0 1rem;
}


.article-divider {
    border: 0;
    height: 1px;
    background: var(--border-light);
    margin: 2rem 0;
}

.article-footer {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-light);
}

.author-info strong {
    display: block;
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.author-info p {
    font-size: 0.9rem;
    color: var(--fg-muted);
    margin: 0;
    line-height: 1.5;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border-light);
}

.article-share span {
    font-size: 0.9rem;
    color: var(--fg-muted);
    font-weight: 500;
}

.btn-share {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--fg);
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-share:hover {
    background: var(--bg-hover);
    color: var(--accent);
    border-color: var(--fg-muted);
    transform: translateY(-2px);
}




.article-callout {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.callout-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.article-callout.info {
    border-left: 4px solid #3b82f6;

}

.article-callout.info .callout-icon {
    color: #3b82f6;
}

.article-callout.tip {
    border-left: 4px solid #10b981;

}

.article-callout.tip .callout-icon {
    color: #10b981;
}

.article-callout.warning {
    border-left: 4px solid #f59e0b;

}

.article-callout.warning .callout-icon {
    color: #f59e0b;
}

.callout-content p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.callout-content p:last-child {
    margin-bottom: 0;
}


.inline-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 0.8em;
    font-family: var(--font-mono);
    color: var(--fg);
    vertical-align: middle;
    margin: 0 0.2rem;
}


.article-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 2.5rem 0;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
}

.article-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.article-table th,
.article-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
}

.article-table th {
    background: var(--bg-hover);
    color: var(--accent);
    font-weight: 600;
    border-bottom: 2px solid var(--border-light);
}

.article-table tr:last-child td {
    border-bottom: none;
}

.article-table tbody tr:hover {
    background: var(--bg-hover);
}


.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;

    margin: 2.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.article-nav-link {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.article-nav-link:hover {
    background: var(--bg-hover);
    border-color: var(--fg-muted);
}

.article-nav-link.next {
    text-align: right;
    align-items: flex-end;
}

.nav-label {
    font-size: 0.8rem;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.nav-title {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 500;
}

@media (max-width: 600px) {
    .article-nav {
        grid-template-columns: 1fr;
    }

    .article-nav-link.next {
        text-align: left;
        align-items: flex-start;
    }
}

/* --- SEÇÃO DE COMENTÁRIOS --- */
.article-comments {
    margin: 0 0 3rem 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 2rem;
}

.article-comments-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.article-comments-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--fg);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.article-comments-header i {
    font-size: 1.2rem;
    color: var(--fg-muted);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.comment-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--fg);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: none;
    min-height: 90px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--fg-muted);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 8%, transparent);
}

.comment-form textarea::placeholder {
    color: var(--fg-faint);
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

.comment-note {
    font-size: 0.78rem;
    color: var(--fg-faint);
    margin-right: auto;
}

.btn-submit {
    background: var(--fg);
    color: var(--bg);
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-submit:hover {
    opacity: 0.85;
}

.btn-submit:active {
    transform: scale(0.97);
}

.comment-error {
    color: #f87171;
    font-size: 0.82rem;
    display: none;
    padding: 0.6rem 0.875rem;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: 5px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.comment-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-light);
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-item:first-child {
    border-top: 1px solid var(--border-light);
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--fg);
    font-size: 0.875rem;
}

.comment-author-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--fg-muted);
}

.comment-date {
    font-size: 0.78rem;
    color: var(--fg-faint);
    white-space: nowrap;
}

.comment-body {
    color: var(--fg-muted);
    line-height: 1.65;
    font-size: 0.95rem;
    padding-left: 34px;
}