/*
Theme Name: mkoDesign
Theme URI: https://mk-13.de
Author: Marc Koschel
Author URI: https://www.marc-koschel.de
Description: Eigenständiges Theme für mk-13.de im Design von marc-koschel.de — dunkles Navy mit Türkis/Smaragd-Akzenten, Hell/Dunkel-Umschalter, Schriftgrößen-Wahl. Enthält alle mk-13-Funktionen: Hero-Köpfe mit Eyebrow, Wasserzeichen und Titel, Sidebar-Accordions (Serien, Themen, Schlagwörter), Artikel-Karten mit Lesezeit und Im-Fokus-Markierung, Serien-Archive, Live-Suche und eigene 404-Seite.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mkodesign
*/

/* ══════════════════════════════════════════════════════
   01 · Farbsystem — dunkel (Standard) und hell
   Palette 1:1 von marc-koschel.de übernommen.
   ══════════════════════════════════════════════════════ */

:root {
  --bg-base: #0B1524;
  --bg-band: #0E1F33;
  --card-bg: #122234;
  --teal: #14B8A6;
  --emerald: #10B981;
  --teal-light: #2DD4BF;
  --emerald-light: #34D399;
  --text-primary: #ffffff;
  --text-body: #D5E0E4;
  --text-secondary: #9FB4BD;
  --text-muted: #7C919B;
  --border-soft: #1f3040;
  --border-strong: #2a4650;
  --field-bg: #1E3444;
  --field-border: #33505d;
  --header-bg: #0B1524;
  --accent-text: var(--emerald-light);
  --highlight-grad-1: #0E5C52;
  --highlight-grad-2: var(--bg-base);
  --highlight-li-color: #CFEAE4;
  --grad-text-1: var(--teal-light);
  --grad-text-2: var(--emerald-light);
  --watermark: rgba(255, 255, 255, 0.045);
  --placeholder-1: #16283C;
  --placeholder-2: #0E1F33;
  --btn-text-on-grad: #06231C;
  /* Glas-Look: durchscheinende Flächen, helle Kante, Licht von oben */
  --glass-bg: rgba(18, 34, 52, 0.55);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-highlight: rgba(255, 255, 255, 0.07);
  --glass-shadow: rgba(0, 0, 0, 0.28);
  --glass-badge-bg: rgba(16, 185, 129, 0.18);
  --glass-badge-border: rgba(52, 211, 153, 0.45);
  --max-width: 1280px;
}

[data-theme="light"] {
  --bg-base: #F4F7F6;
  --bg-band: #EAF0EE;
  --card-bg: #ffffff;
  --teal-light: #0F8F82;
  --emerald-light: #0E7B5E;
  --text-primary: #0B2340;
  --text-body: #2C3A44;
  --text-secondary: #5a6c67;
  --text-muted: #8a9a95;
  --border-soft: #dde5e3;
  --border-strong: #c7d3d0;
  --field-bg: #eef3f2;
  --field-border: #cddad6;
  --header-bg: #ffffff;
  --accent-text: #0E7B5E;
  --highlight-grad-1: #0E7B5E;
  --highlight-grad-2: var(--bg-band);
  --highlight-li-color: #16523F;
  --grad-text-1: #0F8F82;
  --grad-text-2: #0E7B5E;
  --watermark: rgba(11, 35, 64, 0.055);
  --placeholder-1: #e8edf5;
  --placeholder-2: #f5f7fa;
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(11, 35, 64, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.85);
  --glass-shadow: rgba(11, 35, 64, 0.1);
  --glass-badge-bg: rgba(16, 185, 129, 0.14);
  --glass-badge-border: rgba(14, 123, 94, 0.4);
}

/* Schriftgrößen-Stufen: "normal" (kein Attribut) ist die kleinste Größe.
   Alles ist in rem notiert, damit Abstände mitwachsen. */
html[data-fontsize="medium"] { font-size: 112.5%; }
html[data-fontsize="large"]  { font-size: 125%; }

/* ══════════════════════════════════════════════════════
   02 · Basis
   ══════════════════════════════════════════════════════ */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { transition: background-color 0.2s ease, color 0.2s ease; }

body {
  margin: 0;
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Typografie-Anker: "Instrument Serif" für Headlines,
   "Geist" trägt den Rest — bewusster Kontrast. */
h1, h2.mko-title, .mko-title, .mko-focus-title, .mko-entry h1, .mko-entry h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; height: auto; }

