.blog-shell {
    position: relative;
    overflow: hidden;
}

.blog-shell::before,
.blog-shell::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(40px);
    opacity: .18;
    pointer-events: none;
}

.blog-shell::before {
    width: 320px;
    height: 320px;
    background: #c259ff;
    top: 40px;
    left: -80px;
}

.blog-shell::after {
    width: 280px;
    height: 280px;
    background: #cb71ff;
    top: 380px;
    right: -60px;
}

.blog-hero {
    position: relative;
    padding: 70px 0 35px;
}

.blog-hero-box {
    background:
        radial-gradient(circle at top right, rgba(207, 127, 246, .32), transparent 28%),
        radial-gradient(circle at bottom left, rgba(102, 33, 128, .26), transparent 25%),
        linear-gradient(135deg, #ffffff 0%, #fbf5ff 100%);
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 32px;
    box-shadow: var(--blog-shadow);
    padding: 40px 34px;
    position: relative;
    overflow: hidden;
}

.blog-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(29, 78, 216, .08);
    color: var(--blog-blue);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 18px;
}

.blog-title-xl {
    font-size: clamp(2rem, 3vw, 3.35rem);
    line-height: 1.12;
    font-weight: 700;
    color: var(--blog-navy);
    margin-bottom: 16px;
}

.blog-subtitle {
    color: var(--blog-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 760px;
}

.blog-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.blog-search-wrap,
.blog-filter-wrap {
    background: #fff;
    border: 1px solid var(--blog-line);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .04);
}

.blog-search-wrap {
    flex: 1 1 320px;
    display: flex;
    align-items: center;
    padding: 0 16px;
}

.blog-search-wrap i {
    color: #94a3b8;
}

.blog-search-wrap input {
    border: 0;
    outline: 0;
    box-shadow: none;
    padding: 14px 12px;
    width: 100%;
    background: transparent;
    color: var(--blog-text);
}

.blog-filter-wrap select {
    border: 0;
    outline: 0;
    box-shadow: none;
    padding: 14px 18px;
    background: transparent;
    color: var(--blog-text);
    min-width: 210px;
}

.blog-section {
    padding: 20px 0 10px;
}

.blog-section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.blog-section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--blog-navy);
    margin-bottom: 4px;
}

.blog-section-desc {
    color: var(--blog-muted);
    margin: 0;
}

.blog-chip-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.blog-chip {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: #cf7ff6;
    border: 1px solid var(--blog-line);
    color: #334155;
    font-weight: 500;
    text-decoration: none;
    transition: .2s ease;
}

.blog-chip:hover,
.blog-chip.active {
    background: var(--blog-blue);
    background: #662180;
    color: #fff;
    border-color: var(--blog-blue);
    transform: translateY(-1px);
}

.featured-card {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    min-height: 480px;
    background: #dbeafe;
    box-shadow: var(--blog-shadow);
}

.featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, .08) 0%, rgba(15, 23, 42, .72) 75%);
}

.featured-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 32px;
    color: #fff;
    z-index: 2;
}

.blog-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.badge-update {
    background: rgba(59, 130, 246, .18);
    color: #5a5a5a;
}

.badge-article {
    background: rgba(34, 197, 94, .18);
    color: #5a5a5a;
}

.badge-news {
    background: rgba(249, 115, 22, .18);
    color: #5a5a5a;
}

.featured-title {
    font-size: clamp(1.5rem, 2.4vw, 2.4rem);
    line-height: 1.25;
    font-weight: 700;
    margin-bottom: 10px;
}

.featured-desc {
    color: rgba(255, 255, 255, .84);
    line-height: 1.8;
    max-width: 820px;
    margin-bottom: 18px;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    color: #cbd5e1;
    font-size: 14px;
}

.blog-btn-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    border-radius: 999px;
    background: #f2aeff;
    color: var(--blog-blue);
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
    transition: .2s ease;
}

.blog-btn-main:hover {
    transform: translateY(-2px);
    color: var(--blog-blue);
}

