/* ============================================================
   هوشکو تالار گفتمان — استایل کامل
   ============================================================ */

#hk-forum {
    max-width: 1200px;
    margin: 30px auto;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    direction: rtl;
    color: #1e293b;
    padding: 0 10px;
    box-sizing: border-box;
}

#hk-forum * {
    box-sizing: border-box;
}

/* ============ هدر ============ */
.hkf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #67e8f9, #22d3ee);
    padding: 22px 28px;
    border-radius: 24px 24px 12px 12px;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(34, 211, 238, 0.25);
}

.hkf-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #0f172a;
    font-weight: 900;
}

.hkf-btn-new {
    background: #fff;
    color: #0891b2;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-family: inherit;
    box-shadow: 0 4px 0 #0e7490;
}

.hkf-btn-new:hover {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #0e7490;
}

/* ============ نوار جستجو ============ */
.hkf-searchbar {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    background: #f0fdfa;
    border: 3px solid #ccfbf1;
    border-radius: 50px;
    padding: 8px 8px 8px 20px;
    align-items: center;
}

.hkf-searchbar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 8px;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    direction: rtl;
    min-width: 0;
}

.hkf-searchbar button {
    padding: 12px 28px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, #22d3ee, #06b6d4);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    box-shadow: 0 4px 0 #0e7490;
    transition: all 0.15s;
    flex-shrink: 0;
}

.hkf-searchbar button:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #0e7490;
}

#hkfSearchClear {
    background: #f1f5f9 !important;
    color: #64748b !important;
    box-shadow: none !important;
    padding: 10px 18px !important;
    border-radius: 50% !important;
}

/* ============ لیست اصلی ============ */
#hkfListView {
    display: block !important;
    margin-top: 20px;
    width: 100% !important;
}

/* ============ گرید ۴ ستونه ============ */
.hkf-grid-4 {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
}

@media (max-width: 1100px) {
    .hkf-grid-4 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 820px) {
    .hkf-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }
}

@media (max-width: 520px) {
    .hkf-grid-4 {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
}

/* ============ کارت تاپیک ============ */
.hkf-topic {
    border-radius: 24px;
    padding: 22px 22px 20px;
    cursor: pointer;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between;
    gap: 14px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-width: 3px;
    border-style: solid;
    position: relative;
    overflow: hidden;
    min-height: 170px;
    background: #ffffff;
    border-color: #cffafe;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
}

.hkf-topic::before {
    content: "";
    position: absolute;
    top: -25px;
    right: -25px;
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, .55);
    border-radius: 50%;
    pointer-events: none;
}

.hkf-topic:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 14px 36px rgba(0, 0, 0, .12);
}

.hkf-topic-title {
    font-weight: 900;
    color: #0f172a;
    font-size: 1.02rem;
    line-height: 1.55;
    position: relative;
    z-index: 1;
    padding-left: 30px;
    padding-right: 0;
}

.hkf-topic-meta {
    font-size: 0.78rem;
    color: #475569;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.hkf-topic-stats {
    display: flex;
    gap: 16px;
    font-weight: 800;
    font-size: 0.86rem;
    position: relative;
    z-index: 1;
    margin-top: 8px;
}

/* ============ تاپیک مادر (طلایی) ============ */
.hkf-topic-parent {
    background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
    border-color: #f59e0b !important;
    box-shadow: 0 6px 0 #fbbf24, 0 10px 24px rgba(245, 158, 11, .25) !important;
}

.hkf-topic-parent:hover {
    box-shadow: 0 12px 0 #f59e0b, 0 20px 40px rgba(245, 158, 11, .35) !important;
}

/* ============ آیکون پین — بدون دایره ============ */
.hkf-pin-icon {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 22px;
    line-height: 1;
    z-index: 3;
    transform: rotate(-20deg);
    animation: hkfPinFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    pointer-events: none;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
}

@keyframes hkfPinFloat {

    0%,
    100% {
        transform: rotate(-20deg) translateY(0);
    }

    50% {
        transform: rotate(-15deg) translateY(-3px);
    }
}

