/* ═══════════════════════════════════════════════════════════════
   JEE Counsellor — Blog & Article Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Article Grid ── */
.articles-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem;}
@media(max-width:900px){.articles-grid{grid-template-columns:repeat(2,1fr);}}
@media(max-width:600px){.articles-grid{grid-template-columns:1fr;}}

.article-card{display:flex;flex-direction:column;gap:.5rem;padding:1.25rem;transition:all .2s;}
.article-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-lg);}
.article-card-badge{margin-bottom:.2rem;}
.article-card-title{font-size:1rem;font-weight:700;color:var(--gray-900);line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.article-card-subtitle{font-size:.82rem;color:var(--text-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.6;}
.article-card-meta{display:flex;align-items:center;gap:.75rem;font-size:.75rem;color:var(--text-dim);margin-top:auto;padding-top:.5rem;}
.article-card-meta span{display:flex;align-items:center;gap:.25rem;}

/* ── Featured Article ── */
.featured-article{display:grid;grid-template-columns:1fr 1fr;gap:2rem;padding:1.5rem;margin-bottom:2rem;}
.featured-article-content{display:flex;flex-direction:column;justify-content:center;}
.featured-article-badge{margin-bottom:.5rem;}
.featured-article-title{font-size:1.4rem;font-weight:800;color:var(--gray-900);line-height:1.25;margin-bottom:.5rem;}
.featured-article-subtitle{font-size:.9rem;color:var(--text-muted);line-height:1.7;margin-bottom:.75rem;}
.featured-article-meta{display:flex;align-items:center;gap:.75rem;font-size:.78rem;color:var(--text-dim);}
.featured-article-cover{width:100%;height:220px;background:linear-gradient(135deg,var(--blue-50),var(--purple-50));border-radius:var(--r-lg);display:flex;align-items:center;justify-content:center;font-size:3rem;}
@media(max-width:768px){.featured-article{grid-template-columns:1fr;}}

/* ── Category Tabs ── */
.blog-tabs{display:flex;gap:.3rem;margin-bottom:2rem;overflow-x:auto;scrollbar-width:none;}
.blog-tabs::-webkit-scrollbar{display:none;}
.blog-tab{padding:.45rem 1rem;border-radius:var(--r-full);font-size:.82rem;font-weight:600;color:var(--text-muted);background:var(--gray-50);border:1px solid var(--border);cursor:pointer;transition:all .15s;white-space:nowrap;font-family:var(--font-sans);}
.blog-tab:hover{color:var(--text);}
.blog-tab.active{background:var(--blue-600);color:white;border-color:var(--blue-600);}

/* ── Article Body ── */
.article-layout{display:grid;grid-template-columns:1fr 240px;gap:2.5rem;max-width:1000px;margin:0 auto;padding:2rem 5%;}
@media(max-width:900px){.article-layout{grid-template-columns:1fr;}}

.article-header{margin-bottom:2rem;}
.article-header .badge{margin-bottom:.75rem;}
.article-title{font-size:2rem;font-weight:800;color:var(--gray-900);line-height:1.2;margin-bottom:.5rem;}
.article-subtitle{font-size:1.05rem;color:var(--text-muted);line-height:1.6;margin-bottom:1rem;}
.article-meta{display:flex;align-items:center;gap:1rem;font-size:.82rem;color:var(--text-dim);padding-bottom:1.25rem;border-bottom:1px solid var(--border);}
.article-meta span{display:flex;align-items:center;gap:.3rem;}
.article-share{display:flex;gap:.5rem;margin-top:.75rem;}
.article-share-btn{display:inline-flex;align-items:center;gap:.3rem;padding:.4rem .85rem;border-radius:var(--r-full);font-size:.78rem;font-weight:600;border:1px solid var(--border);background:var(--white);cursor:pointer;transition:.15s;font-family:var(--font-sans);color:var(--text-muted);}
.article-share-btn:hover{background:var(--gray-50);color:var(--text);}
.article-share-btn.tg{border-color:rgba(0,136,204,.3);color:#0088CC;}
.article-share-btn.tg:hover{background:rgba(0,136,204,.05);}

/* ── Article Body Typography ── */
.article-body{font-size:.95rem;color:var(--gray-700);line-height:1.85;}
.article-body h2{font-size:1.35rem;font-weight:800;color:var(--gray-900);margin:2rem 0 .75rem;padding-top:1rem;border-top:1px solid var(--border);}
.article-body h2:first-child{border-top:none;margin-top:0;padding-top:0;}
.article-body h3{font-size:1.05rem;font-weight:700;color:var(--gray-900);margin:1.5rem 0 .5rem;}
.article-body p{margin-bottom:1rem;}
.article-body ul,.article-body ol{margin:1rem 0;padding-left:1.5rem;list-style:disc;}
.article-body ol{list-style:decimal;}
.article-body li{margin-bottom:.4rem;}
.article-body strong{color:var(--gray-900);}
.article-body blockquote{border-left:3px solid var(--blue-400);padding:.75rem 1rem;margin:1.25rem 0;background:var(--blue-50);border-radius:0 var(--r-md) var(--r-md) 0;font-style:italic;color:var(--gray-600);}
.article-body code{background:var(--gray-100);padding:.15rem .4rem;border-radius:4px;font-family:var(--font-mono);font-size:.85em;color:var(--gray-800);}
.article-body pre{background:var(--gray-900);color:var(--gray-100);padding:1rem 1.25rem;border-radius:var(--r-lg);overflow-x:auto;margin:1.25rem 0;font-size:.84rem;line-height:1.6;}
.article-body pre code{background:none;padding:0;color:inherit;font-size:inherit;}
.article-body table{width:100%;border-collapse:collapse;margin:1.25rem 0;font-size:.87rem;}
.article-body table th,.article-body table td{padding:.55rem .75rem;border:1px solid var(--border);text-align:left;}
.article-body table th{background:var(--gray-50);font-weight:700;font-size:.78rem;text-transform:uppercase;letter-spacing:.04em;color:var(--gray-500);}

/* ── TOC Sidebar ── */
.toc-sidebar{position:sticky;top:calc(var(--nav-h) + 2rem);height:fit-content;}
.toc-title{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--gray-400);margin-bottom:.75rem;}
.toc-list{display:flex;flex-direction:column;gap:.15rem;}
.toc-link{display:block;padding:.3rem .6rem;font-size:.8rem;color:var(--text-muted);border-left:2px solid var(--border);transition:all .15s;text-decoration:none;}
.toc-link:hover{color:var(--blue-600);border-color:var(--blue-400);}
.toc-link.active{color:var(--blue-600);border-color:var(--blue-600);font-weight:600;}
.toc-link.h3{padding-left:1.2rem;font-size:.76rem;}
@media(max-width:900px){.toc-sidebar{display:none;}}

/* ── Related Articles ── */
.related-section{margin-top:3rem;padding-top:2rem;border-top:1px solid var(--border);}
.related-title{font-size:1.1rem;font-weight:800;margin-bottom:1rem;color:var(--gray-900);}

/* ── Article Editor ── */
.editor-layout{display:grid;grid-template-columns:1fr 1fr;gap:0;height:calc(100vh - var(--nav-h) - 60px);}
@media(max-width:900px){.editor-layout{grid-template-columns:1fr;height:auto;}}
.editor-pane{display:flex;flex-direction:column;border-right:1px solid var(--border);overflow-y:auto;padding:1.25rem;}
.editor-pane:last-child{border-right:none;}
.editor-toolbar{display:flex;gap:.25rem;padding:.5rem;border:1px solid var(--border);border-bottom:none;border-radius:var(--r-lg) var(--r-lg) 0 0;background:var(--gray-50);flex-wrap:wrap;}
.editor-toolbar-btn{padding:.3rem .55rem;border:none;background:none;cursor:pointer;font-size:.82rem;color:var(--gray-600);border-radius:var(--r-sm);transition:.15s;font-family:var(--font-mono);}
.editor-toolbar-btn:hover{background:var(--gray-200);color:var(--text);}
.editor-textarea{width:100%;flex:1;border:1px solid var(--border);border-radius:0 0 var(--r-lg) var(--r-lg);padding:1rem;font-family:var(--font-mono);font-size:.88rem;line-height:1.7;resize:none;outline:none;color:var(--text);}
.editor-textarea:focus{border-color:var(--blue-400);}
.editor-preview{overflow-y:auto;padding:1.25rem;}
.editor-preview-title{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--gray-400);margin-bottom:.75rem;}
.editor-actions{display:flex;gap:.5rem;padding:1rem 5%;background:var(--bg-subtle);border-top:1px solid var(--border);}