.mko-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--grad-text-1), var(--grad-text-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  clip: rect(1px, 1px, 1px, 1px);
  overflow: hidden;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--card-bg); color: var(--text-primary);
  padding: 0.5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

.btn {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.75rem 1.375rem;
  border-radius: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal), var(--emerald));
  color: var(--btn-text-on-grad);
}

.btn-secondary {
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}

/* ══════════════════════════════════════════════════════
   03 · Header & Navigation
   ══════════════════════════════════════════════════════ */

.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand .custom-logo-link { display: flex; flex-shrink: 0; }
.brand .custom-logo {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.brand-text { display: flex; align-items: baseline; gap: 0.875rem; min-width: 0; }
.brand-title { font-weight: 500; font-size: 1rem; white-space: nowrap; }
.brand-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header .nav-links { display: flex; align-items: center; }

.site-header .nav-links ul {
  display: flex;
  gap: 1.375rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  align-items: center;
}

.site-header .nav-links a { color: var(--text-secondary); transition: color 0.15s; }
.site-header .nav-links a:hover,
.site-header .nav-links .current-menu-item > a,
.site-header .nav-links .current-menu-ancestor > a { color: var(--text-primary); }

/* Untermenüs */
.site-header .nav-links li { position: relative; }
.site-header .nav-links li ul {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 0.5rem 0.875rem;
  min-width: 180px;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
  z-index: 60;
}
.site-header .nav-links li:hover > ul,
.site-header .nav-links li:focus-within > ul { display: flex; }

/* Lupe im Menü */
.mko-search-item a { display: flex; align-items: center; opacity: 0.85; }
.mko-search-item a:hover { opacity: 1; }
.mko-search-item svg { display: block; }

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Schriftgrößen-Auswahl */
.fontsize-switch {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0.1875rem;
}

.fontsize-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  font-family: inherit;
  line-height: 1;
}

.fontsize-btn:hover { color: var(--text-primary); }
.fontsize-btn.active { background: var(--card-bg); color: var(--text-primary); }
.fontsize-btn[data-size="normal"] { font-size: 0.75rem; }
.fontsize-btn[data-size="medium"] { font-size: 0.9rem; }
.fontsize-btn[data-size="large"]  { font-size: 1.05rem; }

/* Theme-Switch, iOS-Stil */
.theme-switch { background: none; border: none; padding: 0; cursor: pointer; flex-shrink: 0; }

.theme-switch-track {
  width: 52px; height: 28px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--border-strong);
  position: relative;
  display: block;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.theme-switch-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--emerald));
  display: flex; align-items: center; justify-content: center;
  color: var(--btn-text-on-grad);
  font-size: 12px;
  transition: transform 0.25s ease;
}

[data-theme="light"] .theme-switch-thumb { transform: translateX(24px); }

.theme-switch-thumb .ti-moon { display: flex; }
.theme-switch-thumb .ti-sun { display: none; }
[data-theme="light"] .theme-switch-thumb .ti-sun { display: flex; }
[data-theme="light"] .theme-switch-thumb .ti-moon { display: none; }

/* Mobile-Menü-Knopf */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0.5rem 0.625rem;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--text-secondary);
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ══════════════════════════════════════════════════════
   04 · Hero — Eyebrow, Wasserzeichen, Titel
   Struktur identisch zu den bisherigen mk-13-Templates.
   ══════════════════════════════════════════════════════ */

.mko-hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4rem;
  text-align: center;
  border-bottom: 1px solid var(--border-soft);
}

.mko-watermark {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(6rem, 22vw, 18rem);
  font-weight: 900;
  line-height: 1;
  color: var(--watermark);
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 1;
}

.mko-watermark--long { font-size: clamp(5rem, 18vw, 16rem); }

.mko-hero-inner { position: relative; z-index: 2; }

.mko-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-text);
  font-weight: 700;
  margin: 0 0 1.25rem;
  display: block;
}

.mko-hero .mko-title,
h1.mko-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  color: var(--text-primary);
  margin: 0 0 1rem;
  line-height: 1.15;
}

.mko-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

.mko-hero-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
}
.mko-hero-meta a { color: var(--accent-text); }

/* ══════════════════════════════════════════════════════
   05 · Layout — Inhalt + Sidebar
   ══════════════════════════════════════════════════════ */

.mko-content { padding: 4rem 0 6rem; }

