/* =======   GLOBAL RESET & FONT SYSTEM ========= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans Thai', sans-serif;
}


body {
    background: #ffffff;
    color: #374151;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 .65em;
    line-height: 1.18;
    letter-spacing: -0.025em;
}

/* Hero / Main Title */
h1 {
    font-size: clamp(2.1rem, 5vw, 2.5rem);
    font-weight: 700;
}

/* Section Title */
h2 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    font-weight: 700;
}

/* Card / Content Title */
h3 {
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 700;
}

/* Sub Heading */
h4 {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 600;
}

h5 {
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 600;
}

h6 {
    font-size: 1rem;
    font-weight: 600;
}

/* Paragraph */
p {
    font-size: 1rem;
    line-height: 1.9;
    margin: 0 0 1.2em;
}

/* Lead Text */
.lead {
    font-size: clamp(1.08rem, 1.5vw, 1.28rem);
    line-height: 1.9;
}

/* =========================
   ARTICLE PAGE
========================= */

.article-hero {
    padding: 100px 24px 50px;
    background: #F8FBFF;
}

.article-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.article-head {
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
}

.article-category {
    display: inline-block;
    margin-bottom: 18px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(0, 132, 255, .08);
    color: #0084FF;
    font-weight: 800;
}

.article-head h1 {
    margin: 0 0 22px;
    color: #0F172A;
    line-height: 1.15;
    font-weight: 800;
}

.article-excerpt {
    max-width: 750px;
    margin: 0 auto;
    color: #64748B;
    line-height: 1.8;
}

.article-meta {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 15px;
    color: #94A3B8;
}


/* =========================
   COVER
========================= */

.article-cover {
    padding: 40px 24px 0;
    background: #fff;
}

.article-cover img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 24px;
}


/* =========================
   CONTENT
========================= */

.article-section {
    padding: 70px 24px 110px;
    background: #fff;
}

.article-content {
    width: 100%;
    max-width: 850px;

    margin: 0 auto;

    color: #334155;

    line-height: 1.9;
}

.article-content h2 {
    margin: 55px 0 18px;

    color: #0F172A;

    line-height: 1.3;
}

.article-content h3 {
    margin: 40px 0 15px;

    color: #0F172A;

}

.article-content p {
    margin: 0 0 22px;
}

.article-content ul,
.article-content ol {
    margin: 20px 0;
    padding-left: 28px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content img {
    display: block;

    max-width: 100%;
    height: auto;

    margin: 35px auto;

    border-radius: 16px;
}

.article-content a {
    color: #0084FF;
}

.article-content blockquote {
    margin: 35px 0;

    padding: 22px 25px;

    border-left: 4px solid #0084FF;

    background: #F8FBFF;

    border-radius: 0 12px 12px 0;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {

    .article-hero {
        padding: 80px 16px 40px;
    }

    .article-excerpt {}

    .article-cover {
        padding: 25px 16px 0;
    }

    .article-cover img {
        border-radius: 16px;
    }

    .article-section {
        padding: 50px 16px 80px;
    }

    .article-content {
        line-height: 1.85;
    }

    .article-content h2 {
        margin-top: 45px;
    }

    .article-content h3 {}

}

/* =========================
   BLOG CARD BOTTOM
========================= */
/* ==================================
   BLOG
================================== */


.blog-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}


/* ==================================
   BLOG HERO
================================== */

.blog-hero {
    padding: 130px 24px 90px;

    background:
        linear-gradient(135deg,
            #F8FBFF 0%,
            #EEF7FF 100%);
}

.blog-hero-content {
    max-width: 850px;
    margin: 0 auto;

    text-align: center;
}

.blog-label {
    display: inline-block;

    margin-bottom: 18px;

    color: #0084FF;

    font-weight: 800;
    letter-spacing: .16em;
}

.blog-hero h1 {
    margin: 0;

    color: #0F172A;
    font-weight: 800;
    line-height: 1.15;
}

.blog-hero h1 span {
    color: #0084FF;
}

.blog-hero p {
    max-width: 700px;

    margin: 25px auto 0;

    color: #64748B;

    line-height: 1.8;
}


/* ==================================
   BLOG MAIN
================================== */

.blog-main {
    padding: 80px 24px 120px;

    background: #fff;
}


/* ==================================
   CATEGORY
================================== */

.blog-category {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 10px;

    margin-bottom: 70px;
}

.blog-filter {
    padding: 10px 18px;

    border: 1px solid #E2E8F0;
    border-radius: 999px;

    background: #fff;
    color: #475569;

    font-weight: 600;

    cursor: pointer;

    transition:
        background .25s ease,
        color .25s ease,
        border-color .25s ease,
        transform .25s ease;
}

.blog-filter:hover {
    border-color: #0084FF;
    color: #0084FF;

    transform: translateY(-2px);
}

.blog-filter.active {
    border-color: #0084FF;

    background: #0084FF;
    color: #fff;
}


/* ==================================
   SECTION HEADING
================================== */

.blog-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 40px;
}

.blog-section-heading span {
    display: block;

    margin-bottom: 8px;

    color: #0084FF;

    font-weight: 800;
    letter-spacing: .16em;
}

.blog-section-heading h2 {
    margin: 0;

    color: #0F172A;

    font-weight: 800;
    line-height: 1.2;
}

.blog-section-heading p {
    margin: 0;

    color: #64748B;

}


/* ==================================
   BLOG GRID
================================== */

.blog-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 30px;
}


