:root {
    --blog-bg: #d8f2e5;
    --card-bg: #ffffff;
    --line: #dbe1ea;
    --ink-900: #1f2a37;
    --ink-700: #445164;
    --ink-500: #6f7a89;
    --brand: #0d54b3;
    --brand-2: #0fb9aa;
    --surface: #f7f9fc;
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

body.blog-body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--ink-900);
    background: url('../images/landing/bg.webp') no-repeat top center !important;
    background-size: 100% auto !important;
    background-color: var(--blog-bg) !important;
    min-height: 100vh;
    margin-top: 30px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    text-decoration: none;
    color: inherit;
}

.site-container {
    width: min(96%, 1650px);
    margin: 0 auto;
}

 

.blog-hero {
height: 365px;
    border-radius: 15px;
    background: radial-gradient(circle at 20% 24%, rgba(255, 255, 255, 0.16), transparent 30%), radial-gradient(circle at 74% 20%, rgba(255, 255, 255, 0.16), transparent 26%), linear-gradient(120deg, #ffffff, #00bf9c 55%, #004f41);
    color: #fff;
    display: grid;
    padding: 60px 0px;
    place-items: center;
    text-align: center;
    overflow: hidden;
    justify-content: center;
    align-content: space-evenly;
}

.blog-hero h1 {
    margin: 0;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.05em;
    font-size: clamp(80px, 13vw, 145px);
    line-height: 0.9;
}

.blog-hero p {
    margin: -8px 0 0;
    font-size: clamp(20px, 2vw, 30px);
    font-weight: 700;
}

.blog-toolbar {
    display: grid;
    grid-template-columns: 1fr minmax(270px, 380px);
    gap: 20px;
    align-items: center;
    padding: 16px 0 12px;
}

.blog-toolbar.compact {
    padding-top: 16px;
}

.category-scroller {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.category-tab {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    color: #4f5c6f;
    font-weight: 700;
    margin-right: 20px;
    padding: 10px 0 8px;
    border-bottom: 2px solid transparent;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.category-tab:hover,
.category-tab.active {
    color: var(--brand-2);
    border-color: var(--brand-2);
}

.blog-search {
    margin: 0;
}

.search-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #cfd7e3;
    background: #fff;
    border-radius: 10px;
    height: 46px;
    box-shadow: 0 2px 8px rgba(15, 33, 56, 0.04);
}

.search-wrap:focus-within {
    border-color: #7baeed;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.search-icon {
    width: 44px;
    display: inline-grid;
    place-items: center;
    color: #68809b;
}

.search-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
}

.search-wrap input {
    flex: 1;
    border: 0;
    outline: none;
    height: 100%;
    font-size: 14px;
    color: #1f2a37;
    background: transparent;
    min-width: 0;
}

.search-wrap input::placeholder {
    color: #8492a5;
}

.search-wrap button {
    border: 0;
    border-left: 1px solid #e4e9f1;
    background: #f7fbff;
    color: #1559aa;
    font-weight: 700;
    height: 100%;
    padding: 0 14px;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
}

.search-wrap button:hover {
    background: #eef5ff;
}

.toolbar-meta-row {
    padding-bottom: 10px;
}

.toolbar-meta-row p {
    margin: 0;
    font-size: 13px;
    color: #5e6b7d;
    font-weight: 600;
}

.blog-main-grid {
      display: grid;
    background: #f2fffc;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    padding: 30px 30px;
}

.blog-card {
    background: var(--card-bg); 
    border-radius: 2px;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(13, 28, 48, 0.1);
    border-color: #c8d4e4;
}

.blog-card-image-wrap {
    display: block;
    aspect-ratio: 16 / 9;
    background: #0e2c68;
    overflow: hidden;
}

.blog-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.32s ease;
}

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

.blog-card-image-fallback,
.recent-image-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, #0d2f6d, #0e4d9e);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.blog-card-body {
    padding: 14px 16px 15px;
}

.blog-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.blog-card-author {
    display: flex;
    gap: 9px;
    align-items: center;
    min-width: 0;
}

