/*
Theme Name: blog3 Dark Premium
Theme URI: https://blog3.de
Description: Modern dark premium finance theme for blog3 German financial blog.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: blog3
*/

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

:root {
  --bg:          #080c14;
  --surface:     #0f1523;
  --surface2:    #161d2e;
  --border:      #1e2a40;
  --text:        #e8eaf0;
  --text-muted:  #7a8394;
  --accent:      #00d4a8;
  --accent-glow: rgba(0,212,168,.15);
  --accent-dim:  rgba(0,212,168,.08);

  --cat-cyan-bg:   rgba(0,212,168,.12);
  --cat-cyan-text: #00d4a8;
  --cat-blue-bg:   rgba(59,130,246,.12);
  --cat-blue-text: #60a5fa;
  --cat-purple-bg: rgba(168,85,247,.12);
  --cat-purple-text: #c084fc;
  --cat-amber-bg:  rgba(251,191,36,.12);
  --cat-amber-text: #fbbf24;
  --cat-red-bg:    rgba(248,113,113,.12);
  --cat-red-text:  #f87171;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container: 1100px;
  --radius: 10px;
  --radius-sm: 6px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ──────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--text);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h3 { font-size: 1.2rem; }

a { color: var(--accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .75; }

p { margin-bottom: 1.2rem; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

/* ── Layout ──────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Site Header / Navbar ──────────────────────────────── */
.site-header {
  background: rgba(8,12,20,.95);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.navbar-brand {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.03em;
  white-space: nowrap;
}
.navbar-brand img {
  margin-top: 4px;
  height: 40px;
  width: auto;
  max-width: 350px;
  max-height: 40px;
  object-fit: contain;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-links li { flex-shrink: 0; }

.navbar-links a {
  display: block;
  padding: .5rem .625rem;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
}

.navbar-links a:hover {
  color: var(--accent);
  background: var(--accent-dim);
  opacity: 1;
}

.navbar-links .current-menu-item a {
  color: var(--accent);
  background: var(--accent-dim);
}

/* ── Dropdowns ────────────────────────────────────────── */
.has-dropdown { position: relative; }

.navbar-links .has-dropdown > a {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.dropdown-arrow {
  transition: transform .2s;
  flex-shrink: 0;
  opacity: .6;
}

.has-dropdown:hover .dropdown-arrow { transform: rotate(180deg); }

.navbar-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
  padding: .5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .2s;
  z-index: 200;
  min-width: 360px;
}

.has-dropdown:hover .navbar-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.navbar-dropdown a {
  display: block;
  padding: .5rem .875rem;
  font-size: .875rem;
  color: var(--text-muted);
  transition: background .15s, color .15s;
}

.navbar-dropdown a:hover {
  background: var(--surface2);
  color: var(--text);
  opacity: 1;
}

.navbar-dropdown-wide { min-width: 360px; max-width: 420px; }

.dropdown-article-link {
  display: flex;
  align-items: center;
  padding: .625rem .875rem !important;
}

.dropdown-article-link:hover { background: var(--surface2) !important; }

.dropdown-article-title {
  font-size: .825rem;
  line-height: 1.4;
  color: var(--text-muted);
  transition: color .15s;
}

.dropdown-article-link:hover .dropdown-article-title { color: var(--accent); }

/* ── Mobile ────────────────────────────────────────────── */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: .25rem;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1rem;
  gap: .25rem;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  display: block;
  padding: .6rem .75rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

.mobile-nav a:hover { background: var(--surface2); color: var(--accent); }

.mobile-menu-section { padding: .5rem 0; }

.mobile-menu-label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  padding: .25rem .75rem;
  margin-bottom: .25rem;
}

.mobile-sub {
  padding-left: 1.25rem !important;
  font-weight: 400 !important;
  font-size: .8rem !important;
}

@media (max-width: 768px) {
  .navbar-links { display: none; }
  .mobile-toggle { display: block; }
  .navbar-dropdown { display: none; }
  .has-dropdown:hover .navbar-dropdown { display: none; }
}

/* ── Featured Hero ──────────────────────────────────────── */
.featured-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 4rem;
  background-size: cover;
  background-position: center;
  background-color: var(--surface);
}

.featured-hero .container {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(0,212,168,.15);
  border: 1px solid rgba(0,212,168,.3);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3rem .7rem;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}

.featured-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1rem;
  max-width: 680px;
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: .82rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 1.25rem;
}

.featured-meta span {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.featured-excerpt {
  font-size: 1.05rem;
  color: rgba(255,255,255,.75);
  line-height: 1.7;
  margin-bottom: 1.75rem;
  max-width: 600px;
}

.featured-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--accent);
  color: #080c14;
  font-weight: 700;
  font-size: .9rem;
  padding: .7rem 1.4rem;
  border-radius: var(--radius);
  transition: all .2s;
}
.featured-btn:hover {
  background: #00f0c0;
  transform: translateX(3px);
  opacity: 1;
}

/* ── About Section ──────────────────────────────────────── */
.about-section {
  padding: 5rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.about-heading {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 1.25rem;
  line-height: 1.25;
}

.about-text p {
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.75;
}

.about-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -.03em;
}

.stat-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}

