/* =============================================
   FONTSHARE — BLOG STYLES (Complete)
   ============================================= */
/* =============================================
   Custom (overrides — base styles ở style.css)
   ============================================= */
.gfd-select option {
    background: #16161b;
    border: none;
    border-block-color: #16161b;
}
.search-header-inner {
    max-width: 1200px;
}
span.cat-count {
    color: #f59e0b;
}

/* --- Overrides ---
   Các selector bên dưới đã có định nghĩa gốc trong style.css.
   Blog chỉ ghi đè những thuộc tính khác biệt so với style.css.
   ---------------------------------------------------------------- */

/* .gfd-glyphs-style-bar trong style.css: padding: 20px 0 4px
   Blog dùng padding đều cả trên-dưới hơn. */
.gfd-glyphs-style-bar {
    padding: 20px 0 20px;
}

/* .gfd-styles-shared-dl và --multi trong style.css có full layout/color.
   Blog cần thêm khoảng cách trên (margin-top). */
.gfd-styles-shared-dl {
    margin-top: 20px;
}
.gfd-styles-shared-dl--multi {
    margin-top: 20px;
}

/* .header-logo img trong style.css: max-width: 60px
   Blog dùng logo nhỏ hơn (50px). */
.blog-layout .header-logo img,
.post-layout .header-logo img,
.page-layout .header-logo img {
    max-width: 50px;
}

/* .gfd-page trong style.css: padding: 0 0 80px
   Blog cần padding-bottom lớn hơn (100px). */
.gfd-page {
    padding: 0 0 100px;
}
/* =============================================
   BLOG LAYOUT (danh sách & single)
   ============================================= */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 40px 80px;
}

.blog-main { min-width: 0; }

/* =============================================
   BLOG HERO
   ============================================= */
.blog-hero {
    padding: 64px 40px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -150px; left: 50%;
    transform: translateX(-50%);
    width: 700px; height: 500px;
    background: radial-gradient(ellipse, rgba(108,99,255,.1) 0%, transparent 70%);
    pointer-events: none;
}

.blog-hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(108,99,255,.12);
    border: 1px solid rgba(108,99,255,.25);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 20px;
    letter-spacing: .5px;
}

.blog-hero-title {
    font-size: clamp(32px, 5vw, 60px);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 14px;
}

.blog-hero-title .accent {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-hero-subtitle {
    font-size: 17px;
    color: var(--color-text-muted);
    max-width: 520px;
    margin: 0 auto;
}

/* =============================================
   FILTER BAR (trang blog)
   ============================================= */
.blog-filter-bar {
    border-bottom: 1px solid var(--color-border);
    background: rgba(17,17,24,.6);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 68px;
    z-index: 40;
}

.blog-filter-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}
.blog-filter-inner::-webkit-scrollbar { display: none; }

.blog-cats {
    display: flex;
    gap: 4px;
    flex: 1;
    padding: 10px 0;
    overflow-x: auto;
}

.blog-cat-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    white-space: nowrap;
    transition: var(--transition);
}

.blog-cat-tag:hover  { color: var(--color-text); background: var(--color-surface-2); }
.blog-cat-tag.active { background: var(--color-accent); color: #fff; }
.blog-cat-tag span   { font-size: 11px; opacity: .7; }
.blog-sort { flex-shrink: 0; }

/* =============================================
   POST GRID
   ============================================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* =============================================
   POST CARD (danh sách blog)
   ============================================= */
.post-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    animation: fadeInUp .4s ease both;
}

.post-card:hover {
    border-color: rgba(108,99,255,.35);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.post-card--sticky { border-color: rgba(255,183,77,.3); }

.post-card-thumb {
    display: block;
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--color-surface-2);
}

.post-card-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.post-card:hover .post-card-thumb img { transform: scale(1.04); }

.post-card-thumb--no-img { aspect-ratio: 16/9; }

.post-card-no-img {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-surface-2), var(--color-border));
}

.post-card-no-img span {
    font-size: 48px;
    font-weight: 900;
    color: var(--color-text-dim);
    line-height: 1;
}

