/* ===============================================
   NextMark blog — listing + single post
   =============================================== */
:root {
    --blog-accent: #ff5e14;
    --blog-accent-dark: #e04a00;
    --blog-ink: #111827;
    --blog-text: #4b5563;
    --blog-muted: #6b7280;
    --blog-line: #e5e7eb;
    --blog-soft: #f5f7fb;
}

.blog-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    font-size: 14px;
    color: var(--blog-muted);
}
.blog-breadcrumb li + li::before {
    content: "/";
    margin-right: 6px;
    color: #c0c4cc;
}
.blog-breadcrumb a {
    color: var(--blog-muted);
}
.blog-breadcrumb a:hover {
    color: var(--blog-accent);
}
.blog-breadcrumb [aria-current] {
    color: var(--blog-ink);
}

/* ---------- Listing ---------- */
.blog-section {
    padding: 140px 0 100px;
    background: var(--blog-soft);
}
.blog-subtitle {
    color: var(--blog-accent);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.blog-title {
    font-size: 48px;
    font-weight: 800;
    margin-top: 12px;
    color: var(--blog-ink);
}
.blog-description {
    color: var(--blog-text);
    max-width: 650px;
    margin: 15px auto 0;
    font-size: 17px;
}

.blog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 36px;
}
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.blog-filters a {
    padding: 8px 18px;
    border-radius: 30px;
    background: #fff;
    color: var(--blog-ink);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--blog-line);
    transition: .2s;
}
.blog-filters a:hover,
.blog-filters a.active {
    background: var(--blog-accent);
    border-color: var(--blog-accent);
    color: #fff;
}
.blog-filters a .count {
    opacity: .7;
    font-weight: 400;
    margin-left: 4px;
}
.blog-search {
    display: flex;
    max-width: 340px;
    width: 100%;
}
.blog-search input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--blog-line);
    border-right: 0;
    border-radius: 30px 0 0 30px;
    padding: 10px 18px;
    font-size: 15px;
    background: #fff;
}
.blog-search input:focus {
    outline: none;
    border-color: var(--blog-accent);
}
.blog-search button {
    border: 0;
    background: var(--blog-accent);
    color: #fff;
    padding: 0 20px;
    border-radius: 0 30px 30px 0;
    font-weight: 700;
}
.blog-result-note {
    margin: -16px 0 28px;
    color: var(--blog-muted);
}
.blog-result-note a {
    color: var(--blog-accent);
    font-weight: 600;
}

/* Featured post */
.blog-featured {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    background: #fff;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0, 0, 0, .06);
    margin-bottom: 40px;
}
.blog-featured .blog-image img {
    height: 100%;
    min-height: 340px;
}
.blog-featured .blog-content {
    padding: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.blog-featured .blog-content h2 {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 16px;
}
.blog-featured .blog-content h2 a {
    color: var(--blog-ink);
}
.blog-featured .blog-content h2 a:hover {
    color: var(--blog-accent);
}
.featured-label {
    display: inline-block;
    color: var(--blog-accent);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* Cards */
.blog-grid {
    row-gap: 30px;
}
.blog-card {
    background: #fff;
    border-radius: 25px;
    overflow: hidden;
    transition: all .4s ease;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 35px rgba(0, 0, 0, .06);
}
.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, .12);
}
.blog-image {
    position: relative;
    overflow: hidden;
    display: block;
    background: #e9edf5;
}
.blog-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: .5s;
    display: block;
}
.blog-card:hover .blog-image img,
.blog-featured:hover .blog-image img {
    transform: scale(1.06);
}
.blog-category {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #ff5e14, #ff8a00);
    color: #fff;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}
.blog-category.cat-seo {
    background: linear-gradient(135deg, #007cf0, #00dfd8);
}
.blog-category.cat-ai-marketing {
    background: linear-gradient(135deg, #7928ca, #ff0080);
}
.blog-category.cat-digital-marketing {
    background: linear-gradient(135deg, #0f9d58, #34c38f);
}
.blog-card .blog-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-bottom: 14px;
    color: var(--blog-muted);
    font-size: 14px;
}
.blog-meta i {
    color: var(--blog-accent);
    margin-right: 5px;
}
.blog-card h2,
.blog-card h3 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 12px;
}
.blog-card h2 a,
.blog-card h3 a {
    color: var(--blog-ink);
    transition: .3s;
}
.blog-card h2 a:hover,
.blog-card h3 a:hover {
    color: var(--blog-accent);
}
.blog-card p,
.blog-featured p {
    color: var(--blog-text);
    line-height: 1.8;
    margin-bottom: 22px;
}
.read-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    color: var(--blog-accent);
    font-weight: 700;
    transition: .3s;
}
.read-btn i {
    transition: .3s;
}
.read-btn:hover {
    color: var(--blog-ink);
}
.read-btn:hover i {
    transform: translateX(6px);
}

.blog-empty {
    background: #fff;
    border-radius: 25px;
    padding: 60px 30px;
    text-align: center;
    color: var(--blog-text);
}
.blog-empty h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--blog-ink);
}

