/* ============================================================
   freilernen.css — Ghost/Casper-inspired minimal theme
   ============================================================ */

/* ── Fonts ──────────────────────────────────────────────────── */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-300.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-900.woff2') format('woff2');
  font-weight: 900; font-style: normal; font-display: swap;
}

/* ── Custom Properties ──────────────────────────────────────── */
:root {
  --accent:        #cb155e;
  --accent-dark:   #951040;
  --bg:            #ffffff;
  --surface:       #f9fafb;
  --border:        #e5e7eb;
  --text:          #1a1a1a;
  --text-muted:    #6b7280;
  --nav-height:    64px;
  --content-w:     740px;
  --wide-w:        1100px;
  --font:          'Inter', system-ui, -apple-system, sans-serif;
  --radius:        4px;
}

[data-theme="dark"] {
  --bg:            #111111;
  --surface:       #1c1c1c;
  --border:        #2e2e2e;
  --text:          #eeeeee;
  --text-muted:    #9ca3af;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; font: inherit; }

/* ── Skip Link ──────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius);
  z-index: 9999;
  text-decoration: none;
}
.skip-link:focus { left: 0.5rem; }

/* ── Header / Nav ───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  height: var(--nav-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 200;
}

.site-nav {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.logo .dot { color: var(--accent); }

/* Desktop nav links */
.nav-links {
  display: flex;
  list-style: none;
  margin-left: auto;
}
.nav-links a {
  display: block;
  padding: 0.4rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: none;
  padding: 0.4rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  border-radius: var(--radius);
  transition: color 0.15s;
  margin-left: 0.25rem;
}
.theme-toggle:hover { color: var(--text); }
.theme-toggle svg { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun,
:root:not([data-theme="dark"]) .icon-sun { display: none; }
[data-theme="light"] .icon-moon,
:root:not([data-theme="dark"]) .icon-moon { display: block; }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.4rem;
  color: var(--text);
  margin-left: 0.5rem;
}
.nav-toggle svg { display: block; }

/* Mobile nav */
.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem 1.5rem;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  z-index: 199;
}
.nav-mobile.open { display: flex; }
.nav-mobile ul { list-style: none; display: flex; flex-direction: column; }
.nav-mobile ul li { border-bottom: 1px solid var(--border); }
.nav-mobile ul a {
  display: block;
  padding: 0.75rem 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}
.nav-mobile ul a:hover { color: var(--accent); }
.nav-mobile .lang-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}
.nav-mobile .lang-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 700;
  text-decoration: none;
}
.nav-mobile .lang-links a:hover { color: var(--accent); }

/* ── Language Switcher ──────────────────────────────────────── */
.lang-switcher { position: relative; margin-left: 0.15rem; }
.lang-btn {
  display: flex; align-items: center; gap: 0.28rem;
  padding: 0.3rem 0.4rem;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.15s;
}
.lang-btn:hover,
.lang-btn[aria-expanded="true"] {
  color: var(--text);
}
.lang-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-globe { flex-shrink: 0; }
.lang-chevron { flex-shrink: 0; transition: transform 0.2s ease; }
.lang-btn[aria-expanded="true"] .lang-chevron { transform: rotate(180deg); }
.lang-dropdown {
  position: absolute; top: calc(100% + 0.45rem); right: 0;
  min-width: 6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0,0,0,0.13);
  list-style: none; padding: 0.3rem;
  z-index: 300;
  animation: lang-open 0.14s ease;
}
@keyframes lang-open {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lang-dropdown li { margin: 0; }
.lang-dropdown a {
  display: flex; align-items: center; justify-content: center;
  padding: 0.4rem 0.7rem;
  border-radius: calc(var(--radius) - 2px);
  color: var(--text-muted); font-size: 0.875rem; font-weight: 500;
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
}
.lang-dropdown a:hover,
.lang-dropdown a:focus { background: var(--surface); color: var(--text); outline: none; }
.lang-dropdown a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lang-dropdown a[aria-current="true"] { color: var(--accent); font-weight: 700; }

/* ── Homepage Hero ──────────────────────────────────────────── */
.site-hero {
  width: 100%;
  overflow: hidden;
  background: var(--surface);
}
.site-hero img {
  width: 100%;
  height: min(55vw, 540px);
  object-fit: cover;
  object-position: center 60%;
}

/* ── Post Feed (homepage) ───────────────────────────────────── */
.post-feed {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
.feed-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

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

/* ── Post Card ──────────────────────────────────────────────── */
.post-card {
  display: flex;
  flex-direction: column;
}
.post-card-image {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 1rem;
  aspect-ratio: 16 / 10;
}
.post-card-image a {
  display: block;
  width: 100%;
  height: 100%;
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.post-card:hover .post-card-image img { transform: scale(1.04); }

.post-card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 0.35rem;
}
.post-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}
.post-card-title a {
  color: var(--text);
  text-decoration: none;
}
.post-card-title a:hover { color: var(--accent); }
.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 0.75rem;
}
.post-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.post-card-meta time::after { content: ' · '; }