/* ==================================
   BLOG CARD
================================== */

.blog-card {
    overflow: hidden;
    border: 1px solid #E8EDF3;
    border-radius: 20px;
    background: #fff;
    transition:
        transform .3s ease,
        box-shadow .3s ease,
        border-color .3s ease;
}

.blog-card:hover {
    transform: translateY(-6px);

    border-color: rgba(0, 132, 255, .2);

    box-shadow:
        0 20px 45px rgba(15, 23, 42, .08);
}

.blog-card h3 {
    font-size: 1.25rem;
}

.blog-card>a {
    display: flex;
    flex-direction: column;

    height: 100%;

    color: inherit;
    text-decoration: none;
}


/* ==================================
   CARD IMAGE
================================== */

.blog-card-image {
    position: relative;

    overflow: hidden;

    width: 100%;
    aspect-ratio: 16 / 10;

    background: #F1F5F9;
}

.blog-card-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .45s ease;
}

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


/* ==================================
   CARD CONTENT
================================== */

.blog-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;

    padding: 25px;
}

.post-category {
    display: inline-block;
    align-self: flex-start;

    margin-bottom: 14px;

    padding: 6px 10px;

    border-radius: 999px;

    background: rgba(0, 132, 255, .08);
    color: #0084FF;

    font-weight: 700;
}

.blog-card-content h3 {
    margin: 0 0 12px;
    color: #0F172A;
    font-size: 16;
    font-weight: 800;
    line-height: 1.45;
    transition: color .25s ease;
}

.blog-card:hover h3 {
    color: #0084FF;
}

.blog-card-content p {
    display: -webkit-box;
    overflow: hidden;

    margin: 0;

    color: #64748B;

    line-height: 1.75;

    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}


/* ==================================
   CARD BOTTOM
================================== */

.blog-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-top: auto;
    padding-top: 24px;
}

.post-date {
    color: #94A3B8;

}

.read-more {
    color: #0084FF;

    font-weight: 700;
}


/* ==================================
   NO POSTS
================================== */

.no-posts {
    grid-column: 1 / -1;

    width: 100%;

    padding: 60px 20px;

    border-radius: 18px;

    background: #F8FAFC;
    color: #64748B;

    text-align: center;

}


/* ==================================
   TABLET
================================== */