.mko-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 4rem;
  align-items: start;
}

.mko-sidebar { position: sticky; top: 5.5rem; }

.mko-widget { margin-bottom: 2.5rem; }

.mko-widget-title {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-text);
  font-weight: 700;
  margin: 0 0 1rem;
}

/* Accordions (Serien / Themen / Schlagwörter) */
.mko-accordion { margin-bottom: 2rem; }
.mko-accordion > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-text);
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-soft);
}
.mko-accordion > summary::-webkit-details-marker,
.mko-accordion > summary::marker { display: none; }
.mko-accordion > summary::after {
  content: "+";
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--accent-text);
  opacity: 0.7;
  line-height: 1;
}
.mko-accordion[open] > summary::after { content: "−"; }
.mko-accordion > summary + * { margin-top: 0.75rem; }

/* Kategorie-/Serien-Listen */
.mko-cat-list { list-style: none; padding: 0; margin: 0; }
.mko-cat-list li { margin-bottom: 0.35rem; }
.mko-cat-list a {
  color: var(--text-body);
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border-soft);
  transition: color 0.15s;
}
.mko-cat-list a:hover,
.mko-cat-list a.mko-active { color: var(--teal-light); font-weight: 700; }
.mko-cat-list a.mko-active .mko-cat-count {
  background: linear-gradient(135deg, var(--teal), var(--emerald));
  color: var(--btn-text-on-grad);
}
.mko-cat-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  border-radius: 20px;
  padding: 0 0.5rem;
}

/* Sidebar-Navigation (drittes Menü): Untermenüs + aktive Seite */
.mko-cat-list .sub-menu {
  list-style: none;
  padding: 0.25rem 0 0 0.875rem;
  margin: 0;
}
.mko-cat-list .current-menu-item > a,
.mko-cat-list .current_page_item > a { color: var(--teal-light); font-weight: 700; }

/* Tag-Cloud */
.mko-tagcloud { line-height: 2; }
.mko-tagcloud .tag-cloud-link {
  display: inline-block;
  margin: 0 4px 4px 0;
  color: var(--teal-light) !important;
  text-decoration: none !important;
  transition: color 0.15s;
}
.mko-tagcloud .tag-cloud-link:hover { color: var(--emerald-light) !important; }

/* Widgets aus dem WP-Widget-Bereich */
.mko-sidebar .mko-widget ul { list-style: none; padding: 0; margin: 0; font-size: 0.88rem; }
.mko-sidebar .mko-widget li { margin-bottom: 0.35rem; padding: 0.25rem 0; border-bottom: 1px solid var(--border-soft); }
.mko-sidebar .mko-widget a { color: var(--text-body); }
.mko-sidebar .mko-widget a:hover { color: var(--teal-light); }

/* Abschnitts-Header (Startseite) */
.mko-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 1rem;
}
.mko-section-header--space { margin-top: 3rem; }
.mko-section-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-text);
  font-weight: 700;
}
.mko-section-label em { font-style: normal; color: var(--text-primary); }
.mko-section-link {
  font-size: 0.78rem;
  color: var(--teal-light);
  border-bottom: 1px solid var(--border-strong);
  transition: color 0.15s;
}
.mko-section-link:hover { color: var(--emerald-light); }

/* ══════════════════════════════════════════════════════
   06 · Artikel-Karten
   ══════════════════════════════════════════════════════ */

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

.mko-card {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 32px var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.mko-card:hover {
  box-shadow: 0 12px 40px var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.35);
}

/* Im-Fokus-Karte: Türkis/Smaragd-Akzent statt Gold,
   mit demselben smaragdgrünen Glas-Hintergrund wie die große Fokus-Karte */
.mko-card--fokus {
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--highlight-grad-1) 60%, transparent),
    color-mix(in srgb, var(--highlight-grad-2) 40%, transparent)
  );
  outline: 1.5px solid rgba(20, 184, 166, 0.5);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.15), inset 0 1px 0 var(--glass-highlight);
}
.mko-card--fokus .mko-card-excerpt { color: var(--highlight-li-color); }
.mko-card--fokus .mko-card-meta { color: var(--highlight-li-color); opacity: 0.75; }
.mko-fokus-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--glass-badge-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-badge-border);
  color: var(--accent-text);
  font-size: 0.62em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  z-index: 2;
  pointer-events: none;
  line-height: 1.4;
}

