/* ============================================================
   VMTech — Blog / News extension styles
   Extends site.css. Reuses existing tokens (--blue/--red/--yellow/
   --green, --radius-card, --shadow-*, --font-display/body) so the
   blog feels native to the rest of the site. Nothing here overrides
   or redefines existing site.css rules.
   ============================================================ */

/* ── Blog list ─────────────────────────────────────────── */
.blog-toolbar{
  display:flex; gap:14px; flex-wrap:wrap; align-items:center; justify-content:space-between;
  margin-bottom:40px; padding:18px 20px; background:var(--surface); border-radius:var(--radius-card);
  border:1px solid var(--line);
}
.blog-search{ position:relative; flex:1 1 260px; min-width:220px; }
.blog-search input{
  width:100%; font:inherit; padding:12px 16px 12px 42px; border-radius:var(--radius-btn);
  border:1.5px solid var(--line); background:#fff; transition:border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.blog-search input:focus{ outline:none; border-color:var(--blue); box-shadow:0 0 0 4px rgba(66,133,244,.14); }
.blog-search svg{ position:absolute; left:15px; top:50%; transform:translateY(-50%); color:var(--text-subtle); width:18px; height:18px; }
.blog-filters{ display:flex; gap:10px; flex-wrap:wrap; }
.blog-filters select{
  font:inherit; font-size:14px; padding:11px 16px; border-radius:var(--radius-btn);
  border:1.5px solid var(--line); background:#fff; color:var(--text); cursor:pointer;
}
.blog-filters select:focus{ outline:none; border-color:var(--blue); }

.category-pills{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:40px; }
.category-pill{
  font-size:13.5px; font-weight:600; padding:9px 18px; border-radius:var(--radius-btn);
  background:var(--surface); color:var(--text-muted); border:1.5px solid transparent; cursor:pointer;
  transition:all .2s var(--ease);
}
.category-pill:hover{ border-color:var(--line); }
.category-pill.active{ background:var(--blue); color:#fff; }

.blog-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:28px; }
@media (max-width:980px){ .blog-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:640px){ .blog-grid{ grid-template-columns:1fr; } }

.blog-card{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius-card);
  overflow:hidden; box-shadow:var(--shadow-sm); display:flex; flex-direction:column;
  transition:transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.blog-card:hover{ transform:translateY(-6px); box-shadow:var(--shadow-lg); border-color:transparent; }
.blog-card-media{ position:relative; aspect-ratio:16/10; background:var(--surface); overflow:hidden; }
.blog-card-media img{ width:100%; height:100%; object-fit:cover; transition:transform .5s var(--ease); }
.blog-card:hover .blog-card-media img{ transform:scale(1.06); }
.blog-card-cat{
  position:absolute; top:14px; left:14px; font-size:11.5px; font-weight:700; letter-spacing:.03em;
  text-transform:uppercase; padding:6px 12px; border-radius:var(--radius-btn);
  background:rgba(255,255,255,.92); color:var(--blue); backdrop-filter:blur(6px);
}
.blog-card-body{ padding:24px; display:flex; flex-direction:column; gap:10px; flex:1; }
.blog-card-meta{ display:flex; gap:14px; font-size:12.5px; color:var(--text-subtle); }
.blog-card-meta span{ display:inline-flex; align-items:center; gap:5px; }
.blog-card-body h3{ font-size:18.5px; font-weight:600; line-height:1.3; }
.blog-card-body p{ color:var(--text-muted); font-size:14.5px; flex:1; }
.blog-card-readmore{ font-size:13.5px; font-weight:600; color:var(--blue); display:inline-flex; align-items:center; gap:6px; margin-top:4px; }
.blog-card-readmore svg{ width:14px; height:14px; transition:transform .2s var(--ease); }
.blog-card:hover .blog-card-readmore svg{ transform:translateX(3px); }

.blog-empty, .blog-loading{ text-align:center; padding:80px 20px; color:var(--text-muted); }

.pagination{ display:flex; justify-content:center; gap:8px; margin-top:48px; }
.pagination button{
  min-width:40px; height:40px; padding:0 14px; border-radius:var(--radius-btn); border:1.5px solid var(--line);
  background:#fff; font:inherit; font-size:14px; font-weight:600; color:var(--text-muted); cursor:pointer;
  transition:all .2s var(--ease);
}
.pagination button:hover:not(:disabled){ border-color:var(--blue); color:var(--blue); }
.pagination button.active{ background:var(--blue); color:#fff; border-color:var(--blue); }
.pagination button:disabled{ opacity:.4; cursor:not-allowed; }

.newsletter-box{
  background:var(--surface); border-radius:var(--radius-card); padding:40px; text-align:center; margin-top:64px;
}
.newsletter-box h3{ font-size:22px; font-weight:600; }
.newsletter-box p{ color:var(--text-muted); margin-top:8px; max-width:440px; margin-left:auto; margin-right:auto; }
.newsletter-form{ display:flex; gap:10px; max-width:420px; margin:22px auto 0; }
.newsletter-form input{ flex:1; font:inherit; padding:12px 16px; border-radius:var(--radius-btn); border:1.5px solid var(--line); }
.newsletter-form input:focus{ outline:none; border-color:var(--blue); }
@media (max-width:520px){ .newsletter-form{ flex-direction:column; } }

/* ── Article page ──────────────────────────────────────── */
.article-hero{ padding:150px 0 0; }
.article-breadcrumbs{ display:flex; align-items:center; gap:8px; font-size:13.5px; color:var(--text-subtle); flex-wrap:wrap; }
.article-breadcrumbs a{ color:var(--text-subtle); transition:color .2s var(--ease); }
.article-breadcrumbs a:hover{ color:var(--blue); }
.article-header{ max-width:820px; margin:24px 0 0; }
.article-header h1{ font-size:clamp(30px,4.4vw,48px); font-weight:600; line-height:1.15; }
.article-meta-row{ display:flex; align-items:center; gap:20px; flex-wrap:wrap; margin-top:22px; color:var(--text-muted); font-size:14.5px; }
.article-meta-row .author{ display:flex; align-items:center; gap:10px; }
.avatar{ width:38px; height:38px; border-radius:50%; background:var(--blue); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:600; font-size:14px; font-family:var(--font-display); }
.article-cover{ margin-top:36px; border-radius:var(--radius-card); overflow:hidden; aspect-ratio:16/7; background:var(--surface); }
.article-cover img{ width:100%; height:100%; object-fit:cover; }

.article-layout{ display:grid; grid-template-columns:1fr 260px; gap:56px; align-items:start; }
@media (max-width:900px){ .article-layout{ grid-template-columns:1fr; } }

.article-body{ font-size:17px; line-height:1.85; color:var(--text); max-width:760px; }
.article-body h2{ font-size:26px; font-weight:600; margin:44px 0 16px; font-family:var(--font-display); scroll-margin-top:110px; }
.article-body h3{ font-size:20px; font-weight:600; margin:32px 0 12px; font-family:var(--font-display); scroll-margin-top:110px; }
.article-body p{ margin-bottom:20px; color:var(--text-muted); }
.article-body ul, .article-body ol{ margin:0 0 20px 22px; color:var(--text-muted); }
.article-body li{ margin-bottom:8px; }
.article-body img{ border-radius:var(--radius-sm); margin:24px 0; }
.article-body a{ color:var(--blue); text-decoration:underline; text-decoration-color:rgba(66,133,244,.35); }
.article-body blockquote{
  border-left:3px solid var(--blue); padding:4px 0 4px 20px; margin:24px 0; color:var(--text);
  font-style:italic; font-size:18px;
}
.article-body code{ background:var(--surface-2); padding:2px 7px; border-radius:6px; font-size:14.5px; }
.article-body pre{ background:var(--text); color:#fff; padding:20px; border-radius:var(--radius-sm); overflow-x:auto; margin:24px 0; }
.article-body pre code{ background:none; padding:0; color:inherit; }

.reading-progress{ position:fixed; top:0; left:0; height:3px; background:var(--blue); z-index:1001; width:0%; transition:width .1s linear; }

.toc-box{ position:sticky; top:110px; background:var(--surface); border-radius:var(--radius-card); padding:22px; }
.toc-box h4{ font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--text-subtle); margin-bottom:14px; }
.toc-box ul{ display:flex; flex-direction:column; gap:10px; }
.toc-box a{ font-size:14px; color:var(--text-muted); transition:color .2s var(--ease); display:block; }
.toc-box a:hover, .toc-box a.active{ color:var(--blue); }
.toc-box .share-row{ display:flex; gap:8px; margin-top:20px; padding-top:20px; border-top:1px solid var(--line); }
.share-btn{
  width:36px; height:36px; border-radius:50%; border:1.5px solid var(--line); background:#fff;
  display:flex; align-items:center; justify-content:center; color:var(--text-muted); transition:all .2s var(--ease);
}
.share-btn:hover{ border-color:var(--blue); color:var(--blue); transform:translateY(-2px); }

.tag-chip{ font-size:12.5px; font-weight:600; padding:6px 14px; border-radius:var(--radius-btn); background:var(--surface); color:var(--text-muted); }

.article-nav{ display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-top:56px; }
@media (max-width:640px){ .article-nav{ grid-template-columns:1fr; } }
.article-nav-link{
  border:1px solid var(--line); border-radius:var(--radius-card); padding:22px; transition:all .25s var(--ease);
}
.article-nav-link:hover{ border-color:var(--blue); box-shadow:var(--shadow-md); }
.article-nav-link .dir{ font-size:12px; font-weight:700; text-transform:uppercase; color:var(--text-subtle); letter-spacing:.04em; }
.article-nav-link.next{ text-align:right; }
.article-nav-link h4{ margin-top:8px; font-size:15.5px; font-weight:600; }

.related-grid{ margin-top:24px; }

/* ── Admin ─────────────────────────────────────────────── */
.admin-shell{ display:grid; grid-template-columns:240px 1fr; min-height:100vh; }
@media (max-width:880px){ .admin-shell{ grid-template-columns:1fr; } }
.admin-sidebar{ background:var(--text); color:#fff; padding:28px 20px; position:sticky; top:0; height:100vh; }
@media (max-width:880px){ .admin-sidebar{ height:auto; position:relative; } }
.admin-sidebar .brand{ color:#fff; margin-bottom:36px; }
.admin-nav{ display:flex; flex-direction:column; gap:4px; }
.admin-nav button{
  display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:12px; font:inherit; font-size:14.5px;
  color:rgba(255,255,255,.7); text-align:left; width:100%; transition:all .2s var(--ease);
}
.admin-nav button:hover{ background:rgba(255,255,255,.08); color:#fff; }
.admin-nav button.active{ background:var(--blue); color:#fff; }
.admin-main{ padding:36px 40px; background:var(--surface); }
.admin-topbar{ display:flex; justify-content:space-between; align-items:center; margin-bottom:32px; flex-wrap:wrap; gap:16px; }
.admin-topbar h1{ font-size:24px; font-weight:600; }

.admin-stats{ display:grid; grid-template-columns:repeat(5,1fr); gap:18px; margin-bottom:32px; }
@media (max-width:980px){ .admin-stats{ grid-template-columns:repeat(2,1fr); } }
.admin-stat-card{ background:#fff; border-radius:var(--radius-card); padding:22px; border:1px solid var(--line); }
.admin-stat-card b{ display:block; font-family:var(--font-display); font-size:26px; font-weight:700; }
.admin-stat-card span{ font-size:12.5px; color:var(--text-subtle); }

.admin-table-card{ background:#fff; border-radius:var(--radius-card); border:1px solid var(--line); overflow:hidden; }
.admin-table{ width:100%; border-collapse:collapse; }
.admin-table th{ text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.03em; color:var(--text-subtle); padding:14px 20px; border-bottom:1px solid var(--line); }
.admin-table td{ padding:14px 20px; border-bottom:1px solid var(--line); font-size:14.5px; vertical-align:middle; }
.admin-table tr:last-child td{ border-bottom:none; }
.status-pill{ font-size:11.5px; font-weight:700; padding:4px 11px; border-radius:var(--radius-btn); text-transform:uppercase; letter-spacing:.03em; }
.status-pill.published{ background:rgba(52,168,83,.12); color:var(--green); }
.status-pill.draft{ background:rgba(251,188,5,.18); color:#9C6E00; }
.row-actions{ display:flex; gap:8px; }
.row-actions button{ font-size:13px; font-weight:600; color:var(--text-muted); padding:6px 10px; border-radius:8px; transition:all .2s var(--ease); }
.row-actions button:hover{ background:var(--surface); color:var(--blue); }
.row-actions button.danger:hover{ color:var(--red); }

.login-shell{ min-height:100vh; display:flex; align-items:center; justify-content:center; background:var(--surface); padding:20px; }
.login-card{ width:100%; max-width:400px; background:#fff; border-radius:var(--radius-card); padding:40px; box-shadow:var(--shadow-lg); }
.login-card .brand{ justify-content:center; margin-bottom:28px; }

.editor-shell{ background:#fff; border-radius:var(--radius-card); border:1px solid var(--line); overflow:hidden; }
.editor-toolbar{ display:flex; gap:4px; flex-wrap:wrap; padding:10px; border-bottom:1px solid var(--line); background:var(--surface); }
.editor-toolbar button{
  width:34px; height:34px; border-radius:8px; display:flex; align-items:center; justify-content:center;
  color:var(--text-muted); transition:all .2s var(--ease); font-weight:700; font-size:13px;
}
.editor-toolbar button:hover{ background:#fff; color:var(--blue); box-shadow:var(--shadow-sm); }
.editor-toolbar button.active{ background:var(--blue); color:#fff; }
.editor-toolbar .sep{ width:1px; background:var(--line); margin:4px 6px; }
.editor-body{ min-height:360px; padding:24px; font-size:16px; line-height:1.8; outline:none; }
.editor-body:empty:before{ content:attr(data-placeholder); color:var(--text-subtle); }

.admin-form-grid{ display:grid; grid-template-columns:1fr 320px; gap:24px; align-items:start; }
@media (max-width:1080px){ .admin-form-grid{ grid-template-columns:1fr; } }
.admin-panel{ background:#fff; border-radius:var(--radius-card); border:1px solid var(--line); padding:24px; margin-bottom:20px; }
.admin-panel h4{ font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:var(--text-subtle); margin-bottom:16px; }

.image-drop{
  border:2px dashed var(--line); border-radius:var(--radius-sm); padding:28px; text-align:center; cursor:pointer;
  transition:all .2s var(--ease); color:var(--text-muted); font-size:14px;
}
.image-drop:hover, .image-drop.drag-over{ border-color:var(--blue); background:rgba(66,133,244,.04); color:var(--blue); }
.image-preview{ width:100%; border-radius:var(--radius-sm); margin-bottom:12px; aspect-ratio:16/9; object-fit:cover; }

.toast{
  position:fixed; bottom:24px; right:24px; background:var(--text); color:#fff; padding:14px 22px; border-radius:var(--radius-sm);
  font-size:14px; font-weight:500; box-shadow:var(--shadow-lg); z-index:2000; opacity:0; transform:translateY(12px);
  transition:all .3s var(--ease); pointer-events:none;
}
.toast.show{ opacity:1; transform:translateY(0); }
.toast.error{ background:var(--red); }
.toast.success{ background:var(--green); }

.spinner{ width:18px; height:18px; border:2px solid rgba(255,255,255,.35); border-top-color:#fff; border-radius:50%; animation:spin .7s linear infinite; display:inline-block; }
@keyframes spin{ to{ transform:rotate(360deg); } }

.autosave-note{ font-size:12.5px; color:var(--text-subtle); display:flex; align-items:center; gap:6px; }
