/* ───────────────────────────────────────────
   DESIGN TOKENS
─────────────────────────────────────────── */
:root {
  --bg:           #faf9f7;
  --surface:      #ffffff;
  --surface-2:    #f3f1ee;
  --border:       rgba(0,0,0,0.08);
  --text-primary: #1a1714;
  --text-secondary:#5a5450;
  --text-muted:   #9a9490;
  --accent:       #e8410a;
  --accent-soft:  rgba(232,65,10,0.08);
  --shadow-sm:    0 2px 12px rgba(0,0,0,0.05);
  --shadow-md:    0 8px 32px rgba(0,0,0,0.09);
  --radius-sm:    8px;
  --radius-md:    16px;
  --radius-lg:    24px;
  --font-display: 'Fraunces', serif;
  --font-body:    'DM Sans', sans-serif;
  --max-w:        1100px;
  --max-w-article:720px;
}

/* Category Colors */
--cat-ux:       #5b6af0;
--cat-1000:     #e8410a;
--cat-pokemon:  #c9a84c;
--cat-fitness:  #2da870;
--cat-rezepte:  #d94f3d;
--cat-gedanken: #8a7f7a;

/* ───────────────────────────────────────────
   RESET
─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ───────────────────────────────────────────
   HEADER
─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,249,247,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-logo span {
  color: var(--accent);
}
.header-back {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.header-back:hover { color: var(--text-primary); }
.header-back svg { flex-shrink: 0; }
.header-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}
.header-instagram {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.header-instagram:hover { color: var(--accent); }
.lang-switch {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.lang-switch:hover { color: var(--accent); border-color: var(--accent); }

/* ───────────────────────────────────────────
   SUCHE (im Header)
─────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 380px;
  margin: 0 24px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  color: var(--text-muted);
  transition: border-color 0.2s ease;
}
.search-bar:focus-within {
  border-color: var(--accent);
}
.search-bar svg { flex-shrink: 0; }
.search-bar__input {
  border: none;
  background: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  width: 100%;
}
.search-bar__input::placeholder { color: var(--text-muted); }

/* ───────────────────────────────────────────
   CATEGORY NAV
─────────────────────────────────────────── */
.cat-nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 4px;
}
.cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border: none;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}
.cat-btn:hover { color: var(--text-primary); }
.cat-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.cat-count {
  font-size: 11px;
  background: var(--surface-2);
  border-radius: 20px;
  padding: 1px 7px;
  color: var(--text-muted);
}
.cat-btn.active .cat-count {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ───────────────────────────────────────────
   HERO (homepage intro)
─────────────────────────────────────────── */
.blog-hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 24px 40px;
}
.blog-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.blog-hero__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.blog-hero__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.blog-hero__title em {
  font-style: italic;
  color: var(--accent);
}
.blog-hero__sub {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.6;
}

/* ───────────────────────────────────────────
   POST GRID
─────────────────────────────────────────── */
.posts-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 80px;
}
.posts-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.posts-section__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}
.posts-section__count {
  font-size: 13px;
  color: var(--text-muted);
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ───────────────────────────────────────────
   POST CARD
─────────────────────────────────────────── */
.post-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.post-card__image {
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
  background: var(--surface-2);
  flex-shrink: 0;
}
.post-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card:hover .post-card__image img { transform: scale(1.04); }
.post-card__image-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}
.post-card__cat-badge {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
}
.post-card__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.post-card__excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}
.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.post-card__meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.post-card__meta-dot { opacity: 0.4; }
.post-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-weight: 500;
}

/* ───────────────────────────────────────────
   FEATURED POST (first card, full-width)
─────────────────────────────────────────── */
.post-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 0;
}
.post-card--featured .post-card__image {
  width: 52%;
  flex-shrink: 0;
  aspect-ratio: auto;
  min-height: 280px;
}
.post-card--featured .post-card__body {
  padding: 36px 32px;
  justify-content: center;
}
.post-card--featured .post-card__title {
  font-size: 26px;
}
.post-card--featured .post-card__excerpt {
  font-size: 15px;
}

