/*
Theme Name: Anwesenheit
Description: Schlankes Theme für anwesenheitserfassung.de – Vorlagen für Anwesenheits- und Teilnehmerlisten.
Author: IQONEX GmbH
Version: 1.1.0
Requires PHP: 8.1
Text Domain: anwesenheit
*/

:root {
  --bg: #ffffff;
  --bg-soft: #f4f7f6;
  --ink: #14211d;
  --ink-soft: #4a5a55;
  --line: #dde5e2;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: #e3f2ef;
  --radius: 14px;
  --wrap: 1120px;
  --text: 720px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--font);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--bg); padding: 8px 12px; z-index: 10; }

/* Kopf */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand svg { flex: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: 15px; }
.nav a:hover, .nav .current-menu-item a { color: var(--accent); }

/* Hero */
.hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 40px 0 44px; }
.hero .wrap { display: grid; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(1.75rem, 4.6vw, 2.75rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 14px; }
.hero h1 .hl { color: var(--accent); }
.hero .lead { color: var(--ink-soft); font-size: 1.06rem; }
.hero .lead p { margin: 0 0 10px; }
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1.15fr 0.85fr; }
  .hero { padding: 64px 0; }
}

/* Download-Karte */
.dl-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 10px 30px rgba(20, 33, 29, 0.06); }
.dl-card img { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 14px; background: #fff; }
.dl-card h2 { font-size: 1.05rem; margin: 0 0 12px; }
.dl-btns { display: grid; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #0b5f58; }
.btn-ghost { background: var(--bg); color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }
.dl-note { font-size: 13px; color: var(--ink-soft); margin: 10px 0 0; }

/* Inhalt */
.content { padding: 40px 0 56px; }
.prose { max-width: var(--text); margin: 0 auto; }
.prose h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); line-height: 1.25; margin: 2.2em 0 0.6em; letter-spacing: -0.01em; }
.prose h3 { font-size: 1.15rem; margin: 1.6em 0 0.4em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.25em 0; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.meta-line { color: var(--ink-soft); font-size: 14px; margin: 0 0 8px; }

/* Digital-Hinweis */
.digital { max-width: var(--text); margin: 40px auto 0; background: var(--accent-soft); border-radius: var(--radius); padding: 22px; }
.digital h2 { margin: 0 0 6px; font-size: 1.2rem; }
.digital p { margin: 0 0 14px; color: var(--ink-soft); }

/* Weitere Vorlagen */
.more { border-top: 1px solid var(--line); padding: 40px 0; }
.more h2 { font-size: 1.3rem; margin: 0 0 16px; }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); list-style: none; margin: 0; padding: 0; }
.cards a { display: block; height: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--ink); background: var(--bg); }
.cards a:hover { border-color: var(--accent); }
.cards strong { display: block; color: var(--accent); margin-bottom: 4px; }
.cards span { font-size: 14px; color: var(--ink-soft); }

