/* ================================================================
   blog.css — Blog listing + single post styles
   ================================================================ */

/* ── Blog Hero (always dark) ── */
.blog-hero { background: #0a0a0a; padding: 80px 5% 60px; position: relative; overflow: hidden; border-bottom: 3px solid var(--red); }
.blog-hero::before { content: ''; position: absolute; right: -100px; top: -100px; width: 500px; height: 500px; background: radial-gradient(circle, rgba(255,1,1,.07) 0%, transparent 65%); pointer-events: none; }
.blog-hero-inner { max-width: 680px; position: relative; z-index: 1; }
.blog-hero-tag { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; background: rgba(255,1,1,.12); border: 1px solid rgba(255,1,1,.3); border-radius: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--red); margin-bottom: 20px; }
.blog-hero-tag .dot { width: 5px; height: 5px; background: var(--red); border-radius: 50%; animation: blink 2s infinite; }
@keyframes blink { 0%,100%{opacity:1}50%{opacity:.2} }
.blog-hero h1 { font-size: clamp(32px,5vw,58px); font-weight: 800; color: #fff; line-height: 1.05; letter-spacing: -1.5px; margin-bottom: 14px; }
.blog-hero h1 span { color: var(--red); }
.blog-hero p { font-size: 16px; font-weight: 300; color: rgba(255,255,255,.6); max-width: 520px; line-height: 1.75; }

/* ── Filter Bar ── */
.blog-controls { background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 18px 5%; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; transition: var(--t); }
.blog-search-form { flex: 1; min-width: 200px; }
.blog-search { position: relative; }
.blog-search input { width: 100%; padding: 10px 14px 10px 38px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; font-size: 13.5px; color: var(--text); font-family: 'Inter', sans-serif; outline: none; transition: border-color .2s; }
.blog-search input:focus { border-color: var(--red); }
.blog-search input::placeholder { color: var(--text-3); }
.blog-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 13px; }
.cat-filters { display: flex; gap: 7px; flex-wrap: wrap; }
.cat-btn { padding: 8px 14px; border: 1px solid var(--border); border-radius: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--text-2); background: transparent; cursor: pointer; transition: all .2s; white-space: nowrap; }
.cat-btn:hover, .cat-btn.active { border-color: var(--red); color: var(--red); background: rgba(255,1,1,.08); }

/* ── Blog Layout ── */
.blog-layout { display: grid; grid-template-columns: 1fr 300px; gap: 48px; padding: 56px 5%; max-width: 1280px; margin: 0 auto; }

