.post-card-frame {
    background-color: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.post-card-frame:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    border-color: #d8d8d8;
}

.post-list-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: #999;
}

.post-list-empty i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    color: #ccc;
}

.post-list-empty p {
    font-size: 15px;
    margin: 0;
}

.post-list-container {
    position: relative;
    min-height: 200px;
    scroll-margin-top: 100px;
}

.post-list-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 5;
}

.post-list-spinner {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 42px;
    height: 42px;
    border: 3px solid #e8e8e8;
    border-top-color: var(--bs-primary, #0d6efd);
    border-radius: 50%;
    animation: post-list-spin 0.7s linear infinite;
    z-index: 6;
    display: none;
}

.post-list-loading .post-list-spinner {
    display: block;
}

@keyframes post-list-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.post-pagination {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}

.post-pagination-list {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    direction: ltr;
}

.post-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background-color: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.post-pagination .page-link:hover:not(:disabled) {
    border-color: var(--bs-primary, #0d6efd);
    color: var(--bs-primary, #0d6efd);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.post-pagination .page-item.active .page-link {
    background-color: var(--bs-primary, #0d6efd);
    border-color: var(--bs-primary, #0d6efd);
    color: #fff;
}

.post-pagination .page-item.disabled .page-link {
    cursor: default;
    color: #bbb;
    background-color: #f7f7f7;
    box-shadow: none;
}

.post-pagination .page-link-ellipsis {
    border: none;
    background: transparent;
    cursor: default;
}

.post-pagination .page-link-arrow {
    font-size: 13px;
}

/* ---- پیجینیشن موبایل ---- */
.post-pagination-mobile {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 2.5rem;
    direction: ltr;
}

.mobile-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background-color: #fff;
    color: #333;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-page-btn:hover:not(:disabled) {
    border-color: var(--bs-primary, #0d6efd);
    color: var(--bs-primary, #0d6efd);
}

.mobile-page-btn:disabled {
    color: #ccc;
    background-color: #f7f7f7;
    cursor: default;
}

.mobile-page-display {
    min-width: 60px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    direction: ltr;
    unicode-bidi: embed;
}

@media (max-width: 576px) {
    .post-pagination-desktop {
        display: none;
    }

    .post-pagination-mobile {
        display: flex;
    }
}

@media (max-width: 480px) {
    .post-pagination .page-link {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

.widget_categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_categories .cat-item a {
    display: block;
    text-decoration: none;
}

.widget_categories .cat-item.active a {
    color: var(--bs-primary, #0d6efd);
    font-weight: 600;
}

.filter-tag.active {
    color: #fff !important;
    background-color: var(--bs-primary, #0d6efd);
    border-color: var(--bs-primary, #0d6efd);
    border-radius: 4px;
}

.clear-filters-btn {
    display: block;
    margin-top: 10px;
    font-size: 18px;
    color: var(--bs-primary, #0d6efd);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.clear-filters-btn:hover {
    color: #0a58ca;
}

.post-list-error {
    text-align: center;
    padding: 4rem 1rem;
    color: #999;
}

.post-list-error i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    color: #dc3545;
}

.post-list-error p {
    font-size: 15px;
    margin-bottom: 1rem;
    color: #666;
}

.post-list-loading .post-list-spinner {
    display: block;
}

.related-posts {
    margin: 3rem 0;
}

.related-posts-title {
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: 24px;
    position: relative;
    padding-right: 14px;
}

.related-posts-title::before {
    content: "";
    position: absolute;
    right: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 4px;
    background: var(--bs-primary);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.related-post-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 10px rgba(20, 20, 43, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.related-post-card:hover {
    box-shadow: 0 12px 28px rgba(20, 20, 43, 0.12);
    transform: translateY(-4px);
    border-color: #d8d8d8;
    color: inherit;
}

.related-post-media {
    padding: 14px 14px 0;
}

.related-post-media img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.related-post-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.related-post-title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    margin: 0 0 8px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-description {
    font-size: 13px;
    color: #888;
    line-height: 1.8;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #888;
    margin-bottom: 12px;
}

.related-post-meta .related-post-author {
    color: var(--bs-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-post-meta .related-post-author::before {
    content: "";
    height: 6px;
    width: 6px;
    background-color: var(--bs-primary);
    border-radius: 50%;

}

.related-post-comments {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--bs-primary);
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
    margin-top: auto;
}

@media (max-width: 992px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}
.comment-form,
.comment-item {
    background: #fff;
    border: 0.5px solid var(--bs-secondary-border-subtle);
    border-radius: 12px;
    padding: 14px 16px;
    transition: background-color 1.2s ease-out;
}

.comment-form {
    margin-top: 24px;
}

.comment-item-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bs-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-avatar i {
    font-size: 18px;
    color: var(--bs-primary);
}

.comment-item-reply .comment-avatar {
    width: 34px;
    height: 34px;
}

.comment-item-reply .comment-avatar i {
    font-size: 15px;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-form textarea {
    width: 100%;
    border: 0.5px solid var(--bs-secondary-border-subtle);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--bs-heading-color);
    resize: none;
}

.comment-form textarea:disabled {
    background: var(--bs-light);
    cursor: not-allowed;
}

.comment-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.comment-form-error {
    font-size: 12px;
    color: #d64545;
}

.comment-form-success {
    font-size: 12px;
    color: #16a34a;
}

.comment-submit-btn {
    background: var(--bs-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 22px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .15s ease, opacity .15s ease;
}

.comment-submit-btn:hover:not(:disabled) {
    background: var(--bs-primary-btn-hover-bg);
}

.comment-submit-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.comment-reply-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bs-primary-bg-subtle);
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--bs-body-color);
}

.comment-reply-context button {
    background: none;
    border: none;
    color: var(--bs-body-color);
    cursor: pointer;
}

.comment-count {
    font-size: 15px;
    font-weight: 500;
    color: var(--bs-heading-color);
    margin-bottom: 16px;
}

.comment-count span {
    color: var(--bs-body-color);
    font-weight: 400;
}

.comment-thread {
    margin-bottom: 14px;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.comment-author-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--bs-heading-color);
}

.comment-date {
    direction: ltr;
    font-size: 11px;
    color: var(--bs-body-color);
}

.comment-author-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 3px;
}

.comment-author-badge {
    font-size: 10px;
    font-weight: 500;
    padding: 1px 8px;
    border-radius: 8px;
}

.comment-text {
    font-size: 13px;
    color: var(--bs-body-color);
    line-height: 1.8;
    margin: 6px 0 8px;
}

.comment-text-deleted {
    font-style: italic;
    opacity: .7;
}

.comment-reply-btn {
    background: none;
    border: none;
    color: var(--bs-primary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
}

.comment-replies {
    margin-inline-start: 46px;
    margin-top: 14px;
    padding-inline-start: 16px;
    border-inline-start: 2px solid var(--bs-primary-border-subtle);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment-reply-preview {
    display: block;
    width: 100%;
    text-align: right;
    background: var(--bs-light);
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    margin: 6px 0 8px;
    cursor: pointer;
}

.comment-reply-preview-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--bs-primary);
    display: block;
}

.comment-reply-preview-text {
    font-size: 12px;
    color: var(--bs-body-color);
    display: block;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comment-highlight {
    background-color: var(--bs-primary-bg-subtle) !important;
}

.comment-empty {
    font-size: 13px;
    color: var(--bs-body-color);
    text-align: center;
    padding: 20px 0;
}

.comment-error-state {
    text-align: center;
    padding: 32px 16px;
}

.comment-error-state i {
    font-size: 22px;
    color: #d64545;
    margin-bottom: 8px;
    display: block;
}

.comment-error-state p {
    font-size: 13px;
    color: var(--bs-body-color);
    margin: 0 0 14px;
}

.comment-retry-btn {
    background: var(--bs-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 24px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .15s ease;
}

.comment-retry-btn:hover {
    background: var(--bs-primary-btn-hover-bg);
}

.comment-threads-wrapper {
    position: relative;
    min-height: 80px;
}

#comment-list-container {
    scroll-margin-top: 100px;
}

.comment-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 24px;
    z-index: 5;
    border-radius: 12px;
}

.comment-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--bs-light);
    border-top-color: var(--bs-primary);
    border-radius: 50%;
    animation: comment-spin 0.8s linear infinite;
}

@keyframes comment-spin {
    to { transform: rotate(360deg); }
}

.comment-pagination-loading {
    opacity: .5;
    pointer-events: none;
}

.comment-login-prompt {
    background: var(--bs-light);
    border: 0.5px solid var(--bs-primary-border-subtle);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    margin-top: 24px;
}

.comment-login-prompt i {
    font-size: 22px;
    color: var(--bs-primary);
    margin-bottom: 8px;
    display: block;
}

.comment-login-prompt p {
    font-size: 13px;
    color: var(--bs-body-color);
    margin: 0 0 14px;
}

.comment-login-btn {
    display: inline-block;
    background: var(--bs-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color .15s ease;
}

.comment-login-btn:hover {
    background: var(--bs-primary-btn-hover-bg);
    color: #fff;
}

.comment-pagination-list,
.comment-pagination-mobile {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    margin-top: 20px;
    list-style: none;
    padding: 0;
}

.comment-pagination-list .page-link {
    border: 0.5px solid var(--bs-secondary-border-subtle);
    background: #fff;
    color: var(--bs-heading-color);
    border-radius: 6px;
    min-width: 32px;
    height: 32px;
    font-size: 13px;
    cursor: pointer;
}

.comment-pagination-list .page-item.active .page-link {
    background: var(--bs-primary);
    color: #fff;
    border-color: var(--bs-primary);
}

.comment-pagination-list .page-item.disabled .page-link {
    opacity: .4;
    cursor: default;
}

.comment-pagination-mobile {
    display: none;
}

@media (max-width: 576px) {
    .comment-pagination-desktop {
        display: none !important;
    }

    .comment-pagination-mobile {
        display: flex !important;
    }
}

.post-feedback {
    margin-block: 3rem;
    padding: 2rem 1.5rem;
    background: linear-gradient(180deg, var(--bs-light) 0%, #fff 65%);
    border: 1px solid var(--bs-light-border-subtle);
    border-radius: 1.25rem;
    box-shadow: 0 8px 24px -12px rgba(var(--bs-heading-color-rgb), 0.12);
}

.post-feedback__content {
    max-width: 28rem;
    margin-inline: auto;
    text-align: center;
}

.post-feedback__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.75rem;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    border-radius: 50%;
    font-size: 1.25rem;
}

.post-feedback__title {
    margin: 0;
    color: var(--bs-heading-color);
    font-size: 1.2rem;
    font-weight: 700;
}

.post-feedback__description {
    margin: 0.5rem 0 1.5rem;
    color: var(--bs-body-color);
    font-size: 0.95rem;
}

.post-feedback__actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.post-feedback__button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1.5px solid var(--bs-secondary-border-subtle);
    background: #fff;
    color: var(--bs-secondary);
    border-radius: 50rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease;
}

.post-feedback__button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--bs-light);
    font-size: 0.8rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.post-feedback__button:hover:not(:disabled) {
    border-color: var(--bs-primary);
    color: var(--bs-primary-text-emphasis);
    transform: translateY(-1px);
}

.post-feedback__button:hover:not(:disabled) .post-feedback__button-icon {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}

.post-feedback__button:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.post-feedback__button--yes[aria-pressed="true"] {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.post-feedback__button--yes[aria-pressed="true"] .post-feedback__button-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.post-feedback__button--no[aria-pressed="true"] {
    background: var(--bs-secondary);
    border-color: var(--bs-secondary);
    color: #fff;
}

.post-feedback__button--no[aria-pressed="true"] .post-feedback__button-icon {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.post-feedback__button:disabled {
    cursor: wait;
    opacity: 0.6;
    transform: none;
}

.post-feedback__message {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.25rem 0 0;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.post-feedback__message[data-type="success"] {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis);
}

.post-feedback__message[data-type="error"] {
    background: #fdecea;
    color: #b91c1c;
}