.blog-card {
    background: var(--blog-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: var(--blog-radius);
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(15, 23, 42, .05);
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 45px rgba(15, 23, 42, .10);
}

.blog-card-cover {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #e2e8f0;
}

.blog-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.blog-card:hover .blog-card-cover img {
    transform: scale(1.04);
}

.blog-card-body {
    padding: 22px 22px 20px;
}

.blog-card-title {
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--blog-navy);
    margin-bottom: 10px;
    min-height: 3.2em;
}

.blog-card-desc {
    color: var(--blog-muted);
    line-height: 1.75;
    font-size: .96rem;
    margin-bottom: 14px;
    min-height: 5.2em;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.blog-link {
    color: var(--blog-blue);
    text-decoration: none;
    font-weight: 600;
}

.blog-link:hover {
    color: #1e40af;
}

.blog-side-card {
    background: #fff;
    border: 1px solid var(--blog-line);
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 15px 35px rgba(15, 23, 42, .05);
    height: 100%;
}

.blog-side-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--blog-navy);
    margin-bottom: 16px;
}

.mini-post {
    display: flex;
    gap: 14px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
    text-decoration: none;
}

.mini-post:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.mini-post-thumb {
    width: 78px;
    height: 78px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e2e8f0;
}

.mini-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-post-title {
    font-weight: 600;
    color: var(--blog-navy);
    line-height: 1.55;
    margin-bottom: 6px;
}

.mini-post-meta {
    color: var(--blog-muted);
    font-size: 13px;
}

.blog-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 24px;
    background: rgba(255, 255, 255, .75);
    padding: 38px;
    text-align: center;
    color: var(--blog-muted);
}

@media (max-width: 991.98px) {
    .blog-hero-box {
        padding: 28px 22px;
        border-radius: 24px;
    }

    .featured-content {
        padding: 24px;
    }

    .featured-card {
        min-height: 420px;
    }
}

/* blog-detail */

:root {
    --blog-purple-dark: #662180;
    --blog-purple-light: #cf7ff6;
    --blog-purple-soft: #f8effd;
    --blog-purple-border: #ead6f5;
    --blog-text-main: #24152d;
    --blog-text-muted: #7a6d84;
    --blog-card-bg: rgba(255, 255, 255, .92);
    --blog-shadow: 0 18px 40px rgba(102, 33, 128, .10);
    --blog-radius-xl: 26px;
    --blog-radius-lg: 20px;
}

.blog-detail-shell {
    position: relative;
    padding: 48px 0 80px;
    background:
        radial-gradient(circle at top right, rgba(207, 127, 246, .20), transparent 25%),
        radial-gradient(circle at bottom left, rgba(102, 33, 128, .12), transparent 25%),
        linear-gradient(180deg, #fcf9ff 0%, #ffffff 55%, #fcf8ff 100%);
    overflow: hidden;
}

.blog-detail-shell::before,
.blog-detail-shell::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(50px);
    opacity: .18;
    pointer-events: none;
}

.blog-detail-shell::before {
    width: 280px;
    height: 280px;
    background: #cf7ff6;
    top: 90px;
    right: -60px;
}

.blog-detail-shell::after {
    width: 250px;
    height: 250px;
    background: #662180;
    bottom: 120px;
    left: -60px;
}

.blog-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(300px, .9fr);
    gap: 30px;
    align-items: start;
}

.blog-main-card,
.blog-detail-side-card,
.blog-comment-card,
.blog-comment-form-card {
    background: var(--blog-card-bg);
    border: 1px solid rgba(234, 214, 245, .95);
    box-shadow: var(--blog-shadow);
    border-radius: var(--blog-radius-xl);
}

.blog-main-card {
    overflow: hidden;
}

.blog-detail-cover {
    position: relative;
    aspect-ratio: 16 / 8;
    background: #ede9f3;
    overflow: hidden;
}

.blog-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-detail-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .02) 0%, rgba(0, 0, 0, .18) 100%);
}

.blog-detail-body {
    padding: 30px 30px 26px;
}

.blog-meta-top {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    margin-bottom: 16px;
}