/* ── Featured Post ── */
.featured-post { grid-column: 1/-1; margin-bottom: 8px; }
.feat-card { display: grid; grid-template-columns: 1.1fr 1fr; border-radius: 12px; overflow: hidden; background: var(--card-bg); border: 1px solid var(--card-border); transition: var(--t), transform .3s, box-shadow .3s; }
.feat-card:hover { border-color: rgba(255,1,1,.35); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feat-thumb { height: 340px; position: relative; overflow: hidden; }
.feat-thumb .cover { position: absolute; inset: 0; }
.feat-thumb .cover-content { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.feat-thumb .cover-icon { font-size: 64px; color: rgba(255,255,255,.4); }
.feat-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.feat-badge { position: absolute; top: 16px; left: 16px; padding: 4px 12px; background: var(--red); border-radius: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #fff; z-index: 2; }
.feat-body { padding: 40px 36px; display: flex; flex-direction: column; justify-content: center; }
.feat-cat { font-size: 10.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px; }
.feat-body h2 { font-size: clamp(19px,2.4vw,27px); font-weight: 800; color: var(--text); line-height: 1.2; letter-spacing: -.5px; margin-bottom: 14px; }
.feat-body p { font-size: 14px; font-weight: 300; color: var(--text-2); line-height: 1.75; margin-bottom: 22px; }
.feat-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.feat-author { display: flex; align-items: center; gap: 8px; }
.feat-av { width: 32px; height: 32px; border-radius: 50%; background: var(--red); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; }
.feat-author .name { font-size: 13px; font-weight: 600; color: var(--text); }
.feat-info { display: flex; gap: 12px; flex-wrap: wrap; }
.feat-info span { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.feat-info i { font-size: 10px; color: var(--text-3); }
.read-more { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--red); margin-top: 18px; transition: gap .2s; }
.read-more:hover { gap: 13px; }

/* ── Post Grid ── */
.posts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.post-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 10px; overflow: hidden; transition: var(--t), transform .3s, box-shadow .3s; }
.post-card:hover { border-color: rgba(255,1,1,.3); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-thumb { height: 160px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.post-thumb .cover { position: absolute; inset: 0; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.post-thumb-ico { font-size: 36px; color: rgba(255,255,255,.45); position: relative; z-index: 2; }
.post-cat-badge { position: absolute; top: 10px; left: 10px; z-index: 3; padding: 3px 9px; border-radius: 3px; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #fff; }
.post-body { padding: 20px; }
.post-body h3 { font-size: 15.5px; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 8px; letter-spacing: -.1px; }
.post-body p { font-size: 13px; font-weight: 300; color: var(--text-2); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.post-author-sm { display: flex; align-items: center; gap: 7px; }
.post-av-sm { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; }
.post-author-sm .nm { font-size: 12px; font-weight: 600; color: var(--text-2); }
.post-meta-sm { display: flex; gap: 8px; align-items: center; }
.post-meta-sm span { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 4px; }

/* ── Sidebar (shared blog + post) ── */
.blog-sidebar { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 90px; }
.sidebar-widget { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 10px; padding: 22px; transition: var(--t); }
.about-widget { text-align: center; }
.about-widget img { width: 64px; height: auto; margin: 0 auto 12px; object-fit: contain; }
.about-widget p { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.about-widget a { display: inline-block; margin-top: 14px; padding: 9px 20px; background: var(--red); border-radius: 4px; font-size: 12.5px; font-weight: 700; color: #fff; transition: background .2s; }
.about-widget a:hover { background: var(--red-dk); }
.widget-title { font-size: 10.5px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.widget-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.widget-sub { font-size: 13px; color: var(--text-2); line-height: 1.7; margin-bottom: 12px; }
.cat-list { display: flex; flex-direction: column; gap: 4px; }
.cat-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: color .2s; }
.cat-row:last-child { border-bottom: none; }
.cat-name { font-size: 13.5px; font-weight: 500; color: var(--text-2); display: flex; align-items: center; gap: 8px; transition: color .2s; }
.cat-row:hover .cat-name { color: var(--red); }
.cat-count { font-size: 11px; font-weight: 600; padding: 2px 8px; background: rgba(255,1,1,.1); border: 1px solid rgba(255,1,1,.2); border-radius: 3px; color: var(--red); }
.recent-list { display: flex; flex-direction: column; gap: 14px; }
.recent-item { display: flex; gap: 11px; cursor: pointer; }
.recent-thumb { width: 56px; height: 56px; flex-shrink: 0; border-radius: 6px; overflow: hidden; position: relative; }
.recent-thumb .cover { position: absolute; inset: 0; }
.recent-info h5 { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .2s; }
.recent-item:hover .recent-info h5 { color: var(--red); }
.recent-info span { font-size: 11.5px; color: var(--text-3); }
.tags-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-chip { padding: 5px 11px; background: rgba(255,1,1,.08); border: 1px solid rgba(255,1,1,.2); border-radius: 3px; font-size: 11.5px; font-weight: 500; color: var(--red); cursor: pointer; transition: all .2s; }
.tag-chip:hover { background: var(--red); border-color: var(--red); color: #fff; }
.nl-form { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.nl-form input { padding: 10px 13px; background: var(--input-bg); border: 1px solid var(--input-brd); border-radius: 6px; font-size: 13px; color: var(--input-txt); font-family: 'Inter', sans-serif; outline: none; transition: border-color .2s; }
.nl-form input:focus { border-color: var(--red); }
.nl-form button { padding: 10px; background: var(--red); border: none; border-radius: 6px; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 700; color: #fff; cursor: pointer; transition: background .2s; }
.nl-form button:hover { background: var(--red-dk); }
.nl-note { font-size: 11px; color: var(--text-3); margin-top: 6px; }
.nl-msg { padding: 9px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 500; margin-top: 6px; }
.nl-msg.success { background: rgba(22,163,74,.1); border: 1px solid rgba(22,163,74,.25); color: #16a34a; }
.nl-msg.error   { background: rgba(255,1,1,.1); border: 1px solid rgba(255,1,1,.25); color: var(--red); }
.nl-msg.info    { background: rgba(37,99,235,.1); border: 1px solid rgba(37,99,235,.25); color: #2563eb; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; }
  .feat-card { grid-template-columns: 1fr; }
  .feat-thumb { height: 220px; }
}
@media (max-width: 640px) {
  .posts-grid { grid-template-columns: 1fr; }
  .blog-controls { flex-direction: column; align-items: stretch; }
}