.author-dot,
.comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: #8f9bab;
    flex-shrink: 0;
}

.author-name {
    margin: 0;
    font-size: 12px;
    color: #667484;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}

.author-meta {
    margin: 1px 0 0;
    font-size: 12px;
    color: #7c8797;
}

.blog-card-title {
    margin: 14px 0 9px;
    font-size: clamp(24px, 2.1vw, 45px);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 86px;
}

.blog-card-title a:hover {
    color: #007a43;
}

.blog-card-excerpt {
    margin: 0;
    color: #4b5a6d;
    font-size: 15px;
    line-height: 1.55;
    min-height: 92px;
}

.blog-card-footer {
    margin-top: 14px;
    border-top: 1px solid #ecf0f5;
    padding-top: 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.card-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #5d6a79;
    font-size: 12px;
    font-weight: 600;
}

.stat-pill svg {
    width: 14px;
    height: 14px;
    fill: none;
}

.read-link {
    color: #008348;
    font-size: 14px;
    font-weight: 800;
}

.read-link:hover {
    color: #0d4a92;
}

.share-wrap {
    position: relative;
    flex-shrink: 0;
}

.share-toggle {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
}

.share-toggle:hover {
    background: #f0f4f9;
}

.share-toggle span {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #3f4a57;
}

.share-menu {
    position: absolute;
    top: 34px;
    right: 0;
    min-width: 160px;
    border: 1px solid #d8dfe9;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 26px rgba(15, 30, 47, 0.12);
    padding: 6px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 7;
}

.share-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.share-copy {
    width: 100%;
    border: 0;
    border-radius: 6px;
    text-align: left;
    background: transparent;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #324356;
    cursor: pointer;
}

.share-copy:hover {
    background: #eef4fb;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    border: 1px dashed #bac5d3;
    border-radius: var(--radius);
    background: #fff;
    padding: 48px 26px;
}

.empty-state h2,
.empty-state h1 {
    margin: 0;
    font-size: 30px;
}

.empty-state p {
    margin: 10px 0 0;
    color: #5d6979;
}

.pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 2px 0 44px;
}

