.page-wrapper { overflow: clip !important; }
.rtl { text-align: right; }
.rfs-page-content { direction: rtl; text-align: right; }
.rfs-detail-back { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--main-color); text-decoration: none; margin-bottom: 28px; border: 2px solid var(--main-color); padding: 8px 16px; border-radius: 4px; background: #fff; box-shadow: 3px 3px 0 rgba(0,0,0,0.08); transition: transform 0.2s ease, background 0.2s ease; }
.rfs-detail-back:hover { color: #fff; background: var(--main-color); transform: translate(-2px, -2px); }
.rfs-detail-hero { padding: 108px 0 32px; background: linear-gradient(135deg, #f4f0e9 0%, #efe9d7 100%); border-bottom: 2px solid #222; direction: rtl; text-align: right; }
.rfs-detail-id { display: block; font-size: clamp(28px, 4vw, 40px); font-weight: 800; color: var(--main-color); margin-bottom: 12px; direction: ltr; text-align: left; letter-spacing: 0.06em; }
.rfs-detail-title { font-size: clamp(26px, 3.5vw, 38px); font-weight: 800; color: #222; line-height: 1.45; margin-bottom: 10px; }
.rfs-detail-subtitle { font-size: 17px; color: #666; font-weight: 600; margin-bottom: 18px; direction: ltr; text-align: right; }
a.rfs-detail-category { display: inline-block; background: var(--main-color); color: #fff; border: 2px solid #000; padding: 6px 14px; border-radius: 3px; font-size: 14px; font-weight: 700; text-decoration: none; }
a.rfs-detail-category:hover { background: #b6402b; color: #fff; transform: translate(-2px, -2px); box-shadow: 4px 4px 0 rgba(0,0,0,0.15); }
.rfs-detail-categories-box {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 12px;
    padding: 16px 18px;
    background: #f4f0e9;
    border: 2px solid #222;
    border-radius: 5px;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.08);
    direction: rtl;
    text-align: right;
    max-width: 100%;
}

.rfs-detail-category-label {
    font-size: 14px;
    font-weight: 800;
    color: #444;
    flex-shrink: 0;
    order: -1;
}

.rfs-detail-categories-items {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

a.rfs-detail-subcategory {
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    background: #fff;
    border: 2px solid #222;
    border-radius: 20px;
    color: #333;
    text-decoration: none;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.06);
}

a.rfs-detail-subcategory:hover {
    border-color: var(--main-color);
    color: var(--main-color);
    background: #fff;
}
.rfs-detail-main { padding: 56px 0 80px; background: #fff; }
.rfs-detail-layout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.rfs-detail-video { aspect-ratio: 16/9; background: #efe9d7; border: 2px dashed #999; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #666; font-weight: 700; font-size: 15px; margin-bottom: 36px; }
.rfs-detail-video.has-media { border-style: solid; border-color: #222; padding: 0; overflow: hidden; }
.rfs-detail-video img, .rfs-detail-video > iframe { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; }
.rfs-detail-video--aparat { aspect-ratio: auto; display: block; background: #000; }
.rfs-detail-video--aparat .h_iframe-aparat_embed_frame { position: relative; }
.rfs-detail-video--aparat .h_iframe-aparat_embed_frame iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.rfs-detail-body p { font-size: 17px; line-height: 2.05; color: #444; margin-bottom: 22px; }
.rfs-detail-body ul, .rfs-detail-body ol { margin: 0 0 22px; padding-right: 24px; color: #444; line-height: 2; }
.rfs-detail-body li { margin-bottom: 8px; }
.rfs-detail-body h2, .rfs-detail-body h3 { font-size: 22px; font-weight: 800; color: #222; margin: 28px 0 14px; }
.rfs-detail-body a { color: var(--main-color); text-decoration: underline; }
.rfs-detail-callout { background: #f4f0e9; border: 2px solid #222; border-right: 6px solid var(--main-color); padding: 24px 28px; margin: 32px 0; border-radius: 4px; box-shadow: 6px 6px 0 rgba(0,0,0,0.06); }
.rfs-detail-callout-label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; font-weight: 800; color: var(--main-color); margin-bottom: 10px; }
.rfs-detail-callout-id { display: inline-block; direction: ltr; unicode-bidi: isolate; font-size: 12px; font-weight: 800; color: #222; background: #f4f0e9; border: 2px solid #222; padding: 2px 10px; border-radius: 3px; box-shadow: 3px 3px 0 rgba(0,0,0,0.08); }
.rfs-detail-callout p { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.9; color: #222; }
.rfs-detail-section-title { font-size: 24px; font-weight: 800; color: #222; margin: 40px 0 18px; padding-bottom: 10px; border-bottom: 2px solid #efe9d7; }
.rfs-detail-success { background: var(--main-color); color: #fff; border: 2px solid #000; padding: 26px 30px; border-radius: 5px; margin: 36px 0; box-shadow: 8px 8px 0 rgba(0,0,0,0.2); }
.rfs-detail-success p { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.95; color: #fff; }
.rfs-detail-sidebar { position: sticky; top: 120px; }
.rfs-detail-side-card { background: #f4f0e9; border: 2px solid #222; border-radius: 5px; padding: 24px; box-shadow: 8px 8px 0 rgba(0,0,0,0.08); }
.rfs-detail-side-card .theme-btn { width: 100%; direction: rtl; }
.rfs-detail-side-card .theme-btn .btn-wrap { float: none; display: inline-flex; width: 100%; justify-content: center; }
.rfs-detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
a.rfs-detail-tag { font-size: 12px; font-weight: 700; padding: 6px 12px; background: #fff; border: 2px solid #ddd; border-radius: 20px; color: #555; text-decoration: none; }
a.rfs-detail-tag:hover { border-color: var(--main-color); color: var(--main-color); background: #f4f0e9; }
.rfs-detail-not-found {
    padding: 108px 0 80px;
    text-align: right;
    direction: rtl;
}

.rfs-detail-not-found .rfs-detail-subtitle {
    direction: rtl;
    text-align: center;
    max-width: 640px;
    line-height: 1.9;
    margin: 0 auto 32px;
    unicode-bidi: plaintext;
}

.rfs-detail-not-found-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.rfs-detail-not-found-actions .theme-btn .btn-wrap {
    float: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 991px) { .rfs-detail-layout { grid-template-columns: 1fr; } .rfs-detail-sidebar { position: static; } }
