/* Single Post (Blocksy Child) — lightweight, responsive, accessible */

:root {
  --bcx-max-content: 760px;      /* Article content width */
  --bcx-gap: 2rem;
  --bcx-gap-lg: 2.5rem;
  --bcx-muted: #6b7280;
  --bcx-border: #e5e7eb;
  --bcx-bg-soft: #fafafa;
  --bcx-link: #0ea5e9;
  --bcx-link-hover: #653490;
}

.bcx-single > * {
  padding: 24px 16px;
}

.bcx-single > article,
.bcx-single nav,
.bcx-single > .ct-comments {
    max-width: calc(var(--bcx-max-content) + 2rem);
  margin-inline: auto;
}

.bcx-article__header {
  margin-bottom: var(--bcx-gap-lg);
  text-align: left;
}

.bcx-article__cat {
  margin: 0 0 8px;
  font-size: 0.875rem;
  color: var(--bcx-muted);
}

.bcx-article__cat a {
  color: inherit;
  text-decoration: none;
}

.bcx-article__title {
  margin: 0 0 8px;
  font-weight: 800;
  line-height: 1.15;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  color: #653490;
}

.bcx-article__meta {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--bcx-muted);
  font-size: 0.95rem;
}

.bcx-article__featured {
  margin: var(--bcx-gap-lg) 0 var(--bcx-gap);
}

.bcx-article__featured-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* Gutenberg content defaults */
.bcx-article__content {
  font-size: 1.05rem;
  line-height: 1.7;
}

.bcx-article__content > * + * {
  margin-top: 1.1em;
}

.bcx-article__content h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  margin-top: 1.6em;
  margin-bottom: 0.4em;
}

.bcx-article__content h3 {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  margin-top: 1.4em;
  margin-bottom: 0.3em;
}

.bcx-article__content img,
.bcx-article__content svg,
.bcx-article__content video {
  max-width: 100%;
  height: auto;
}

.bcx-article__content figure {
  margin: 1.5em 0;
}

.bcx-article__content blockquote {
  border-left: 3px solid var(--bcx-border);
  margin: 1.25em 0;
  padding: 0.8em 1em;
  background: var(--bcx-bg-soft);
}

.bcx-article__content a {
  color: var(--bcx-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bcx-article__content a:hover {
  color: var(--bcx-link-hover);
}

.bcx-article__footer {
  margin-top: var(--bcx-gap-lg);
}

.bcx-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.bcx-tags a {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bcx-bg-soft);
  border-radius: 999px;
  font-size: 0.85rem;
  color: inherit;
  text-decoration: none;
}

/* Prev/Next navigation */
.bcx-post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--bcx-gap);
  margin: calc(var(--bcx-gap-lg) + 8px) 0 var(--bcx-gap-lg);
}

.bcx-post-nav__item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--bcx-border);
  border-radius: 8px;
  text-decoration: none;
  background: #fff;
  transition: transform .12s ease, background-color .12s ease, box-shadow .12s ease;
}

.bcx-post-nav__item:hover { transform: translateY(-1px); box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.bcx-post-nav__item .kicker { color: var(--bcx-muted); font-size: 0.8rem; }
.bcx-post-nav__item .title { color: inherit; font-weight: 600; line-height: 1.35; }

/* Related posts */
.bcx-related {
  margin: var(--bcx-gap-lg) 0;
}

.bcx-related h2 {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  margin: 0 0 12px;
  font-weight: 700;
}

.bcx-related__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--bcx-gap);
}

@media (max-width: 1024px) {
  .bcx-related__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .bcx-post-nav { grid-template-columns: 1fr; }
  .bcx-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .bcx-related__grid { grid-template-columns: 1fr; }
}

.bcx-related__item {
  /*border: 1px solid var(--bcx-border);*/
  /*border-radius: 8px;*/
  /*overflow: hidden;*/
  /*background: #fff;*/
    background: #fff;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    position: relative;
    overflow: hidden;
    min-width: 160px;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

.bcx-related__item:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05);
}

.bcx-related__item:focus-within {
    outline: 3px solid #653490;
    outline-offset: 2px;
}

.bcx-related__link {
  display: grid;
  grid-template-rows: auto 1fr;
  text-decoration: none;
  color: inherit;
}

.bcx-related__item .thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bcx-bg-soft);
}

.bcx-related__item .thumb:has(.placeholder-image) {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #653490 0%, #4a2568 100%);
}

.bcx-related__item .thumb .placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 2rem;
    height: 100%;
}

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

.bcx-related__title {
  padding: 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.bcx-related__title:hover {
    color: #653490;
}

/* Empty state */
.bcx-empty { text-align: center; margin: var(--bcx-gap-lg) 0; }
.bcx-btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 6px;
  background: #0f172a;
  color: #fff;
  text-decoration: none;
}

/* Wide/full alignment support for block editor content */
.bcx-article__content .alignwide {
  width: min(1200px, 100vw - 4rem);
  margin-inline: auto;
}
.bcx-article__content .alignfull {
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
  max-width: 100vw;
}

/* Reduce motion for those who prefer it */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}