.page-btn,
.page-number {
    border: 1px solid #ccd6e4;
    background: #fff;
    color: #28548a;
    font-weight: 700;
    min-width: 42px;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.page-btn:hover,
.page-number:hover {
    border-color: #95bae5;
    background: #eef5ff;
}

.page-btn.disabled {
    opacity: 0.42;
    pointer-events: none;
}

.page-number-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.page-number.active {
    border-color: #1a65c0;
    background: #1a65c0;
    color: #fff;
}

.detail-shell {
    max-width: 1080px;
    padding-bottom: 48px;
}

.blog-detail-card,
.recent-block,
.comments-block {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 4px;
}

.blog-detail-card {
    padding: 30px;
}

.detail-top {
    margin-bottom: 10px;
}

.copy-post-link {
    border: 1px solid #ccd8e6;
    background: #f7fbff;
    color: #1a5dae;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.copy-post-link:hover {
    background: #edf5ff;
}

.blog-detail-title {
    margin: 0 0 22px;
    line-height: 1.12;
    font-size: clamp(34px, 4vw, 58px);
    letter-spacing: -0.01em;
}

.detail-cover-wrap {
    margin: 0;
    border: 1px solid #d9dfeb;
    background: #f0f4fa;
    border-radius: 4px;
    overflow: hidden;
}

.detail-cover {
    width: 100%;
    display: block;
    max-height: 560px;
    object-fit: cover;
}

.blog-content {
    margin-top: 22px;
    color: #243244;
    font-size: 18px;
    line-height: 1.75;
}

.blog-content h2,
.blog-content h3,
.blog-content h4 {
    margin: 22px 0 10px;
    line-height: 1.22;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #d7deea;
}

.blog-content a {
    color: #0f64c5;
    text-decoration: underline;
}

.blog-content ul,
.blog-content ol {
    padding-left: 22px;
}

.tag-wrap {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-pill {
    border: 1px solid #d7dfea;
    background: #f6faff;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #415366;
}

.detail-meta-row {
    margin-top: 20px;
    border-top: 1px solid #edf1f6;
    padding-top: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.meta-link {
    color: #0f62be;
    font-weight: 800;
}

.comments-block {
    margin-top: 18px;
    padding: 20px;
}

.comments-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.comments-head h2 {
    margin: 0;
    font-size: 24px;
}

.comments-head span {
    font-size: 14px;
    font-weight: 700;
    color: #58667a;
}

.comment-alert {
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}

.comment-alert.success {
    border: 1px solid #a8e4c6;
    background: #ecfdf5;
    color: #166a4a;
}

.comment-alert.error {
    border: 1px solid #ffc7c7;
    background: #fff2f2;
    color: #9f2020;
}

.comment-form {
    border: 1px solid #e2e8f1;
    border-radius: 10px;
    padding: 14px;
    background: #fafcff;
}

.comment-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    border: 1px solid #d3dbe7;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: #1f2d41;
    font-family: inherit;
    outline: none;
    background: #fff;
}

.comment-form textarea {
    margin-top: 10px;
    resize: vertical;
    min-height: 110px;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #80afe6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.comment-form button {
    margin-top: 10px;
    border: 0;
    background: #1a66c1;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.comment-form button:hover {
    background: #1458a8;
}

.comment-list {
    margin-top: 14px;
}

.no-comments {
    margin: 0;
    color: #607186;
    font-size: 14px;
}

.comment-item {
    border-top: 1px solid #edf1f6;
    padding: 14px 0;
    display: flex;
    gap: 10px;
}

.comment-item:first-child {
    border-top: 0;
    padding-top: 4px;
}

.comment-author {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #2b3b4e;
}

.comment-time {
    margin: 2px 0 6px;
    font-size: 12px;
    color: #798596;
}

.comment-text {
    margin: 0;
    font-size: 15px;
    color: #334459;
    line-height: 1.6;
}

.recent-block {
    margin-top: 20px;
    padding: 20px;
}

.recent-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.recent-head h2 {
    margin: 0;
    font-size: 24px;
}

.recent-head a {
    color: #0f62bc;
    font-size: 13px;
    font-weight: 700;
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.recent-card {
    border: 1px solid #dfe6f1;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.recent-image-wrap {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.recent-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.recent-body {
    padding: 12px;
}

.recent-body h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.22;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-body p {
    margin: 9px 0;
    font-size: 14px;
    color: #49586d;
    line-height: 1.52;
    min-height: 42px;
}

.recent-meta {
    font-size: 12px;
    color: #707e90;
}

.recent-stats {
    margin-top: 8px;
}

.detail-empty {
    margin-top: 20px;
}

.back-link {
    margin-top: 14px;
    display: inline-flex;
    border: 1px solid #cad5e4;
    padding: 9px 14px;
    border-radius: 8px;
    font-weight: 700;
    color: #1658a3;
}

.reveal-card {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.42s ease, transform 0.42s ease;
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.blog-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1200;
    background: #17365a;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.blog-toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1440px) {
    .blog-main-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .blog-toolbar {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .blog-search {
        max-width: 420px;
    }

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

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

@media (max-width: 760px) {
    .site-container {
        width: min(95%, 600px);
    }

    .blog-hero {
        height: 210px;
    }

    .blog-hero p {
        margin-top: -4px;
        font-size: clamp(17px, 4.4vw, 26px);
    }

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

    .blog-card-title {
        min-height: 0;
    }

    .blog-card-excerpt {
        min-height: 0;
    }

    .pagination-wrap {
        flex-wrap: wrap;
    }

    .detail-shell {
        width: min(95%, 700px);
    }

    .blog-detail-card,
    .comments-block,
    .recent-block {
        padding: 16px;
    }

    .comment-form-grid {
        grid-template-columns: 1fr;
    }

    .detail-meta-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal-card {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .blog-card,
    .blog-card-image,
    .category-tab,
    .share-menu,
    .search-wrap,
    .page-btn,
    .page-number {
        transition: none;
    }
}