.mko-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}
.mko-card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--placeholder-2);
}
.mko-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.mko-card:hover .mko-card-img img { transform: scale(1.04); }
.mko-card-img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--placeholder-1), var(--placeholder-2));
}
.mko-card-body {
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.mko-card-cat {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  font-weight: 700;
  margin-bottom: 0.35rem;
  display: block;
}
.mko-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin: 0 0 0.4rem;
  font-family: "Geist", sans-serif;
}
.mko-card-excerpt {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 0.6rem;
  flex: 1;
}
.mko-card-meta { font-size: 0.70rem; color: var(--text-muted); }

/* Im Fokus — horizontale Karte (Startseite) */
.mko-focus-card {
  display: flex;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--highlight-grad-1) 78%, transparent),
    color-mix(in srgb, var(--highlight-grad-2) 55%, transparent)
  );
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(20, 184, 166, 0.3);
  box-shadow: 0 8px 32px var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  color: inherit;
  transition: box-shadow 0.2s;
  max-height: 260px;
}
.mko-focus-card:hover { box-shadow: 0 12px 40px rgba(16, 185, 129, 0.22), inset 0 1px 0 var(--glass-highlight); }
.mko-focus-img {
  width: 38%;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--placeholder-2);
}
.mko-focus-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mko-focus-body {
  padding: 1.5rem 1.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.mko-focus-badge {
  display: inline-block;
  margin-bottom: 0.6rem;
  background: var(--glass-badge-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-badge-border);
  color: var(--accent-text);
  font-size: 0.68em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  width: fit-content;
}
.mko-focus-card .mko-card-cat { color: var(--teal-light); }
.mko-focus-title {
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-primary);
  margin: 0.3rem 0 0.6rem;
}
.mko-focus-excerpt {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--highlight-li-color);
  margin: 0 0 0.8rem;
  flex: 1;
}
.mko-focus-card .mko-card-meta { color: var(--highlight-li-color); opacity: 0.75; }

/* ══════════════════════════════════════════════════════
   07 · Seiten-Navigation (Pagination)
   ══════════════════════════════════════════════════════ */

.mko-pagination { margin-top: 3rem; }
.mko-pagination .nav-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.mko-pagination .page-numbers {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.mko-pagination .page-numbers:hover,
.mko-pagination .page-numbers.current {
  background: linear-gradient(135deg, var(--teal), var(--emerald));
  color: var(--btn-text-on-grad);
  border-color: transparent;
}
.mko-pagination--center .nav-links { justify-content: center; }

.mko-empty {
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 2rem 0;
}

/* ══════════════════════════════════════════════════════
   08 · Einzelartikel & Seiten
   ══════════════════════════════════════════════════════ */

.mko-hero--single { padding: 4rem 0 3rem; }
.mko-hero--single .mko-title { max-width: 820px; margin-left: auto; margin-right: auto; }

.mko-featured {
  max-width: 860px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}
.mko-featured img {
  width: 100%;
  border-radius: 14px;
  display: block;
}
.mko-featured figcaption {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: center;
}

.mko-entry-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem 0;
}

.mko-entry {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-body);
}
.mko-entry > * { margin-top: 0; margin-bottom: 1.25rem; }
.mko-entry h1, .mko-entry h2, .mko-entry h3, .mko-entry h4 {
  color: var(--text-primary);
  line-height: 1.3;
  margin-top: 2.25rem;
  margin-bottom: 0.875rem;
}
.mko-entry h2 { font-size: 1.75rem; }
.mko-entry h3 { font-size: 1.2rem; font-weight: 600; }
.mko-entry a {
  color: var(--teal-light);
  border-bottom: 1px solid rgba(20, 184, 166, 0.35);
  transition: color 0.15s, border-color 0.15s;
}
.mko-entry a:hover { color: var(--emerald-light); border-color: var(--emerald-light); }
.mko-entry blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--teal);
  color: var(--text-secondary);
  font-style: italic;
}
.mko-entry blockquote cite { font-style: normal; font-size: 0.85em; color: var(--text-muted); }
.mko-entry img { border-radius: 10px; }
.mko-entry figcaption { font-size: 0.78rem; color: var(--text-muted); text-align: center; margin-top: 0.4rem; }
.mko-entry code {
  background: var(--field-bg);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.85em;
}
.mko-entry pre {
  background: var(--field-bg);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.85rem;
}
.mko-entry pre code { background: none; border: none; padding: 0; }
.mko-entry hr {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 2.5rem auto;
  max-width: 200px;
}
.mko-entry ul, .mko-entry ol { padding-left: 1.4rem; }
.mko-entry li { margin-bottom: 0.4rem; }
.mko-entry table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.mko-entry th, .mko-entry td {
  border: 1px solid var(--border-soft);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.mko-entry th { background: var(--card-bg); color: var(--text-primary); }
.mko-entry .wp-block-image.alignwide { max-width: none; margin-left: -70px; margin-right: -70px; }

/* Serien-Hinweis über dem Artikel */
.mko-serie-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--glass-badge-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-badge-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--accent-text);
  margin-bottom: 1.25rem;
}

