/* Blog si Tutoriale: paginile publice (randate pe server) si editorul din Support Center. Aceleasi tokenuri ca restul site-ului. */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Antet de pagina ---------- */
.content-hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(32px, 6vw, 72px)) 0 clamp(28px, 4vw, 48px);
  overflow: hidden;
}

.content-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(55% 70% at 85% 0%, rgba(96, 80, 255, 0.24), transparent 70%),
    radial-gradient(40% 60% at 5% 10%, rgba(47, 125, 255, 0.14), transparent 70%);
}

.content-hero__title {
  margin-top: 16px;
  font-size: var(--fs-h2);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.content-hero__lead {
  max-width: 62ch;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 18px;
  color: var(--text-dim);
  font-size: var(--fs-xs);
}

.breadcrumbs a {
  color: var(--text-muted);
  transition: color var(--t-fast);
}

.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs [aria-current="page"] { color: var(--text); }

.content-search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 560px;
  margin-top: 26px;
}

.content-search .field__input {
  flex: 1 1 220px;
  min-height: 48px;
  border-radius: var(--radius-pill);
  padding-inline: 20px;
}

.content-search .btn { min-height: 48px; }

.content-section { padding-block: clamp(28px, 4vw, 56px); }

/* ---------- Filtre ---------- */
.chip-filters,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-filters { margin-bottom: 14px; }
.tag-row { margin: 18px 0 4px; gap: 8px; }

.chip-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: border-color var(--t-fast), background-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}

.chip-filter small { color: var(--text-dim); font-weight: 600; }
.chip-filter:hover { color: var(--text); border-color: rgba(139, 92, 255, 0.55); transform: translateY(-1px); }

.chip-filter.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--gradient) border-box;
  border: 1px solid transparent;
}

.tag {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: #c9b8ff;
  font-size: var(--fs-xs);
  font-weight: 600;
  transition: background-color var(--t-fast);
}

a.tag:hover, .tag.is-active { background: rgba(139, 92, 255, 0.3); }

.content-count { margin: 14px 0 4px; color: var(--text-muted); font-size: var(--fs-sm); }

.content-empty {
  padding: 56px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  text-align: center;
}

.content-empty a { color: #b9a4ff; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Carduri ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 24px;
  margin-top: 22px;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  transition: transform var(--t) var(--ease), border-color var(--t), box-shadow var(--t);
}

.post-card:hover,
.post-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 255, 0.45);
  box-shadow: 0 24px 60px -30px rgba(110, 100, 255, 0.7);
}

.post-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-tint);
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease);
}

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

.post-card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #b9a4ff;
  font-size: 2.4rem;
  background:
    radial-gradient(70% 90% at 80% 10%, rgba(96, 80, 255, 0.4), transparent 70%),
    radial-gradient(60% 80% at 10% 100%, rgba(47, 125, 255, 0.25), transparent 70%),
    var(--surface-2);
}

.post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 22px;
}

.post-card__tags { min-height: 28px; }

.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid rgba(139, 92, 255, 0.35);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: #c9b8ff;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: border-color var(--t-fast), background-color var(--t-fast);
}

.chip-link:hover { border-color: rgba(139, 92, 255, 0.7); background: rgba(139, 92, 255, 0.24); }
.chip-link--device { border-color: rgba(47, 125, 255, 0.4); background: rgba(47, 125, 255, 0.12); color: #9ec0ff; }
.chip-link--device:hover { border-color: rgba(47, 125, 255, 0.75); background: rgba(47, 125, 255, 0.22); }
.chip-link .icon { width: 1em; height: 1em; }

.post-card__title { font-size: 1.2rem; line-height: 1.25; }
.post-card__title a { transition: color var(--t-fast); }
.post-card__title a:hover { color: #c9b8ff; }

.post-card__excerpt {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: auto;
  padding-top: 6px;
  color: var(--text-dim);
  font-size: var(--fs-xs);
}

/* ---------- Paginare ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  margin-top: 40px;
}

.pager__pages { display: flex; align-items: center; gap: 6px; }
.pager__gap { color: var(--text-dim); padding: 0 4px; }

.pager-link {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: border-color var(--t-fast), color var(--t-fast);
}

a.pager-link:hover { color: var(--text); border-color: rgba(139, 92, 255, 0.55); }
.pager-link.is-current { color: #fff; border-color: transparent; background: var(--gradient); }
.pager-link.is-disabled { opacity: 0.4; }

/* ---------- Articol / tutorial ---------- */
.article__head { padding: calc(var(--header-h) + clamp(28px, 5vw, 56px)) 0 18px; }

.article__tags { margin-bottom: 14px; }

.article__title {
  font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 16px;
  color: var(--text-dim);
  font-size: var(--fs-sm);
}

.article__lead {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.6;
}

.article__cover { margin: 8px 0 34px; }

.article__cover img,
.step__figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.article__back { margin: 36px 0 12px; }

.prose { font-size: 1.0625rem; line-height: 1.75; color: #d9dae6; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { color: var(--text); margin-top: 1.8em; line-height: 1.2; }
.prose h2 { font-size: 1.65rem; }
.prose h3 { font-size: 1.3rem; }
.prose h4 { font-size: 1.1rem; }
.prose a { color: #b9a4ff; text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: #d6c9ff; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: #8b5cff; }
.prose strong { color: var(--text); }

.prose blockquote {
  margin-inline: 0;
  padding: 14px 20px;
  border-left: 3px solid var(--violet);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-soft);
  color: var(--text);
}

.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9em;
}

.prose pre {
  overflow-x: auto;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-tint);
}

.prose pre code { padding: 0; background: none; }
.prose hr { height: 1px; border: 0; background: var(--border-strong); }

.prose figure { margin: 1.6em 0; }
.prose figure img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.prose figcaption { margin-top: 8px; color: var(--text-dim); font-size: var(--fs-sm); text-align: center; }

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin: 1.4em 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #000;
}