/* ============ Loading / Empty ============ */
.hkf-loading {
    text-align: center;
    padding: 50px;
    color: #64748b;
    font-weight: 700;
    grid-column: 1 / -1;
}

.hkf-empty {
    text-align: center;
    padding: 50px 20px;
    color: #64748b;
    font-weight: 700;
    background: #f8fafc;
    border-radius: 20px;
    border: 2px dashed #cbd5e1;
}

/* ============ صفحه تاپیک ============ */
.hkf-back-btn {
    background: #ecfeff;
    border: 2px solid #a5f3fc;
    color: #0891b2;
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 800;
    font-family: inherit;
    margin-bottom: 20px;
    font-size: 14px;
    transition: all 0.2s;
}

.hkf-back-btn:hover {
    background: #22d3ee;
    color: #fff;
    border-color: #22d3ee;
}

.hkf-question {
    background: linear-gradient(135deg, #ecfeff, #f0fdfa);
    border: 3px solid #22d3ee;
    border-radius: 24px;
    padding: 26px 30px;
    margin-bottom: 22px;
    box-shadow: 0 8px 0 #a5f3fc, 0 12px 28px rgba(34, 211, 238, .15);
    position: relative;
}

.hkf-question::before {
    content: "❓ سوال";
    position: absolute;
    top: -14px;
    right: 24px;
    background: #22d3ee;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 900;
    padding: 5px 16px;
    border-radius: 20px;
}

.hkf-question .hkf-post-author {
    color: #0891b2;
    font-weight: 900;
    margin-bottom: 14px;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 6px;
}

.hkf-question .hkf-post-body {
    color: #0f172a;
    line-height: 2;
    font-size: 1.02rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 16px;
}

.hkf-parent-question {
    background: linear-gradient(135deg, #fef3c7, #fffbeb) !important;
    border-color: #f59e0b !important;
    box-shadow: 0 8px 0 #fbbf24, 0 12px 28px rgba(245, 158, 11, .2) !important;
}

.hkf-parent-question::before {
    content: "⭐ تاپیک اصلی" !important;
    background: #f59e0b !important;
}

.hkf-sub-question {
    background: linear-gradient(135deg, #ecfeff, #f0fdfa) !important;
    border-color: #22d3ee !important;
}

.hkf-sub-question::before {
    content: "📄 زیرمجموعه" !important;
    background: #0891b2 !important;
}

/* ============ دکمه‌های زیرمجموعه ============ */
.hkf-subtopics-wrap {
    margin: 22px 0;
    padding: 22px;
    background: #ffffff;
    border-radius: 24px;
    border: 3px solid #fde68a;
    box-shadow: 0 6px 0 #fef3c7;
}

.hkf-subtopics-title {
    font-weight: 900;
    color: #7c2d12;
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.hkf-subtopics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hkf-subtopic-btn {
    background: linear-gradient(135deg, #ecfeff, #cffafe);
    border: 2.5px solid #22d3ee;
    color: #0891b2;
    padding: 11px 22px;
    border-radius: 50px;
    font-weight: 800;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 0 #a5f3fc;
}

.hkf-subtopic-btn:hover {
    background: linear-gradient(135deg, #22d3ee, #06b6d4);
    color: #fff;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 0 #0e7490;
}

.hkf-subtopic-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #0e7490;
}

.hkf-empty-sub {
    text-align: center;
    padding: 30px;
    color: #94a3b8;
    font-weight: 700;
    background: #f8fafc;
    border-radius: 20px;
    border: 2px dashed #cbd5e1;
    margin: 22px 0;
}

/* ============ نظرات ============ */
.hkf-answer {
    background: linear-gradient(135deg, #f5f3ff, #fdf4ff);
    border: 3px solid #c4b5fd;
    border-radius: 20px;
    padding: 20px 24px;
    margin-bottom: 14px;
    margin-right: 30px;
    box-shadow: 0 5px 0 #ddd6fe, 0 8px 20px rgba(139, 92, 246, .1);
    position: relative;
}

.hkf-answer::before {
    content: "💬 پاسخ";
    position: absolute;
    top: -12px;
    right: 20px;
    background: #a78bfa;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 4px 14px;
    border-radius: 20px;
}

.hkf-answer .hkf-post-author {
    color: #7c3aed;
    font-weight: 900;
    margin-bottom: 10px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 6px;
}

.hkf-answer .hkf-post-body {
    color: #312e81;
    line-height: 1.95;
    font-size: 0.98rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 12px;
}

.hkf-post-time {
    font-weight: 600;
    color: #94a3b8;
    font-size: 0.78rem;
}

.hkf-edited {
    color: #f59e0b;
    font-weight: 700;
    font-size: 0.75rem;
    margin-right: 6px;
}

.hkf-post-footer {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.hkf-like-btn {
    background: #fff;
    border: 2px solid #a5f3fc;
    color: #0891b2;
    cursor: pointer;
    font-weight: 800;
    font-family: inherit;
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 0.83rem;
    transition: all 0.2s;
}

.hkf-like-btn:hover:not(:disabled) {
    background: #22d3ee;
    color: #fff;
    border-color: #22d3ee;
    transform: scale(1.05);
}

.hkf-like-btn.hkf-liked {
    background: #22d3ee;
    color: #fff;
    border-color: #0891b2;
}

.hkf-like-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hkf-answer .hkf-like-btn {
    border-color: #c4b5fd;
    color: #7c3aed;
}

.hkf-answer .hkf-like-btn:hover:not(:disabled) {
    background: #a78bfa;
    color: #fff;
    border-color: #a78bfa;
}

.hkf-action-btn {
    background: #fff;
    border: 2px solid #e2e8f0;
    color: #64748b;
    cursor: pointer;
    font-weight: 700;
    font-family: inherit;
    padding: 7px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.hkf-action-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.hkf-action-btn.hkf-danger:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

/* ============ دکمه‌های ادمین ============ */
.hkf-admin-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 2px dashed #fde68a;
}

.hkf-parent-question .hkf-admin-actions {
    border-top-color: #fcd34d;
}

.hkf-sub-question .hkf-admin-actions {
    border-top-color: #a5f3fc;
}

.hkf-admin-btn {
    background: #ffffff !important;
    border: 2px solid #f59e0b !important;
    color: #b45309 !important;
    padding: 8px 18px !important;
    border-radius: 50px !important;
    font-weight: 800 !important;
    font-size: 0.85rem !important;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    box-shadow: 0 3px 0 #fde68a;
}

.hkf-admin-btn:hover {
    background: #f59e0b !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #b45309;
}

.hkf-admin-btn.hkf-danger {
    border-color: #dc2626 !important;
    color: #dc2626 !important;
    box-shadow: 0 3px 0 #fecaca;
}

.hkf-admin-btn.hkf-danger:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    box-shadow: 0 5px 0 #991b1b;
}

/* ============ فرم پاسخ ============ */
.hkf-reply-box {
    margin-top: 26px;
    padding: 26px;
    background: #f0fdfa;
    border-radius: 24px;
    border: 3px dashed #99f6e4;
}

.hkf-reply-box textarea {
    width: 100%;
    padding: 16px 20px;
    border: 3px solid #ccfbf1;
    border-radius: 18px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 14px;
    outline: none;
    min-height: 110px;
    resize: vertical;
    box-sizing: border-box;
    background: #fff;
    transition: border-color 0.2s;
}

.hkf-reply-box textarea:focus {
    border-color: #22d3ee;
    box-shadow: 0 0 0 4px rgba(34, 211, 238, .12);
}

.hkf-reply-note {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 14px;
    padding: 10px 16px;
    background: #fef3c7;
    border-radius: 12px;
    border-right: 4px solid #f59e0b;
    font-weight: 600;
    line-height: 1.7;
}

.hkf-reply-submit {
    background: linear-gradient(135deg, #22d3ee, #06b6d4);
    color: #fff;
    border: none;
    padding: 14px 38px;
    border-radius: 50px;
    font-weight: 900;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: 0 6px 0 #0e7490;
}

.hkf-reply-submit:hover:not(:disabled) {
    transform: translateY(3px);
    box-shadow: 0 3px 0 #0e7490;
}

.hkf-reply-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hkf-login-note {
    text-align: center;
    padding: 28px;
    background: #f0fdfa;
    border-radius: 24px;
    border: 3px dashed #99f6e4;
    color: #0f172a;
    font-weight: 700;
    font-size: 1rem;
}

.hkf-login-note a {
    color: #0891b2;
    font-weight: 900;
    text-decoration: underline;
}

/* ============ Modal ============ */
.hkf-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(6px);
}

.hkf-modal.hkf-show {
    display: flex;
}

.hkf-modal-box {
    background: #fff;
    padding: 32px;
    border-radius: 28px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    animation: hkfSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

@keyframes hkfSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hkf-modal-box h3 {
    margin: 0 0 24px;
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 900;
}

.hkf-modal-box label {
    display: block;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    font-size: 0.88rem;
}

.hkf-modal-box input:not([type="file"]),
.hkf-modal-box textarea {
    width: 100%;
    padding: 14px 18px;
    border: 3px solid #ccfbf1;
    border-radius: 16px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 18px;
    outline: none;
    box-sizing: border-box;
    background: #f8fafc;
    transition: all 0.2s;
}

.hkf-modal-box input:focus,
.hkf-modal-box textarea:focus {
    border-color: #22d3ee;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(34, 211, 238, .12);
}

.hkf-modal-box textarea {
    min-height: 140px;
    resize: vertical;
}

.hkf-note {
    font-size: 0.8rem;
    color: #92400e;
    background: #fffbeb;
    border: 2px solid #fde68a;
    border-right: 5px solid #f59e0b;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    line-height: 1.8;
    font-weight: 600;
}

.hkf-note-sub {
    color: #b45309;
    font-weight: 700;
    font-size: 0.78rem;
}

.hkf-modal-actions {
    display: flex;
    gap: 12px;
}

.hkf-btn-cancel {
    padding: 14px 30px;
    background: #f1f5f9;
    border: none;
    border-radius: 50px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    color: #64748b;
}

.hkf-btn-cancel:hover {
    background: #e2e8f0;
}

.hkf-btn-submit {
    padding: 14px 38px;
    background: linear-gradient(135deg, #22d3ee, #06b6d4);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 900;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: 0 6px 0 #0e7490;
}

.hkf-btn-submit:hover:not(:disabled) {
    transform: translateY(3px);
    box-shadow: 0 3px 0 #0e7490;
}

.hkf-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hkf-btn-submit.hkf-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 6px 0 #991b1b;
}

/* ============ Modal محدودیت ============ */
.hkf-limit-box {
    text-align: center;
    max-width: 480px !important;
    padding: 40px 34px !important;
}

.hkf-limit-icon {
    font-size: 68px;
    margin-bottom: 12px;
    animation: hkfSpinSlow 3s ease-in-out infinite;
}

@keyframes hkfSpinSlow {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(15deg);
    }
}

.hkf-limit-box h3 {
    color: #0f172a !important;
    font-size: 1.3rem !important;
    margin-bottom: 16px !important;
    line-height: 1.5;
}

.hkf-limit-text {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.9;
    margin-bottom: 22px;
    font-weight: 600;
}

.hkf-limit-countdown {
    background: linear-gradient(135deg, #ecfeff, #f0fdfa);
    border: 3px solid #22d3ee;
    border-radius: 20px;
    padding: 20px 24px;
    margin-bottom: 22px;
    box-shadow: 0 6px 0 #a5f3fc;
}

.hkf-cd-label {
    display: block;
    color: #0891b2;
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.hkf-cd-time {
    display: block;
    color: #0f172a;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.hkf-limit-note {
    color: #7c3aed;
    background: #f5f3ff;
    border: 2px dashed #ddd6fe;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 22px;
}

.hkf-limit-ok {
    background: linear-gradient(135deg, #22d3ee, #06b6d4) !important;
    box-shadow: 0 6px 0 #0e7490 !important;
    min-width: 180px;
}

/* ============ Toast ============ */
.hkf-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #0f172a;
    color: #fff;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 800;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
    z-index: 100000;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: inherit;
    max-width: 90vw;
    text-align: center;
}

.hkf-toast.hkf-show {
    transform: translateX(-50%) translateY(0);
}

.hkf-toast.hkf-error {
    background: #dc2626;
}

.hkf-toast.hkf-success {
    background: #10b981;
}

/* ============ بنر نظرات جدید ============ */
.hkf-new-replies-banner {
    position: sticky;
    top: 15px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #22d3ee, #0891b2);
    color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    margin: 0 auto 16px;
    max-width: fit-content;
    box-shadow: 0 8px 24px rgba(34, 211, 238, .45);
    font-weight: 800;
    font-size: 0.95rem;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
}

.hkf-new-replies-banner.hkf-show {
    opacity: 1;
    transform: translateY(0);
}

.hkf-nr-icon {
    font-size: 20px;
    animation: hkfNrbounce 1s ease-in-out infinite;
}

@keyframes hkfNrbounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.hkf-nr-btn {
    background: #fff;
    color: #0891b2;
    border: none;
    padding: 6px 18px;
    border-radius: 50px;
    font-weight: 900;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.hkf-nr-btn:hover {
    background: #0e7490;
    color: #fff;
    transform: scale(1.05);
}

/* ============ لینک خودکار ============ */
.hkf-auto-link {
    color: #0891b2;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    word-break: break-all;
    transition: color 0.2s;
}

.hkf-auto-link:hover {
    color: #0e7490;
    text-decoration-thickness: 2px;
}

.hkf-auto-link::after {
    content: " ↗";
    font-size: 0.85em;
    opacity: 0.7;
}

/* ============ LTR ============ */
#hk-forum[dir="ltr"] .hkf-topic-title {
    padding-left: 0;
    padding-right: 30px;
}

#hk-forum[dir="ltr"] .hkf-topic::before {
    right: auto;
    left: -25px;
}

#hk-forum[dir="ltr"] .hkf-pin-icon {
    left: auto;
    right: 10px;
    transform: rotate(20deg);
}

#hk-forum[dir="ltr"] .hkf-searchbar {
    padding: 8px 20px 8px 8px;
}

#hk-forum[dir="ltr"] .hkf-reply-note {
    border-right: none;
    border-left: 4px solid #f59e0b;
}

#hk-forum[dir="ltr"] .hkf-note {
    border-right: 2px solid #fde68a;
    border-left: 5px solid #f59e0b;
}

#hk-forum[dir="ltr"] .hkf-answer {
    margin-right: 0;
    margin-left: 30px;
}

/* ============ موبایل ============ */
@media (max-width: 640px) {
    .hkf-header {
        padding: 16px 20px;
    }

    .hkf-header h2 {
        font-size: 1.15rem;
    }

    .hkf-topic {
        min-height: 140px;
        padding: 18px 18px 16px;
        border-radius: 18px;
    }

    .hkf-topic-title {
        font-size: 0.95rem;
    }

    .hkf-topic-meta {
        font-size: 0.75rem;
    }

    .hkf-topic-stats {
        font-size: 0.82rem;
        gap: 12px;
    }

    .hkf-pin-icon {
        font-size: 18px;
        top: 8px;
        left: 8px;
    }

    .hkf-answer {
        margin-right: 12px;
        padding: 16px 18px;
    }

    .hkf-question {
        padding: 22px 22px;
    }

    .hkf-modal-box {
        padding: 24px 20px;
    }

    .hkf-searchbar {
        padding: 6px 6px 6px 14px;
    }

    .hkf-searchbar button {
        padding: 10px 18px;
        font-size: 13px;
    }

    .hkf-subtopics-wrap {
        padding: 16px;
    }

    .hkf-subtopic-btn {
        padding: 9px 16px;
        font-size: 13px;
    }
}