
.blog-root-container {
    --blog-surface: #ffffff;
    --blog-border: #e9ecef;
    --blog-muted: #6c757d;
    --blog-heading: var(--title-clr);
    --blog-soft: #f6f8fb;
}

.dark-theme .blog-root-container {
    --blog-surface: #1b1b1d;
    --blog-border: #2c2c30;
    --blog-muted: #9aa0a6;
    --blog-soft: #202023;
}

.blog-root-container {
    color: var(--blog-heading);
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: initial;
    -webkit-line-clamp: 1;
    line-clamp: 1;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: initial;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: initial;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.blog-page-header {
    background: url('../../admin-module/img/blog-header.png') right center / cover no-repeat var(--base-clr);
    border-radius: 16px;
    padding: 48px 24px;
    margin-bottom: 32px;
    color: #fff;
}
.blog-page-header_title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}
.blog-page-header_subtitle {
    font-size: 15px;
    opacity: 0.9;
    max-width: 680px;
    margin-inline: auto;
}

.blog-nav-row { margin-bottom: 8px; }
.blog-top-nav {
    display: flex;
    gap: 12px;
    list-style: none;
    padding: 4px 0;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
}
.blog-top-nav::-webkit-scrollbar { display: none; }
.blog-top-nav li a {
    display: inline-block;
    white-space: nowrap;
    background: var(--blog-surface);
    border: 1px solid var(--blog-border);
    border-radius: 8px;
    padding: 11px 22px;
    font-size: 14px;
    line-height: 1;
    color: var(--blog-heading);
    transition: all 0.2s ease;
}
.blog-top-nav li a:hover { border-color: var(--base-clr); color: var(--base-clr); }
.blog-top-nav li.active a {
    background: var(--base-clr);
    border-color: var(--base-clr);
    color: #fff;
}
.blog-top-nav_prev-btn,
.blog-top-nav_next-btn {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
}
.blog-top-nav_prev-btn { inset-inline-start: 0; }
.blog-top-nav_next-btn { inset-inline-end: 0; }
.blog-nav-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--base-clr);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(var(--base-rgb), 0.4);
}

.blog-search-box { position: relative; }
.blog-search-input {
    width: 100%;
    height: 45px;
    border: 1px solid var(--blog-border);
    border-radius: 10px;
    padding: 0 44px 0 16px;
    background: var(--blog-surface);
    color: var(--blog-heading);
    outline: none;
}
[dir="rtl"] .blog-search-input { padding: 0 16px 0 44px; }
.blog-search-input:focus { border-color: var(--base-clr); }
.blog-search-input::placeholder { color: #9ca3af; opacity: 1; }
.blog-search-btn {
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    height: 45px;
    width: 44px;
    border: none;
    background: transparent;
    color: var(--base-clr);
    display: flex;
    align-items: center;
    justify-content: center;
}
.blog-search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-start: 0;
    width: 100%;
    background: var(--blog-surface);
    border: 1px solid var(--blog-border);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    z-index: 20;
    overflow: hidden;
}
.blog-search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: none;
    background: transparent;
    text-align: start;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--blog-heading);
}
.blog-search-suggestion-item:hover { background: var(--blog-soft); color: var(--base-clr); }

.blog-card {
    background: var(--blog-surface);
    border: 1px solid var(--blog-border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.blog-card:hover { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08); transform: translateY(-3px); }
.blog-card_image { overflow: hidden; }
.blog-card_image img {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.blog-card:hover .blog-card_image img { transform: scale(1.05); }
.blog-card_body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}
.blog-badge {
    align-self: flex-start;
    background: rgba(var(--base-rgb), 0.1);
    color: var(--base-clr);
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 12px;
    line-height: 1.6;
    max-width: 100%;
}
.blog-card_title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}
.blog-card_title a { color: var(--blog-heading); transition: color 0.2s ease; }
.blog-card_title a:hover { color: var(--base-clr); }
.blog-card_footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--blog-muted);
}
.blog-card_author a { color: var(--blog-muted); }
.blog-card_author a:hover { color: var(--base-clr); }
.blog-card_date { white-space: nowrap; margin-inline-start: auto; }