.post-card-cat {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--color-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 3px 10px;
    border-radius: 100px;
}

.post-card-sticky-badge {
    position: absolute;
    top: 12px; right: 12px;
    font-size: 16px;
}

.post-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.post-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

.post-card-title a { color: var(--color-text); transition: var(--transition); }
.post-card-title a:hover { color: var(--color-accent); }
.post-card-title--sm { font-size: 14px; }

.post-card-excerpt {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.7;
    flex: 1;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    gap: 8px;
    font-size: 12px;
    color: var(--color-text-dim);
}

.post-card-author { display: flex; align-items: center; gap: 6px; }

.post-card-avatar {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50%;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.post-card--small .post-card-thumb { aspect-ratio: 16/9; }

/* =============================================
   FEATURED POST (trang blog listing)
   ============================================= */
.blog-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 32px;
}

.blog-featured-img {
    display: block;
    position: relative;
    overflow: hidden;
    min-height: 280px;
}

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

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

.blog-featured-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to right, transparent 60%, var(--color-surface));
}

.blog-featured-body {
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

.blog-featured-meta { display: flex; align-items: center; gap: 10px; }

.post-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.post-badge--featured {
    background: rgba(255,183,77,.15);
    color: #ffb74d;
    border: 1px solid rgba(255,183,77,.3);
}

.post-cat-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: .8px;
}

.blog-featured-title {
    font-size: clamp(18px, 2vw, 26px);
    font-weight: 800;
    letter-spacing: -.5px;
    line-height: 1.3;
}

.blog-featured-title a { color: var(--color-text); transition: var(--transition); }
.blog-featured-title a:hover { color: var(--color-accent); }

.blog-featured-excerpt { font-size: 14px; color: var(--color-text-muted); line-height: 1.7; }

.post-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-dim);
    flex-wrap: wrap;
}

.author-avatar  { width: 28px !important; height: 28px !important; border-radius: 50%; }
.author-name    { color: var(--color-text-muted); font-weight: 500; }
.meta-dot       { color: var(--color-text-dim); }
.read-time      { color: var(--color-text-dim); }

/* =============================================
   SINGLE POST LAYOUT
   ============================================= */
.post-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 40px 80px;
    align-items: start;
}

.post-main { min-width: 0; }

/* Breadcrumb */
.post-breadcrumb {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.post-breadcrumb-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-dim);
    flex-wrap: wrap;
}

.post-breadcrumb-inner a { color: var(--color-text-muted); transition: var(--transition); }
.post-breadcrumb-inner a:hover { color: var(--color-accent); }

/* Post header */
.post-header { margin-bottom: 32px; }

.post-cats-row { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

.post-cat-badge {
    padding: 4px 12px;
    background: rgba(108,99,255,.12);
    border: 1px solid rgba(108,99,255,.25);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: .8px;
    transition: var(--transition);
}

.post-cat-badge:hover { background: var(--color-accent); color: #fff; }

.post-title {
    font-size: clamp(26px, 4vw, 44px);
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1.15;
    margin-bottom: 16px;
}

.post-excerpt {
    font-size: 18px;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
    border-left: 3px solid var(--color-accent);
    padding-left: 18px;
}

.post-header-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.post-author-card { display: flex; align-items: center; gap: 12px; }

.author-avatar-lg { width: 44px !important; height: 44px !important; border-radius: 50%; }

.author-name-lg { font-weight: 700; font-size: 15px; }
.author-name-lg a { color: var(--color-text); }
.author-name-lg a:hover { color: var(--color-accent); }

.post-meta-items {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--color-text-dim);
    flex-wrap: wrap;
}

/* Thumbnail */
.post-thumbnail-wrap {
    margin-bottom: 36px;
    border-radius: var(--radius);
    overflow: hidden;
}

.post-thumbnail-img { width: 100%; height: auto; display: block; }

.post-thumbnail-caption {
    text-align: center;
    font-size: 13px;
    color: var(--color-text-dim);
    padding: 10px;
    background: var(--color-surface-2);
    font-style: italic;
}

/* =============================================
   TABLE OF CONTENTS
   ============================================= */
.post-toc {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-accent);
    border-radius: var(--radius-sm);
    margin-bottom: 32px;
    overflow: hidden;
}

.toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    background: var(--color-surface-2);
}

.toc-toggle {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    transition: var(--transition);
}

.toc-toggle svg { transition: transform .25s; }

.toc-nav { padding: 12px 18px 16px; }

.toc-nav ol {
    list-style: none;
    counter-reset: toc;
    padding: 0; margin: 0;
}

.toc-item { counter-increment: toc; margin: 2px 0; }

.toc-item a {
    display: block;
    font-size: 13px;
    color: var(--color-text-muted);
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition);
    line-height: 1.5;
}

.toc-item a::before { content: counter(toc) '. '; color: var(--color-text-dim); font-size: 11px; }
.toc-item a:hover, .toc-item a.active { color: var(--color-accent); background: rgba(108,99,255,.08); }
.toc-h3 { padding-left: 16px; }
.toc-h3 a::before { content: '↳ '; }

/* =============================================
   POST CONTENT TYPOGRAPHY
   ============================================= */
.post-content {
    font-size: 17px;
    line-height: 1.85;
    color: var(--color-text);
    margin-bottom: 40px;
}

.post-content > * + * { margin-top: 1.25em; }

.post-content h2 {
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 800;
    letter-spacing: -.5px;
    margin-top: 2.5em;
    margin-bottom: .6em;
    padding-bottom: .4em;
    border-bottom: 1px solid var(--color-border);
}

.post-content h3 {
    font-size: clamp(17px, 2vw, 22px);
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: .5em;
}

.post-content h4 { font-size: 17px; font-weight: 700; margin-top: 1.5em; }

.post-content a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: var(--transition);
}

.post-content a:hover { color: #8b84ff; }
.post-content strong { font-weight: 700; }
.post-content em { font-style: italic; color: var(--color-text-muted); }

.post-content ul,
.post-content ol { padding-left: 1.6em; margin: 1em 0; }

.post-content li { margin-bottom: .4em; line-height: 1.7; }
.post-content ul li::marker { color: var(--color-accent); }

.post-content blockquote {
    border-left: 4px solid var(--color-accent);
    margin: 2em 0;
    padding: 16px 24px;
    background: var(--color-surface);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    font-size: 18px;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.post-content blockquote cite {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: var(--color-text-dim);
    font-style: normal;
}

.post-content code {
    font-family: var(--font-mono);
    font-size: 14px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 2px 7px;
    color: var(--color-accent-2);
}

.post-content pre {
    background: #0d0d14;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    overflow-x: auto;
    margin: 1.5em 0;
    font-size: 14px;
    line-height: 1.7;
}

.post-content pre code { background: none; border: none; padding: 0; color: #e8e8f0; }

.post-content img {
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
    max-width: 100%;
}

.post-content figure { margin: 2em 0; }

.post-content figcaption {
    text-align: center;
    font-size: 13px;
    color: var(--color-text-dim);
    margin-top: 8px;
    font-style: italic;
}

.post-content hr { border: none; border-top: 1px solid var(--color-border); margin: 2.5em 0; }

.post-content table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 1.5em 0; }
.post-content th { background: var(--color-surface-2); padding: 10px 14px; font-weight: 700; border: 1px solid var(--color-border); text-align: left; }
.post-content td { padding: 10px 14px; border: 1px solid var(--color-border); color: var(--color-text-muted); }
.post-content tr:nth-child(even) td { background: rgba(255,255,255,.02); }

/* =============================================
   POST TAGS
   ============================================= */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 32px;
    padding: 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.tags-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: .8px;
    flex-shrink: 0;
}

/* =============================================
   SHARE BUTTONS
   ============================================= */
.share-buttons { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-muted);
    cursor: pointer;
    text-decoration: none;
}