.blog-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 50px;
    padding: 0;
    list-style: none;
}
.blog-pagination a,
.blog-pagination span {
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
    background: #fff;
    color: var(--blog-ink);
    font-weight: 700;
    border: 1px solid var(--blog-line);
}
.blog-pagination a:hover,
.blog-pagination .current {
    background: var(--blog-accent);
    border-color: var(--blog-accent);
    color: #fff;
}

/* ---------- Single post ---------- */
.post-hero {
    padding: 140px 0 50px;
    background: #f8fafc;
    border-bottom: 1px solid #eee;
}
.post-hero .container {
    max-width: 900px;
}
.post-hero .blog-category {
    position: static;
    display: inline-block;
    margin-bottom: 18px;
}
.post-hero h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--blog-ink);
}
.post-hero .excerpt {
    color: var(--blog-text);
    font-size: 19px;
    line-height: 1.7;
    margin: 18px 0 24px;
}
.post-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 22px;
    color: var(--blog-muted);
    font-size: 15px;
}
.post-byline i {
    color: var(--blog-accent);
    margin-right: 6px;
}
.post-byline strong {
    color: var(--blog-ink);
}

.post-featured-image {
    padding: 40px 0 0;
}
.post-featured-image img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    border-radius: 18px;
    display: block;
}

.post-layout {
    padding: 50px 0 40px;
}
.post-sidebar {
    position: sticky;
    top: 100px;
}
.sidebar-box {
    background: #fff;
    border: 1px solid var(--blog-line);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}
.sidebar-box h2 {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--blog-ink);
    margin-bottom: 14px;
}
.toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 55vh;
    overflow-y: auto;
}
.toc li a {
    display: block;
    padding: 6px 0 6px 12px;
    border-left: 2px solid var(--blog-line);
    color: var(--blog-text);
    font-size: 14px;
    line-height: 1.5;
}
.toc li.level-3 a {
    padding-left: 26px;
    font-size: 13px;
}
.toc li a:hover,
.toc li a.active {
    color: var(--blog-accent);
    border-left-color: var(--blog-accent);
}
.toc-mobile {
    margin-bottom: 30px;
}
.toc-mobile summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--blog-ink);
}
.toc-mobile ol {
    margin-top: 14px;
}
.sidebar-cta {
    background: linear-gradient(135deg, #1a2b4c, #2d4a7c);
    border: 0;
    color: #fff;
}
.sidebar-cta h2 {
    color: #fff;
    text-transform: none;
    letter-spacing: 0;
    font-size: 20px;
}
.sidebar-cta p {
    color: rgba(255, 255, 255, .85);
    font-size: 15px;
    line-height: 1.6;
}
.btn-accent {
    display: inline-block;
    background: var(--blog-accent);
    color: #fff;
    padding: 11px 24px;
    border-radius: 30px;
    font-weight: 700;
    transition: background .3s;
}
.btn-accent:hover {
    background: var(--blog-accent-dark);
    color: #fff;
}

.post-content {
    font-size: 18px;
    line-height: 1.9;
    color: #374151;
    overflow-wrap: break-word;
}
.post-content h2 {
    font-size: 30px;
    font-weight: 800;
    color: var(--blog-ink);
    margin: 48px 0 16px;
    scroll-margin-top: 100px;
}
.post-content h3 {
    font-size: 23px;
    font-weight: 700;
    color: var(--blog-ink);
    margin: 34px 0 12px;
    scroll-margin-top: 100px;
}
.post-content h4 {
    font-size: 19px;
    font-weight: 700;
    color: var(--blog-ink);
    margin: 26px 0 10px;
}
.post-content p {
    margin-bottom: 1.3em;
}
.post-content a {
    color: var(--blog-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.post-content a:hover {
    color: var(--blog-accent-dark);
}
.post-content ul,
.post-content ol {
    padding-left: 1.4em;
    margin-bottom: 1.4em;
}
.post-content li {
    margin-bottom: .45em;
}
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 10px 0 20px;
}
.post-content blockquote {
    border-left: 4px solid var(--blog-accent);
    background: #fff7f2;
    padding: 18px 24px;
    margin: 28px 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
}
.post-content .pull-quote {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.6;
    color: var(--blog-ink);
    border-left: 4px solid var(--blog-accent);
    padding: 6px 0 6px 22px;
    margin: 32px 0;
}
.post-content pre,
.post-content code {
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 15px;
}
.post-content code {
    padding: 2px 6px;
}
.post-content pre {
    padding: 16px;
    overflow-x: auto;
}
.table-scroll {
    overflow-x: auto;
    margin: 20px 0 30px;
}
.post-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    line-height: 1.6;
}
.post-content th,
.post-content td {
    border: 1px solid #e0e0e0;
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
}
.post-content th {
    background: #f8fafc;
    font-weight: 700;
    color: var(--blog-ink);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 36px 0 0;
    padding: 0;
    list-style: none;
}
.post-tags a {
    display: inline-block;
    background: var(--blog-soft);
    color: var(--blog-text);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 14px;
}
.post-tags a:hover {
    background: var(--blog-accent);
    color: #fff;
}

.post-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 26px;
    border-top: 1px solid var(--blog-line);
}
.post-share > span {
    font-weight: 700;
    color: var(--blog-ink);
    margin-right: 6px;
}
.post-share a,
.post-share button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--blog-soft);
    color: var(--blog-ink);
    border: 0;
    font-size: 16px;
    transition: .2s;
}
.post-share a:hover,
.post-share button:hover {
    background: var(--blog-accent);
    color: #fff;
}

