/* ── Blog CSS — InnoTalent-inspired redesign ────────────────── */
:root {
    --navy:         #F8F6FF;
    --navy-card:    #0F172A;
    --cyan:         #8B5CF6;
    --cyan-dim:     #7C3AED;
    --white:        #1A0A2E;
    --muted:        #6E5F8B;
    --border:       rgba(139,92,246,.2);
    --bg:           #F1F5F9;
    --surface:      #FFFFFF;
    --text:         #0F172A;
    --text-2:       #334155;
    --text-muted:   #64748B;
    --font-head:    'DM Serif Display', Georgia, serif;
    --font-body:    'DM Sans', system-ui, sans-serif;
    --radius:       12px;
    --tr:           .22s ease;
    --shadow:       0 2px 8px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
    --shadow-lg:    0 8px 32px rgba(0,0,0,.12);
    --shadow-hover: 0 16px 48px rgba(15,23,42,.18);
}
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body { font-family:var(--font-body); background:var(--bg); color:var(--text); line-height:1.6; }
a { text-decoration:none; color:inherit; }
img { max-width:100%; display:block; }

/* ── Site header ─────────────────────────────────────────────── */
.blog-site-header { background:var(--navy); position:sticky; top:0; z-index:200; border-bottom:1px solid var(--border); }
.blog-site-header .inner { max-width:1280px; margin:0 auto; padding:0 32px; display:flex; align-items:center; height:64px; gap:32px; }
.blog-logo { font-family:var(--font-head); font-size:21px; color:var(--white); font-weight:700; letter-spacing:-.3px; }
.blog-logo span { color:var(--cyan); }
.blog-header-nav { display:flex; gap:28px; margin-left:auto; }
.blog-header-nav a { font-size:14px; color:var(--muted); transition:color var(--tr); font-weight:500; }
.blog-header-nav a:hover, .blog-header-nav a.active { color:var(--white); }
.blog-header-cta { display:flex; gap:10px; }
.btn { display:inline-flex; align-items:center; gap:6px; padding:8px 20px; border-radius:8px; font-size:14px; font-weight:600; transition:var(--tr); border:none; cursor:pointer; font-family:var(--font-body); }
.btn--primary { background:var(--cyan); color:#fff; }
.btn--primary:hover { background:var(--cyan-dim); transform:translateY(-1px); }
.btn--ghost { border:1px solid var(--border); color:var(--white); background:transparent; }
.btn--ghost:hover { border-color:var(--cyan); color:var(--cyan); }

/* ── Blog page hero ──────────────────────────────────────────── */
.blog-page-hero { background:#fff; border-bottom:1px solid #E2E8F0; padding:64px 32px 52px; text-align:center; }
.blog-page-hero .label { font-size:12px; letter-spacing:2px; text-transform:uppercase; color:var(--cyan-dim); margin-bottom:16px; font-weight:700; display:flex; align-items:center; justify-content:center; gap:10px; }
.blog-page-hero .label::before,
.blog-page-hero .label::after { content:''; width:36px; height:1px; background:var(--cyan-dim); opacity:.4; }
.blog-page-hero h1 { font-family:var(--font-head); font-size:clamp(38px,5vw,62px); color:var(--text); line-height:1.1; margin-bottom:18px; letter-spacing:-.5px; }
.blog-page-hero p { color:var(--text-muted); font-size:18px; max-width:560px; margin:0 auto 32px; line-height:1.65; }

/* ── Hero search bar ─────────────────────────────────────────── */
.blog-search-form { display:flex; max-width:520px; margin:0 auto; box-shadow:0 2px 20px rgba(0,0,0,.08); border-radius:10px; overflow:hidden; }
.blog-search-input { flex:1; padding:14px 20px; border:1.5px solid #E2E8F0; border-right:none; border-radius:10px 0 0 10px; background:#fff; color:var(--text); font-size:15px; font-family:var(--font-body); outline:none; transition:border-color var(--tr); }
.blog-search-input::placeholder { color:#94A3B8; }
.blog-search-input:focus { border-color:var(--cyan-dim); }
.blog-search-btn { padding:14px 22px; background:var(--cyan-dim); border:none; border-radius:0 10px 10px 0; cursor:pointer; font-size:17px; color:#fff; transition:background var(--tr); }
.blog-search-btn:hover { background:var(--cyan); }

/* ── Featured posts section ──────────────────────────────────── */
.featured-section { background:#fff; border-bottom:1px solid #E2E8F0; padding:52px 0 48px; }
.featured-section__header { display:flex; align-items:center; gap:14px; margin-bottom:32px; }
.featured-section__header h2 { font-family:var(--font-head); font-size:13px; font-weight:700; letter-spacing:1.5px; text-transform:uppercase; color:var(--text-muted); white-space:nowrap; }
.featured-section__header::after { content:''; flex:1; height:1px; background:#E2E8F0; }
.featured-posts-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:28px; }

/* ── Layout ─────────────────────────────────────────────────── */
.blog-container { max-width:1280px; margin:0 auto; padding:0 32px; }
.blog-layout { display:grid; grid-template-columns:1fr 320px; gap:52px; align-items:start; padding:48px 0 72px; }
.blog-main { min-width:0; }

/* ── Post Card (shared by featured + grid) ───────────────────── */
.post-card { background:var(--surface); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); transition:transform var(--tr), box-shadow var(--tr); display:flex; flex-direction:column; }
.post-card:hover { transform:translateY(-5px); box-shadow:var(--shadow-hover); }

.post-card__img-wrap { position:relative; overflow:hidden; flex-shrink:0; }
.post-card__img { width:100%; height:220px; object-fit:cover; transition:transform .5s ease; }
.post-card:hover .post-card__img { transform:scale(1.05); }
.post-card__img-placeholder { width:100%; height:220px; background:linear-gradient(135deg,#1E3A5F,#0D2B45); display:flex; align-items:center; justify-content:center; font-size:48px; }

.post-card__cat-badge { position:absolute; top:14px; left:14px; background:rgba(255,255,255,.93); backdrop-filter:blur(4px); color:var(--cyan-dim); font-size:10px; font-weight:700; padding:4px 12px; border-radius:20px; letter-spacing:.6px; text-transform:uppercase; }

.post-card__body { padding:22px 24px 26px; display:flex; flex-direction:column; flex:1; }
.post-card__meta { font-size:12px; color:var(--text-muted); margin-bottom:10px; display:flex; align-items:center; gap:6px; }
.post-card__meta-dot { color:#CBD5E1; }
.post-card__title { font-family:var(--font-head); font-size:18px; line-height:1.35; margin-bottom:10px; color:var(--text); }
.post-card__title a { color:inherit; }
.post-card__title a:hover { color:var(--cyan-dim); }
.post-card__excerpt { font-size:14px; color:var(--text-2); line-height:1.65; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; margin-bottom:18px; flex:1; }
.post-card__read-more { font-size:13px; font-weight:600; color:var(--cyan-dim); display:inline-flex; align-items:center; gap:5px; margin-top:auto; transition:gap var(--tr), color var(--tr); }
.post-card__read-more:hover { color:var(--cyan); gap:9px; }
.post-card__read-more svg { width:13px; height:13px; flex-shrink:0; }

/* Featured cards: slightly taller image */
.featured-posts-grid .post-card__img,
.featured-posts-grid .post-card__img-placeholder { height:240px; }

/* Backward compat for old category link inside card body */
.post-card__cat { display:inline-block; font-size:10px; font-weight:700; letter-spacing:1px; text-transform:uppercase; color:var(--cyan-dim); margin-bottom:8px; }

/* ── Posts grid (latest articles) ────────────────────────────── */
.posts-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }

/* ── Section header ──────────────────────────────────────────── */
.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:24px; padding-bottom:14px; border-bottom:1px solid #E2E8F0; }
.section-header h2 { font-family:var(--font-head); font-size:22px; letter-spacing:-.3px; }
.section-header a { font-size:13px; color:var(--cyan-dim); font-weight:600; }
.section-header a:hover { color:var(--cyan); }

/* ── Sidebar ─────────────────────────────────────────────────── */
.blog-sidebar { display:flex; flex-direction:column; gap:20px; }
.sidebar-widget { background:var(--surface); border-radius:var(--radius); padding:22px 24px; box-shadow:var(--shadow); }
.sidebar-widget h4 { font-size:11px; font-weight:700; letter-spacing:1.5px; text-transform:uppercase; color:var(--text-muted); margin-bottom:16px; padding-bottom:12px; border-bottom:1px solid #F1F5F9; }

/* Sidebar search */
.sidebar-search-form { display:flex; border-radius:8px; overflow:hidden; border:1.5px solid #E2E8F0; transition:border-color var(--tr); }
.sidebar-search-form:focus-within { border-color:var(--cyan-dim); }
.sidebar-search-input { flex:1; padding:10px 13px; border:none; background:#F8FAFC; color:var(--text); font-size:14px; font-family:var(--font-body); outline:none; }
.sidebar-search-btn { padding:10px 13px; background:var(--cyan-dim); border:none; cursor:pointer; color:#fff; font-size:14px; transition:background var(--tr); }
.sidebar-search-btn:hover { background:var(--cyan); }

/* Sidebar categories */
.sidebar-cat-list { display:flex; flex-direction:column; gap:2px; }
.sidebar-cat-item { display:flex; align-items:center; justify-content:space-between; padding:8px 10px; border-radius:8px; transition:background var(--tr); }
.sidebar-cat-item:hover { background:#F8FAFC; }
.sidebar-cat-item a { font-size:14px; color:var(--text-2); font-weight:500; transition:color var(--tr); }
.sidebar-cat-item:hover a { color:var(--cyan-dim); }
.sidebar-cat-count { font-size:11px; background:#F1F5F9; color:var(--text-muted); padding:2px 8px; border-radius:10px; font-weight:600; }

/* Sidebar post items (recent / popular) */
.sidebar-post-item { display:flex; gap:12px; padding:10px 0; border-bottom:1px solid #F8FAFC; }
.sidebar-post-item:last-child { border-bottom:none; padding-bottom:0; }
.sidebar-post-item:first-child { padding-top:0; }
.sidebar-post-thumb { width:56px; height:56px; object-fit:cover; border-radius:8px; flex-shrink:0; }
.sidebar-post-thumb-ph { width:56px; height:56px; background:linear-gradient(135deg,#1E3A5F,#0D2B45); border-radius:8px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:18px; }
.sidebar-post-info { min-width:0; }
.sidebar-post-title { font-size:13px; font-weight:600; line-height:1.4; margin-bottom:4px; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar-post-title a { color:inherit; }
.sidebar-post-title a:hover { color:var(--cyan-dim); }
.sidebar-post-date { font-size:11px; color:var(--text-muted); }

/* Backward compat: old sidebar-recent-post class */
.sidebar-recent-post { display:flex; gap:10px; padding:8px 0; border-bottom:1px solid #F8FAFC; }
.sidebar-recent-post:last-child { border-bottom:none; }
.sidebar-recent-post img { width:52px; height:52px; object-fit:cover; border-radius:6px; flex-shrink:0; }
.sidebar-recent-thumb-ph { width:52px; height:52px; background:linear-gradient(135deg,#1a2a5a,#0d3b5e); border-radius:6px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:18px; }
.sidebar-recent-title { font-size:13px; font-weight:600; line-height:1.4; margin-bottom:3px; }
.sidebar-recent-title a:hover { color:var(--cyan-dim); }
.sidebar-recent-date { font-size:11px; color:var(--text-muted); }

/* Tags */
.tag-cloud { display:flex; flex-wrap:wrap; gap:7px; }
.tag-pill { display:inline-block; padding:5px 13px; border:1.5px solid #E2E8F0; border-radius:20px; font-size:12px; color:var(--text-2); font-weight:500; transition:border-color var(--tr), color var(--tr), background var(--tr); }
.tag-pill:hover { border-color:var(--cyan-dim); color:var(--cyan-dim); background:rgba(139,92,246,.05); }

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb { font-size:12px; color:var(--text-muted); margin-bottom:20px; display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.breadcrumb a { color:var(--cyan-dim); }
.breadcrumb a:hover { text-decoration:underline; }
.breadcrumb span { color:#CBD5E1; }

/* ── Single post ─────────────────────────────────────────────── */
.post-header { margin-bottom:28px; }
.post-header .post-cats { display:flex; gap:8px; margin-bottom:12px; }
.post-header .post-cat-badge { display:inline-block; background:rgba(139,92,246,.1); color:var(--cyan-dim); border:1px solid rgba(139,92,246,.2); padding:3px 12px; border-radius:20px; font-size:12px; font-weight:600; }
.post-header h1 { font-family:var(--font-head); font-size:clamp(26px,4vw,42px); line-height:1.2; margin-bottom:14px; color:var(--text); }
.post-meta-bar { display:flex; align-items:center; flex-wrap:wrap; gap:14px; font-size:13px; color:var(--text-muted); padding:14px 0; border-top:1px solid #F1F5F9; border-bottom:1px solid #F1F5F9; margin-bottom:24px; }
.post-meta-bar strong { color:var(--text); }
.meta-dot { color:#CBD5E1; }
.reading-time { display:flex; align-items:center; gap:4px; }
.post-featured-img { width:100%; height:auto; border-radius:12px; margin-bottom:28px; display:block; }

/* Article body typography */
.article-body { font-size:16px; line-height:1.8; color:var(--text-2); }
.article-body h2 { font-family:var(--font-head); font-size:24px; color:var(--text); margin:32px 0 12px; line-height:1.3; }
.article-body h3 { font-size:19px; font-weight:700; color:var(--text); margin:24px 0 10px; }
.article-body h4 { font-size:16px; font-weight:700; color:var(--text); margin:20px 0 8px; }
.article-body p { margin-bottom:16px; }
.article-body ul, .article-body ol { padding-left:24px; margin-bottom:16px; }
.article-body li { margin-bottom:8px; }
.article-body strong { color:var(--text); font-weight:700; }
.article-body a { color:var(--cyan-dim); text-decoration:underline; text-underline-offset:3px; }
.article-body a:hover { color:var(--cyan); }
.article-body blockquote { border-left:4px solid var(--cyan-dim); padding:14px 20px; background:#F8FAFC; border-radius:0 8px 8px 0; margin:20px 0; font-style:italic; color:var(--text-2); }
.article-body code { background:#F1F5F9; padding:2px 6px; border-radius:4px; font-family:monospace; font-size:14px; }
.article-body pre { background:#1E293B; color:#E2E8F0; padding:18px; border-radius:8px; overflow-x:auto; margin:16px 0; }
.article-body pre code { background:none; padding:0; color:inherit; }

/* In-article CTA */
.article-cta { background:linear-gradient(135deg,var(--navy),#1a2a5a); border:1px solid var(--border); border-radius:12px; padding:28px 32px; margin:32px 0; text-align:center; }
.article-cta h3 { font-family:var(--font-head); color:var(--white); font-size:20px; margin-bottom:8px; }
.article-cta p { color:var(--muted); font-size:14px; margin-bottom:16px; }

/* Post tags */
.post-tags { margin:28px 0; display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.post-tags-label { font-size:13px; font-weight:600; color:var(--text-muted); }

/* Author box */
.author-box { background:#F8FAFC; border:1px solid #E2E8F0; border-radius:12px; padding:20px 24px; margin:28px 0; display:flex; gap:16px; align-items:flex-start; }
.author-avatar { width:52px; height:52px; border-radius:50%; background:linear-gradient(135deg,var(--cyan),#4F46E5); color:#fff; display:flex; align-items:center; justify-content:center; font-size:20px; font-weight:700; flex-shrink:0; }
.author-info h4 { font-size:15px; font-weight:700; margin-bottom:3px; }
.author-info p { font-size:13px; color:var(--text-muted); line-height:1.5; }

/* Share bar */
.share-bar { margin:24px 0; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.share-bar-label { font-size:13px; font-weight:600; color:var(--text-muted); }
.share-btn { display:inline-flex; align-items:center; gap:6px; padding:7px 14px; border-radius:6px; font-size:13px; font-weight:600; transition:var(--tr); cursor:pointer; border:none; }
.share-btn--twitter { background:#1DA1F2; color:#fff; }
.share-btn--linkedin { background:#0A66C2; color:#fff; }
.share-btn--copy { background:#F1F5F9; color:var(--text-2); }
.share-btn:hover { opacity:.85; transform:translateY(-1px); }

/* Related posts */
.related-posts { margin-top:40px; }
.related-posts h3 { font-family:var(--font-head); font-size:22px; margin-bottom:20px; }
.related-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }

/* ── Pagination ──────────────────────────────────────────────── */
.blog-pagination { display:flex; align-items:center; justify-content:center; gap:6px; margin-top:48px; flex-wrap:wrap; }
.blog-pagination a, .blog-pagination span { display:inline-flex; align-items:center; justify-content:center; min-width:40px; height:40px; padding:0 12px; border-radius:8px; font-size:14px; font-weight:500; transition:var(--tr); }
.blog-pagination a { border:1.5px solid #E2E8F0; color:var(--text-muted); }
.blog-pagination a:hover { border-color:var(--cyan-dim); color:var(--cyan-dim); background:rgba(139,92,246,.05); }
.blog-pagination .current { background:var(--cyan-dim); color:#fff; border:1.5px solid var(--cyan-dim); }
.blog-pagination .dots { color:var(--text-muted); }

/* ── Flash messages ──────────────────────────────────────────── */
.flash { padding:12px 16px; border-radius:8px; font-size:14px; margin-bottom:20px; display:flex; align-items:center; gap:8px; }
.flash--success { background:#F0FDF4; border:1px solid #BBF7D0; color:#15803D; }
.flash--error   { background:#FEF2F2; border:1px solid #FECACA; color:#DC2626; }
.flash--info    { background:#EFF6FF; border:1px solid #BFDBFE; color:#1D4ED8; }

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state { text-align:center; padding:80px 24px; }
.empty-state .icon { font-size:56px; margin-bottom:16px; opacity:.3; }
.empty-state h3 { font-size:20px; font-weight:700; margin-bottom:10px; }
.empty-state p { color:var(--text-muted); font-size:15px; }

/* ── Site footer ─────────────────────────────────────────────── */
.blog-site-footer { background:var(--navy); border-top:1px solid var(--border); padding:32px 0; margin-top:0; }
.blog-site-footer .inner { max-width:1280px; margin:0 auto; padding:0 32px; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px; }
.blog-site-footer p { color:var(--muted); font-size:13px; }
.blog-site-footer a { color:var(--muted); font-size:13px; margin-left:20px; }
.blog-site-footer a:hover { color:var(--white); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width:1100px) {
    .blog-layout { grid-template-columns:1fr 280px; gap:36px; }
    .posts-grid, .featured-posts-grid { grid-template-columns:repeat(2,1fr); }
    .related-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:860px) {
    .blog-layout { grid-template-columns:1fr; }
    .blog-sidebar { display:grid; grid-template-columns:repeat(2,1fr); }
    .featured-posts-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:640px) {
    .blog-container { padding:0 16px; }
    .blog-page-hero { padding:48px 16px 40px; }
    .blog-page-hero h1 { font-size:36px; }
    .featured-section { padding:36px 0 28px; }
    .featured-posts-grid, .posts-grid { grid-template-columns:1fr; }
    .blog-layout { gap:32px; padding:32px 0 48px; }
    .blog-sidebar { grid-template-columns:1fr; }
    .blog-header-nav { display:none; }
    .related-grid { grid-template-columns:1fr; }
    .blog-site-header .inner { padding:0 16px; }
    .blog-site-footer .inner { padding:0 16px; }
}
@media (max-width:480px) {
    .post-meta-bar { flex-direction:column; align-items:flex-start; gap:6px; }
    .share-bar { flex-direction:column; align-items:flex-start; }
}
