.like-button { background: rgba(var(--C1-rgb), 0.1); border: none; padding: 5px 12px; font-size: 14px; color: var(--C1); cursor: pointer; margin-top: 10px; transition: all 0.2s ease-in-out; border-radius: 5px; display: inline-flex; align-items: center; gap: 5px; }

.like-button:hover { background: rgba(var(--C1-rgb), 0.2); color: var(--C7); }

.like-button:disabled { cursor: default; opacity: 0.7; }

.tags a { display: inline-block; margin-left: 8px; color: var(--C1); text-decoration: none; background-color: var(--C4); padding: 3px 8px; border-radius: 5px; font-size: 0.9em; transition: background-color 0.2s ease-in-out; }

.tags a:hover { background-color: var(--C5); color: var(--C6); }

/* ——— باکس ارسال دیدگاه ——— */
.comment-form-card { background: var(--C2); border: 1px solid var(--C4); border-radius: 12px; padding: 1.5rem 1.75rem; box-shadow: 0 2px 12px rgba(0,0,0,0.06); margin-bottom: 2rem; }
.comment-form-title { color: var(--C6); font-size: 1.25rem; font-weight: 600; margin-bottom: 1.25rem; display: inline-flex; align-items: center; gap: 8px; }
.comment-form-fields .comment-label { font-weight: 500; color: var(--C6); margin-bottom: 0.35rem; }
.comment-form-fields .comment-input { border-radius: 8px; border: 1px solid var(--C4); padding: 0.5rem 0.75rem; }
.comment-form-fields .comment-input:focus { border-color: var(--C1); box-shadow: 0 0 0 3px rgba(var(--C1-rgb), 0.15); }
.comment-form-fields .comment-textarea { min-height: 120px; resize: vertical; }
.comment-form-fields .btn-comment-submit { border-radius: 8px; padding: 0.5rem 1.5rem; font-weight: 500; margin-top: 0.25rem; }
.comment-msg { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; display: flex; align-items: center; gap: 8px; }
.comment-msg-success { background: rgba(34, 197, 94, 0.12); color: #166534; border: 1px solid rgba(34, 197, 94, 0.3); }
.comment-msg-error { background: rgba(239, 68, 68, 0.1); color: #b91c1c; border: 1px solid rgba(239, 68, 68, 0.25); }
.comments-section .comment-form-fields small.text-muted { font-size: 0.8rem; margin-top: 0.25rem; display: block; }
.comment-msg-loading { background: rgba(var(--C1-rgb), 0.08); color: var(--C6); border: 1px solid rgba(var(--C1-rgb), 0.2); }
.comment-msg-loading i { animation: commentSpinner 0.8s linear infinite; }
@keyframes commentSpinner { to { transform: rotate(360deg); } }

/* ——— باکس نظرات کاربران ——— */
.comments-list-card { background: var(--C2); border: 1px solid var(--C4); border-radius: 12px; padding: 1.5rem 1.75rem; margin-top: 2rem; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.comments-list-title { color: var(--C6); font-size: 1.15rem; font-weight: 600; margin-bottom: 1.25rem; display: inline-flex; align-items: center; gap: 8px; }
.comments-list-inner { display: flex; flex-direction: column; gap: 1rem; }

.comment-item { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; padding: 1rem; border-radius: 10px; background: var(--C8); border: 1px solid var(--C4); transition: box-shadow 0.2s ease; }
.comment-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.comment-avatar { width: 44px; height: 44px; min-width: 44px; border-radius: 50%; background: rgba(var(--C1-rgb), 0.12); color: var(--C1); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.comment-content { flex: 1; min-width: 200px; }
.comment-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.comment-author { font-weight: 600; color: var(--C6); font-size: 0.95rem; }
.comment-date { font-size: 0.8rem; color: var(--C5); }
.comment-body { margin: 0 0 0.5rem 0; color: var(--C3); line-height: 1.65; font-size: 0.95rem; }
.comment-reply-btn { display: inline-flex; align-items: center; gap: 0.35rem; }
.comment-replies-nested { flex-basis: 100%; width: 100%; margin-right: 1rem; margin-left: 0; margin-top: 0.25rem; padding-right: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.comment-replies-title { font-size: 0.8rem; font-weight: 600; color: var(--C5); margin-bottom: 0.25rem; }
.comment-reply-item { background: rgba(var(--C1-rgb), 0.04); }
.comment-item-admin { background: var(--C2); border: 1px solid var(--C5); }
.comment-item-admin.comment-reply-item { background: var(--C2); }

.sidebar-sticky { background-color: var(--C2); padding: 20px; border-radius: 8px; box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); }

.sidebar-sticky h4 { border-bottom: 2px solid var(--C4); padding-bottom: 8px; margin-bottom: 20px; color: var(--C6); display: inline-flex; /* برای همترازی آیکن و متن */ align-items: center; gap: 8px; /* فاصله بین آیکن و متن */ }

.latest-article-item { display: flex; gap: 15px; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px dashed var(--C4); }

.latest-article-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.latest-article-item img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }

.latest-article-content a { text-decoration: none; color: var(--C1); font-weight: bold; font-size: 1.1em; display: block; margin-bottom: 5px; }

.latest-article-content a:hover { color: var(--C7); }

.latest-article-date { font-size: 12px; color: var(--C5); }

@media (min-width: 768px) {
    .sidebar-sticky { position: sticky !important; top: 120px; align-self: flex-start; }
}

@media (max-width: 767.98px) {
    .sidebar-sticky { position: static !important; top: auto !important; padding-top: 0; }
}

.meta span i { vertical-align: middle; margin-left: 3px; }

.article-body { text-align: justify; font-size: 1rem; background-color: var(--C8); border-radius: 5px; padding: 10px; line-height: 1.8rem; }
.article-body a { color: var(--C1); font-weight: bold; border-bottom: 1px dashed var(--C1); }
.article-body p { line-height: 2.2rem; }
.article-body ul { padding-inline-start: 20px; padding-left: 5px }
.article-body ol { padding-inline-start: 20px; padding-left: 5px }

.article-body > h2,
.article-body > h3,
.article-body > h4,
.article-body > h5 { font-weight: bold; text-align: right; padding: 5px 0 10px; }

ul li h3 { font-weight: bold; }
ol li h3 { font-weight: bold; }

ol::marker { font-weight: bold }

.article-body h2 { font-size: calc(1.8rem); line-height: 2.5rem; margin-top: 30px; text-align:right }
.article-body h3 { font-size: calc(1.3rem); text-align:right }
.article-body h4 { font-size: calc(1.2rem); text-align:right }
.article-body h5 { font-size: calc(1.1rem); }
.article-body h6 { font-size: calc(1.1rem); }

.audio-player-container { background-color: var(--C2); /* پس‌زمینه روشن */ border: 1px solid var(--C4); /* حاشیه ظریف */ border-radius: 8px; /* گوشه‌های گرد */ padding: 10px; /* فاصله داخلی */ box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* سایه نرم */ display: flex; flex-direction: column; align-items: center; width: 100%; /* عرض 100% */ margin-bottom: 20px; /* فاصله از محتوای زیر */ }

.audio-player-container h5 { font-size: 1.1rem; font-weight: bold; color: var(--C1); /* رنگ تیتر */ margin-bottom: 10px; }

audio { width: 100%; /* عرض کامل برای پلیر */ outline: none; /* حذف حاشیه پیش‌فرض */ border-radius: 5px; /* گوشه‌های گرد */ background-color: var(--C2); /* پس‌زمینه هماهنگ */ margin-top: 10px; }

.audio-player-container .audio-description { font-size: 0.8rem; color: var(--C3); /* متن توضیحات */ margin-top: 15px; text-align: center; }

.tooltip-link { position: relative; color: var(--C1); text-decoration: none; transition: all 0.3s ease; padding-bottom: 2px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }

.tooltip-link:hover { color: var(--C7); border-bottom-color: var(--C7); }

.tooltip-icon { display: inline-flex; font-size: 0.9em; color: var(--C1); cursor: pointer; vertical-align: middle; transition: color 0.3s ease; font-weight: bold; padding: 0px 3px 0px 0; }

.tooltip-icon i { font-size: 1.4em; vertical-align: middle; }

.tooltip-link:hover .tooltip-icon { color: var(--C7); }

/* استایل باکس تولتیپ */
.tooltip-box { position: fixed; background: white; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.40); padding: 16px; width: 320px; z-index: 1000; display: none; animation: tooltipFadeIn 0.3s ease; border: 1px solid #eee; max-height: 90vh; overflow: visible; }

.tooltip-box.active { display: block; }

.tooltip-box::before { content: ''; position: absolute; left: var(--arrow-left, 50%); transform: translateX(-50%); border-width: 8px; border-style: solid; border-color: transparent; }

.tooltip-box[data-position="top"]::before { top: -16px; border-bottom-color: white; }

.tooltip-box[data-position="bottom"]::before { bottom: -16px; border-top-color: white; }

.tooltip-close { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,0.1); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; z-index: 2; }

.tooltip-close:hover { background: rgba(0,0,0,0.2); }

.tooltip-close i { font-size: 14px; color: #666; }

.tooltip-box a { text-decoration: none; color: inherit; transition: color 0.2s ease; display: flex; align-items: center; flex-direction: column; }

.tooltip-box a:hover { color: var(--C7); }

.tooltip-box img { width: 100%; height: 140px; object-fit: cover; border-radius: 4px; margin-bottom: 12px; cursor: pointer; }

.tooltip-box h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--C1); cursor: pointer; }

.tooltip-box p { font-size: 0.9rem; color: #666; margin-bottom: 8px; line-height: 1.5; text-align: center }

.tooltip-box .tooltip-footer { display: flex; justify-content: center; align-items: center; font-size: 0.8rem; color: #999; margin-top: 12px; padding-top: 8px; border-top: 1px solid #eee; }

/* استایل لودینگ */
.tooltip-loading { display: flex; justify-content: center; align-items: center; height: 100px; width: 100%; }

.tooltip-loading::after { content: ''; width: 30px; height: 30px; border: 3px solid #f3f3f3; border-top: 3px solid var(--C1); border-radius: 50%; animation: spin 1s linear infinite; }

.tooltip-error { text-align: center; padding: 20px; color: #666; }

.tooltip-error i { font-size: 24px; color: var(--C1); margin-bottom: 10px; }

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes tooltipFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(10px); }
}