/* Fuß */
.site-footer { background: var(--ink); color: #c8d3cf; padding: 40px 0 28px; font-size: 15px; }
.site-footer a { color: #ffffff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.foot-cols h2 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: #8fa39c; margin: 0 0 10px; }
.foot-cols ul { list-style: none; margin: 0; padding: 0; }
.foot-cols li { margin: 0 0 6px; }
.foot-base { border-top: 1px solid #2b3b36; margin-top: 28px; padding-top: 16px; font-size: 13px; color: #8fa39c; }

@media print {
  .site-header, .site-footer, .more, .digital, .dl-btns { display: none; }
}
.dl-card img { max-height: 340px; width: auto; margin-left: auto; margin-right: auto; }
@media (max-width: 719px) {
  .site-header .wrap { padding-top: 10px; padding-bottom: 8px; gap: 6px; }
  .nav { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav ul { flex-wrap: nowrap; white-space: nowrap; }
  .nav a { display: inline-block; padding: 6px 0; }
  .hero { padding: 28px 0 32px; }
  .dl-card img { max-height: 200px; }
}
.head-litelog { order: 3; display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.head-litelog:hover { background: var(--accent-soft); }
.nav { margin-left: auto; }
@media (max-width: 719px) {
  .site-header .brand { flex: 1; }
  .head-litelog { order: 2; min-height: 32px; padding: 4px 10px; font-size: 13px; }
  .nav { order: 4; margin-left: 0; }
}
.hero-digital { margin: 18px 0 0; font-size: 15px; color: var(--ink-soft); }
.hero-digital a { font-weight: 600; }
.weiche { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 620px) { .weiche { grid-template-columns: 1fr 1fr; } }
.weiche a { display: block; height: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.weiche a:hover { border-color: var(--accent); }
.weiche strong { display: block; color: var(--accent); margin-bottom: 2px; }
.weiche span { font-size: 14px; color: var(--ink-soft); }
html { scroll-behavior: smooth; }
.hero-digital { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.hero-digital a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); text-decoration: none; }
.hero-digital a:hover { border-color: var(--accent); }
.hero-digital > span { flex-basis: 100%; }

/* --- 1.1: Hero-Raster, Schritte, FAQ-Akkordeon, Figur in der Digital-Box --- */
.hero-grid { display: grid; gap: 20px 40px; grid-template-areas: "head" "card" "text"; }
.hero-head { grid-area: head; }
.hero-head h1 { margin-bottom: 0; }
.hero-grid .dl-card { grid-area: card; }
.hero-text { grid-area: text; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; grid-template-areas: "head card" "text card"; grid-template-rows: auto 1fr; align-items: start; }
  .hero-head { align-self: end; }
}
.btn small { font-weight: 400; opacity: 0.8; font-size: 13px; }
.btn-primary small { opacity: 0.9; }

.steps { padding: 48px 0 8px; }
.steps h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin: 0 0 22px; text-align: center; letter-spacing: -0.01em; }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 760px) { .steps-list { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.steps-list li { position: relative; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 20px; }
.steps-img { height: 150px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.steps-img img { max-height: 150px; width: auto; }
.steps-nr { position: absolute; top: 14px; left: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.steps-list h3 { margin: 0 0 4px; font-size: 1.05rem; }
.steps-list p { margin: 0; color: var(--ink-soft); font-size: 15px; }

.prose .faq-item { border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; background: var(--bg); }
.prose .faq-item summary { cursor: pointer; list-style: none; padding: 14px 44px 14px 16px; font-weight: 600; position: relative; }
.prose .faq-item summary::-webkit-details-marker { display: none; }
.prose .faq-item summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--accent); font-weight: 400; }
.prose .faq-item[open] summary::after { content: "–"; }
.prose .faq-item > :not(summary) { padding: 0 16px; }
.prose .faq-item > :last-child { padding-bottom: 14px; margin-bottom: 0; }

.digital-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.digital-head img { width: 96px; height: auto; flex: none; }
.digital-head p { margin: 0; }
@media (max-width: 480px) { .digital-head img { width: 72px; } }
@media (min-width: 900px) {
  .hero-grid { grid-template-areas: "head card" "text card" ". card"; grid-template-rows: auto auto 1fr; align-items: start; }
  .hero-head { align-self: start; padding-top: 12px; }
}
/* 1.1.1: Knopf-Hinweis als zweite Zeile, Figuren-Größen */
.dl-btns .btn { flex-direction: column; gap: 0; line-height: 1.25; padding-top: 8px; padding-bottom: 8px; }
.dl-btns .btn small { font-size: 12px; }
.steps-img img { max-height: 140px; max-width: 80%; }
.digital-head img { width: auto; height: 120px; }
@media (max-width: 480px) {
  .digital-head { align-items: flex-start; gap: 12px; }
  .digital-head img { height: 96px; }
  .digital h2 { font-size: 1.1rem; }
  .digital-head p { font-size: 15px; }
}