.share-btn:hover { transform: translateY(-1px); }
.share-btn--fb:hover   { background: #1877f2; border-color: #1877f2; color: #fff; }
.share-btn--tw:hover   { background: #000; border-color: #000; color: #fff; }
.share-btn--li:hover   { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.share-btn--copy:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

.post-share-bottom { border-top: 1px solid var(--color-border); padding-top: 28px; margin-bottom: 40px; }
.share-cta { font-size: 15px; color: var(--color-text-muted); margin-bottom: 16px; font-weight: 500; }

/* =============================================
   AUTHOR BOX
   ============================================= */
.author-box {
    display: flex;
    gap: 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.author-box-avatar { border-radius: 50%; flex-shrink: 0; }
.author-box-name { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.author-box-name a { color: var(--color-text); }
.author-box-name a:hover { color: var(--color-accent); }
.author-box-bio { font-size: 14px; color: var(--color-text-muted); line-height: 1.7; margin-bottom: 12px; }
.author-box-link { font-size: 13px; color: var(--color-accent); font-weight: 600; }
.author-box-link:hover { color: #8b84ff; }

/* =============================================
   POST NAV (prev / next)
   ============================================= */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 48px;
}

.post-nav-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: var(--transition);
}

.post-nav-item:hover { border-color: var(--color-accent); }
.post-nav-next { text-align: right; }
.nav-dir   { font-size: 12px; color: var(--color-text-dim); text-transform: uppercase; letter-spacing: .8px; }
.nav-title { font-size: 14px; font-weight: 600; color: var(--color-text); line-height: 1.4; }

/* =============================================
   RELATED POSTS
   ============================================= */
.related-posts { margin-bottom: 48px; }

.section-heading {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.5px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* =============================================
   READING PROGRESS BAR
   ============================================= */
.reading-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2));
    width: 0%;
    z-index: 9999;
    transition: width .1s linear;
}

/* =============================================
   BACK TO TOP
   ============================================= */
.back-to-top {
    position: fixed;
    bottom: 32px; right: 32px;
    width: 44px; height: 44px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition);
    z-index: 200;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
}

.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* =============================================
   COMMENTS
   ============================================= */
.comments-area { margin-top: 48px; }

.comments-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.comments-title span { color: var(--color-accent); margin-right: 4px; }

.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 48px; }
.comment-item { margin-bottom: 20px; }

.comment-body {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    transition: var(--transition);
}

.comment-body:hover { border-color: rgba(108,99,255,.25); }

