/**
 * styles/pages/article-view.css
 * Article single view — CSP-safe layout (no inline styles on template)
 */

.article-view-main {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
    min-height: 60vh;
    box-sizing: border-box;
}

.article-msg-wrap {
    text-align: center;
    padding: 4rem 1rem;
    color: #ff9999;
    max-width: 700px;
    margin: 0 auto;
}

.article-msg-title {
    padding: 1.5rem 0;
    background-color: #a6031d;
    color: white;
    border: 1px solid #ffa1b0;
    border-radius: 1rem;
}

.article-msg-body {
    font-size: 1.2rem;
    margin: 1.5rem 0;
    color: honeydew;
}

.article-msg-actions {
    margin-top: 3rem;
}

.article-back-link {
    color: var(--apald-cyan, #0af);
    text-decoration: none;
}
.article-back-link:hover {
    color: var(--apald-peach, #ffdab9);
}

.article-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    gap: 1rem;
}

.article-title-left {
    display: flex;
    align-items: center;
    flex: 1;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-title-left h1 {
    margin: 0;
}

.article-featured-badge {
    background: #ffd700;
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-left: 0.5rem;
}

.article-share-row {
    display: flex;
    gap: 0.8rem;
}

.author-link {
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
    color: var(--apald-cyan, #0af);
}
.author-link:hover {
    color: rgb(255, 218, 185);
}

.article-meta {
    color: #aaa;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

#article_content_area p {
    text-indent: 0;
    font-size: 1.2rem;
}

/* Center content images — avoids left-aligned small images with empty space */
#article_content_area img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
}

#article_content_area figure {
    display: block;
    margin: 1.25rem auto;
    text-align: center;
}

#article_content_area figure img {
    margin-left: auto;
    margin-right: auto;
}

#article_content_area p img {
    /* Images alone in a paragraph still center */
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.article-categories {
    text-align: center;
    margin: 3rem 0 2rem 0;
}

.article-categories-label {
    margin: 0 0 0.8rem 0;
    font-weight: bold;
    color: #ddd;
}

.related-articles {
    margin: 4rem auto 2rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.related-articles-heading {
    width: 100%;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.related-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid #555;
    border-radius: 8px;
    padding: 1rem;
    transition: transform 0.2s ease;
    position: relative;
    box-sizing: border-box;
}
.related-card:hover {
    transform: translateY(-4px);
}
.related-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
}
.related-card h4 {
    margin: 0.8rem 0 0.4rem 0;
    font-size: 1.1rem;
    line-height: 1.3;
}
.related-card-excerpt {
    color: #bbb;
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
}
.related-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #aaa;
}
.related-empty {
    color: #aaa;
}

#comments.article-comments {
    margin-top: 3rem;
}

.comment-date {
    margin-left: 0.5rem;
    color: #777;
}

.comments-empty {
    color: #aaa;
    font-style: italic;
}

.article-comment-form {
    margin-top: 2.5rem;
}

.article-comment-textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(30, 20, 60, 0.6);
    color: #fff;
    border: 1px solid #555;
    border-radius: 8px;
    resize: vertical;
    font-size: 1.05rem;
    box-sizing: border-box;
}

.article-comment-actions {
    margin-top: 1rem;
    text-align: right;
}

.article-comment-submit {
    padding: 0.8rem 1.8rem;
    background: #4a148c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.05rem;
}
.article-comment-submit:hover {
    background: var(--apald-darkpurple, #6a1b9a);
}

.article-comment-login {
    margin-top: 2rem;
    color: #aaa;
}
.article-comment-login a {
    color: var(--apald-cyan, #0af);
    text-decoration: none;
}
.article-comment-login a:hover {
    color: var(--apald-peach, #ffdab9);
}

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