/*
Theme Name: ZLN Theme
Theme URI: https://zln.localhost
Author: Codex
Description: Database-driven theme shell for the ZLN Astro to WordPress migration.
Version: 0.2.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: zln-theme
*/

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  min-height: 100vh;
}

.zln-imported-page {
  background: #ffffff;
}

/* Sticky nav clearance — ALL pages */
.page-main-space {
  padding-top: 7rem !important;
}

/* ═══════════════════════════════════════════
   Single Post / Article Template
   ═══════════════════════════════════════════ */

.zln-article {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1a1a2e;
}

/* Header */
.zln-article-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #e8e8ef;
}

.zln-article-meta {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.zln-article-category a {
  display: inline-block;
  background: #eef2ff;
  color: #4f46e5;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.zln-article-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 16px;
  color: #111827;
  letter-spacing: -0.5px;
}

.zln-article-excerpt {
  font-size: 1.2rem;
  line-height: 1.7;
  color: #4b5563;
  margin: 0;
  font-weight: 400;
}

/* Featured Image */
.zln-article-image {
  margin-bottom: 40px;
  border-radius: 12px;
  overflow: hidden;
}

.zln-featured-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Article Content Typography ── */
.zln-article-content {
  font-size: 1.1rem;
  line-height: 1.85;
  color: #374151;
}

.zln-article-content h1 { font-size: 2rem; font-weight: 800; margin: 48px 0 20px; color: #111827; line-height: 1.3; }
.zln-article-content h2 { font-size: 1.6rem; font-weight: 700; margin: 40px 0 16px; color: #1f2937; line-height: 1.35; border-left: 4px solid #4f46e5; padding-left: 16px; }
.zln-article-content h3 { font-size: 1.3rem; font-weight: 700; margin: 32px 0 12px; color: #1f2937; }
.zln-article-content h4 { font-size: 1.15rem; font-weight: 600; margin: 24px 0 10px; color: #374151; }
.zln-article-content h5, .zln-article-content h6 { font-size: 1.05rem; font-weight: 600; margin: 20px 0 8px; }

.zln-article-content p {
  margin: 0 0 1.2em;
}

.zln-article-content a {
  color: #4f46e5;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.zln-article-content a:hover {
  color: #3730a3;
}

.zln-article-content strong {
  font-weight: 700;
  color: #111827;
}

.zln-article-content em {
  font-style: italic;
}

.zln-article-content blockquote {
  margin: 24px 0;
  padding: 20px 24px;
  border-left: 4px solid #4f46e5;
  background: #f8f9ff;
  border-radius: 0 8px 8px 0;
  font-size: 1.05rem;
  color: #4b5563;
}
.zln-article-content blockquote p:last-child {
  margin-bottom: 0;
}

.zln-article-content ul,
.zln-article-content ol {
  margin: 16px 0;
  padding-left: 24px;
}
.zln-article-content li {
  margin-bottom: 8px;
  padding-left: 4px;
}
.zln-article-content li::marker {
  color: #4f46e5;
}
.zln-article-content ul ul,
.zln-article-content ol ol,
.zln-article-content ul ol,
.zln-article-content ol ul {
  margin: 8px 0;
}

.zln-article-content code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
  color: #e11d48;
}

.zln-article-content pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 20px 24px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 20px 0;
}

.zln-article-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.zln-article-content hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 40px 0;
}

.zln-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
}

.zln-article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.95rem;
}
.zln-article-content th {
  background: #f8f9ff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #4f46e5;
}
.zln-article-content td {
  padding: 10px 16px;
  border-bottom: 1px solid #e5e7eb;
}

/* Footer */
.zln-article-footer {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid #e8e8ef;
}

.zln-article-tags {
  margin-bottom: 24px;
}
.zln-article-tags a {
  display: inline-block;
  background: #f3f4f6;
  color: #6b7280;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  margin-right: 6px;
  margin-bottom: 6px;
}
.zln-article-tags a:hover {
  background: #e5e7eb;
  color: #374151;
}
.zln-tag-label {
  font-size: 13px;
  color: #9ca3af;
  margin-right: 4px;
}

.zln-article-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 14px;
}
.zln-article-nav a {
  color: #4f46e5;
  text-decoration: none;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zln-article-nav a:hover {
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .zln-article {
    padding: 32px 16px 48px;
  }
  .zln-article-title {
    font-size: 1.7rem;
  }
  .zln-article-content {
    font-size: 1rem;
  }
  .zln-article-content h2 {
    font-size: 1.3rem;
    padding-left: 12px;
  }
  .zln-article-content h3 {
    font-size: 1.15rem;
  }
}