.comment-author-info { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.comment-avatar { border-radius: 50%; }

.comment-author-name {
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-author-badge {
    font-size: 10px;
    padding: 2px 8px;
    background: rgba(108,99,255,.15);
    color: var(--color-accent);
    border-radius: 100px;
    font-weight: 600;
    text-transform: uppercase;
}

.comment-time { font-size: 12px; color: var(--color-text-dim); }
.comment-text { font-size: 14px; color: var(--color-text-muted); line-height: 1.7; }
.comment-actions { display: flex; gap: 12px; margin-top: 12px; }
.comment-reply a, .comment-edit a { font-size: 12px; color: var(--color-text-dim); font-weight: 600; transition: var(--transition); }
.comment-reply a:hover { color: var(--color-accent); }
.comment-pending { font-size: 13px; color: #ffb74d; margin-bottom: 8px; }

/* Comment form */
.comment-form { margin-top: 36px; }

.comment-form label { display: block; font-size: 13px; font-weight: 700; color: var(--color-text-muted); margin-bottom: 6px; }
.comment-form label span { color: var(--color-accent-2); }

.comment-fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.comment-field { margin-bottom: 16px; }
.comment-field--checkbox { margin-top: -4px; }
.comment-field--checkbox label { display: flex; align-items: center; gap: 8px; font-weight: normal; }
.comment-field--checkbox input { margin: 0; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: 9px;
    color: var(--color-text);
    font-size: 14px;
    font-family: var(--font-ui);
    outline: none;
    resize: vertical;
    transition: var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(108,99,255,.12); }

.btn-comment-submit {
    padding: 11px 24px;
    background: linear-gradient(135deg, var(--color-accent), #8b5cf6);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    font-family: var(--font-ui);
    transition: var(--transition);
}

.btn-comment-submit:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(108,99,255,.4); }

/* =============================================
   SIDEBAR
   ============================================= */
.blog-sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 24px; }

.sidebar-widget {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
}

.widget-heading {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

/* Sidebar search */
.sidebar-search { display: flex; gap: 8px; }

.sidebar-search input {
    flex: 1;
    padding: 9px 12px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    font-size: 14px;
    font-family: var(--font-ui);
    outline: none;
    transition: var(--transition);
}

.sidebar-search input:focus { border-color: var(--color-accent); }

.sidebar-search button {
    padding: 9px 12px;
    background: var(--color-accent);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.sidebar-search button:hover { background: #7c75ff; }

/* Popular posts */
.popular-posts { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }

.popular-post-item { display: flex; align-items: flex-start; gap: 10px; }

.popular-num {
    width: 22px; height: 22px;
    background: var(--color-surface-2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: var(--color-text-dim);
    flex-shrink: 0;
    margin-top: 2px;
}

.popular-post-item:first-child .popular-num { background: var(--color-accent); color: #fff; }
.popular-post-item:nth-child(2) .popular-num { background: rgba(108,99,255,.2); color: var(--color-accent); }

.popular-post-body { display: flex; gap: 8px; align-items: flex-start; flex: 1; }

.popular-post-thumb { flex-shrink: 0; border-radius: 6px; overflow: hidden; }
.popular-post-thumb img { width: 56px; height: 56px; object-fit: cover; display: block; }

.popular-post-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.45;
    display: block;
    margin-bottom: 4px;
    transition: var(--transition);
}

.popular-post-title:hover { color: var(--color-accent); }
.popular-post-meta { font-size: 11px; color: var(--color-text-dim); }

/* Recent posts */
.recent-posts { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.recent-post-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition);
}

.recent-post-link:hover .recent-title { color: var(--color-accent); }
.recent-thumb { border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.recent-thumb img { width: 48px; height: 48px; object-fit: cover; display: block; }
.recent-text { display: flex; flex-direction: column; gap: 2px; }
.recent-title { font-size: 13px; font-weight: 600; color: var(--color-text); line-height: 1.4; transition: var(--transition); }
.recent-date  { font-size: 11px; color: var(--color-text-dim); }

/* Sidebar categories */
.sidebar-cats { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 2px; }

.sidebar-cat-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--color-text-muted);
    transition: var(--transition);
}

.sidebar-cat-link:hover { background: var(--color-surface-2); color: var(--color-text); }
.sidebar-cat-link .cat-count { font-size: 12px; color: var(--color-text-dim); }

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

.tag-cloud-item {
    padding: 4px 12px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    color: var(--color-text-muted);
    font-size: 12px;
    transition: var(--transition);
}

.tag-cloud-item:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* Sidebar fonts */
.sidebar-fonts { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.sidebar-font-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition);
}

.sidebar-font-link:hover .sidebar-font-name { color: var(--color-accent); }

.sidebar-font-thumb { border-radius: 4px; overflow: hidden; background: var(--color-surface-2); }
.sidebar-font-thumb img { width: 56px; height: 32px; object-fit: cover; display: block; }
.sidebar-font-info { display: flex; flex-direction: column; gap: 2px; }
.sidebar-font-name { font-size: 13px; font-weight: 600; color: var(--color-text); transition: var(--transition); }
.sidebar-font-dl   { font-size: 11px; color: var(--color-text-dim); }

.sidebar-view-all {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    color: var(--color-accent);
    font-weight: 600;
    padding: 8px;
    border-radius: 8px;
    background: rgba(108,99,255,.08);
    transition: var(--transition);
}

.sidebar-view-all:hover { background: rgba(108,99,255,.15); }

/* =============================================
   ARCHIVE PAGE HEADER
   ============================================= */
.archive-page-header { padding: 48px 40px 36px; border-bottom: 1px solid var(--color-border); }
.archive-page-header-inner { max-width: 1280px; margin: 0 auto; }

.archive-type-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-dim);
    margin-bottom: 12px;
}

.archive-page-title { font-size: clamp(28px, 4vw, 44px); font-weight: 900; letter-spacing: -1.5px; margin-bottom: 10px; }
.archive-page-desc  { font-size: 16px; color: var(--color-text-muted); margin-bottom: 12px; }
.archive-count      { font-size: 14px; color: var(--color-text-dim); }

.archive-author-hero  { display: flex; gap: 20px; align-items: flex-start; }
.archive-author-avatar { border-radius: 50%; flex-shrink: 0; }
.archive-author-meta  { display: flex; gap: 16px; align-items: center; margin-top: 8px; font-size: 14px; color: var(--color-text-dim); }
.author-website-link  { color: var(--color-accent); font-weight: 600; }

/* =============================================
   SEARCH PAGE
   ============================================= */
.search-header { padding: 52px 40px 40px; border-bottom: 1px solid var(--color-border); }
.search-header-inner { max-width: 1280px; margin: 0 auto; }

.search-title { font-size: clamp(24px, 3.5vw, 38px); font-weight: 900; letter-spacing: -1px; margin-bottom: 10px; }
.search-title span { color: var(--color-accent); }
.search-count { font-size: 15px; color: var(--color-text-muted); margin-bottom: 24px; }

.search-form-large { display: flex; gap: 12px; max-width: 640px; }

.search-input-large {
    flex: 1;
    padding: 12px 18px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text);
    font-size: 16px;
    font-family: var(--font-ui);
    outline: none;
    transition: var(--transition);
}

