﻿.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-item { border: 1px solid var(--C4); padding: 15px; border-radius: 10px; margin-bottom: 15px; background-color: var(--C2); }

.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }

.comment-author { font-weight: bold; color: var(--C6); display: inline-flex;  align-items: center; gap: 5px; /* فاصله بین آیکن و متن */ }

.comment-date { font-size: 12px; color: var(--C5); }

.comment-body { margin-top: 0; color: var(--C3); }

.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); }
}