/* Ähnliche Artikel / Serie */
.mko-related {
  max-width: 720px;
  margin: 3rem auto 0;
  padding: 2rem 2rem 0;
  border-top: 1px solid var(--border-soft);
}
.mko-related-heading {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  font-weight: 700;
  margin: 0 0 1.2rem;
}
.mko-related-block + .mko-related-block { margin-top: 2rem; }
.mko-related-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.mko-related-card {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  color: inherit;
  transition: box-shadow 0.18s, border-color 0.18s;
  position: relative;
}
.mko-related-card:hover {
  box-shadow: 0 8px 28px var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  border-color: rgba(20, 184, 166, 0.35);
}
.mko-related-serie { border-color: rgba(20, 184, 166, 0.4); }
.mko-related-badge {
  font-size: 0.65em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 6px;
}
.mko-related-title { font-size: 0.88em; font-weight: 600; line-height: 1.4; flex: 1; color: var(--text-primary); }
.mko-related-date { font-size: 0.75em; color: var(--text-muted); margin-top: 8px; }
.mko-serie-alle-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8em;
  font-weight: 600;
  color: var(--accent-text);
  letter-spacing: 0.03em;
}
.mko-serie-alle-link:hover { color: var(--teal-light); text-decoration: underline; }

/* Vor/Zurück zwischen Artikeln */
.mko-post-nav {
  max-width: 720px;
  margin: 3rem auto 0;
  padding: 2rem 2rem 0;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.mko-post-nav a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 46%;
  transition: color 0.15s;
}
.mko-post-nav a:hover { color: var(--teal-light); }
.mko-post-nav .mko-post-nav-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.mko-post-nav-next { text-align: right; margin-left: auto; }

/* ══════════════════════════════════════════════════════
   09 · Suche
   ══════════════════════════════════════════════════════ */

.mko-searchform { max-width: 620px; margin: 0 auto; }
.mko-searchform-inner {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 2px var(--teal);
  background: var(--field-bg);
}
.mko-search-input {
  flex: 1;
  padding: 0.85rem 1.2rem;
  background: transparent;
  border: none;
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}
.mko-search-input::placeholder {
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
  opacity: 1;
}
.mko-search-btn {
  padding: 0 1.2rem;
  background: linear-gradient(135deg, var(--teal), var(--emerald));
  color: var(--btn-text-on-grad);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
}
.mko-search-btn:hover { opacity: 0.85; }

/* Live-Suche (Seite „Suche") */
.mko-livesearch-wrap {
  max-width: 560px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 2px var(--teal);
  background: var(--field-bg);
}
.mko-livesearch-input {
  width: 100%;
  padding: 0.9rem 1.3rem;
  background: transparent;
  border: none;
  font-size: 1.1rem;
  font-family: inherit;
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  outline: none;
  box-shadow: none !important;
}
.mko-livesearch-input::placeholder {
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
  opacity: 1;
}
#mko-live-results { transition: opacity 0.15s; }
#mko-live-results.loading { opacity: 0.4; }

/* Inline-Suchleiste unterm Header */
#mko-inline-search {
  position: fixed;
  left: 0; right: 0;
  top: -100px;
  background: var(--header-bg);
  border-bottom: 2px solid var(--teal);
  padding: 0.8rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 9999;
  opacity: 0;
  transition: top 0.22s ease, opacity 0.18s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}