.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.share a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  transition: border-color var(--t-fast), color var(--t-fast);
}

.share a:hover { color: var(--text); border-color: rgba(139, 92, 255, 0.6); }
.share .icon { width: 1.1em; height: 1.1em; color: #b9a4ff; }

.content-related { margin-top: 56px; }
.content-related__title { font-size: var(--fs-h3); }

.preview-banner {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  padding: 10px var(--gutter);
  border-bottom: 1px solid rgba(255, 170, 70, 0.5);
  background: rgba(60, 40, 10, 0.92);
  color: #ffd9a0;
  font-size: var(--fs-sm);
  text-align: center;
}

.preview-banner a { text-decoration: underline; }

/* Tutoriale: cuprins si pasi */
.toc {
  margin: 8px 0 34px;
  padding: 22px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.toc__title { font-size: 1.05rem; margin-bottom: 12px; }
.toc ol { display: grid; gap: 8px; padding-left: 1.3em; list-style: decimal; color: var(--text-muted); }
.toc li::marker { color: #8b5cff; font-weight: 700; }
.toc a { transition: color var(--t-fast); }
.toc a:hover { color: var(--text); }

.steps { display: grid; gap: 22px; }

.step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.step__num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--gradient);
  box-shadow: var(--glow);
  font-size: 1.25rem;
  font-weight: 800;
}

.step__title { font-size: 1.3rem; margin-bottom: 10px; }
.step__content .prose { font-size: 1rem; }
.step__figure { margin: 18px 0 0; }

@media (max-width: 560px) {
  .step { grid-template-columns: 1fr; padding: 20px; }
  .step__num { width: 40px; height: 40px; border-radius: 12px; }
}

/* ---------- Editor (Support Center) ---------- */
.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}

.editor__side { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 12px); }
.editor__box { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.editor__box h3 { margin-bottom: 12px; font-size: 0.95rem; letter-spacing: 0; }
.editor__box .field { margin-bottom: 12px; }
.editor__box .field:last-child { margin-bottom: 0; }
.editor__main { display: grid; gap: 16px; min-width: 0; }
.editor__main .field { margin: 0; }
.editor__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.editor__hint { color: var(--text-dim); font-size: var(--fs-xs); margin-top: 6px; }

.counter { color: var(--text-dim); font-size: var(--fs-xs); font-weight: 400; margin-left: 8px; }
.counter.is-over { color: #ffc46b; }

.md-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: rgba(255, 255, 255, 0.04);
}

.md-toolbar button {
  min-width: 36px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: 700;
  transition: border-color var(--t-fast), color var(--t-fast);
}

.md-toolbar button:hover { color: var(--text); border-color: rgba(139, 92, 255, 0.6); }
.md-toolbar .spacer { flex: 1; }

.md-editor {
  width: 100%;
  min-height: 360px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
}

.md-preview {
  min-height: 120px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-tint);
}

.step-edit {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.step-edit__head { display: flex; align-items: center; gap: 10px; }
.step-edit__head strong { flex: 1; font-size: var(--fs-sm); }
.step-edit__thumb { width: 96px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.step-edit__media { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.media-card {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  text-align: left;
  transition: border-color var(--t-fast), transform var(--t-fast);
}

button.media-card:hover { border-color: rgba(139, 92, 255, 0.6); transform: translateY(-2px); }
.media-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--bg-tint); }
.media-card small { color: var(--text-dim); font-size: 0.72rem; word-break: break-all; }
.media-card .field__input { min-height: 34px; padding: 4px 8px; font-size: 0.8rem; }

.picker {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(139, 92, 255, 0.4);
  border-radius: var(--radius);
  background: var(--bg-tint);
}

.picker__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.picker__head strong { flex: 1; }

.cat-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.cat-row .field__input { min-height: 38px; flex: 1 1 160px; }
.cat-row small { color: var(--text-dim); }

.pill[data-status="content-published"] { color: #7ae6bf; border-color: rgba(66, 220, 163, 0.55); background: rgba(66, 220, 163, 0.14); }
.pill[data-status="content-scheduled"] { color: #8fb4ff; border-color: rgba(47, 125, 255, 0.5); background: rgba(47, 125, 255, 0.12); }
.pill[data-status="content-draft"] { color: var(--text-dim); }

@media (max-width: 1000px) {
  .editor { grid-template-columns: 1fr; }
  .editor__side { position: static; }
}