@media (max-width: 1000px) {

    .blog-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* ==================================
   MOBILE
================================== */

@media (max-width: 700px) {

    .blog-hero {
        padding: 100px 16px 60px;
    }

    .blog-hero h1 {}

    .blog-hero p {
        margin-top: 20px;

    }


    /* Category */

    .blog-category {
        justify-content: flex-start;
        flex-wrap: nowrap;

        overflow-x: auto;

        margin: 0 -16px 50px;
        padding: 0 16px 8px;

        scrollbar-width: none;
    }

    .blog-category::-webkit-scrollbar {
        display: none;
    }

    .blog-filter {
        flex: 0 0 auto;

        white-space: nowrap;
    }


    /* Main */

    .blog-main {
        padding: 60px 16px 80px;
    }


    /* Heading */

    .blog-section-heading {
        align-items: flex-start;
        flex-direction: column;

        gap: 10px;

        margin-bottom: 30px;
    }

    .blog-section-heading h2 {}


    /* Grid */

    .blog-grid {
        grid-template-columns: 1fr;

        gap: 22px;
    }


    /* Card */

    .blog-card {
        border-radius: 16px;
    }

    .blog-card-content {
        padding: 20px;
    }

    .blog-card-content h3 {
        font-size: 16px;
    }

}


/* =========================
   PAGINATION
========================= */

.blog-pagination {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;

    align-items: center;
    justify-content: center;

    gap: 18px;

    width: 100%;
    margin-top: 60px;
}

.pagination-numbers {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;

    align-items: center;
    justify-content: center;

    gap: 7px;

    width: auto;
}

.pagination-number,
.pagination-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    min-width: 42px;
    height: 42px;

    padding: 0 14px;

    border: 1px solid #E2E8F0;
    border-radius: 10px;

    background: #fff;
    color: #475569;

    font-weight: 700;

    white-space: nowrap;
    text-decoration: none;

    transition: .25s ease;
}

.pagination-number:hover,
.pagination-arrow:hover {
    border-color: #0084FF;
    color: #0084FF;
}

.pagination-number.active {
    border-color: #0084FF;
    background: #0084FF;
    color: #fff;
}


/* MOBILE */

@media (max-width: 700px) {

    .blog-pagination {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px;
        margin-top: 45px;
    }

    .pagination-number {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
    }

    .pagination-arrow {
        min-width: auto;
        height: 38px;
        padding: 0 12px;
        white-space: nowrap;
    }
}


.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;

    margin: 0px 0 12px;

    color: #94a3b8;

}

.blog-card-meta span+span::before {
    content: "•";
    margin-right: 8px;
    color: #cbd5e1;
}


/* =========================
   ARTICLE + TOC
========================= */

.article-section {
    overflow: visible;
}

.article-layout {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 250px minmax(0, 850px);
    gap: 60px;

    align-items: start;

    overflow: visible;
}


/* =========================
   ARTICLE + TOC
========================= */

.article-section {
    padding: 70px 24px 110px;
    background: #fff;
    overflow: visible;
}


/* =========================
   STICKY TOC
========================= */

.article-toc {
    position: sticky;
    top: 110px;

    align-self: start;
    height: fit-content;
}

.article-toc-box {
    max-height: calc(100vh - 140px);
    overflow-y: auto;

    padding: 22px;

    border: 1px solid #E2E8F0;
    border-radius: 16px;

    background: #F8FAFC;
}


/* =========================
   TOC TITLE
========================= */

.toc-title {
    display: block;

    margin-bottom: 14px;

    color: #0F172A;

    font-weight: 700;
}


/* =========================
   TOC NAV
========================= */

.article-toc nav {
    display: flex;
    flex-direction: column;

    gap: 5px;
}

.toc-link {
    display: block;

    padding: 7px 0;

    color: #64748B;

    line-height: 1.5;

    text-decoration: none;

    transition: .2s ease;
}

.toc-link:hover {
    color: #0084FF;
}

.toc-h3 {
    padding-left: 16px;

    color: #94A3B8;

}


/* =========================
   SHARE
========================= */

