/* ==========================================================================
   Blog: listing (/blog, /blog/katigoria/{slug}) and article (/blog/{slug}).
   Page-specific layout only; cards, pagination, banners, callout and rich
   text come from app.css.
   ========================================================================== */

/* Listing ----------------------------------------------------------------- */
/* Each card sits in a wrapper that carries the scroll reveal, so a long list
   never depends on one very tall element entering the viewport. */
.blog-grid__item {
  display: flex;
}
.blog-grid__item > .card {
  flex: 1 1 auto;
  width: 100%;
}

/* Category pages: a quiet way back to the full list, above the grid. The
   shared arrow link, mirrored (arrow first, nudging left on hover). */
.blog-back {
  margin: 0 0 var(--space-5);
}
/* From two columns up the grid is centred (a category may hold one or two
   posts), so the link is centred with it. */
@media (min-width: 768px) {
  .blog-back {
    text-align: center;
  }
}
.blog-back .link-arrow--back {
  flex-direction: row-reverse;
  color: var(--c-text);
  transition: color .3s;
}
.blog-back .link-arrow--back:hover,
.blog-back .link-arrow--back:focus-visible {
  color: var(--c-heading);
}
.blog-back .link-arrow--back:hover .icon {
  transform: translateX(-4px);
}

/* No posts yet. */
.blog-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 760px;
  margin-inline: auto;
  padding: 40px 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--bg-soft);
  text-align: center;
}
.blog-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin-bottom: var(--space-4);
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--accent);
}
.blog-empty__title {
  margin: 0 0 var(--space-3);
}
.blog-empty__actions {
  margin-top: var(--space-5);
}
@media (min-width: 768px) {
  .blog-empty {
    padding: 60px 40px;
  }
}

/* Article ----------------------------------------------------------------- */
/* Ribbon for drafts / scheduled posts opened by a logged-in admin. */
.post-preview {
  position: sticky;
  top: var(--header-h);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin: 0;
  padding: 10px var(--gutter);
  background: var(--accent);
  color: var(--navy-950);
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}
.post-preview .icon {
  flex: none;
}

.page--post .banner__head .eyebrow {
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Contact prompt closing the article. */
.post-callout {
  margin: var(--space-7) 0 0;
}
.post-callout__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-4);
}
@media (min-width: 768px) {
  .post-callout {
    padding: 40px;
  }
}

/* Previous / next article: two equal halves around a round "all posts" link.
   Stacked below 768px, where long Greek titles need the full width. */
.post-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.post-nav__side {
  display: flex;
  width: 100%;
  min-width: 0;
}
.post-nav__side--next {
  justify-content: flex-end;
}
.post-nav__side.is-empty {
  display: none;
}
.post-nav__link {
  display: flex;
  align-items: center;
  gap: 25px;
  max-width: 100%;
  min-height: 44px;
  color: var(--ink-900);
}
.post-nav__side--next .post-nav__link {
  text-align: right;
}
.post-nav__link .icon {
  flex: none;
  transition: transform .3s var(--ease), color .3s;
}
.post-nav__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.post-nav__label {
  color: var(--ink-500);
  font-size: 1rem;
  line-height: 1.5;
}
.post-nav__title {
  color: var(--ink-900);
  font-size: var(--fs-h6);
  font-weight: var(--fw-heading);
  line-height: 1.25;
  letter-spacing: -.01em;
  overflow-wrap: break-word;
  transition: color .3s;
}
.post-nav__link:hover .post-nav__title,
.post-nav__link:hover .icon,
.post-nav__link:focus-visible .post-nav__title,
.post-nav__link:focus-visible .icon {
  color: var(--blue-500);
}
.post-nav__side--prev .post-nav__link:hover .icon {
  transform: translateX(-6px);
}
.post-nav__side--next .post-nav__link:hover .icon {
  transform: translateX(6px);
}
.post-nav__all {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 1px solid var(--ink-300);
  border-radius: 50%;
  color: var(--ink-900);
  transition: background-color .4s, color .4s, border-color .4s;
}
.post-nav__all:hover,
.post-nav__all:focus-visible {
  border-color: var(--navy-900);
  background: var(--navy-900);
  color: var(--accent);
}
@media (min-width: 768px) {
  .post-nav {
    flex-direction: row;
    gap: var(--space-6);
  }
  .post-nav__side {
    flex: 1 1 0;
    width: auto;
  }
  /* An empty side keeps its half, so the round link stays centred. */
  .post-nav__side.is-empty {
    display: flex;
  }
}
@media (min-width: 992px) {
  .post-nav {
    gap: var(--space-7);
    margin-top: var(--space-7);
  }
}

/* Related posts: the "all posts" link hugs the right edge of the heading row. */
.post-related .section-head--split > .post-related__more {
  flex: none;
}

@media (prefers-reduced-motion: reduce) {
  .post-nav__link .icon {
    transition: none;
  }
}

/* On phones the trail ends at "Blog": the article title follows as the <h1>
   right below, so its copy in the trail is kept for assistive tech only. */
@media (max-width: 767px) {
  .page--post .banner__breadcrumbs [aria-current] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