.blog-badge-purple {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(102, 33, 128, .10);
    color: var(--blog-purple-dark);
    border: 1px solid rgba(102, 33, 128, .12);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.blog-meta-line {
    color: var(--blog-text-muted);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.blog-detail-title {
    font-size: clamp(1.9rem, 2.4vw, 2.75rem);
    line-height: 1.22;
    font-weight: 700;
    color: var(--blog-text-main);
    margin-bottom: 16px;
}

.blog-detail-intro {
    color: var(--blog-text-muted);
    font-size: 1.04rem;
    line-height: 1.9;
    margin-bottom: 22px;
}

.blog-content-wrap {
    color: #3d3147;
    line-height: 1.95;
    font-size: 1rem;
}

.blog-content-wrap h2,
.blog-content-wrap h3,
.blog-content-wrap h4 {
    color: var(--blog-purple-dark);
    font-weight: 700;
    margin-top: 28px;
    margin-bottom: 12px;
}

.blog-content-wrap p {
    margin-bottom: 16px;
}

.blog-content-wrap blockquote {
    margin: 24px 0;
    padding: 20px 22px;
    background: linear-gradient(135deg, #fcf3ff 0%, #f8effd 100%);
    border-left: 4px solid var(--blog-purple-light);
    border-radius: 18px;
    color: #6b4f79;
    font-style: italic;
}

.blog-content-wrap ul,
.blog-content-wrap ol {
    padding-left: 22px;
    margin-bottom: 18px;
}

.blog-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #f1e7f7;
}

.blog-tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    background: #faf5fd;
    color: var(--blog-purple-dark);
    border: 1px solid #eedbf8;
    font-size: 14px;
    transition: .2s ease;
}

.blog-tag-pill:hover {
    background: var(--blog-purple-dark);
    color: #fff;
    border-color: var(--blog-purple-dark);
}

.blog-detail-side-card {
    padding: 22px;
    margin-bottom: 22px;
}

.blog-side-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--blog-purple-dark);
    margin-bottom: 16px;
}

.blog-search-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--blog-purple-border);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.blog-search-box input {
    border: 0;
    outline: 0;
    box-shadow: none;
    padding: 14px 14px;
    width: 100%;
    background: transparent;
}

.blog-search-box button {
    border: 0;
    background: linear-gradient(135deg, var(--blog-purple-dark), var(--blog-purple-light));
    color: #fff;
    padding: 18px 16px;
}

.blog-side-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-side-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed #efe4f5;
    color: #4d3f58;
    font-size: 15px;
}

.blog-side-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.blog-latest-item {
    display: flex;
    gap: 14px;
    align-items: start;
    text-decoration: none;
    padding: 12px 0;
    border-bottom: 1px solid #f0e4f6;
}

.blog-latest-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.blog-latest-thumb {
    width: 82px;
    height: 82px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    background: #ece7f0;
}

.blog-latest-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-latest-title {
    font-weight: 600;
    color: var(--blog-text-main);
    line-height: 1.55;
    margin-bottom: 6px;
}

.blog-latest-meta {
    color: var(--blog-text-muted);
    font-size: 13px;
}

.blog-comment-card,
.blog-comment-form-card {
    margin-top: 26px;
    padding: 24px;
}

.blog-comment-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blog-purple-dark);
    margin-bottom: 18px;
}

.blog-comment-item {
    display: flex;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid #f1e7f7;
}

.blog-comment-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.blog-comment-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f2e8f8;
}

.blog-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-comment-name {
    font-weight: 700;
    color: var(--blog-text-main);
    margin-bottom: 4px;
}

.blog-comment-date {
    font-size: 13px;
    color: var(--blog-text-muted);
    margin-bottom: 8px;
}

.blog-comment-text {
    color: #4c3f57;
    line-height: 1.8;
}

.blog-reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #faf4fd;
    border: 1px solid #eddcf7;
    color: var(--blog-purple-dark);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.blog-reply-btn:hover {
    background: var(--blog-purple-dark);
    color: #fff;
    border-color: var(--blog-purple-dark);
}

.blog-form-label {
    font-size: 14px;
    color: var(--blog-text-main);
    font-weight: 600;
    margin-bottom: 8px;
}

.blog-form-control {
    border: 1px solid #eadcf4;
    background: #fff;
    border-radius: 16px;
    padding: 14px 16px;
    width: 100%;
    outline: 0;
    box-shadow: none;
    color: var(--blog-text-main);
}