.article-share {
    position: relative;
    z-index: 2;

    padding: 50px 24px 70px;

    background: #fff;
}

.article-share-inner {
    width: 100%;
    max-width: 850px;

    margin: 0 auto;

    padding-top: 30px;

    border-top: 1px solid #E2E8F0;
}

.share-title {
    display: block;

    margin-bottom: 15px;

    color: #0F172A;

    font-weight: 700;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 0 18px;

    border: 1px solid #E2E8F0;
    border-radius: 999px;

    background: #fff;
    color: #475569;

    font-weight: 700;

    text-decoration: none;

    cursor: pointer;

    transition: .25s ease;
}

.share-btn:hover {
    border-color: #0084FF;
    color: #0084FF;
}


/* =========================
   SCROLL
========================= */

.article-content h2,
.article-content h3 {
    scroll-margin-top: 110px;
}

html {
    scroll-behavior: smooth;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 900px) {

    .article-layout {
        grid-template-columns: 1fr;

        gap: 35px;
    }

    .article-toc {
        position: static;

        height: auto;
    }

    .article-toc-box {
        max-height: none;

        overflow: visible;
    }

}

@media (max-width: 600px) {

    .article-section {
        padding: 50px 16px 70px;
    }

    .article-share {
        padding: 35px 16px 55px;
    }

}


/* =========================
   ARTICLE SHARE
========================= */

.article-share {
    padding: 0 24px 70px;
    background: #fff;
}


/* บทความ อื่นๆ */
/* =========================
   RELATED POSTS
========================= */

.related-posts {
    position: relative;
    z-index: 2;

    padding: 80px 24px 110px;

    background: #F8FAFC;
}

.related-container {
    width: 100%;
    max-width: 1180px;

    margin: 0 auto;
}


/* HEADING */

.related-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 35px;
}

.related-label {
    display: block;

    margin-bottom: 8px;

    color: #0084FF;

    font-weight: 800;

    letter-spacing: .15em;
}

.related-heading h2 {
    margin: 0;

    color: #0F172A;

    line-height: 1.3;
}

.related-all {
    flex-shrink: 0;

    color: #0084FF;

    font-weight: 700;

    text-decoration: none;
}


/* GRID */

.related-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 24px;
}


/* CARD */

.related-card {
    overflow: hidden;

    border: 1px solid #E2E8F0;
    border-radius: 18px;

    background: #fff;

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}

.related-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 18px 40px rgba(15, 23, 42, .08);
}

.related-card-link {
    display: flex;
    flex-direction: column;

    height: 100%;

    color: inherit;

    text-decoration: none;
}


/* IMAGE */

.related-image {
    width: 100%;

    aspect-ratio: 16 / 10;

    overflow: hidden;

    background: #E2E8F0;
}

.related-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .4s ease;
}

.related-card:hover .related-image img {
    transform: scale(1.04);
}


/* CONTENT */

.related-content {
    display: flex;
    flex-direction: column;

    flex: 1;

    padding: 22px;
}

.related-category {
    display: inline-block;

    margin-bottom: 10px;

    color: #0084FF;

    font-weight: 700;
}

.related-content h3 {
    margin: 0 0 12px;

    color: #0F172A;

    line-height: 1.45;
}

.related-content p {
    margin: 0 0 18px;

    color: #64748B;

    line-height: 1.7;
}


/* META */

.related-meta {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: auto;

    color: #94A3B8;

}

.related-meta span+span::before {
    content: "•";

    margin-right: 8px;

    color: #CBD5E1;
}


/* READ MORE */

.related-read-more {
    display: block;

    margin-top: 16px;

    color: #0084FF;

    font-weight: 700;
}


/* =========================
   TABLET
========================= */

@media (max-width: 900px) {

    .related-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    .related-posts {
        padding: 60px 16px 80px;
    }

    .related-heading {
        align-items: flex-start;
        flex-direction: column;

        gap: 12px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

}