/* ── Single Article Page ── */

.article-spacer { height: 72px; }

/* Ticker */
.news-ticker-bar {
    background: #1b4332;
    color: #fff;
    padding: 8px 0;
    overflow: hidden;
    white-space: nowrap;
}
.news-ticker-bar .ticker-label {
    display: inline-block;
    background: #e11d48;
    color: #fff;
    font-weight: 700;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 14px;
    margin-right: 14px;
    border-radius: 2px;
}
.news-ticker-bar .ticker-track {
    display: inline-block;
    animation: ticker-scroll 40s linear infinite;
    font-size: .88rem;
}
@keyframes ticker-scroll {
    0%   { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* Breadcrumbs */
.breadcrumbs {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 10px 0;
    font-size: .85rem;
}
.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.breadcrumbs li + li::before { content: '/'; color: #9ca3af; margin-right: 6px; }
.breadcrumbs a { color: #059669; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* Layout */
.article-page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Article */
.article-main {}

.article-category-badge {
    display: inline-block;
    background: #e11d48;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 14px;
}

.article-headline {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    color: #111827;
    margin: 0 0 14px;
    letter-spacing: -.5px;
}

.article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 24px;
    font-size: .85rem;
    color: #6b7280;
}
.article-meta-bar .author-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #111827;
    font-weight: 500;
}
.article-meta-bar .author-chip img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

/* Hero image */
.article-hero-img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 28px;
}

/* Content */
.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
}
.article-content p { margin: 0 0 1.4em; }
.article-content h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #111827;
    margin: 2em 0 .8em;
    padding-left: 14px;
    border-left: 4px solid #059669;
}
.article-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 1.6em 0 .6em;
}
.article-content blockquote {
    background: #ecfdf5;
    border-left: 4px solid #059669;
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin: 24px 0;
    color: #1f2937;
    font-style: italic;
    font-size: 1.05rem;
}
.article-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 16px 0;
}
.article-content a { color: #059669; }
.article-content ul, .article-content ol {
    margin: 0 0 1.4em 1.2em;
    line-height: 1.8;
}

/* Article photos gallery */
.article-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 24px 0;
}
.article-photos-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform .2s;
}
.article-photos-grid img:hover { transform: scale(1.02); }