.search-input-large:focus { border-color: var(--color-accent); }

.search-btn-large {
    padding: 12px 20px;
    background: var(--color-accent);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-ui);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: var(--transition);
}

.search-btn-large:hover { background: #7c75ff; }

.search-tabs { display: flex; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; }

.search-tab {
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.search-tab span { font-size: 11px; opacity: .7; }
.search-tab.active, .search-tab:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

/* =============================================
   STATIC PAGE
   ============================================= */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 40px 80px;
    align-items: start;
}

.page-main { min-width: 0; }

.page-header { margin-bottom: 32px; border-bottom: 1px solid var(--color-border); padding-bottom: 20px; }
.page-title { font-size: clamp(28px, 4vw, 44px); font-weight: 900; letter-spacing: -1.5px; margin-bottom: 16px; }
.page-thumbnail { margin-top: 20px; border-radius: var(--radius); overflow: hidden; }
.page-thumbnail-img { width: 100%; height: auto; }
.page-content { font-size: 16px; line-height: 1.85; }

/* =============================================
   HOMEPAGE BLOG SECTION
   ============================================= */
.homepage-blog-section {
    padding: 64px 40px 80px;
    border-top: 1px solid var(--color-border);
    background: linear-gradient(180deg, transparent, rgba(108,99,255,.03) 50%, transparent);
}

.homepage-blog-inner { max-width: 1200px; margin: 0 auto; }

.homepage-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.homepage-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--color-accent);
    background: rgba(108,99,255,.1);
    border: 1px solid rgba(108,99,255,.2);
    border-radius: 100px;
    padding: 4px 14px;
    margin-bottom: 12px;
}

.homepage-section-title {
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 6px;
}

.homepage-section-sub { font-size: 14px; color: var(--color-text-muted); }

.homepage-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    padding: 9px 18px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition);
}

.homepage-view-all:hover { border-color: var(--color-accent); color: var(--color-accent); background: rgba(108,99,255,.06); }

/* Blog grid: 1 featured bên trái + 3 small bên phải */
.homepage-blog-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    grid-template-rows: repeat(3, auto);
    gap: 20px;
    margin-bottom: 32px;
}

