.article-container { max-width: 900px; margin: 50px auto; padding: 0 20px; line-height: 1.8; color: var(--text); }
.article-header { text-align: center; margin-bottom: 50px; }
.article-header h1 { font-size: 2.8rem; color: var(--primary); margin-bottom: 15px; }
.article-intro { font-size: 1.3rem; color: var(--text-muted); font-style: italic; margin-bottom: 20px; }
.article-meta { color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; border-top: 1px solid var(--border); display: inline-block; padding-top: 15px; }
.article-body { background: var(--bg-card); padding: 50px; border-radius: var(--radius-card); box-shadow: var(--shadow-card); font-size: 1.15rem; border: 1px solid var(--border); }

.article-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; padding-top: 20px; border-top: 1px dashed var(--border); }
.admin-tools { display: flex; gap: 15px; align-items: center; }

.back-to-blog { color: var(--primary); text-decoration: none; font-weight: bold; }
.btn-edit-inline { background: var(--text-dark); color: var(--bg-card) !important; padding: 8px 15px; text-decoration: none; border-radius: 5px; font-weight: bold; font-size: 0.85rem; }
.btn-delete-inline { background: transparent; color: var(--danger); border: 1px solid var(--danger); padding: 7px 12px; text-decoration: none; border-radius: 5px; font-weight: bold; font-size: 0.85rem; transition: transform var(--transition), box-shadow var(--transition), background var(--transition), background-color var(--transition), color var(--transition), border-color var(--transition), opacity var(--transition); }
.btn-delete-inline:hover { background: var(--danger); color: var(--bg-card); }

.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary);
    z-index: 99999;
    box-shadow: 0 1px 4px rgba(var(--primary-rgb), 0.4);
    transition: width 0.08s linear;
}

.share-btn.share-copy {
    background: var(--text-dark);
    color: #ffffff;
    border: none;
    cursor: pointer;
}
.share-btn.share-copy:hover {
    background: var(--primary);
    color: #ffffff;
}

.commenti-section { max-width: 850px; margin: 40px auto; padding: 0 20px; }
.commento {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
}
.commento-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.commento-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}
.commento-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.commento-autore {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.95rem;
}
.commento-data {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}
.commento-testo {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.65;
    padding-left: 50px;
}
.commento-form { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-card); padding: 25px; margin-top: 30px; box-shadow: var(--shadow-card); }
.commento-form input, .commento-form textarea { width: 100%; padding: 12px 14px; margin-bottom: 12px; border: 1.5px solid var(--border); border-radius: 8px; background: var(--bg-page); color: var(--text); font-family: inherit; font-size: 0.95rem; box-sizing: border-box; transition: border-color var(--transition); }
.commento-form input:focus, .commento-form textarea:focus { outline: none; border-color: var(--primary); }
.commento-form textarea { min-height: 120px; resize: vertical; }
.commento-form button { background: var(--primary); color: #ffffff; padding: 12px 26px; border: none; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 0.95rem; transition: background var(--transition); }
.commento-form button:hover { background: var(--primary-hover); }
.commento-intro { margin-bottom: 24px; font-size: 1.1rem; color: var(--text-dark); font-weight: 700; border-bottom: 1px solid var(--border-light); padding-bottom: 12px; }

@media (max-width: 600px) {
    .commento-testo { padding-left: 0; }
}

/* Related posts */
.related-posts { margin-top: 50px; }
.related-posts h2 { font-size: 1.4rem; color: var(--text); margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.related-card { display: flex; flex-direction: column; gap: 6px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-card); padding: 12px; text-decoration: none; color: var(--text); transition: box-shadow var(--transition); }
.related-card:hover { box-shadow: var(--shadow-card); }
.related-card img { width: 100%; height: 140px; object-fit: cover; border-radius: 6px; }
.related-title { font-weight: 600; font-size: 0.92rem; line-height: 1.3; }
.related-card small { color: var(--text-muted); font-size: 0.8rem; }

@media (max-width: 768px) {
    .article-container {
        padding: 0 12px;
        margin: 24px auto;
    }
    .article-header {
        margin-bottom: 24px;
    }
    .article-header h1 {
        font-size: 1.85rem;
        line-height: 1.25;
        margin-bottom: 12px;
    }
    .article-intro {
        font-size: 1.05rem;
        margin-bottom: 16px;
    }
    .article-body {
        padding: 20px 16px;
        font-size: 1rem;
    }
    .article-footer {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    .commenti-section {
        padding: 0 12px;
        margin: 24px auto;
    }
    .commento-form {
        padding: 18px 14px;
    }
}

@media (max-width: 480px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}