/* ── Breadcrumb ──────────────────────────────────────────────── */
.article-breadcrumb {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 1.25rem 1.5rem 0;
}
.article-breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.article-breadcrumb li + li::before {
  content: '›';
  margin: 0 0.4rem;
  color: var(--text-muted);
}
.article-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.article-breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.article-breadcrumb [aria-current="page"] { color: var(--text); }

/* ── Article Layout ─────────────────────────────────────────── */
.article-outer {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 0;
}
.article-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 0.75rem;
}
.article-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.article-meta time::after { content: ' · '; }
.article-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 2rem;
}

/* Full-bleed hero image */
.article-hero {
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  overflow: hidden;
  background: var(--surface);
}
.article-hero img {
  width: 100%;
  height: min(50vw, 520px);
  object-fit: cover;
  object-position: center;
}

/* Author byline */
.article-byline {
  max-width: var(--content-w);
  margin: 1.5rem auto 2.5rem;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.author-name {
  font-size: 0.875rem;
  font-weight: 600;
}

/* Article body */
.article-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}
.article-content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 2.5rem 0 0.9rem;
  letter-spacing: -0.015em;
}
.article-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}
.article-content p { margin-bottom: 1.4rem; }
.article-content ul,
.article-content ol {
  padding-left: 1.6rem;
  margin-bottom: 1.4rem;
}
.article-content li { margin-bottom: 0.4rem; }
.article-content ul li { list-style: disc; }
.article-content ol li { list-style: decimal; }
.article-content strong { font-weight: 700; }
.article-content em { font-style: italic; }
.article-content a { color: var(--accent); text-decoration: underline; }
.article-content a:hover { color: var(--accent-dark); }
.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.2rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
}
.article-content figure { margin: 2rem 0; }
.article-content figure img { border-radius: var(--radius); width: 100%; }

