/* ============== Straipsniai: korteles, saraso ir straipsnio puslapiai ============== */
/* Naudoja tuos pacius kintamuosius kaip styles.css (jis kraunamas pirmas). */

/* Kalbu perjungimas remiasi hidden atributu, todel jis turi buti stipresnis
   uz svetaines display taisykles. */
[hidden] { display: none !important; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.post-card {
  border: 1px solid var(--line);
  background: var(--white);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -22px rgba(20,50,63,0.25);
}
.post-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--paper-warm);
}
.post-card-media img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body {
  padding: 26px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.post-card-date {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  display: flex; align-items: center; gap: 10px;
}
.post-card-date::before { content: ""; width: 18px; height: 1px; background: var(--brand); }
.post-card-title {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.22;
  font-weight: 500;
  margin: 0;
}
.post-card-excerpt {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.post-card-read {
  margin-top: auto;
  font-size: 13px;
  color: var(--brand);
  display: flex; align-items: center; gap: 8px;
}
.post-card-read .arrow { width: 14px; height: 14px; transition: transform .2s ease; }
.post-card:hover .post-card-read .arrow { transform: translateX(3px); }

/* Nuoroda i visus straipsnius tituliniame puslapyje */
.articles-all {
  margin-top: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--brand);
  border-bottom: 1px solid var(--brand);
  padding-bottom: 4px;
}
.articles-all:hover { color: var(--brand-deep); }

.posts-empty { color: var(--muted); font-size: 16px; }

/* ---------- saraso puslapis ---------- */
.posts-page { padding-top: 88px; }

/* ---------- straipsnio puslapis ---------- */
.article { padding: 72px 0 24px; }
.article-wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 32px; }

.back-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  display: inline-block;
  margin-bottom: 28px;
}
.back-link:hover { color: var(--brand-deep); }
.back-bottom { margin: 56px 0 0; }

.article-date {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.article-title {
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.12;
  margin: 0 0 32px;
}
.article-cover {
  margin: 0 0 40px;
  border: 1px solid var(--line);
  background: var(--paper-warm);
}
.article-cover img { width: 100%; }

.article-body {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 18.5px;
  line-height: 1.72;
  color: var(--ink-soft);
}
.article-body > *:first-child { margin-top: 0; }
.article-body p { margin: 0 0 22px; }
.article-body h2 {
  font-size: clamp(26px, 2.6vw, 34px);
  margin: 48px 0 16px;
}
.article-body h3 {
  font-size: clamp(21px, 2vw, 26px);
  margin: 36px 0 12px;
}
.article-body ul, .article-body ol { margin: 0 0 22px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--brand-deep); }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body blockquote {
  margin: 32px 0;
  padding: 4px 0 4px 26px;
  border-left: 2px solid var(--accent);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.4;
  color: var(--ink);
}
.article-body blockquote p { margin: 0; }
.article-body img { max-width: 100%; height: auto; display: block; margin: 28px auto; border-radius: 4px; }
.article-body figure { margin: 32px 0; }
.article-body figcaption {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
}
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

.more-posts { padding-top: 72px; }
.more-posts .eyebrow { margin-bottom: 32px; display: inline-flex; }

.draft-banner {
  background: var(--accent);
  color: #2c2210;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 10px 16px;
}

.error-page { padding-top: 120px; min-height: 52vh; }

@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .posts-grid { grid-template-columns: 1fr; }
  .article { padding: 40px 0 16px; }
  .article-wrap { padding: 0 20px; }
  .article-body { font-size: 17px; }
  .posts-page { padding-top: 56px; }
  .more-posts { padding-top: 48px; }
}