/* ───────────────────────────────────────────
   EMPTY STATE
─────────────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}
.empty-state__icon { font-size: 48px; margin-bottom: 16px; }
.empty-state__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* ───────────────────────────────────────────
   ARTICLE PAGE
─────────────────────────────────────────── */
.article-header {
  max-width: var(--max-w-article);
  margin: 0 auto;
  padding: 56px 24px 40px;
}
.article-cat-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.article-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.article-meta__author {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 500;
}
.article-meta__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #ff9a3c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  color: #fff;
  flex-shrink: 0;
}
.article-meta__dot { opacity: 0.3; }

.article-hero {
  max-width: var(--max-w);
  margin: 0 auto 48px;
  padding: 0 24px;
}
.article-hero img {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 16/7;
  object-fit: cover;
}
.article-hero-placeholder {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 16/7;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}

.article-body {
  max-width: var(--max-w-article);
  margin: 0 auto;
  padding: 0 24px 80px;
}
.article-content { line-height: 1.8; }
.article-content h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin: 40px 0 16px;
  letter-spacing: -0.02em;
}
.article-content h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 12px;
}
.article-content p {
  font-size: 17px;
  margin-bottom: 20px;
  color: var(--text-primary);
}
.article-content ul, .article-content ol {
  margin: 0 0 20px 24px;
  font-size: 17px;
}
.article-content li { margin-bottom: 8px; }
.article-content strong { font-weight: 600; }
.article-content em { font-style: italic; color: var(--text-secondary); }
.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 32px 0;
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-style: italic;
  line-height: 1.5;
}
.article-content img {
  border-radius: var(--radius-md);
  margin: 32px 0;
}
.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-tags {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.article-tags__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}

/* Related posts */
.related-posts {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 80px;
  border-top: 1px solid var(--border);
  padding-top: 64px;
}
.related-posts__title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 28px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ───────────────────────────────────────────
   ADMIN PAGE
─────────────────────────────────────────── */
.admin-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.admin-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}
.admin-title span { color: var(--accent); }
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
}
.form-textarea {
  min-height: 400px;
  resize: vertical;
  line-height: 1.6;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}
.btn-publish {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
  margin-top: 8px;
}
.btn-publish:hover { opacity: 0.88; }
.admin-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-weight: 500;
}
.admin-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-weight: 500;
}
.login-card {
  max-width: 400px;
  margin: 100px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.login-card__title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}
.login-card__sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ───────────────────────────────────────────
   FOOTER
─────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.site-footer a { color: var(--accent); }

/* ───────────────────────────────────────────
   1000-TAGE CHALLENGE KARTE
─────────────────────────────────────────── */
.challenge-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  text-align: center;
  min-width: 200px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.challenge-card__number {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}
.challenge-card__label {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.challenge-card__bar {
  margin-top: 14px;
  height: 6px;
  border-radius: 999px;
  background: rgba(232,65,10,0.15);
  overflow: hidden;
}
.challenge-card__bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* ───────────────────────────────────────────
   NEWSLETTER
─────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.newsletter {
  background: var(--accent-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 24px;
}
.newsletter__inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.newsletter__icon {
  font-size: 32px;
  margin-bottom: 12px;
}
.newsletter__title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.newsletter__sub {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 28px;
}
.newsletter__form {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}
.newsletter__input {
  flex: 1;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
}
.newsletter__input:focus { border-color: var(--accent); }
.newsletter__input::placeholder { color: var(--text-muted); }
.newsletter__submit {
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.newsletter__submit:hover { opacity: 0.92; transform: translateY(-1px); }
.newsletter__note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.newsletter__success {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
  color: #2da870;
}
@media (max-width: 520px) {
  .newsletter { padding: 48px 20px; }
  .newsletter__form { flex-direction: column; }
}

/* ───────────────────────────────────────────
   RESPONSIVE
─────────────────────────────────────────── */
@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card--featured { flex-direction: column; }
  .post-card--featured .post-card__image { width: 100%; aspect-ratio: 16/9; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 20px; gap: 10px; }
  .search-bar { order: 3; max-width: none; width: 100%; margin: 0; flex-basis: 100%; }
}
@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .blog-hero { padding: 40px 20px 32px; }
  .blog-hero__inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .challenge-card { align-self: stretch; }
  .posts-section { padding: 0 20px 60px; }
  .article-header, .article-body { padding-left: 20px; padding-right: 20px; }
}
