/* ============================================================
   DMHouse — Single Post  (RTL)
   ============================================================ */
.dm-single-post { direction: rtl; background: #f7f8fa; min-height: 80vh; }
.dm-sp-post-wrap { max-width: 1450px; margin: 0 auto; padding: 0 24px 60px; }

/* ════ Layout: sidebar (right) + main (left) ════ */
.dm-sp-post-layout {
    display: flex;
    gap: 28px;
    direction: rtl;
    align-items: flex-start;
    padding-top: 16px;
}

/* ── Sidebar ── */
.dm-sp-post-sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    /*position: sticky;*/
    /*top: 88px;*/
}
.dm-sb-box {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    border: 1px solid #f0f0f0;
}
.dm-sb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}
.dm-sb-header h3 { font-size: 14px; font-weight: 800; color: #222; margin: 0; }
.dm-sb-header a  { font-size: 12px; color: var(--dm-primary,#ff6600); text-decoration: none; font-weight: 600; }

/* Popular list */
.dm-sb-pop-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.dm-sb-pop-item { display: flex; align-items: flex-start; gap: 10px; }
.dm-sb-pop-num {
    width: 22px; height: 22px; flex-shrink: 0;
    background: var(--dm-primary,#ff6600);
    color: #fff; font-size: 11px; font-weight: 800;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    margin-top: 2px;
}
.dm-sb-pop-body { flex: 1; min-width: 0; }
.dm-sb-pop-title {
    display: block; font-size: 12.5px; font-weight: 600; color: #333; line-height: 1.6;
    text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 4px;
}
.dm-sb-pop-title:hover { color: var(--dm-primary,#ff6600); }
.dm-sb-pop-meta { display: flex; align-items: center; gap: 6px; }
.dm-sb-pop-cat {
    display: inline-block;
    font-size: 10px; font-weight: 700; color: #fff;
    padding: 2px 7px; border-radius: 4px;
    white-space: nowrap;
}
.dm-sb-pop-date { font-size: 11px; color: #aaa; }

/* Recent list */
.dm-sb-recent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.dm-sb-recent-item { display: flex; gap: 10px; align-items: flex-start; }
.dm-sb-recent-img { flex-shrink: 0; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; display: block; }
.dm-sb-recent-img img { width: 100%; height: 100%; object-fit: cover; }
.dm-sb-recent-info { flex: 1; min-width: 0; }
.dm-sb-recent-cat { font-size: 11px; font-weight: 700; display: block; margin-bottom: 4px; }
.dm-sb-recent-title {
    display: block; font-size: 12.5px; font-weight: 700; color: #222; line-height: 1.5;
    text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 4px;
}
.dm-sb-recent-title:hover { color: var(--dm-primary,#ff6600); }
.dm-sb-recent-meta { font-size: 11px; color: #aaa; display: flex; gap: 4px; }


/* ── Main content ── */
.dm-sp-post-main { flex: 1; min-width: 0; }

/* Breadcrumb */
.dm-post-breadcrumb {
    font-size: 12px; color: #aaa;
    display: flex; align-items: center; gap: 6px;
    flex-wrap: wrap;
    padding: 0 0 16px;
}
.dm-post-breadcrumb a { color: #aaa; text-decoration: none; }
.dm-post-breadcrumb a:hover { color: var(--dm-primary,#ff6600); }
.dm-bc-sep { color: #ddd; }
.dm-bc-current { color: #555; font-weight: 600; }

/* Post Header */
.dm-post-header { background: #fff; border-radius: 16px; padding: 24px; margin-bottom: 20px; border: 1px solid #f0f0f0; }

.dm-post-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.dm-post-cat-pill {
    display: inline-flex; align-items: center;
    font-size: 12px; font-weight: 700;
    padding: 4px 12px; border-radius: 20px;
    border: 1px solid;
    text-decoration: none;
    transition: opacity 0.2s;
}
.dm-post-cat-pill:hover { opacity: 0.8; }

.dm-post-h1 { font-size: 22px; font-weight: 900; color: #111; line-height: 1.7; margin: 0 0 16px; }

/* Meta bar */
.dm-post-meta-bar {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding-top: 14px; border-top: 1px solid #f5f5f5;
}
.dm-pm-item {
    display: flex; align-items: center; gap: 5px;
    font-size: 12.5px; color: #888;
}
.dm-pm-item svg { color: #bbb; flex-shrink: 0; }
.dm-pm-item a { color: #888; text-decoration: none; }
.dm-pm-item a:hover { color: var(--dm-primary,#ff6600); }
.dm-pm-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.dm-pm-link { text-decoration: none; }
.dm-pm-link:hover { color: var(--dm-primary,#ff6600); }
.dm-pm-like { background: transparent; border: none; cursor: pointer; font-family: inherit; gap: 5px; transition: color 0.2s; }
.dm-pm-like:hover,
.dm-pm-like.is-liked { color: #ef4444 !important; }
.dm-pm-like.is-liked svg { fill: #ef4444; stroke: #ef4444; }

/* Featured image */
.dm-post-feat-img { border-radius: 14px; overflow: hidden; margin-bottom: 20px; }
.dm-post-feat-img img { width: 100%; height: auto; display: block; }

/* Post content */
.dm-post-content-body {
    background: #fff; border-radius: 16px; padding: 28px 32px;
    margin-bottom: 20px; border: 1px solid #f0f0f0;
    font-size: 15px; color: #333; line-height: 2; direction: rtl;
}
.dm-post-content-body h2 { font-size: 19px; font-weight: 800; color: #111; margin: 24px 0 14px; }
.dm-post-content-body h3 { font-size: 17px; font-weight: 800; color: #222; margin: 20px 0 12px; }
.dm-post-content-body p  { margin: 0 0 16px; }
.dm-post-content-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 16px auto; display: block; }
.dm-post-content-body a { color: var(--dm-primary,#ff6600); text-decoration: underline; }
.dm-post-content-body blockquote {
    border-right: 4px solid var(--dm-primary,#ff6600);
    padding: 12px 16px; margin: 20px 0;
    background: #fff9f5; border-radius: 0 10px 10px 0;
    font-style: normal; color: #555;
}
.dm-post-content-body ul,
.dm-post-content-body ol { padding-right: 24px; margin: 0 0 16px; }
.dm-post-content-body li { margin-bottom: 8px; }
.dm-post-content-body table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.dm-post-content-body th,
.dm-post-content-body td { border: 1px solid #eee; padding: 10px 14px; text-align: right; }
.dm-post-content-body th { background: #f8f9fb; font-weight: 700; }

/* Tags */
.dm-post-tags-row {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    background: #fff; border-radius: 12px; padding: 14px 20px;
    margin-bottom: 16px; border: 1px solid #f0f0f0;
    font-size: 13px; color: #888;
}
.dm-post-tags-row svg { color: var(--dm-primary,#ff6600); }
.dm-tag-pill {
    display: inline-flex; align-items: center;
    font-size: 12px; color: #666; font-weight: 600;
    padding: 4px 12px; border-radius: 20px;
    background: #f5f5f5; text-decoration: none;
    transition: all 0.2s;
}
.dm-tag-pill:hover { background: var(--dm-primary,#ff6600); color: #fff; }

/* Action bar */
.dm-post-action-bar {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border-radius: 12px; padding: 14px 20px;
    margin-bottom: 20px; border: 1px solid #f0f0f0;
}
.dm-act-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 10px;
    font-size: 13px; font-weight: 600; color: #555;
    background: #f5f5f5; border: none; cursor: pointer; transition: all 0.2s;
    text-decoration: none; font-family: inherit;
}
.dm-act-btn:hover { background: var(--dm-primary,#ff6600); color: #fff; }
.dm-act-btn:hover svg { color: #fff; }
.dm-act-btn.is-liked { background: #fef2f2; color: #ef4444; }
.dm-act-btn.is-liked svg { fill: #ef4444; stroke: #ef4444; }

/* Share popup */
.dm-act-share-wrap { position: relative; margin-right: auto; }
.dm-share-popup {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 10px;
    display: flex; flex-direction: column; gap: 6px;
    min-width: 140px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    z-index: 100;
    opacity: 0; pointer-events: none; transform: translateY(4px);
    transition: all 0.2s;
}
.dm-share-popup.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.dm-share-pill {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-radius: 8px;
    font-size: 12.5px; font-weight: 700;
    text-decoration: none; border: none; cursor: pointer; font-family: inherit;
    transition: opacity 0.2s;
}
.dm-share-pill:hover { opacity: 0.85; }
.dm-share-tg { background: #2AABEE; color: #fff; }
.dm-share-tw { background: #1DA1F2; color: #fff; }
.dm-share-copy { background: #f3f4f6; color: #333; }

/* Author box */
.dm-post-author-box {
    display: flex; align-items: flex-start; gap: 16px;
    background: #fff; border-radius: 14px; padding: 20px;
    margin-bottom: 20px; border: 1px solid #f0f0f0;
}
.dm-author-box-av { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.dm-author-box-name { font-size: 14px; font-weight: 800; color: #222; text-decoration: none; display: block; margin-bottom: 6px; }
.dm-author-box-bio { font-size: 13px; color: #777; line-height: 1.7; margin: 0; }

/* Comments section */
.dm-post-comments-section {
    background: #fff; border-radius: 16px; padding: 24px;
    border: 1px solid #f0f0f0;
}
.dm-comments-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
    padding-bottom: 16px; border-bottom: 2px solid #f0f0f0;
}
.dm-comments-header h3 { font-size: 16px; font-weight: 800; color: #222; margin: 0; }
.dm-comments-header svg { color: var(--dm-primary,#ff6600); }
.dm-comments-count {
    background: var(--dm-primary,#ff6600); color: #fff;
    font-size: 11px; font-weight: 800;
    padding: 1px 8px; border-radius: 10px;
}
.dm-comments-empty { text-align: center; padding: 40px 20px; }
.dm-comments-empty p { color: #aaa; font-size: 14px; margin: 10px 0 0; }
.dm-comments-hint { font-size: 12px !important; }

/* WP Comments styling */
.dm-post-comments-section .comment-list { list-style: none; padding: 0; margin: 0 0 24px; }
.dm-post-comments-section .comment-body { background: #f8f9fb; border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.dm-post-comments-section .fn { font-weight: 700; font-size: 13px; color: #222; }
.dm-post-comments-section .comment-metadata { font-size: 11px; color: #aaa; }
.dm-post-comments-section .comment-content p { font-size: 14px; color: #444; margin: 8px 0 0; line-height: 1.7; }
.dm-post-comments-section .comment-form { display: flex; flex-direction: column; gap: 12px; }
.dm-post-comments-section .comment-form label { font-size: 13px; font-weight: 700; color: #444; display: block; margin-bottom: 4px; }
.dm-post-comments-section .comment-form input[type="text"],
.dm-post-comments-section .comment-form input[type="email"],
.dm-post-comments-section .comment-form textarea {
    width: 100%; padding: 10px 14px;
    border: 1.5px solid #eee; border-radius: 10px;
    font-size: 14px; font-family: inherit; direction: rtl;
    transition: border-color 0.2s; box-sizing: border-box;
}
.dm-post-comments-section .comment-form input:focus,
.dm-post-comments-section .comment-form textarea:focus { border-color: var(--dm-primary,#ff6600); outline: none; }
.dm-post-comments-section .form-submit input[type="submit"] {
    background: var(--dm-primary,#ff6600); color: #fff;
    border: none; border-radius: 10px;
    padding: 11px 28px; font-size: 14px; font-weight: 800; font-family: inherit;
    cursor: pointer; transition: opacity 0.2s;
}
.dm-post-comments-section .form-submit input[type="submit"]:hover { opacity: 0.88; }


/* ── Related posts (full width) ── */
.dm-post-related-section { margin-top: 40px; }
.dm-related-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.dm-related-header h3 { font-size: 18px; font-weight: 900; color: #222; margin: 0; }
.dm-related-header a { font-size: 13px; color: var(--dm-primary,#ff6600); text-decoration: none; font-weight: 700; }
.dm-posts-related-slider { overflow: hidden; padding: 8px 0; }
.dm-posts-related-slider .swiper-button-next,
.dm-posts-related-slider .swiper-button-prev { color: var(--dm-primary,#ff6600); }


/* Responsive */
@media (max-width: 1024px) { .dm-sp-post-sidebar { width: 240px; } }
@media (max-width: 900px) {
    .dm-sp-post-layout { flex-direction: column; }
    .dm-sp-post-sidebar { width: 100%; position: static; }
    .dm-sb-box:first-child { display: none; } /* Hide popular on mobile */
}
@media (max-width: 640px) {
    .dm-sp-post-wrap { padding: 0 16px 40px; }
    .dm-post-h1 { font-size: 18px; }
    .dm-post-content-body { padding: 20px 16px; }
}