/* esparks.de – zentrales Stylesheet (Layout angelehnt an das bisherige WordPress-Design) */
:root {
  --bg: #ececec;
  --surface: #ffffff;
  --text: #444444;
  --heading: #333333;
  --muted: #777777;
  --line: #e2e2e2;
  --accent: #cc5ad6;      /* Magenta – Menü, Links */
  --quote: #632e9b;       /* Violett – Zitatbalken */
  --dark: #333a40;        /* Buttons */
  --max: 1240px;
  --sans: Roboto, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: Merriweather, Georgia, "Iowan Old Style", "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.75 var(--serif); min-height: 100vh; display: flex; flex-direction: column; }
.layout { flex: 1 0 auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--sans); font-weight: 400; color: var(--heading); line-height: 1.25; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: .5rem 1rem; z-index: 20; }

/* Kopfzeile */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: rgba(246, 246, 246, .94); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: stretch; justify-content: space-between; min-height: 64px;
}
.brand { font-family: var(--sans); font-size: 2rem; color: var(--heading); padding: 0 1.4rem; display: flex; align-items: center; }
.brand:hover { text-decoration: none; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; height: 100%; }
nav li { display: flex; border-left: 1px solid var(--line); }
nav a {
  font-family: var(--sans); font-size: 1rem; color: var(--heading);
  display: flex; align-items: center; padding: 0 1.4rem;
}
nav a:hover { color: var(--accent); text-decoration: none; }
nav a[aria-current="page"] { background: var(--accent); color: #fff; }

/* Titelbild */
.header-image { width: 100%; height: clamp(180px, 27vw, 420px); object-fit: cover; object-position: center 40%; }

/* Inhalt mit Seitenleiste */
.layout { width: 100%; max-width: var(--max); margin: 2.5rem auto; padding: 0 1.25rem; display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(220px, 1fr); gap: 2.5rem; align-items: start; }
.content, .widget { background: var(--surface); padding: 2.2rem 2.5rem; }
.content > :first-child { margin-top: 0; }
.content h1 { font-size: 2.1rem; margin: 0 0 1rem; }
.content h2 { font-size: 1.5rem; margin: 2rem 0 .6rem; }
.content h3 { font-size: 1.2rem; margin: 1.5rem 0 .4rem; }
.meta { color: var(--muted); font-size: .9rem; font-family: var(--sans); }
blockquote {
  margin: 1.5rem 0; padding: 1.2rem 1.6rem;
  border: 1px solid var(--line); border-left: 4px solid var(--quote);
  font-style: italic; font-size: 1.1rem;
}
blockquote p { margin: 0; }
.portrait { margin: 2rem 0 0; }
.portrait img { width: 100%; }

.widget + .widget { margin-top: 2rem; }
.widget h2 { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; margin: 0 0 .8rem; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.widget li:last-child { border-bottom: 0; }
.btn { display: inline-block; background: var(--dark); color: #fff; padding: .7rem 1.3rem; border-radius: 4px; font-family: var(--serif); }
.btn:hover { text-decoration: none; filter: brightness(1.2); }

/* Karten für Fortbildungen / HowTos */
.cards { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.card { border: 1px solid var(--line); padding: 1.3rem 1.5rem; }
.card h3 { margin: .2rem 0 .4rem; }
.card p { margin: 0 0 .5rem; }
.tag { font-family: var(--sans); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.note { border: 1px dashed var(--line); padding: 1rem 1.3rem; color: var(--muted); }
.box { background: #f6f0f8; padding: 1rem 1.3rem; margin: 1.5rem 0; }
pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
code { background: #f3f3f3; padding: .1em .35em; }
pre { background: #f6f6f6; border: 1px solid var(--line); padding: 1rem; overflow-x: auto; }
pre code { background: none; padding: 0; }
.todo { background: #fff3c4; color: #5a4300; padding: 0 .3em; }

/* Fußzeile */
footer.site { background: #fff; border-top: 1px solid var(--line); padding: 1.4rem 1.25rem; font-family: var(--sans); font-size: .9rem; color: var(--muted); }
footer.site .inner { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
footer.site a { color: var(--muted); }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; margin: 1.5rem auto; gap: 1.5rem; }
  .content, .widget { padding: 1.5rem 1.4rem; }
  header.site { flex-direction: column; }
  .brand { padding: .6rem 1.2rem; font-size: 1.7rem; }
  nav ul { flex-wrap: wrap; }
  nav li { flex: 1 1 auto; }
  nav a { justify-content: center; width: 100%; }
  nav li { border-left: 0; border-right: 1px solid var(--line); }
  nav a { padding: .7rem 1rem; }
}
@media print {
  header.site nav, .header-image, aside, footer.site { display: none; }
  body { background: #fff; }
  .layout { display: block; }
}

/* Videos */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.video-card { border: 1px solid var(--line); display: flex; flex-direction: column; }
.video-thumb { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer; background: #222; aspect-ratio: 16/9; overflow: hidden; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.video-thumb:hover img, .video-thumb:focus-visible img { transform: scale(1.04); }
.video-thumb .play { position: absolute; left: 50%; top: 50%; width: 62px; height: 44px; margin: -22px 0 0 -31px; background: rgba(0,0,0,.65); border-radius: 12px; transition: background .2s; }
.video-thumb .play::after { content: ""; position: absolute; left: 25px; top: 13px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }
.video-thumb:hover .play, .video-thumb:focus-visible .play { background: var(--accent); }
.video-body { padding: 1rem 1.2rem 1.2rem; }
.video-body .meta { margin: 0 0 .2rem; }
.video-body h3 { margin: 0 0 .5rem; font-size: 1.1rem; }
.video-body p { margin: 0; font-size: .92rem; line-height: 1.6; }
dialog#player { width: min(960px, 94vw); padding: 0; border: 0; background: #111; color: #eee; }
dialog#player::backdrop { background: rgba(0,0,0,.75); }
.player-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 1rem; font-family: var(--sans); }
.player-close { background: none; border: 0; color: #eee; font-size: 1.3rem; cursor: pointer; }
.player-frame { aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; }
.player-frame iframe { width: 100%; height: 100%; border: 0; }
.consent { max-width: 34rem; padding: 1.5rem; text-align: center; font-size: .95rem; }
.consent a { color: #e6a3eb; }
.consent .btn { background: var(--accent); border: 0; cursor: pointer; font-size: 1rem; }