#mko-inline-search.open {
  top: var(--mko-header-bottom, 70px);
  opacity: 1;
}
#mko-inline-search form {
  display: flex;
  flex: 1;
  max-width: 640px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 2px var(--teal);
  background: var(--field-bg);
}
#mko-inline-search input[type="search"] {
  flex: 1;
  padding: 0.75rem 1.1rem;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  outline: none;
}
#mko-inline-search input[type="search"]::placeholder {
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
  opacity: 1;
}
#mko-inline-search button[type="submit"] {
  padding: 0 1.2rem;
  background: linear-gradient(135deg, var(--teal), var(--emerald));
  color: var(--btn-text-on-grad);
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  transition: opacity 0.15s;
}
#mko-inline-search button[type="submit"]:hover { opacity: 0.85; }
#mko-inline-search .mko-inline-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
  padding: 0 0.3rem;
  transition: color 0.15s;
}
#mko-inline-search .mko-inline-close:hover { color: var(--text-primary); }

/* ══════════════════════════════════════════════════════
   10 · Footer
   ══════════════════════════════════════════════════════ */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 1.5rem 0;
  margin-top: 0;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding-bottom: 1.5rem;
}

/* Site-Badges: gemeinsames Footer-Muster aller mk-Seiten; die Trennlinie
   zum Copyright wandert von .footer-widgets hierher */
.footer-sites {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-bottom: 1.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-soft);
}
@media (max-width: 700px) { .footer-sites { grid-template-columns: 1fr; } }
.footer-site-badge {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  column-gap: 0.75rem; align-items: center;
  border-radius: 10px; padding: 0.875rem 1.125rem;
  /* Gradient-Rand + leichte Smaragd-Tönung — gleiche Kartenoptik wie mkophoto.de */
  border: 1px solid transparent;
  background:
    linear-gradient(150deg, rgba(20, 184, 166, 0.09), rgba(20, 184, 166, 0) 55%) padding-box,
    linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
    linear-gradient(135deg, rgba(45, 212, 191, 0.55), rgba(16, 185, 129, 0.14) 55%, var(--border-soft)) border-box;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.site-footer a.footer-site-badge { color: var(--text-primary); }
.site-footer a.footer-site-badge:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.footer-site-badge i { grid-row: 1 / 3; font-size: 1.5rem; color: var(--accent-text); }
.footer-site-name { font-weight: 500; font-size: 0.9375rem; }
.footer-site-desc { color: var(--text-muted); font-size: 0.8125rem; }

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.625rem;
}

.footer-links ul {
  display: flex;
  gap: 1.125rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
/* Footer-Links: als Links erkennbar — smaragd, Hover unterstrichen */
.site-footer a {
  color: var(--accent-text);
  transition: color 0.15s;
}
.site-footer a:hover {
  color: var(--teal-light);
  text-decoration: underline;
}

/* ══════════════════════════════════════════════════════
   11 · Responsive
   ══════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .mko-grid { gap: 2.5rem; }
}

@media (max-width: 900px) {
  .mko-grid { grid-template-columns: 1fr; gap: 2rem; }
  .mko-sidebar { position: static; order: 2; }
  .mko-main { order: 1; }
  .mko-focus-card { flex-direction: column; max-height: none; }
  .mko-focus-img { width: 100%; height: 50vw; max-height: 220px; }
  .mko-cards, .mko-related-list { grid-template-columns: repeat(2, 1fr); }

  .nav-toggle { display: flex; }
  .site-header .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-soft);
    padding: 1rem 2rem 1.25rem;
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.5);
  }
  .site-header .nav-links.open { display: block; }
  .site-header .nav-links ul { flex-direction: column; gap: 0.875rem; align-items: flex-start; font-size: 0.95rem; }
  .site-header .nav-links li ul {
    display: flex;
    position: static;
    border: none;
    background: none;
    box-shadow: none;
    padding: 0.5rem 0 0 1rem;
  }
  .brand-desc { display: none; }
}

@media (max-width: 600px) {
  .mko-hero { padding: 3.5rem 0 3rem; }
  .mko-cards, .mko-related-list { grid-template-columns: 1fr; }
  .mko-focus-body { padding: 1rem 1.2rem; }
  .mko-focus-title { font-size: 1.15rem; }
  .fontsize-switch { display: none; }
  .mko-wrap { padding: 0 1.25rem; }
  .nav-inner { padding: 0.875rem 1.25rem; }
  .mko-entry-wrap, .mko-featured, .mko-related, .mko-post-nav { padding-left: 1.25rem; padding-right: 1.25rem; }
  .mko-entry .wp-block-image.alignwide { margin-left: 0; margin-right: 0; }
}
