/* Fascinerend Fit! — Ghost Theme CSS */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg:         #F5EFE6;
  --bg-alt:     #EEE8DF;
  --surface:    #FFFFFF;
  --border:     #E8DDD0;
  --text:       #1A202C;
  --text-sub:   #4A5568;
  --text-muted: #718096;
  --green:      #2E7D32;
  --green-dim:  #E8F5E9;
  --orange:     #F5A623;
  --orange-dim: #FEF0D6;
  --yellow-green: #a9b919;
  --radius:     14px;
  --font:       'Georgia', 'Times New Roman', serif;
  --max-width:  860px;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  min-height: 100vh;
}

img { max-width: 1200px; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 8px;
  width: 100%;
  flex-wrap: nowrap;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-logo img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
}

.site-logo-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  font-style: italic;
  white-space: nowrap;
}

.site-logo-text span {
  color: var(--orange);
}

.site-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  align-items: center;
  overflow-x: auto;
}

.site-nav a {
  font-size: 12px;
  color: var(--text-sub);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--green);
  text-decoration: none;
}

/* ── Hero (homepage) ────────────────────────────────────────── */
.site-hero {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  border-bottom: 1px solid var(--border);
  padding: 48px 24px 40px;
  text-align: center;
}

.site-hero h1 {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 400;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 12px;
}

.site-hero h1 em {
  color: var(--green);
  font-style: italic;
}

.site-hero p {
  font-size: 15px;
  color: var(--text-sub);
  max-width: 480px;
  margin: 0 auto;
}

/* ── Main Layout ────────────────────────────────────────────── */
.site-main {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ── Chapter Label ──────────────────────────────────────────── */
.chapter-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 600;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ── Post Grid (index) ──────────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: block;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  text-decoration: none;
}

.post-card-tag {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--green);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.post-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 8px;
}

.post-card-excerpt {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-card-reading-time {
  font-size: 11px;
  color: var(--text-muted);
}

.post-card-free {
  font-size: 10px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-dim);
  padding: 2px 8px;
  border-radius: 20px;
}

.post-card-premium {
  font-size: 10px;
  font-weight: 600;
  color: var(--orange);
  background: var(--orange-dim);
  padding: 2px 8px;
  border-radius: 20px;
}

/* ── Tag/Chapter page ───────────────────────────────────────── */
.tag-header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.tag-header h1 {
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 6px;
}

.tag-header p {
  font-size: 14px;
  color: var(--text-sub);
}

/* ── Article (post) ─────────────────────────────────────────── */
.article-header {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.article-tag {
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.article-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 400;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.article-meta-item {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.article-feature-image {
  margin-bottom: 40px;
  border-radius: var(--radius);
  overflow: hidden;
}

.article-feature-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Article Body ───────────────────────────────────────────── */
.gh-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}

.gh-content h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green);
}

.gh-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 32px 0 12px;
}

.gh-content p {
  margin-bottom: 20px;
  color: var(--text-sub);
}

.gh-content strong {
  color: var(--text);
  font-weight: 600;
}

.gh-content em {
  color: var(--green);
  font-style: italic;
}

.gh-content a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-underline-offset: 2px;
}

.gh-content blockquote {
  border-left: 3px solid var(--green);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--green-dim);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-sub);
}

.gh-content ul, .gh-content ol {
  margin: 0 0 20px 24px;
  color: var(--text-sub);
}

.gh-content li {
  margin-bottom: 6px;
}

.gh-content li::marker {
  color: var(--green);
}

.gh-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.gh-content img {
  border-radius: 10px;
  margin: 24px 0;
}

.gh-content pre {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  overflow-x: auto;
  font-size: 13px;
  margin: 24px 0;
}

.gh-content code {
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* ── Article Navigation ─────────────────────────────────────── */
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.article-nav-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 45%;
  text-decoration: none;
}

.article-nav-item:hover { text-decoration: none; }

.article-nav-label {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.article-nav-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  line-height: 1.4;
}