/* Featured: chiếm cả chiều cao cột trái */
.hp-post--featured {
    grid-row: 1 / span 3;
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.hp-post--featured:hover {
    border-color: rgba(108,99,255,.35);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.hp-post-img--featured {
    display: block;
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--color-surface-2);
}

.hp-post-img--featured img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.hp-post--featured:hover .hp-post-img--featured img { transform: scale(1.04); }

.hp-post-img-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(10,10,15,.55), transparent 55%);
}

/* Small posts: card ngang */
.hp-post--small {
    display: flex;
    gap: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
    align-items: stretch;
}

.hp-post--small:hover {
    border-color: rgba(108,99,255,.3);
    transform: translateX(3px);
    box-shadow: 0 4px 20px rgba(108,99,255,.1);
}

.hp-post-img--small {
    display: block;
    width: 100px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--color-surface-2);
}

.hp-post-img--small img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.hp-post--small:hover .hp-post-img--small img { transform: scale(1.07); }

/* Post body chung */
.hp-post-body {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.hp-post-body--small {
    padding: 14px 16px;
    justify-content: center;
    gap: 8px;
}

/* Category pill */
.hp-post-cat {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .9px;
    color: var(--color-accent);
    background: rgba(108,99,255,.1);
    border: 1px solid rgba(108,99,255,.2);
    padding: 3px 10px;
    border-radius: 100px;
    width: fit-content;
    transition: var(--transition);
}

.hp-post-cat:hover { background: var(--color-accent); color: #fff; }

/* Titles */
.hp-post-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

.hp-post-title--featured {
    font-size: clamp(18px, 2.2vw, 24px);
    letter-spacing: -.4px;
}

.hp-post-title a { color: var(--color-text); transition: var(--transition); }
.hp-post-title a:hover { color: var(--color-accent); }

/* Excerpt (featured only) */
.hp-post-excerpt {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta row */
.hp-post-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-text-dim);
    flex-wrap: wrap;
    margin-top: auto;
}

.hp-avatar { width: 24px !important; height: 24px !important; border-radius: 50%; }
.hp-author { color: var(--color-text-muted); font-weight: 500; font-size: 12px; }

/* Footer CTA */
.homepage-blog-footer { text-align: center; }

.btn-blog-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 28px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-muted);
    transition: var(--transition);
}

.btn-blog-more:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(108,99,255,.06);
    transform: translateY(-1px);
}

/* =============================================
   EMPTY STATE
   ============================================= */
.no-posts { text-align: center; padding: 80px 20px; color: var(--color-text-dim); }
.no-posts h3 { font-size: 20px; margin-bottom: 8px; color: var(--color-text-muted); }
.no-posts p  { font-size: 14px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
    .homepage-blog-grid { grid-template-columns: 1fr 1fr; }
    .hp-post--featured   { grid-row: auto; }
}

@media (max-width: 1024px) {
    .blog-layout,
    .post-layout,
    .page-layout    { grid-template-columns: 1fr; }
    .blog-sidebar   { position: static; }
    .related-grid   { grid-template-columns: 1fr 1fr; }
    .blog-featured  { grid-template-columns: 1fr; }
    .blog-featured-overlay { display: none; }
}

@media (max-width: 768px) {
    .blog-layout,
    .post-layout,
    .page-layout { padding: 24px 20px 60px; }

    .blog-hero,
    .homepage-blog-section { padding-left: 20px; padding-right: 20px; }

    .blog-filter-inner,
    .search-header,
    .archive-page-header,
    .post-breadcrumb-inner { padding-left: 20px; padding-right: 20px; }

    .blog-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }
    .homepage-blog-grid { grid-template-columns: 1fr; }
    .hp-post--featured { grid-row: auto; }
    .hp-post-img--featured { aspect-ratio: 16/9; }

    .post-header-meta  { flex-direction: column; align-items: flex-start; }
    .post-nav          { grid-template-columns: 1fr; }
    .comment-fields-row { grid-template-columns: 1fr; }
    .author-box        { flex-direction: column; }
    .archive-author-hero { flex-direction: column; }
    .homepage-section-header { flex-direction: column; align-items: flex-start; }
}