.post-faq {
    margin-top: 50px;
}
.post-faq > h2 {
    font-size: 30px;
    font-weight: 800;
    color: var(--blog-ink);
    margin-bottom: 20px;
}
.faq-item {
    border: 1px solid var(--blog-line);
    border-radius: 14px;
    margin-bottom: 12px;
    background: #fff;
}
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 54px 18px 22px;
    font-weight: 700;
    font-size: 18px;
    color: var(--blog-ink);
    position: relative;
}
.faq-item summary::-webkit-details-marker {
    display: none;
}
.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--blog-accent);
}
.faq-item[open] summary::after {
    content: "−";
}
.faq-item .faq-answer {
    padding: 0 22px 18px;
    color: var(--blog-text);
    font-size: 17px;
    line-height: 1.8;
}
.faq-item .faq-answer p:last-child {
    margin-bottom: 0;
}

.author-box {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-top: 44px;
    padding: 24px;
    background: var(--blog-soft);
    border-radius: 16px;
}
.author-box img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    padding: 8px;
    flex-shrink: 0;
}
.author-box h2 {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 4px;
    color: var(--blog-ink);
}
.author-box p {
    margin: 0;
    color: var(--blog-text);
    font-size: 15px;
    line-height: 1.6;
}

.post-related {
    background: var(--blog-soft);
    padding: 70px 0 90px;
}
.post-related > .container > h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--blog-ink);
    margin-bottom: 30px;
}
.back-btn {
    display: inline-block;
    margin-top: 40px;
    padding: 12px 28px;
    background: var(--blog-accent);
    color: #fff;
    border-radius: 30px;
    font-weight: 600;
    transition: background .3s;
}
.back-btn:hover {
    background: var(--blog-accent-dark);
    color: #fff;
}

.preview-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9990;
    background: #1a2b4c;
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-size: 14px;
}
.preview-banner a {
    color: #ffb48a;
    font-weight: 700;
    margin-left: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .blog-title {
        font-size: 38px;
    }
    .blog-featured {
        grid-template-columns: 1fr;
    }
    .blog-featured .blog-image img {
        min-height: 0;
        height: 260px;
    }
    .blog-featured .blog-content {
        padding: 30px;
    }
    .post-hero h1 {
        font-size: 34px;
    }
    .post-sidebar {
        position: static;
        margin-top: 40px;
    }
}
@media (max-width: 576px) {
    .blog-section {
        padding-top: 120px;
    }
    .blog-title {
        font-size: 30px;
    }
    .blog-card .blog-content {
        padding: 22px;
    }
    .blog-featured .blog-content h2 {
        font-size: 24px;
    }
    .blog-search {
        max-width: none;
    }
    .post-hero {
        padding-top: 120px;
    }
    .post-hero h1 {
        font-size: 28px;
    }
    .post-hero .excerpt {
        font-size: 17px;
    }
    .post-content {
        font-size: 17px;
    }
    .post-content h2 {
        font-size: 25px;
    }
    .post-content h3 {
        font-size: 21px;
    }
}