.blog-form-control:focus {
    border-color: var(--blog-purple-light);
    box-shadow: 0 0 0 4px rgba(207, 127, 246, .12);
}

.blog-btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blog-purple-dark), var(--blog-purple-light));
    color: #fff;
    padding: 13px 24px;
    font-weight: 600;
    box-shadow: 0 14px 28px rgba(102, 33, 128, .18);
    transition: .2s ease;
}

.blog-btn-submit:hover {
    transform: translateY(-2px);
}

@media (max-width: 991.98px) {
    .blog-detail-grid {
        grid-template-columns: 1fr;
    }

    .blog-detail-body {
        padding: 24px 20px 22px;
    }

    .blog-comment-card,
    .blog-comment-form-card,
    .blog-detail-side-card {
        padding: 20px;
    }
}

.featured-card {
    position: relative;
}

.featured-badge-top {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
}

.blog-cta-box {
    margin-top: 32px;
    padding: 28px;
    border-radius: 24px;
    background: linear-gradient(135deg, #f3f0ff 0%, #fff7fb 100%);
    border: 1px solid rgba(102, 45, 128, 0.12);
    box-shadow: 0 10px 30px rgba(52, 64, 84, 0.08);
}

.blog-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.blog-cta-title {
    margin: 0 0 8px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #4b1f68;
}

.blog-cta-desc {
    margin: 0;
    color: #5f6470;
    line-height: 1.7;
    max-width: 760px;
}

.blog-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, #662d80 0%, #8b3fa8 100%);
    color: #fff !important;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(102, 45, 128, 0.22);
    transition: all .2s ease;
    white-space: nowrap;
}

.blog-cta-btn:hover {
    transform: translateY(-2px);
    color: #fff !important;
}

@media (max-width: 768px) {
    .blog-cta-box {
        padding: 22px;
    }

    .blog-cta-title {
        font-size: 1.2rem;
    }

    .blog-cta-btn {
        width: 100%;
    }
}

/* ส่วนของ tag */

.tag-page-hero {
    padding: 48px 0 18px;
    background:
        radial-gradient(circle at top left, rgba(13, 110, 253, .08), transparent 26%),
        radial-gradient(circle at bottom right, rgba(102, 45, 128, .08), transparent 28%),
        linear-gradient(180deg, #f9fbff 0%, #f5f7fc 100%);
}

.tag-hero-card {
    border-radius: 28px;
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(255, 255, 255, .8);
    box-shadow: 0 20px 60px rgba(15, 23, 42, .07);
    padding: 34px;
}

.tag-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #edf4ff;
    color: #004aad;
    font-weight: 600;
    font-size: .92rem;
}

.tag-hero-title {
    margin: 16px 0 12px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    font-weight: 800;
    color: #0f172a;
}

.tag-hero-desc {
    color: #64748b;
    line-height: 1.85;
    max-width: 900px;
    margin: 0;
}

.tag-chip-big {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #662d80 0%, #8d44ad 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 12px 28px rgba(102, 45, 128, .18);
}

.tag-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid #d9e2f0;
    background: #fff;
    color: #556070;
    font-weight: 500;
    text-decoration: none;
    transition: all .2s ease;
}

.tag-filter-pill.active {
    background: linear-gradient(135deg, #004aad 0%, #287ced 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(0, 74, 173, .16);
}

.tag-filter-pill:hover {
    color: inherit;
    transform: translateY(-1px);
}

.tag-empty-box {
    border-radius: 24px;
    padding: 48px 24px;
    background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
    border: 1px solid #eef2f8;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .05);
    text-align: center;
}

.tag-empty-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.tag-empty-desc {
    color: #64748b;
    margin-bottom: 0;
    line-height: 1.8;
}

.tag-chip-light {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #edf0f7;
    color: #556070;
    font-weight: 500;
    font-size: .9rem;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all .2s ease;
}

.tag-chip-light:hover {
    background: #e2e8f0;
    color: #004aad;
    transform: translateY(-1px);
}

/* ----------------------------------- */