/* Blog — sąrašas ir straipsnio skaitymas (mobilus + desktop) */

body.page-blog,
body.page-blog-post {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.page-blog > header,
body.page-blog-post > header {
  flex-shrink: 0;
}

body.page-blog > main#main,
body.page-blog-post > main#main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

body.page-blog > .site-footer,
body.page-blog-post > .site-footer {
  flex-shrink: 0;
  margin-top: auto;
  width: 100%;
}

body.page-blog .blog-layout,
body.page-blog-post .blog-layout {
  flex: 1 1 auto;
  width: 100%;
}

body.page-blog.cookie-banner-active,
body.page-blog-post.cookie-banner-active {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

body.page-blog.cookie-banner-active .back-top,
body.page-blog-post.cookie-banner-active .back-top {
  bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
}

/* —— Bendras konteineris —— */
.blog-layout {
  padding: calc(3.35rem + env(safe-area-inset-top, 0px)) clamp(1rem, 4vw, 1.5rem) 2.5rem;
  background: var(--bg);
  text-align: left;
}

.blog-layout--read {
  padding-top: calc(4rem + env(safe-area-inset-top, 0px));
}

.blog-layout__inner {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
}

.blog-layout--list .blog-layout__inner {
  max-width: 44rem;
}

/* —— Sąrašo antraštė —— */
.blog-index-head {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(184, 121, 0, 0.12);
}

.blog-index-head .section-label {
  margin-bottom: 0.5rem;
  justify-content: flex-start;
}

.blog-index-head .section-label::before {
  display: block;
}

.page-blog .blog-index-title,
.page-blog-post .blog-read-title {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.blog-index-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 6vw, 2.75rem);
  font-weight: 300;
  line-height: 1.12;
  margin: 0 0 0.65rem;
  color: var(--text-light);
}

.blog-index-title em {
  font-style: italic;
  color: var(--gold);
}

.blog-index-lead {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
  font-weight: 300;
}

.blog-index-lead code {
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  background: rgba(184, 121, 0, 0.08);
  color: var(--text-light);
}

.blog-index-empty {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* —— Įrašų sąrašas —— */
.blog-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.blog-entry {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-deep);
  border: 1px solid rgba(184, 121, 0, 0.14);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.blog-entry:hover,
.blog-entry:focus-visible {
  border-color: rgba(255, 184, 0, 0.35);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.blog-entry:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.blog-entry__media {
  aspect-ratio: 16 / 9;
  background: rgba(11, 9, 6, 0.6);
  overflow: hidden;
}

.blog-entry__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-entry__body {
  padding: 1.15rem 1.25rem 1.35rem;
}

.blog-entry__date {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.45rem;
}

.blog-entry__title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4.5vw, 1.55rem);
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  color: var(--text-light);
}

.blog-entry__excerpt {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
  font-weight: 300;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-entry__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

/* —— Straipsnis —— */
.blog-layout--read .blog-layout__inner {
  max-width: 42rem;
}

.blog-read-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0;
  min-height: 44px;
}

.blog-read-back--footer {
  margin-top: 0;
}

.blog-read-back:hover {
  color: var(--gold);
}

.blog-read-head {
  margin-bottom: 1.75rem;
}

.blog-read-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.blog-read-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6.5vw, 2.65rem);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 0.85rem;
  color: var(--text-light);
}

.blog-read-deck {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-muted);
  font-weight: 300;
}

.blog-read-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.blog-read-meta .blog-read-author {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.88rem;
  color: var(--text-light);
}

.blog-read-tags {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.blog-read-tags li {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(184, 121, 0, 0.22);
  color: var(--text-muted);
}

.blog-read-cover {
  margin: 0 0 1.75rem;
  border: 1px solid rgba(184, 121, 0, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.blog-read-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

/* Prose — skaitymui */
.blog-read-prose {
  font-size: 1.0625rem;
  line-height: 1.78;
  font-weight: 300;
  color: var(--text-muted);
}

.blog-read-prose > *:first-child {
  margin-top: 0;
}

.blog-read-prose p {
  margin: 0 0 1.25em;
}

.blog-read-prose h2,
.blog-read-prose h3,
.blog-read-prose h4 {
  font-family: var(--font-display);
  color: var(--text-light);
  font-weight: 400;
  line-height: 1.2;
  margin: 2em 0 0.6em;
}

.blog-read-prose h2 {
  font-size: 1.4rem;
}

.blog-read-prose h3 {
  font-size: 1.2rem;
}

.blog-read-prose ul,
.blog-read-prose ol {
  margin: 0 0 1.25em;
  padding-left: 1.25rem;
}

.blog-read-prose li {
  margin-bottom: 0.45em;
}

.blog-read-prose li::marker {
  color: var(--gold);
}

.blog-read-prose a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-color: rgba(255, 184, 0, 0.35);
}

.blog-read-prose strong {
  color: var(--text-light);
  font-weight: 500;
}

.blog-read-prose code {
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
  background: rgba(184, 121, 0, 0.1);
  padding: 0.12em 0.35em;
  color: var(--text-light);
}

.blog-read-prose blockquote {
  margin: 1.5em 0;
  padding: 0 0 0 1rem;
  border-left: 2px solid var(--gold);
  font-style: italic;
}

.blog-read-prose blockquote p:last-child {
  margin-bottom: 0;
}

.blog-read-prose pre {
  overflow-x: auto;
  padding: 1rem;
  background: var(--bg-deep);
  border: 1px solid rgba(184, 121, 0, 0.12);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 1.25em 0;
}

.blog-read-foot {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(184, 121, 0, 0.12);
}

.blog-read-foot .btn {
  min-height: 44px;
}

/* Desktop: šiek tiek platesnis sąrašas, didesnis tarpas */
@media (min-width: 768px) {
  .blog-layout {
    padding-top: 4rem;
    padding-bottom: 3rem;
  }

  .blog-layout--list .blog-layout__inner {
    max-width: 52rem;
  }

  .blog-feed {
    gap: 1.5rem;
  }

  .blog-entry {
    display: grid;
    grid-template-columns: 220px 1fr;
    grid-template-rows: auto;
  }

  .blog-entry__media {
    aspect-ratio: auto;
    min-height: 100%;
  }

  .blog-entry__body {
    padding: 1.35rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .blog-entry__excerpt {
    -webkit-line-clamp: 4;
  }

  .blog-read-prose {
    font-size: 1.125rem;
    line-height: 1.82;
  }

  .blog-read-prose h2 {
    font-size: 1.55rem;
  }
}

@media (min-width: 1024px) {
  .blog-entry {
    grid-template-columns: 260px 1fr;
  }
}