/* ==========================================================
   Article Standard Component Styles
   A centralized set of styles for all themes — import in layout.
   ========================================================== */

/* --- Article Header --- */
.article-header {
    margin-bottom: 24px;
}
.article-breadcrumb {
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.article-breadcrumb a {
    color: inherit;
    text-decoration: none;
}
.article-breadcrumb a:hover {
    text-decoration: underline;
}
.article-breadcrumb .sep {
    margin: 0 4px;
    color: #ccc;
}
.article-badge {
    display: inline-block;
    padding: 2px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: var(--article-accent, #c00);
    border-radius: 2px;
    margin-bottom: 12px;
}
.article-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 12px 0;
    color: var(--article-title-color, #111);
}
@media (min-width: 768px) {
    .article-title {
        font-size: 2rem;
    }
}
.article-summary {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #555;
    margin: 0 0 16px 0;
    font-weight: 400;
}
.article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    font-size: 0.82rem;
    color: #666;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
}
.article-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #333;
}
.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--article-accent, #c00), #1a1a2e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.article-date,
.article-reading-time,
.article-views {
    display: flex;
    align-items: center;
    gap: 4px;
}
.article-reading-time {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

/* --- Article Featured Image --- */
.article-featured-image {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
}
.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- Article Content --- */
.article-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #222;
}
.article-body h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--article-accent, #c00);
    color: #111;
}
.article-body h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 24px 0 12px;
    color: #222;
}
.article-body h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 20px 0 10px;
    color: #333;
}
.article-body p {
    margin: 0 0 16px;
}
.article-body a {
    color: var(--article-accent, #c00);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.article-body a:hover {
    opacity: 0.8;
}
.article-body blockquote {
    margin: 20px 0;
    padding: 16px 20px;
    border-left: 4px solid var(--article-accent, #c00);
    background: #f8f8f8;
    font-style: italic;
    color: #444;
    border-radius: 0 6px 6px 0;
}
.article-body blockquote p:last-child {
    margin-bottom: 0;
}
.article-body ul,
.article-body ol {
    margin: 0 0 16px;
    padding-left: 24px;
}
.article-body li {
    margin-bottom: 6px;
}
.article-body figure {
    margin: 20px 0;
    text-align: center;
}
.article-body figure img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}
.article-body figure figcaption {
    font-size: 0.82rem;
    color: #777;
    margin-top: 8px;
    font-style: italic;
}
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}
.article-body .pull-quote {
    margin: 24px 0;
    padding: 20px 24px;
    font-size: 1.2rem;
    font-weight: 600;
    font-style: italic;
    color: var(--article-accent, #c00);
    border-top: 2px solid #e0e0e0;
    border-bottom: 2px solid #e0e0e0;
    text-align: center;
    line-height: 1.5;
}
.article-body .mention {
    color: var(--article-accent, #c00);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.article-body .mention:hover {
    text-decoration: underline;
}
.article-body .article-highlight {
    background: #fff9e6;
    padding: 16px 20px;
    border-radius: 6px;
    border-left: 4px solid #f59e0b;
    margin: 20px 0;
}
.article-body .article-highlight h4 {
    margin-top: 0;
    font-size: 0.95rem;
    color: #92400e;
}

/* --- Table of Contents --- */
.article-toc {
    margin: 20px 0;
    padding: 16px 20px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.75);
}
.article-toc-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}
.article-toc-toggle {
    font-size: 0.75rem;
    color: #888;
    margin-left: auto;
}
.article-toc ol {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
}
.article-toc li {
    line-height: 1.45;
}
.article-toc a {
    text-decoration: none;
    color: inherit;
}
.article-toc a:hover {
    color: var(--article-accent, #c00);
}

/* --- Tags --- */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 16px 0;
    margin: 16px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}
.article-tags .tag-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}
.article-tags .tag-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.78rem;
    border-radius: 20px;
    background: #f0f0f0;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
}
.article-tags .tag-badge:hover {
    background: var(--article-accent, #c00);
    color: #fff;
}

/* --- Share Buttons --- */
.article-share {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 12px 0;
    margin: 16px 0;
}
.article-share > span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-right: 8px;
}
.article-share a,
.article-share button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: inherit;
}
.article-share a:hover,
.article-share button:hover {
    opacity: 0.85;
}
.share-twitter {
    background: #1d9bf0;
    color: #fff;
}
.share-facebook {
    background: #1877f2;
    color: #fff;
}
.share-whatsapp {
    background: #25d366;
    color: #fff;
}
.share-copy {
    background: #e8e8e8;
    color: #444;
}
.share-copy:hover {
    background: #ddd;
}

/* --- Floating Share Bar --- */
.floating-share {
    position: fixed;
    left: max(calc(50vw - 520px), 12px);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.floating-share.visible {
    opacity: 1;
    pointer-events: auto;
}
.floating-share a,
.floating-share button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: transform 0.2s, opacity 0.2s;
    font-family: inherit;
}
.floating-share a:hover,
.floating-share button:hover {
    transform: scale(1.1);
}
@media (max-width: 1100px) {
    .floating-share {
        display: none;
    }
}

/* --- Author Bio --- */
.article-author-bio {
    margin: 24px 0;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    border: 1px solid #e0e0e0;
}
.article-author-bio .bio-avatar {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--article-accent, #c00), #1a1a2e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
}
.article-author-bio .bio-info {
    flex: 1;
    min-width: 0;
}
.article-author-bio .bio-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #222;
    margin-bottom: 4px;
}
.article-author-bio .bio-text {
    margin: 0;
    font-size: 0.82rem;
    color: #666;
    line-height: 1.5;
}

/* --- Related Posts --- */
.article-related {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}
.article-related-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.article-related-title:after {
    content: '';
    flex: 1;
    height: 2px;
    background: #e0e0e0;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}
.related-card {
    text-decoration: none;
    color: inherit;
    display: block;
}
.related-card-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}
.related-card-placeholder {
    width: 100%;
    height: 120px;
    background: #e0e0e0;
    border-radius: 6px;
    margin-bottom: 8px;
}
.related-card-category {
    font-size: 0.65rem;
    color: var(--article-accent, #c00);
    text-transform: uppercase;
    font-weight: 600;
}
.related-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 4px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-card-date {
    font-size: 0.72rem;
    color: #999;
}

/* --- Comments --- */
.article-comments {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}
.article-comments h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.comment-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}
.comment-date {
    font-size: 0.75rem;
    color: #999;
}
.comment-text {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #444;
}
.comment-form-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 20px 0 12px;
}
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
}
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--article-accent, #c00);
}
.comment-form .form-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.comment-form .form-row input {
    flex: 1;
}
.comment-form button {
    margin-top: 8px;
    padding: 8px 20px;
    background: var(--article-accent, #c00);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: opacity 0.2s;
}
.comment-form button:hover {
    opacity: 0.9;
}

/* --- Ad Space --- */
.article-ad {
    margin: 24px 0;
    text-align: center;
}
.article-ad img {
    max-width: 100%;
    height: auto;
}