.blog-sidebar-card {
    background: var(--blog-surface);
    border: 1px solid var(--blog-border);
    border-radius: 14px;
    padding: 20px;
}
.blog-sidebar-title { font-size: 18px; font-weight: 600; margin-bottom: 18px; }
.recent-post-wrapper { display: flex; flex-direction: column; gap: 16px; }
.recent-post { display: flex; gap: 12px; }
.recent-post_thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}
.recent-post_title { font-size: 14px; font-weight: 500; margin: 0 0 6px; }
.recent-post_title a { color: var(--blog-heading); }
.recent-post_title a:hover { color: var(--base-clr); }
.recent-post_date { font-size: 13px; color: var(--blog-muted); }
.blog-sticky { position: sticky; top: 100px; }

.blog-app-card {
    background: linear-gradient(150deg, var(--base-clr), rgba(var(--base-rgb), 0.82));
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.blog-app-card--image { background-size: cover; background-position: center; }
.blog-app-card--image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(150deg, rgba(var(--base-rgb), 0.92), rgba(var(--base-rgb), 0.78));
}
.blog-app-card_inner { position: relative; }
.blog-app-card_title { font-size: 18px; font-weight: 600; margin-bottom: 6px; color: #fff; }
.blog-app-card_subtitle { font-size: 13px; color: rgba(255, 255, 255, 0.85); margin-bottom: 18px; }

.blog-app-qr {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    width: 150px;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    margin: 0 auto 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.blog-app-qr_code {
    border: 1px solid #e7ebf0;
    border-radius: 10px;
    padding: 10px;
    width: 92px;
    height: 92px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}
.blog-app-qr_code svg { width: 100%; height: 100%; display: block; }
.blog-app-qr_label { font-size: 12px; color: #5b6b7b; }

.blog-app-card_btns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.blog-app-card_btns { flex-wrap: nowrap; }
.blog-store-btn {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #fff;
    color: #1d2939;
    border: 1px solid #e7ebf0;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}
.blog-store-btn span { overflow: hidden; text-overflow: ellipsis; }
.blog-store-btn:hover { color: #1d2939; opacity: 0.9; }
.blog-store-btn_icon { width: 18px; height: 20px; object-fit: contain; flex-shrink: 0; }

.blog-share-label { display: block; margin-bottom: 14px; color: var(--base-clr); font-weight: 500; }
.blog-share-divider { border: 0; border-top: 1px solid var(--blog-border); margin: 20px 0; opacity: 1; }

.border-top-before-after { --bs-border-color: var(--blog-border); }
@media screen and (min-width: 576px) {
    .border-top-before-after { position: relative; }
    .border-top-before-after::before,
    .border-top-before-after::after {
        content: "";
        position: absolute;
        inset-inline-start: 0;
        inset-block-start: 50%;
        border-top: 1px solid var(--bs-border-color);
        width: calc(50% - 140px);
        z-index: 0;
    }
    .border-top-before-after::after { inset-inline-start: unset; inset-inline-end: 0; }
}
@media screen and (max-width: 575px) {
    .card-mobile {
        background-color: var(--blog-surface);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.06);
        border-radius: 10px;
        padding: 1rem;
    }
}
.mb-30 { margin-bottom: 1.875rem; }
.pt-30 { padding-top: 1.875rem; }

.blog-draft-badge {
    border: 1px solid #dc3545;
    color: #dc3545;
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 14px;
    display: inline-flex;
    gap: 8px;
    align-items: center;
}
.blog-details-title { font-size: 28px; font-weight: 700; margin-bottom: 16px; }
.blog-details-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    line-height: 1;
    color: var(--blog-muted);
}
.blog-details-meta > span:not(:last-child) {
    border-inline-end: 1px solid var(--blog-border);
    padding-inline-end: 16px;
}
.blog-details-meta a { color: var(--base-clr); text-decoration: underline; }
.blog-details-thumb {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 28px;
    max-height: 440px;
}
.rich-editor-html-content { line-height: 1.8; font-size: 16px; }
.rich-editor-html-content img { max-width: 100%; height: auto; border-radius: 10px; }
.rich-editor-html-content h2 { font-size: 22px; font-weight: 600; margin: 28px 0 14px; scroll-margin-top: 90px; }
.rich-editor-html-content ul { list-style: disc; padding-inline-start: 1.5rem; margin-bottom: 1rem; }
.rich-editor-html-content ol { list-style: decimal; padding-inline-start: 1.5rem; margin-bottom: 1rem; }
.rich-editor-html-content ul li { list-style: disc; }
.rich-editor-html-content ol li { list-style: decimal; }
.rich-editor-html-content ul ul li { list-style: circle; }
.rich-editor-html-content li { margin-bottom: 0.35rem; }
.rich-editor-html-content table { width: 100%; border-collapse: collapse; }
.rich-editor-html-content table td,
.rich-editor-html-content table th { border: 1px solid var(--blog-border); padding: 8px 12px; }

.article-nav-wrapper {
    padding: 0;
}
.article-nav-title { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.scrollspy-blog-details-menu { list-style: none; margin: 0; padding: 0; }
.scrollspy-blog-details-menu li a {
    display: block;
    padding: 7px 10px;
    border-radius: 8px;
    color: var(--blog-muted);
    font-size: 14px;
}
.scrollspy-blog-details-menu li a:hover { color: var(--base-clr); }
.scrollspy-blog-details-menu li.active a { background: rgba(var(--base-rgb), 0.1); color: var(--base-clr); font-weight: 500; }
.article-nav-wrapper_collapse {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--base-clr);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    cursor: pointer;
}

.blog-popular { margin-top: 48px; }
.blog-popular-title { font-size: 24px; font-weight: 700; }
.blog-see-more { color: var(--base-clr); white-space: nowrap; }
.blog-result-count { font-size: 15px; margin-bottom: 8px; }

.blog-sidebar-title,
.blog-details-title,
.blog-popular-title,
.article-nav-title {
    color: var(--blog-heading);
}

.rounded-10 { border-radius: 10px !important; }
.fs-22 { font-size: 22px; }
.fs-18 { font-size: 18px; }
@media (max-width: 575px) {
    .fs-16-mobile { font-size: 16px; }
    .fs-12-mobile { font-size: 12px; }
}

.blog-empty-state__title { font-size: 18px; }
.blog-empty-state__subtitle { font-size: 14px; }

@media (max-width: 575px) {
    .blog-empty-state__title { font-size: 14px; }
    .blog-empty-state__subtitle { font-size: 12px; }
}

.blog-pagination .pagination {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
}
.blog-pagination .pagination li a,
.blog-pagination .pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--blog-border);
    border-radius: 8px;
    background: var(--blog-surface);
    color: var(--blog-heading);
    font-size: 14px;
    line-height: 1;
    transition: all 0.2s ease;
}
.blog-pagination .pagination li a:hover {
    border-color: var(--base-clr);
    color: var(--base-clr);
}
.blog-pagination .pagination li.active span {
    background: var(--base-clr);
    border-color: var(--base-clr);
    color: #fff;
}
.blog-pagination .pagination li.disabled span {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 991px) {
    .blog-sticky { position: static; }
    .blog-page-header { padding: 36px 18px; }
    .blog-page-header_title { font-size: 26px; }
    .blog-details-title { font-size: 23px; }
    .article-nav-wrapper_collapse {
        position: fixed;
        inset-inline-start: 16px;
        top: 80px;
        z-index: 8;
        margin-bottom: 0;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    }
    .article-nav-wrapper {
        display: none;
        position: fixed;
        inset-inline-start: 66px;
        top: 100px;
        z-index: 7;
        width: 260px;
        max-width: calc(100vw - 82px);
        max-height: 60vh;
        overflow-y: auto;
        padding: 16px;
        background: var(--blog-surface);
        border: 1px solid var(--blog-border);
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    }
}
@media (max-width: 575px) {
    .blog-page-header {
        background-image: url('../../admin-module/img/blog-header-mobile.png');
        padding: 20px 18px;
    }
    .blog-page-header_title { font-size: 22px; }
    .blog-card_title { font-size: 16px; }
    .blog-details-title { font-size: 20px; }
    .blog-popular-title { font-size: 20px; }
}
