/* ─── Single Post – Tin tức BĐS ─────────────────────────────────────────────
   Loaded only on single post pages.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Container ───────────────────────────────────────────────────────────── */
.ns-wrap {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Breadcrumb bar ──────────────────────────────────────────────────────── */
.ns-breadcrumb-bar {
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
    padding: 12px 0;
}
.ns-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6B7280;
    flex-wrap: wrap;
}
.ns-breadcrumb a {
    color: #6B7280;
    text-decoration: none;
    transition: color .15s;
}
.ns-breadcrumb a:hover { color: var(--bds-primary, #312E8D); }
.ns-breadcrumb__sep { color: #D1D5DB; }
.ns-breadcrumb__current { color: var(--bds-primary, #312E8D); font-weight: 500; }

/* ── Page body ───────────────────────────────────────────────────────────── */
.ns-body { padding: 44px 0 60px; }

/* ── Layout: article + sidebar ───────────────────────────────────────────── */
.ns-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    align-items: start;
}

/* ══════════════════════════════════════════════════════
   ARTICLE
   ══════════════════════════════════════════════════════ */
.ns-article { min-width: 0; }

/* ─ Header ─ */
.ns-article__cat {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--bds-primary, #312E8D);
    background: var(--bds-primary-light, #EEF2FF);
    border-radius: 4px;
    padding: 4px 10px;
    text-decoration: none;
    margin-bottom: 14px;
    transition: background .15s, color .15s;
}
.ns-article__cat:hover { background: var(--bds-primary, #312E8D); color: #fff; }

.ns-article__title {
    font-size: 30px;
    font-weight: 800;
    color: #111827;
    line-height: 1.35;
    margin: 0 0 18px;
    letter-spacing: -.4px;
}

.ns-article__meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 28px;
}
.ns-article__date,
.ns-article__author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6B7280;
}
.ns-article__date svg,
.ns-article__author svg { color: #9CA3AF; }

/* ─ Featured image ─ */
.ns-article__thumb {
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 28px;
    aspect-ratio: 16 / 9;
    background: #F3F4F6;
}
.ns-article__thumb img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}

/* ─ Content typography ─ */
.ns-article__content {
    font-size: 16px;
    line-height: 1.8;
    color: #1F2937;
}
.ns-article__content p {
    margin: 0 0 20px;
}
.ns-article__content p:last-child { margin-bottom: 0; }

.ns-article__content h2 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 36px 0 14px;
    line-height: 1.35;
    padding-left: 14px;
    border-left: 4px solid var(--bds-primary, #312E8D);
}
.ns-article__content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 28px 0 12px;
    line-height: 1.4;
}
.ns-article__content h4 {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 22px 0 8px;
}

.ns-article__content ul,
.ns-article__content ol {
    padding-left: 22px;
    margin: 0 0 20px;
}
.ns-article__content li { margin-bottom: 6px; }

.ns-article__content a {
    color: var(--bds-primary, #312E8D);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ns-article__content a:hover { color: var(--bds-primary-dark, #231D7A); }

.ns-article__content blockquote {
    margin: 24px 0;
    padding: 16px 20px;
    border-left: 4px solid var(--bds-primary, #312E8D);
    background: #F0F1FF;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #374151;
}
.ns-article__content blockquote p:last-child { margin-bottom: 0; }

.ns-article__content img {
    border-radius: 10px;
    margin: 8px 0 20px;
    width: 100%;
    height: auto;
    display: block;
}

.ns-article__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}
.ns-article__content th,
.ns-article__content td {
    padding: 10px 14px;
    border: 1px solid #E5E7EB;
    text-align: left;
}
.ns-article__content th {
    background: #F9FAFB;
    font-weight: 600;
    color: #374151;
}
.ns-article__content tr:nth-child(even) td { background: #FAFAFA; }

/* ─ Share section ─ */
.ns-share {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 22px 0;
    border-top: 1px solid #E5E7EB;
    margin-top: 32px;
}
.ns-share__label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    flex-shrink: 0;
}
.ns-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #F3F4F6;
    border: none;
    cursor: pointer;
    color: #374151;
    text-decoration: none;
    transition: background .15s, color .15s, transform .15s;
    flex-shrink: 0;
}
.ns-share__btn:hover { transform: translateY(-2px); }
.ns-share__btn--fb:hover  { background: #1877F2; color: #fff; }
.ns-share__btn--tw:hover  { background: #000; color: #fff; }
.ns-share__btn--li:hover  { background: #0A66C2; color: #fff; }

/* ─ Tags ─ */
.ns-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 20px 0;
    border-bottom: 1px solid #E5E7EB;
}
.ns-tags__label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    flex-shrink: 0;
}
.ns-tags__item {
    display: inline-block;
    font-size: 13px;
    color: #374151;
    background: #F3F4F6;
    border-radius: 6px;
    padding: 5px 12px;
    text-decoration: none;
    border: 1px solid #E5E7EB;
    transition: background .15s, color .15s, border-color .15s;
}
.ns-tags__item:hover {
    background: var(--bds-primary-light, #EEF2FF);
    color: var(--bds-primary, #312E8D);
    border-color: #C7D2FE;
}

/* ══════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════ */
.ns-sidebar { position: sticky; top: 80px; }

.ns-sidebar__widget {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 24px;
}
.ns-sidebar__title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 18px;
    padding-left: 12px;
    border-left: 4px solid var(--bds-primary, #312E8D);
    line-height: 1.3;
}

/* Recent post items in sidebar */
.ns-recent__item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 14px 0;
    border-bottom: 1px solid #F3F4F6;
}
.ns-recent__item:first-child { padding-top: 0; }
.ns-recent__item:last-child { border-bottom: none; padding-bottom: 0; }
.ns-recent__item:hover { text-decoration: none; color: inherit; }

.ns-recent__img-wrap {
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background: #F3F4F6;
    flex-shrink: 0;
}
.ns-recent__img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform .3s;
}
.ns-recent__item:hover .ns-recent__img { transform: scale(1.06); }
.ns-recent__no-img {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: #D1D5DB;
}

.ns-recent__body { }
.ns-recent__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.ns-recent__cat {
    font-size: 11px;
    font-weight: 600;
    color: var(--bds-primary, #312E8D);
}
.ns-recent__date {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #9CA3AF;
}
.ns-recent__title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .15s;
}
.ns-recent__item:hover .ns-recent__title { color: var(--bds-primary, #312E8D); }

/* ══════════════════════════════════════════════════════
   RELATED POSTS
   ══════════════════════════════════════════════════════ */
.ns-related { margin-top: 52px; }

.ns-related__title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 24px;
    padding-left: 14px;
    border-left: 4px solid var(--bds-primary, #312E8D);
    line-height: 1.3;
}

.ns-related__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.ns-rel-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 14px;
    transition: box-shadow .15s, transform .15s;
}
.ns-rel-item:hover {
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    transform: translateY(-2px);
}

.ns-rel-item__img-wrap {
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background: #F3F4F6;
    flex-shrink: 0;
}
.ns-rel-item__img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform .3s;
}
.ns-rel-item:hover .ns-rel-item__img { transform: scale(1.05); }
.ns-rel-item__no-img {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: #D1D5DB;
}

.ns-rel-item__cat {
    font-size: 11px;
    font-weight: 600;
    color: var(--bds-primary, #312E8D);
    display: block;
    margin-bottom: 4px;
}
.ns-rel-item__title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    line-height: 1.45;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .15s;
}
.ns-rel-item:hover .ns-rel-item__title { color: var(--bds-primary, #312E8D); }
.ns-rel-item__date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #9CA3AF;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .ns-layout { grid-template-columns: 1fr; gap: 36px; }
    .ns-sidebar { position: static; }
}

@media (max-width: 768px) {
    .ns-article__title { font-size: 24px; }
    .ns-article__content { font-size: 15px; }
    .ns-article__content h2 { font-size: 19px; }
    .ns-related__grid { grid-template-columns: 1fr; }
    .ns-body { padding: 28px 0 48px; }
}

@media (max-width: 480px) {
    .ns-article__title { font-size: 21px; }
    .ns-rel-item { grid-template-columns: 80px 1fr; gap: 10px; padding: 10px; }
}
