/* ==================================================================
   Dodocluster — Single Post / Beitragsdetail
   ================================================================== */

.detail-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 50px 40px 80px;
  position: relative;
  z-index: 5;
}

@media (max-width: 900px) {
  .detail-page { padding: 32px 20px 60px; }
}

/* ── Hero Cover ─────────────────────────────────────────────────── */

.detail-hero-cover {
  position: relative;
  aspect-ratio: 21 / 9;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 40px;
  border: 2px solid rgba(164,212,58,0.2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

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

.detail-hero-cover .post-cover-art {
  border-radius: 0;
  width: 100%;
  height: 100%;
}

.detail-hero-cover .post-cover-art svg {
  width: 36%;
  height: 36%;
}

.detail-hero-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(5,6,13,0.9) 100%);
  pointer-events: none;
}

.detail-hero-cover .post-cat-chip {
  top: 24px;
  left: 24px;
  padding: 10px 16px;
  font-size: 13px;
}

.detail-hero-cover .pinned-ribbon {
  top: 24px;
  right: 24px;
  padding: 10px 16px;
  font-size: 13px;
}

/* ── Two-column layout ──────────────────────────────────────────── */

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 50px;
}

@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
}

/* ── Article ────────────────────────────────────────────────────── */

.article {
  font-family: var(--font-body);
  color: var(--cream);
  min-width: 0;
  background: rgba(10, 14, 31, 0.6);
  border: 1px solid rgba(164, 212, 58, 0.1);
  border-radius: 20px;
  padding: 40px 48px;
}

.article h1 {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 1.08;
  color: var(--lime-bright);
  text-shadow: 0 3px 0 var(--lime-shadow), 0 6px 0 #1a2a0a, 0 12px 24px rgba(0,0,0,0.5);
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .article { padding: 24px 20px; }
  .article h1 { font-size: 36px; }
}

.article-meta {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 0 24px;
  border-bottom: 2px dashed rgba(164,212,58,0.2);
  margin-bottom: 32px;
  font-size: 14px;
  opacity: 0.85;
}

.article-meta .post-author { gap: 12px; }

.article-meta .author-avatar {
  width: 44px;
  height: 44px;
  font-size: 18px;
}

.article-meta .author-name {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 1px;
  display: block;
}

.article-meta .dot-sep { opacity: 0.3; }

/* ── Article body ───────────────────────────────────────────────── */

.article-body {
  font-size: 17px;
  line-height: 1.7;
}

.article-body > * + * { margin-top: 20px; }

.article-body .lede {
  font-size: 21px;
  line-height: 1.55;
  color: var(--cream);
  opacity: 0.95;
  padding-left: 20px;
  border-left: 4px solid var(--lime);
  font-weight: 500;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--lime-bright);
  text-shadow: 0 2px 0 var(--lime-shadow);
  margin-top: 40px !important;
  letter-spacing: 0.5px;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 21px;
  color: var(--cream);
  margin-top: 28px !important;
  letter-spacing: 0.3px;
}

.article-body p { opacity: 0.88; }

.article-body ul,
.article-body ol { padding-left: 24px; }

.article-body li {
  margin-bottom: 10px;
  opacity: 0.88;
}

.article-body li::marker { color: var(--lime-bright); }

.article-body strong {
  color: var(--lime-bright);
  font-weight: 600;
}

.article-body a {
  color: var(--lime-bright);
  border-bottom: 1px dotted rgba(164,212,58,0.5);
  text-decoration: none;
}

.article-body a:hover { border-bottom-style: solid; }

.article-body blockquote {
  padding: 16px 20px;
  border-left: 4px solid var(--lime);
  background: rgba(164,212,58,0.06);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  opacity: 0.9;
}

.article-body img {
  max-width: 100%;
  border-radius: 12px;
  border: 2px solid rgba(164,212,58,0.15);
}