.article-nav-item.next { text-align: right; margin-left: auto; }

/* ── App CTA Banner ─────────────────────────────────────────── */
.app-cta {
  background: linear-gradient(135deg, var(--green-dim) 0%, var(--bg) 100%);
  border: 1.5px solid rgba(46, 125, 50, 0.2);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 48px 0;
  display: flex;
  align-items: center;
  gap: 20px;
}

.app-cta-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.app-cta-text h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.app-cta-text p {
  font-size: 13px;
  color: var(--text-sub);
  margin: 0;
}

.app-cta-button {
  margin-left: auto;
  background: var(--green);
  color: white !important;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none !important;
  flex-shrink: 0;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
}

.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.site-footer-logo {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  font-style: italic;
}

.site-footer-logo span { color: var(--green); }

.site-footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .post-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .app-cta { flex-direction: column; text-align: center; }
  .app-cta-button { margin-left: 0; }
  .article-nav { flex-direction: column; }
  .article-nav-item { max-width: 1200px; }
  .article-nav-item.next { text-align: left; margin-left: 0; }
}

/* ── Ghost Koenig Editor classes (required) ─────────────────── */
.kg-width-wide {
  margin-left: calc(50% - 50vw + 24px);
  margin-right: calc(50% - 50vw + 24px);
  max-width: min(100vw - 48px, 1000px);
}

.kg-width-full {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: 100vw;
}

.kg-image { max-width: 1200px; }
.kg-image-card { margin: 24px 0; }
.kg-image-card img { border-radius: 10px; }
.kg-image-card figcaption {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

.kg-gallery-container { display: flex; flex-direction: column; gap: 8px; margin: 24px 0; }
.kg-gallery-row { display: flex; gap: 8px; }
.kg-gallery-image { flex: 1; }
.kg-gallery-image img { border-radius: 8px; width: 100%; height: 100%; object-fit: cover; }

.kg-bookmark-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
}
.kg-bookmark-container {
  display: flex;
  text-decoration: none;
  color: inherit;
}
.kg-bookmark-content { padding: 16px; flex: 1; }
.kg-bookmark-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.kg-bookmark-description { font-size: 13px; color: var(--text-sub); }
.kg-bookmark-thumbnail { width: 120px; object-fit: cover; }

.kg-callout-card {
  background: var(--green-dim);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 24px 0;
  display: flex;
  gap: 12px;
}
.kg-callout-emoji { font-size: 20px; }
.kg-callout-text { color: var(--text-sub); font-size: 15px; }

.kg-toggle-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 16px 0;
  overflow: hidden;
}
.kg-toggle-heading { padding: 14px 16px; font-weight: 600; cursor: pointer; }
.kg-toggle-content { padding: 0 16px 14px; color: var(--text-sub); }

.kg-video-card { margin: 24px 0; }
.kg-video-card video { width: 100%; border-radius: var(--radius); }

.kg-audio-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 24px 0;
}

.kg-hr-card { margin: 40px 0; border: none; border-top: 1px solid var(--border); }

.kg-file-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.kg-file-card:hover { background: var(--bg-alt); }
.kg-file-title { font-weight: 600; font-size: 14px; }
.kg-file-caption { font-size: 12px; color: var(--text-muted); }

/* ── Mobile nav ─────────────────────────────────────────────── */
.site-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
  font-size: 20px;
}

@media (max-width: 600px) {
  .site-nav { display: none; flex-direction: column; position: absolute;
    top: 64px; left: 0; right: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); padding: 12px 24px; gap: 0; z-index: 99; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
  .site-nav a:last-child { border-bottom: none; }
  .site-nav-toggle { display: block; }
  .site-header { position: relative; }
}

/* ── Login button ───────────────────────────────────────────── */
.site-login-btn {
  background: var(--green);
  color: white !important;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none !important;
  flex-shrink: 0;
}

.site-login-btn:hover {
  background: #1b5e20;
  text-decoration: none !important;
}