/* Video embeds */
.article-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin: 24px 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}
.article-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Share bar */
.article-share {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 32px;
    font-size: .9rem;
    color: #6b7280;
    flex-wrap: wrap;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    transition: background .15s;
    text-decoration: none;
}
.share-btn:hover { background: #f3f4f6; }
.share-btn img { width: 18px; height: 18px; object-fit: contain; }

/* Author box */
.author-box {
    display: flex;
    gap: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-top: 32px;
}
.author-box img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid #d1fae5;
}
.author-box-avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #059669;
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.author-box-info h4 { font-size: 1rem; font-weight: 700; color: #111827; margin: 0 0 4px; }
.author-box-info .author-label { font-size: .72rem; color: #059669; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.author-box-info p { font-size: .88rem; color: #6b7280; margin: 0; line-height: 1.5; }

/* Comments */
.comments-section { margin-top: 40px; }
.comments-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}
.comment-form textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: .9rem;
    resize: vertical;
    outline: none;
    transition: border .2s;
    box-sizing: border-box;
}
.comment-form textarea:focus { border-color: #059669; }
.comment-form button {
    background: #059669;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    font-size: .9rem;
}
.comment-form button:hover { background: #047857; }
.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #059669;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    flex-shrink: 0;
}
.comment-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.comment-body {
    flex: 1;
    background: #f9fafb;
    border-radius: 10px;
    padding: 12px 16px;
}
.comment-body .comment-author { font-weight: 600; font-size: .88rem; color: #111827; }
.comment-body .comment-date  { font-size: .75rem; color: #9ca3af; margin-left: 8px; }
.comment-body .comment-text  { font-size: .9rem; color: #374151; margin-top: 6px; line-height: 1.55; }
.comment-replies { margin-left: 50px; margin-top: 12px; }
.reply-btn {
    background: none;
    border: none;
    color: #059669;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-top: 6px;
}

/* ── Paper-Detail Comment Classes (used by article.html) ── */
.pd-section { background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 2px 16px rgba(0,0,0,0.06); }
.pd-section-title {
    font-weight: 700; font-size: 1.2rem; color: #111827;
    margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}
.pd-section-title i { color: #059669; }

.pd-comment-form { margin-bottom: 24px; }
.pd-comment-form textarea {
    width: 100%; padding: 14px; border: 1.5px solid #e5e7eb;
    border-radius: 12px; resize: vertical; min-height: 80px; font-size: 0.95rem;
    font-family: inherit; box-sizing: border-box;
}
.pd-comment-form textarea:focus { border-color: #059669; outline: none; box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
.pd-comment-btn {
    background: #059669; color: #fff; border: none;
    padding: 10px 24px; border-radius: 10px; font-weight: 600;
    cursor: pointer; margin-top: 8px; transition: background 0.2s;
}
.pd-comment-btn:hover { background: #047857; }

.pd-login-prompt {
    text-align: center; padding: 24px;
    background: #f9fafb; border-radius: 12px;
    color: #6b7280; margin-bottom: 20px;
}
.pd-login-prompt a { color: #059669; font-weight: 600; }

.pd-comment {
    display: flex; gap: 14px; padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}
.pd-comment:last-child { border-bottom: none; }
.pd-comment-avatar {
    width: 42px; height: 42px; border-radius: 50%; object-fit: cover;
    background: #d1fae5; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #047857; font-weight: 700; font-size: 1.1rem;
}
.pd-comment-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pd-comment-body { flex: 1; }
.pd-comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.pd-comment-name { font-weight: 600; color: #111827; font-size: 0.95rem; }
.pd-comment-date { font-size: 0.8rem; color: #9ca3af; }
.pd-comment-text { color: #4b5563; font-size: 0.92rem; line-height: 1.5; }

/* Replies */
.pd-replies { margin-left: 56px; margin-top: 4px; border-left: 2px solid #f3f4f6; padding-left: 14px; }
.pd-reply { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f3f4f6; }
.pd-reply:last-child { border-bottom: none; }
.pd-reply-avatar {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    background: #d1fae5; display: flex; align-items: center;
    justify-content: center; color: #047857; font-weight: 700; font-size: 0.85rem;
}
.pd-reply-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pd-reply-form { margin-left: 56px; margin-top: 8px; display: none; }
.pd-reply-form textarea {
    width: 100%; padding: 10px 12px; border: 1.5px solid #e5e7eb;
    border-radius: 10px; resize: vertical; min-height: 60px; font-size: 0.9rem;
    font-family: inherit; box-sizing: border-box;
}
.pd-reply-form textarea:focus { border-color: #059669; outline: none; box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
.pd-reply-form-actions { display: flex; gap: 8px; margin-top: 6px; }
.pd-reply-submit { background: #059669; color: #fff; border: none; padding: 7px 18px; border-radius: 8px; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.pd-reply-submit:hover { background: #047857; }
.pd-reply-cancel { background: none; border: none; color: #6b7280; font-size: 0.82rem; cursor: pointer; padding: 7px 0; }
.pd-reply-cancel:hover { color: #374151; }
.pd-reply-toggle { background: none; border: none; color: #059669; font-size: 0.8rem; font-weight: 600; cursor: pointer; padding: 4px 0; margin-top: 4px; }
.pd-reply-toggle:hover { text-decoration: underline; }

/* Related articles */
.related-section { margin-top: 40px; }
.related-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.related-card {
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: inherit;
    transition: transform .2s, box-shadow .2s;
}
.related-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.related-card img { width: 100%; height: 140px; object-fit: cover; }
.related-card-placeholder {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #6ee7b7;
}
.related-card-body { padding: 12px; }
.related-card-body h4 { font-size: .9rem; font-weight: 600; color: #111827; margin: 0; line-height: 1.4; }
.related-card-body small { color: #9ca3af; font-size: .75rem; }

/* Sidebar */
.article-sidebar {}
.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-bottom: 24px;
}
.sidebar-widget-title {
    background: linear-gradient(135deg, #064e3b, #059669);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 16px;
}
.sidebar-article {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
}
.sidebar-article:last-child { border-bottom: none; }
.sidebar-article:hover { background: #f9fafb; }
.sidebar-article-img {
    width: 56px; height: 56px; border-radius: 8px;
    object-fit: cover; flex-shrink: 0;
}
.sidebar-article-placeholder {
    width: 56px; height: 56px; border-radius: 8px;
    background: #ecfdf5; display: flex; align-items: center;
    justify-content: center; font-size: 1.3rem; color: #6ee7b7; flex-shrink: 0;
}
.sidebar-article h4 {
    font-size: .83rem; font-weight: 600; line-height: 1.35;
    color: #111827; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.sidebar-article small { color: #9ca3af; font-size: .73rem; }

/* Newsletter */
.newsletter-box {
    background: linear-gradient(135deg, #064e3b, #059669);
    color: #fff;
    border-radius: 12px;
    padding: 22px 18px;
    margin-bottom: 24px;
}
.newsletter-box h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.newsletter-box p  { font-size: .82rem; opacity: .85; margin-bottom: 14px; }
.newsletter-box input {
    width: 100%; padding: 9px 13px; border: none;
    border-radius: 7px; font-size: .88rem; margin-bottom: 7px;
    outline: none; box-sizing: border-box;
}
.newsletter-box button {
    width: 100%; background: #fff; color: #064e3b;
    border: none; border-radius: 7px; padding: 9px;
    font-weight: 700; cursor: pointer; font-size: .88rem;
}
.newsletter-box button:hover { opacity: .9; }

/* Lightbox */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    object-fit: contain;
}
.lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10000;
}

@media (max-width: 900px) {
    .article-page-layout { grid-template-columns: 1fr; }
    .article-headline { font-size: 1.6rem; }
    .article-sidebar { display: none; }
}