/* Related posts */
.related-posts {
  max-width: var(--wide-w);
  margin: 3rem auto 0;
  padding: 2.5rem 1.5rem 4rem;
  border-top: 1px solid var(--border);
}
.related-posts-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ── Static Page Layout ─────────────────────────────────────── */
.page-hero {
  width: 100%;
  overflow: hidden;
  background: var(--surface);
}
.page-hero img {
  width: 100%;
  height: min(42vw, 420px);
  object-fit: cover;
  object-position: center;
}
.page-content {
  max-width: var(--content-w);
  margin: 3rem auto 4rem;
  padding: 0 1.5rem;
}
.page-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 2rem;
}
.page-body {
  font-size: 1.05rem;
  line-height: 1.85;
}
.page-body h2 { font-size: 1.35rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.page-body h3 { font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.page-body p { margin-bottom: 1.25rem; }
.page-body ul { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.page-body ul li { list-style: disc; margin-bottom: 0.3rem; }
.page-body ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.page-body ol li { list-style: decimal; margin-bottom: 0.6rem; }
.page-body strong { font-weight: 700; }
.page-body a { color: var(--accent); text-decoration: underline; }

/* Contact block */
.contact-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
  font-size: 0.95rem;
  line-height: 2;
}
.contact-block a { color: var(--accent); text-decoration: none; }
.contact-block a:hover { text-decoration: underline; }

/* ── Archive Page ────────────────────────────────────────────── */
.archive-header {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 0;
}
.archive-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.archive-desc {
  color: var(--text-muted);
}

/* ── Legal Pages ─────────────────────────────────────────────── */
.legal-content {
  max-width: var(--content-w);
  margin: 3rem auto 4rem;
  padding: 0 1.5rem;
}
.legal-content h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}
.legal-content h2 { font-size: 1.2rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.legal-content p { margin-bottom: 1.1rem; font-size: 0.95rem; line-height: 1.75; }
.legal-content ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.legal-content ul li { list-style: disc; margin-bottom: 0.25rem; font-size: 0.95rem; }
.legal-content a { color: var(--accent); }

/* ── Newsletter ──────────────────────────────────────────────── */
.newsletter-section {
  background: var(--accent);
  color: #fff;
  padding: 3rem 1.5rem;
  text-align: center;
}
.newsletter-section h2 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.newsletter-section p { font-size: 0.95rem; opacity: 0.9; margin-bottom: 1.5rem; }
.nl-form {
  display: flex;
  max-width: 440px;
  margin: 0 auto;
  gap: 0;
}
.nl-form input[type="email"] {
  flex: 1;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 4px 0 0 4px;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.95);
  color: #1a1a1a;
  outline: none;
}
.nl-form input[type="email"]:focus { box-shadow: 0 0 0 2px #fff; }
.nl-form button {
  padding: 0.65rem 1.2rem;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 0 4px 4px 0;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.nl-form button:hover { background: #333; }
.nl-form button:disabled { opacity: 0.6; cursor: not-allowed; }
.nl-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: 440px;
  margin: 0.75rem auto 0;
  font-size: 0.8rem;
  opacity: 0.85;
  text-align: left;
}
.nl-consent input[type="checkbox"] { margin-top: 0.15rem; flex-shrink: 0; accent-color: #fff; }
.nl-consent a { color: #fff; }
/* ── Toast notification ──────────────────────────────────────── */
.nl-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: #1c1c1e;
  color: #fff;
  padding: 0.875rem 1.5rem;
  border-radius: 0.625rem;
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 9999;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), opacity 0.35s ease;
  white-space: nowrap;
  max-width: calc(100vw - 2rem);
  text-align: center;
}
.nl-toast.nl-toast-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.nl-toast.nl-toast-ok  { border-left: 4px solid #86efac; }
.nl-toast.nl-toast-err { border-left: 4px solid #fca5a5; }

@media (max-width: 480px) {
  .nl-form { flex-direction: column; }
  .nl-form input[type="email"] { border-radius: 4px; margin-bottom: 0.5rem; }
  .nl-form button { border-radius: 4px; }
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem 0;
}
.footer-inner {
  max-width: var(--wide-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
  list-style: none;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
}
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-lang {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
}
.footer-lang a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 700;
}
.footer-lang a:hover { color: var(--accent); }
.fl-social { display: flex; align-items: center; font-weight: 400; }
.fl-social svg { display: block; }
/* Separator + thicker strokes for footer social icons */
.footer-lang .fl-social:first-of-type {
  margin-left: 0.25rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
}
.footer-lang svg { stroke-width: 2.5; }
.made-by {
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0.55;
  text-align: center;
  padding: 0.75rem 1rem 0;
  border-top: 1px solid var(--border);
  letter-spacing: 0.04em;
}
.made-by a { color: inherit; text-decoration: none; }
.made-by a:hover { opacity: 1; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .post-grid,
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  :root { --nav-height: 56px; }

  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .post-grid,
  .related-grid { grid-template-columns: 1fr; gap: 1.5rem; }

  .site-hero img { height: 52vw; }
  .article-hero img { height: 56vw; }
  .article-outer { padding-top: 2rem; }
  .page-hero img { height: 52vw; }
}

/* ── Article page: accent header ────────────────────────────── */
.page-article .site-header {
  background: var(--accent);
  border-bottom-color: transparent;
}
.page-article .site-header .logo,
.page-article .site-header .nav-links a,
.page-article .site-header .theme-toggle,
.page-article .site-header .nav-toggle,
.page-article .site-header .fl-rss,
.page-article .site-header .fl-social { color: rgba(255,255,255,0.92); }
.page-article .site-header .lang-btn { color: rgba(255,255,255,0.85); }
.page-article .site-header .lang-btn:hover,
.page-article .site-header .lang-btn[aria-expanded="true"] { color: #fff; }
.page-article .site-header .logo .dot { color: rgba(255,255,255,0.7); }
.page-article .site-header:not(.is-scrolled) .lang-dropdown,
.page-home .site-header:not(.is-scrolled) .lang-dropdown {
  background: rgba(0,0,0,0.45);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
}
.page-article .site-header:not(.is-scrolled) .lang-dropdown a,
.page-home .site-header:not(.is-scrolled) .lang-dropdown a { color: rgba(255,255,255,0.75); }
.page-article .site-header:not(.is-scrolled) .lang-dropdown a:hover,
.page-article .site-header:not(.is-scrolled) .lang-dropdown a:focus,
.page-home .site-header:not(.is-scrolled) .lang-dropdown a:hover,
.page-home .site-header:not(.is-scrolled) .lang-dropdown a:focus { background: rgba(255,255,255,0.1); color: #fff; }
.page-article .site-header:not(.is-scrolled) .lang-dropdown a[aria-current="true"],
.page-home .site-header:not(.is-scrolled) .lang-dropdown a[aria-current="true"] { color: var(--accent); }
.page-article .site-header .nav-links a:hover,
.page-article .site-header .nav-links a[aria-current] { color: #fff; }

/* ── Article header: centered title/meta ────────────────────── */
.page-article main > .article-breadcrumb + .article-outer { text-align: center; }
.page-article main > .article-breadcrumb + .article-outer .article-tag { display: block; }

/* ── Article pages: meta block overlay on cover image ───────── */
.page-article .site-cover::after {
  background: linear-gradient(to bottom, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0.52) 68%, rgba(0,0,0,0.82) 100%);
}
.page-article .article-breadcrumb {
  margin-top: -40vh;
  position: relative;
  z-index: 2;
  padding-bottom: 0.5rem;
}
.page-article .article-breadcrumb a,
.page-article .article-breadcrumb [aria-current="page"] {
  color: rgba(255,255,255,0.82);
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.page-article .article-breadcrumb a:hover { color: #fff; }
.page-article .article-breadcrumb li + li::before { color: rgba(255,255,255,0.55); }
.page-article main > .article-breadcrumb + .article-outer {
  position: relative;
  z-index: 2;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.page-article main > .article-breadcrumb + .article-outer .article-meta {
  color: rgba(255,255,255,0.82);
}
.page-article main > .article-breadcrumb + .article-outer .article-tag {
  color: rgba(255,255,255,0.9);
}
.page-article main > .article-breadcrumb + .article-outer .article-title {
  color: #fff;
}
.page-article .article-byline {
  position: relative;
  z-index: 2;
  margin-bottom: max(3rem, calc(40vh - 14rem));
}
.page-article .article-byline .author-name {
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
.page-article .article-byline .author-avatar {
  width: 52px;
  height: 52px;
  border: 2px solid rgba(255,255,255,0.45);
}
.page-article main > .article-outer ~ .article-outer {
  position: relative;
  z-index: 3;
  background: var(--bg);
  padding-top: 2.5rem;
  scroll-margin-top: var(--nav-height);
}

/* ── Legal pages: title overlay on cover image ───────────────── */
.page-legal .site-cover::after {
  background: linear-gradient(to bottom, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0.52) 68%, rgba(0,0,0,0.82) 100%);
}
.page-legal .legal-title-outer {
  max-width: var(--content-w);
  margin: -28vh auto 0;
  min-height: 28vh;
  padding: 0 1.5rem 5rem;
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.page-legal .legal-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
  margin: 0;
}
.page-legal .legal-content {
  position: relative;
  z-index: 3;
  background: var(--bg);
  padding-top: 3rem;
  margin-top: 0;
  scroll-margin-top: var(--nav-height);
}
.page-legal .site-cover-arrow,
.page-article .site-cover-arrow {
  z-index: 3;
}
.page-legal .legal-content .page-content {
  margin-top: 0;
}

/* ── Homepage: transparent header over cover ────────────────── */
.page-home .site-header {
  position: fixed;
  width: 100%;
  transition: background 0.45s, border-color 0.45s, color 0.45s;
}
.page-home .site-header:not(.is-scrolled) {
  background: transparent;
  border-bottom-color: transparent;
}
.page-home .site-header:not(.is-scrolled) .logo,
.page-home .site-header:not(.is-scrolled) .nav-links a,
.page-home .site-header:not(.is-scrolled) .theme-toggle,
.page-home .site-header:not(.is-scrolled) .nav-toggle,
.page-home .site-header:not(.is-scrolled) .fl-rss,
.page-home .site-header:not(.is-scrolled) .fl-social,
.page-home .site-header:not(.is-scrolled) .lang-btn { color: rgba(255,255,255,0.92); }
.page-home .site-header:not(.is-scrolled) .logo .dot { color: var(--accent); }
.page-home .site-header:not(.is-scrolled) .nav-links a:hover,
.page-home .site-header:not(.is-scrolled) .nav-links a[aria-current="page"] { color: #fff; }

/* ── Full-viewport Cover ─────────────────────────────────────── */
.site-cover {
  position: relative;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
  background: #111;
}
.site-cover-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  opacity: 0.82;
}
.site-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0) 45%, rgba(0,0,0,0.38) 100%);
  pointer-events: none;
}
.site-cover-arrow {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  background: none;
  border: 2px solid rgba(255,255,255,0.55);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.2s, border-color 0.2s;
}
.site-cover-arrow:hover { background: rgba(255,255,255,0.15); border-color: #fff; }

/* ── Featured Section ("Wichtige Beiträge") ─────────────────── */
.featured-section {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}
.featured-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.featured-card {
  display: block;
  text-decoration: none;
  color: var(--text);
}
.featured-card-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 0.75rem;
}
.featured-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.featured-card:hover .featured-card-image img { transform: scale(1.04); }
.featured-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.4;
  transition: color 0.15s;
}
.featured-card:hover .featured-card-title { color: var(--accent); }

/* ── Post Feed List ("Aktuelle Beiträge") ────────────────────── */
.feed-section {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}
.feed-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.feed-list { display: flex; flex-direction: column; }
.feed-item {
  position: relative;
  display: grid;
  grid-template-columns: 52px 150px 1fr auto;
  gap: 1.25rem;
  align-items: start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
}
.feed-item-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.feed-item:hover { background: var(--surface); padding-left: 0.75rem; padding-right: 0.75rem; margin: 0 -0.75rem; }
.feed-cal {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.1rem;
}
.feed-cal-day {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
}
.feed-cal-month {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.feed-thumb {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  aspect-ratio: 4 / 3;
}
.feed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-content { min-width: 0; }
.feed-item-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
  transition: color 0.15s;
}
.feed-item:hover .feed-item-title { color: var(--accent); }
.feed-item-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feed-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  white-space: nowrap;
  padding-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.feed-item-arrow { color: var(--text-muted); margin-top: auto; }

/* Responsive: featured + feed */
@media (max-width: 900px) {
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  .feed-item { grid-template-columns: 44px 120px 1fr; }
  .feed-item-meta { display: none; }
}
@media (max-width: 540px) {
  .featured-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .featured-card-title { font-size: 0.82rem; }
  .feed-item { grid-template-columns: 40px 1fr; gap: 1rem; }
  .feed-thumb { display: none; }
}

/* ── Archive Pagination ──────────────────────────────────────── */
.feed-pagination[hidden] { display: none; }
.feed-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 2rem 0 0.5rem;
}
.feed-page-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.feed-page-btn:hover:not(:disabled) { background: var(--surface); border-color: var(--accent); color: var(--accent); }
.feed-page-btn:disabled { opacity: 0.35; cursor: default; }
.feed-page-info { font-size: 0.8rem; color: var(--text-muted); min-width: 3rem; text-align: center; }

/* ── Focus ───────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── RSS Icon (header + mobile nav) ─────────────────────────── */
.fl-rss {
  display: flex;
  align-items: center;
  padding: 0.4rem;
  color: var(--text-muted);
  border-radius: var(--radius);
  margin-left: 0.25rem;
  text-decoration: none;
}
.fl-rss:hover { color: var(--accent); }
.fl-rss svg { display: block; }
.nav-mobile .lang-links .fl-rss { display: flex; align-items: center; padding: 0; margin-left: 0; }
/* Force white in pink/transparent header — !important needed to beat cascade */
.page-article .site-header .fl-rss,
.page-article .site-header .fl-social,
.page-home .site-header .fl-rss,
.page-home .site-header .fl-social { color: rgba(255,255,255,0.92) !important; }

/* ── Article Actions (share button) ──────────────────────────── */
.article-actions {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 1rem 1.5rem 2.5rem;
  display: flex;
  justify-content: flex-end;
}
.fl-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: none;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.fl-share-btn:hover { background: var(--accent); color: #fff; }

/* ── Back-to-top ─────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: 0 2px 14px rgba(203,21,94,0.3);
  cursor: pointer;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--accent-dark); }

/* ── Reduced Motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Print ───────────────────────────────────────────────────── */
@media print {
  .site-header, .nav-mobile, .site-cover,
  .article-byline, .related-posts, .article-actions,
  .site-footer, .skip-link, #back-to-top,
  .newsletter-section { display: none !important; }
  @page { margin: 2cm 2.5cm; }
  .article-outer { max-width: 100%; padding: 1.5rem 0 0; }
  h1, h2, h3, h4 { page-break-after: avoid; break-after: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
  a[href^="/"]::after, a[href^="../"]::after, a[href^="../../"]::after { content: ""; }
  main::after {
    content: "freilernen.dk";
    display: block;
    margin-top: 2rem;
    font-size: 9pt;
    color: #aaa;
    text-align: right;
  }
}