/* Callout boxes — editors can add class="callout" to a block */
.article-body .callout,
.callout {
  padding: 22px 26px;
  background: rgba(255,194,58,0.08);
  border: 2px solid rgba(255,194,58,0.35);
  border-radius: 16px;
  font-size: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.callout .ic {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.callout strong { color: #ffc23a; }

/* ── Article footer (share) ─────────────────────────────────────── */

.article-footer {
  margin-top: 50px;
  padding: 24px 0;
  border-top: 2px dashed rgba(164,212,58,0.2);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.share-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}

.share-btns > span {
  font-family: var(--font-hand);
  font-size: 17px;
  opacity: 0.7;
  margin-right: 4px;
}

.share-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: rgba(26,21,48,0.7);
  border: 2px solid rgba(164,212,58,0.2);
  color: var(--cream);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s;
  text-decoration: none;
}

.share-btn:hover {
  border-color: var(--lime);
  transform: translateY(-2px);
  color: var(--lime-bright);
}

.share-btn svg {
  width: 18px;
  height: 18px;
}

/* ── Prev/Next navigation ───────────────────────────────────────── */

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 70px;
}

@media (max-width: 600px) {
  .post-nav { grid-template-columns: 1fr; }
}

.post-nav-link {
  padding: 20px;
  background: rgba(10,14,31,0.6);
  border: 2px solid rgba(164,212,58,0.15);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
  display: block;
}

.post-nav-link:hover {
  border-color: rgba(164,212,58,0.4);
  transform: translateY(-3px);
}

.post-nav-link.next { text-align: right; }

.post-nav-label {
  font-family: var(--font-hand);
  font-size: 15px;
  opacity: 0.6;
  margin-bottom: 6px;
  display: block;
}

.post-nav-title {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--cream);
  letter-spacing: 0.5px;
  line-height: 1.3;
}

/* ── Sidebar ────────────────────────────────────────────────────── */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 100px;
  align-self: start;
}

@media (max-width: 900px) {
  .sidebar { position: static; }
}

.side-card {
  background: rgba(10,14,31,0.75);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(164,212,58,0.18);
  border-radius: 18px;
  padding: 22px;
}

.side-card h4 {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 1.5px;
  color: var(--lime-bright);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.side-card h4::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
  flex-shrink: 0;
}

/* ToC */
.toc-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-list a {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--cream);
  opacity: 0.8;
  border-radius: 8px;
  border-left: 3px solid transparent;
  text-decoration: none;
  transition: all 0.15s;
}

.toc-list a:hover,
.toc-list a.active {
  background: rgba(164,212,58,0.08);
  border-left-color: var(--lime);
  opacity: 1;
}

/* Related posts */
.related-mini {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.related-mini a {
  display: flex;
  gap: 12px;
  padding: 10px;
  margin: -10px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.related-mini a:hover { background: rgba(164,212,58,0.06); }

.related-mini .mini-cover {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.related-mini .mini-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  border-radius: 0;
}

.related-mini .mini-cover svg {
  width: 55%;
  height: 55%;
}

.related-mini .mini-text { min-width: 0; }

.related-mini .mini-cat {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 1.5px;
  opacity: 0.7;
  display: block;
  margin-bottom: 3px;
}

.related-mini .mini-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--cream);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tag cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-cloud a {
  font-family: var(--font-body);
  font-size: 12px;
  padding: 5px 11px;
  background: rgba(164,212,58,0.1);
  border: 1px solid rgba(164,212,58,0.3);
  color: var(--lime-bright);
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.15s;
}

.tag-cloud a:hover {
  background: var(--lime);
  color: #1a2a0a;
}

/* Discord widget */
.discord-widget {
  background: linear-gradient(135deg, rgba(88,101,242,0.15), rgba(88,101,242,0.05));
  border-color: rgba(88,101,242,0.4);
}

.discord-widget h4 { color: #8ab4ff; }

.discord-widget p {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 14px;
  line-height: 1.5;
}

.discord-widget-link {
  display: block;
  text-align: center;
  padding: 10px;
  background: #5865F2;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  letter-spacing: 1px;
  font-size: 13px;
  box-shadow: 0 4px 0 #2a2f7a;
  transition: transform 0.15s;
}

.discord-widget-link:hover { transform: translateY(-2px); }
