/* ==========================================================================
   Drehstuhlkameraden – WordPress-Ergänzungen
   Inhalte aus dem Block-Editor, Admin-Leiste, Menüs, Beitragslisten
   ========================================================================== */

/* ---------- Admin-Leiste (nur für eingeloggte Nutzer sichtbar) ---------- */
.admin-bar .site-header { top: calc(32px + env(safe-area-inset-top, 0px)); }
@media (max-width: 782px) { .admin-bar .site-header { top: calc(46px + env(safe-area-inset-top, 0px)); } }
@media (max-width: 600px) { .admin-bar .site-header { top: env(safe-area-inset-top, 0px); } }
@media (min-width: 601px) and (max-width: 900px) { .admin-bar .nav-links { top: calc(72px + 46px); } }

/* ---------- Menü aus WordPress ---------- */
.nav-links .current-menu-item > a:not(.btn) { color: var(--fg); }

/* ---------- Kopf von Unterseiten ---------- */
.page-hero-inner { position: relative; z-index: 1; }
.post-meta { font-family: var(--font-head); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-dim); font-size: .9rem; margin: 0; }
.page-hero .post-meta { margin-top: var(--space-2); }
.notfound { padding-block: var(--space-9); }

/* ---------- Allgemeine Editor-Inhalte ---------- */
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin: var(--space-7) 0 var(--space-4); }
.entry-content h3 { font-size: 1.3rem; margin: var(--space-6) 0 var(--space-3); }
.entry-content h4 { font-size: 1.1rem; margin: var(--space-5) 0 var(--space-2); }
.entry-content p, .entry-content li { color: var(--fg-muted); }
.entry-content strong { color: var(--fg); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin: 0 0 var(--space-4); display: grid; gap: 6px; }
.entry-content li::marker { color: var(--olive-bright); }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-6) 0; }
.entry-content blockquote { margin: var(--space-5) 0; padding: var(--space-4) var(--space-5); border-left: 3px solid var(--olive-bright); background: rgba(107,120,72,.1); border-radius: 0 var(--radius) var(--radius) 0; }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content img { height: auto; border-radius: var(--radius); }
.entry-content figure { margin: var(--space-5) 0; }
.entry-content figcaption { color: var(--fg-dim); font-size: .9rem; margin-top: var(--space-2); }
.entry-content code { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: .92em; }
.entry-content .wp-block-button__link { display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--space-5); background: var(--tan); color: var(--on-tan); border-radius: var(--radius); font-family: var(--font-head); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.entry-content .wp-block-button__link:hover { background: var(--tan-hover); color: var(--on-tan); }
.entry-thumb { width: 100%; height: auto; border-radius: var(--radius-lg); margin-bottom: var(--space-6); }
.entry-content .alignwide, .entry-content .alignfull { max-width: 100%; }

/* Tabellen */
.entry-content .wp-block-table { overflow-x: auto; margin: var(--space-4) 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.entry-content th, .entry-content td { text-align: left; padding: var(--space-3) var(--space-4); border: 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--fg-muted); }
.entry-content thead { border-bottom: 0; }
.entry-content th { font-family: var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-dim); font-weight: 600; font-size: .9rem; border-bottom: 1px solid var(--line-strong); }
.entry-content td:first-child { color: var(--fg); font-weight: 600; }

/* Hinweis-Kasten: Absatz mit der CSS-Klasse "callout" */
.entry-content .callout { margin-top: var(--space-5); padding: var(--space-4) var(--space-5); border-left: 3px solid var(--olive-bright); background: rgba(107,120,72,.1); border-radius: 0 var(--radius) var(--radius) 0; font-size: 1rem; }
.entry-content .callout strong { color: var(--olive-bright); }

/* ---------- Regelwerk-Layout ----------
   Jede Gruppe mit der CSS-Klasse "rule-section" wird zu einem Paragraphen (§).
   Überschrift und Listenpunkte werden automatisch nummeriert (§1, 1.1, 1.2 …). */
.entry-rules { counter-reset: sec; min-width: 0; }
.entry-rules .rule-section {
  counter-increment: sec; counter-reset: rule; position: relative;
  padding: var(--space-6); margin: 0 0 var(--space-5);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.entry-rules .rule-section::before, .entry-rules .rule-section::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--olive-bright); opacity: .55; pointer-events: none;
}
.entry-rules .rule-section::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: var(--radius-lg); }
.entry-rules .rule-section::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: var(--radius-lg); }
.entry-rules .rule-section h2 { display: flex; gap: var(--space-4); align-items: baseline; margin: 0 0 var(--space-5); font-size: clamp(1.7rem, 3vw, 2.2rem); }
.entry-rules .rule-section h2::before { content: "§" counter(sec); font-family: var(--font-head); font-weight: 800; color: var(--olive-bright); font-size: .8em; }
.entry-rules .rule-section ol { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: grid; gap: var(--space-4); }
.entry-rules .rule-section ol:last-child { margin-bottom: 0; }
.entry-rules .rule-section ol > li { counter-increment: rule; position: relative; padding-left: 52px; color: var(--fg-muted); }
.entry-rules .rule-section ol > li::before {
  content: counter(sec) "." counter(rule); position: absolute; left: 0; top: 1px;
  font-family: var(--font-head); font-weight: 700; color: var(--tan); font-size: 1rem; letter-spacing: .04em;
  min-width: 40px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--bg-2);
}
.entry-rules .rule-section > *:last-child, .entry-rules .rule-section .wp-block-group__inner-container > *:last-child { margin-bottom: 0; }
.rule-cta-card { padding: var(--space-6); display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: space-between; }
.rule-cta-card h2 { margin: 0 0 6px; font-size: 1.6rem; }
.rule-cta-card p { margin: 0; color: var(--fg-muted); }
.entry-updated { color: var(--fg-dim); font-size: .95rem; margin-top: var(--space-5); }
@media (max-width: 480px) { .entry-rules .rule-section { padding: var(--space-5); } }

/* ---------- Beitragsliste ---------- */
.post-list-wrap { padding-block: var(--space-8) var(--space-9); }
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--space-5); }
.post-card { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.post-card h2 { font-size: 1.5rem; margin: 0; }
.post-card h2 a { color: var(--fg); text-decoration: none; }
.post-card h2 a:hover { color: var(--tan); }
.post-card p { color: var(--fg-muted); margin: 0; }
.post-card .btn { align-self: flex-start; margin-top: auto; }
.empty-note { color: var(--fg-muted); }
.pagination { margin-top: var(--space-6); }
.pagination { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--fg-muted); text-decoration: none; font-family: var(--font-head); font-weight: 700; }
.pagination .page-numbers.current { background: var(--olive-dk); color: var(--fg); border-color: var(--olive); }

/* ---------- Kommentare (falls aktiviert) ---------- */
.entry-comments { margin-top: var(--space-7); border-top: 1px solid var(--line); padding-top: var(--space-6); }
.entry-comments input[type="text"], .entry-comments input[type="email"], .entry-comments input[type="url"], .entry-comments textarea {
  width: 100%; background: var(--bg); color: var(--fg); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: var(--space-3); font: inherit;
}
.entry-comments input[type="submit"] { background: var(--tan); color: var(--on-tan); border: 0; border-radius: var(--radius); min-height: 48px; padding: 0 var(--space-5); font-family: var(--font-head); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }

/* ---------- Barrierefreiheit ---------- */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
