/* Majordomo blog. Loaded after /css/styles.css, which provides the colour
   tokens (light/dark), fonts, .wrap, the header, the language selector and
   the theme toggle. */

/* ---------- Language switching ----------
   Text in all three languages is in the page; only the one matching
   <html lang> is shown. Unmarked elements are shared by all languages. */
html[lang="en"] [data-lang]:not([data-lang="en"]),
html[lang="ro"] [data-lang]:not([data-lang="ro"]),
html[lang="hu"] [data-lang]:not([data-lang="hu"]) { display: none !important; }

/* ---------- Header ---------- */
.blog-header .header-inner { gap: 16px; }
.blog-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.blog-header .brand { display: inline-flex; align-items: center; }
.blog-header-label {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.94rem;
  padding: 6px 14px 6px 8px;
  margin-left: -8px;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.back-link:hover { background: var(--blue); color: #ffffff; }
.back-link svg {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Blog index ---------- */
.blog-main { padding: 64px 0 88px; }
.blog-hero { max-width: 760px; margin: 0 auto 44px; }
.blog-hero h1,
.article-head h1 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
}
.blog-hero h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  margin: 0 0 12px;
}
.blog-hero p { color: var(--ink-soft); font-size: 1.08rem; margin: 0; }

/* Category navigation and sections */
.blog-categories {
  max-width: 760px;
  margin: 0 auto 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.blog-categories a {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.blog-categories a:hover { background: var(--blue); border-color: var(--blue); color: #ffffff; }
.blog-category {
  max-width: 760px;
  margin: 0 auto 56px;
  scroll-margin-top: 96px;
}
.blog-category:last-child { margin-bottom: 0; }
.category-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 6px;
}
.category-intro { color: var(--ink-soft); margin: 0 0 22px; }

.post-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.post-card {
  display: block;
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-alt);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.post-card:hover { background: var(--hover); border-color: var(--line-strong); }
.post-card:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.post-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 6px 0 10px;
  color: var(--ink);
}
.post-card p { margin: 0; color: var(--ink-soft); }
.post-date {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.post-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}
.post-card:hover .post-more { text-decoration: underline; }

/* ---------- Article ---------- */
.article { max-width: 720px; margin: 0 auto; }
.article-head { margin-bottom: 36px; }
.post-category {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.post-category a { color: var(--ink-soft); text-decoration: none; }
.post-category a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.post-byline {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.post-byline a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.article-head h1 {
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.2;
  margin: 10px 0 0;
}
.article-body {
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--ink-soft);
}
.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin: 40px 0 12px;
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 8px;
}
.article-body p { margin: 0 0 18px; }
.article-shot { margin: 28px 0; }
.article-shot a { display: block; cursor: zoom-in; }
.article-shot img {
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.article-shot.narrow img { max-width: min(100%, 480px); }
.article-shot figcaption {
  margin-top: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 22px; }
.article-body li { margin-bottom: 6px; }
.article-body a { color: var(--ink); }
.article-body strong { color: var(--ink); }
.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 28px auto;
}
.article-body blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--line-strong);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
}
.article-note {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}

.article-cta {
  margin: 56px auto 0;
  max-width: 720px;
  padding: 32px 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-alt);
  text-align: center;
}
.article-cta h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 10px;
}
.article-cta p { margin: 0 0 20px; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.blog-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-alt);
  padding: 32px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.blog-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  margin-bottom: 10px;
}
.blog-footer a { color: var(--ink-soft); text-decoration: none; }
.blog-footer a:hover { color: var(--ink); text-decoration: underline; }
.blog-footer p { margin: 0; }

@media (max-width: 560px) {
  .blog-main { padding: 40px 0 64px; }
  .blog-header .brand-logo { height: 28px; }
  .blog-header-label { font-size: 1rem; padding-left: 10px; }
  .back-link .back-text { display: none; }
  .back-link { padding: 6px; margin-left: -6px; }
  .post-card { padding: 22px 20px; }
  .article-cta { padding: 26px 20px; }
}