.about-visual {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.about-card-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,212,168,.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.about-card h3 {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: .3rem;
}

.about-card p {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 768px) {
  .about-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-stats { gap: 1.5rem; }
}

/* ── Post Grid ──────────────────────────────────────────── */
.posts-section { padding: 3rem 0; }

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-title {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-line { flex: 1; height: 1px; background: var(--border); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}

.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,.4), 0 0 0 1px var(--accent-glow);
}

.post-card-image {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: var(--surface2);
}

.post-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
  font-size: .78rem;
  color: var(--text-muted);
}

.post-card-meta time { display: flex; align-items: center; gap: .3rem; }
.read-time { color: var(--text-muted); }

.post-card h2 {
  font-size: 1.05rem;
  margin-bottom: .6rem;
  line-height: 1.35;
}

.post-card h2 a { color: var(--text); }
.post-card h2 a:hover { color: var(--accent); opacity: 1; }

.post-card-excerpt {
  color: var(--text-muted);
  font-size: .875rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.25rem;
}

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

.read-more {
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: .3rem;
}

.read-more::after { content: "→"; }

/* ── Single Layout ─────────────────────────────────────── */
.single-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
  padding-bottom: 4rem;
}

.single-toc {
  position: sticky;
  top: 80px;
}

/* ── TOC ────────────────────────────────────────────────── */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: .8rem;
}

.toc-header {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}

.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc-counter;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.toc-item {
  counter-increment: toc-counter;
}

.toc-item a {
  display: block;
  padding: .3rem .5rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  line-height: 1.4;
  transition: all .15s;
  font-size: .8rem;
}

.toc-item a:hover {
  color: var(--accent);
  background: var(--accent-dim);
  border-left-color: var(--accent);
  opacity: 1;
}

.toc-sub { padding-left: .75rem; }
.toc-sub a { font-size: .775rem; }

/* ── Single Featured Image ────────────────────────────── */
.single-featured-image {
  width: 100%;
  height: 400px;
  background-size: cover;
  background-position: center;
  background-color: var(--surface);
  margin-bottom: 0;
}

/* ── Single Header ────────────────────────────────────── */
.single-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.single-header .container { max-width: 1100px; }

.single-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: .82rem;
  color: var(--text-muted);
}

/* ── Single Content ────────────────────────────────────── */
.single-content {
  max-width: 720px;
  padding-bottom: 0;
}

.single-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #c8cdd8;
  margin-bottom: 1.4rem;
}

.single-content h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 1rem;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
  color: var(--text);
}

.single-content h3 {
  font-size: 1.1rem;
  margin: 1.75rem 0 .75rem;
  color: var(--text);
}

.single-content strong { color: var(--text); font-weight: 600; }
.single-content a { color: var(--accent); border-bottom: 1px solid var(--accent-glow); }
.single-content ul, .single-content ol { color: #c8cdd8; padding-left: 1.5rem; margin-bottom: 1.2rem; line-height: 1.8; }
.single-content li { margin-bottom: .4rem; font-size: 1rem; }

/* ── Author Box ────────────────────────────────────────── */
.author-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 3rem;
}

.author-avatar {
  width: 56px;
  height: 56px;
  min-width: 56px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,212,168,.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.author-info { flex: 1; }

.author-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: .3rem;
}

.author-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .5rem;
}

.author-bio {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* ── Related Posts ─────────────────────────────────────── */
.related-posts {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.related-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s;
}

.related-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  opacity: 1;
}

.related-img {
  width: 100%;
  height: 120px;
  background-size: cover;
  background-position: center;
  background-color: var(--surface2);
}

.related-body {
  padding: 1rem;
}

.related-date {
  font-size: .72rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: .35rem;
}

.related-body h4 {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
}

.related-card:hover h4 { color: var(--accent); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .single-layout { grid-template-columns: 1fr; }
  .single-toc { display: none; }
}

@media (max-width: 640px) {
  .related-grid { grid-template-columns: 1fr; }
  .single-featured-image { height: 240px; }
  .author-box { flex-direction: column; }
}

/* ── Page Content ───────────────────────────────────────── */
.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.page-content h1 { margin-bottom: 1.5rem; font-size: clamp(1.6rem, 4vw, 2.2rem); }

.page-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.5rem 0 .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}

.page-content p { color: #c8cdd8; line-height: 1.8; margin-bottom: 1.2rem; font-size: .975rem; }

.page-content a { color: var(--accent); border-bottom: 1px solid var(--accent-glow); }
.page-content a:hover { opacity: .8; }

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

.page-content ul, .page-content ol {
  color: #c8cdd8;
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
  line-height: 1.8;
}

.page-content li { margin-bottom: .4rem; font-size: .975rem; }

.page-content em { color: var(--text-muted); font-style: italic; }

/* Contact highlight box */
.contact-highlight {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.contact-highlight p { color: var(--text-muted); margin: 0; font-size: .9rem; }
.contact-highlight strong { color: var(--accent); }

/* ── Site Footer ────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-copy { font-size: .8rem; color: var(--text-muted); }

.footer-links { list-style: none; display: flex; gap: 1.5rem; }
.footer-links a { font-size: .8rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); opacity: 1; }

/* ── Reading Time ───────────────────────────────────────── */
.reading-time-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: .2rem .55rem;
  border-radius: 20px;
}

/* ── Back Link ──────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.back-link:hover { color: var(--accent); }

/* ── Utility ─────────────────────────────────────────────── */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
