/* firebee.org – moderne Ansicht
 * Kopfleiste mit Textmenü, Einstieg, Karten; helles Design (Standard) oder dunkles per Schalter
 * (<html data-theme="dark">, siehe src/Theme.php). Kein JavaScript, keine Web-Fonts.
 * Alle Maße in rem: Die Grundschrift wächst ab 1440 px Fensterbreite mit (clamp), auf großen
 * Bildschirmen (4K) werden Text und Seitenbreite also gemeinsam größer.
 * Die klassische Atari-Ansicht (templates/classic) nutzt diese Datei nicht.
 */
html { font-size: clamp(16px, calc(16px + (100vw - 1440px) * .006), 26px); }
:root {
  --bg: #f4f6f8;
  --surface: #fff;
  --text: #1b2127;
  --soft: #5d6873;
  --line: #e2e7ec;
  --brand: #2f7cc0;
  --brand-2: #59c2db;
  --honey: #f2b233;
  --hero-1: #10161c;
  --hero-2: #1f2a35;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,24,32,.06), 0 8px 24px rgba(16,24,32,.06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #0f1418; --surface: #171e24; --text: #e4e9ee; --soft: #9aa7b3; --line: #26313b;
  --brand: #5aa5e6; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}
html[data-theme="dark"] :is(.text, .news-body, .news-preview) img { filter: brightness(.92); }
html[data-theme="dark"] .mk-box { background: color-mix(in srgb, var(--surface) 70%, var(--line)) !important; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
/* Silbentrennung nach der Sprache der Seite (<html lang="…">); kurze Wortreste werden vermieden */
/* overflow-wrap: Wörter, die der Browser nicht trennt (z. B. groß geschriebene außerhalb des Deutschen),
   werden notfalls ohne Trennstrich umbrochen statt über den Rand zu ragen */
body { -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 7 3 3; overflow-wrap: break-word; }
.topbar, .site-footer, .pagination, .news-date, pre, code, kbd, input, textarea, select { -webkit-hyphens: manual; hyphens: manual; }
a { color: var(--brand); text-underline-offset: 2px; text-decoration-thickness: 1px; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 70rem; margin: 0 auto; padding: 0 1.25rem; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 10px; top: 0.625rem; background: var(--surface); padding: 0.5rem 0.75rem; z-index: 10; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; border-radius: 4px; }

/* --- Kopfleiste ------------------------------------------------------------ */
.topbar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 70rem; margin: 0 auto; padding: 0 1.25rem; display: flex; align-items: center; gap: 1.375rem; min-height: 4rem; }
.brand { margin: 0; font-size: 1.25rem; line-height: 1; }
.brand a { display: flex; align-items: center; gap: 0.625rem; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: -.01em; }
.brand a > span:last-child { display: flex; flex-direction: column; }
.brand small { display: block; white-space: nowrap; font-size: .66rem; font-weight: 500; color: var(--soft); letter-spacing: .02em; margin-left: 2px; }
.brand-logo { width: 2.1rem; height: auto; flex: none; }
/* Die Biene im Logo ist schwarz – auf dunklem Grund bekommt das Logo eine helle Kachel */
html[data-theme="dark"] .brand .brand-logo, .footer-brand .brand-logo { background: #fff; border-radius: 6px; padding: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nav-wide { margin-left: auto; }
.nav-toggle { display: none; }
.nav { display: flex; gap: 0; }
.nav a { color: var(--soft); text-decoration: none; padding: 0.4375rem 0.5625rem; border-radius: 8px; font-size: .9rem; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--bg); }
.nav a[aria-current="page"] { color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.tools { display: flex; align-items: center; gap: 0.5rem; }
.lang { position: relative; }
.lang summary { white-space: nowrap; list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; padding: 0.3125rem 0.625rem; font-size: .85rem; font-weight: 600; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: " ▾"; color: var(--soft); }
.lang-list { position: absolute; right: 0; top: calc(100% + 0.375rem); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 0.375rem; display: grid; grid-template-columns: repeat(4, 2.75rem); gap: 2px; }
.lang-list a, .lang-list span { text-align: center; padding: 0.375rem 0; border-radius: 6px; font-size: .85rem; text-decoration: none; color: var(--text); }
.lang-list a:hover { background: var(--bg); }
.lang-list span { background: var(--brand); color: #fff; }
.padlock { text-decoration: none; font-size: 1rem; }
.theme-toggle { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border: 1px solid var(--line); border-radius: 8px; color: var(--text); text-decoration: none; font-size: 1.05rem; line-height: 1; }
.theme-toggle:hover { background: var(--bg); }
.rss { font-size: .72rem; font-weight: 700; color: #fff; background: #f08a24; padding: 0.3125rem 0.5rem; border-radius: 6px; text-decoration: none; }

/* --- Hero (Startseiten-Teaser) -------------------------------------------- */
.hero { background: radial-gradient(1200px 400px at 80% 20%, #2b4a66 0, transparent 60%), linear-gradient(160deg, var(--hero-1), var(--hero-2)); color: #e7eef4; padding: 3.25rem 3rem 3.5rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-wrap { margin-top: 1.75rem; margin-bottom: 1.75rem; }
.first-text { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.first-text h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.15; margin: 0 0 1.125rem; color: #fff; letter-spacing: -.02em; }
.first-text h2 .fs-p1, .first-text h2 .fs-p2 { font-size: inherit; }
.first-text-text { color: #b9c7d3; font-size: 1.02rem; line-height: 1.65; }
.first-text-text b, .first-text-text strong { color: #fff; }
.first-text-more { margin: 1.625rem 0 0; }
.first-text-more a { display: inline-block; background: var(--honey); color: #1b1300; font-weight: 700; padding: 0.75rem 1.375rem; border-radius: 999px; text-decoration: none; box-shadow: 0 6px 20px rgba(242,178,51,.3); }
.first-text-more a:hover { filter: brightness(1.06); }
.first-text-img { width: 100%; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.45); }

/* --- Spalten -------------------------------------------------------------- */
.columns { display: grid; grid-template-columns: minmax(0, 1fr) 18.75rem; gap: 1.75rem; align-items: start; padding-top: 0; padding-bottom: 3rem; }
body:not(:has(.hero)) .columns { padding-top: 2rem; }
/* Unterseiten ohne Seitenleiste: zentrierte Spalte, Zeilen bleiben gut lesbar (~100 Zeichen) */
.columns.no-sidebar { grid-template-columns: minmax(0, 50rem); justify-content: center; }
.main, .sidebar { display: grid; gap: 1.25rem; align-content: start; }
.sidebar { position: sticky; top: 5.25rem; }
.spacer { display: none; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.75rem 2rem; }
.text { overflow-wrap: anywhere; font-size: 1rem; line-height: 1.65; }
.text h1, .text h2, .text h3 { line-height: 1.25; letter-spacing: -.01em; }
.title-box { background: none; border: 0; box-shadow: none; padding: 0 0 0.25rem; }
.title-box h1 { margin: 0; font-size: 2rem; letter-spacing: -.02em; }

/* --- Seitenleiste --------------------------------------------------------- */
.clip { padding: 1.25rem 1.375rem; font-size: .9rem; }
.clip-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); margin: 0 0 0.375rem; }
.clip-item { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.clip-item:last-child { border-bottom: 0; padding-bottom: 0; }
.clip-item strong { display: block; line-height: 1.35; font-size: .95rem; }
.clip-date, .clip-meta time { display: block; font-size: .75rem; color: var(--soft); margin: 2px 0 0.375rem; }
.clip-text { color: var(--soft); line-height: 1.5; font-size: .85rem; }
.clip-text img { display: none; }
.clip-more { display: inline-block; margin-top: 0.375rem; font-weight: 600; font-size: .85rem; text-decoration: none; }
.clip-more::after { content: " →"; }
.comments-clip .clip-meta { display: flex; justify-content: space-between; gap: 0.5rem; }
.comments-clip a { font-size: .88rem; text-decoration: none; }

/* --- News ----------------------------------------------------------------- */
.news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; background: none; border: 0; box-shadow: none; padding: 0; }
.news-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0 0 1.25rem; overflow: hidden; display: flex; flex-direction: column; }
.news-card > *:not(.news-preview) { padding: 0 1.375rem; }
.news-card h3 { order: 2; margin: 0.875rem 0 0.25rem; font-size: 1.1rem; line-height: 1.3; }
.news-card h3 a, .news-article h2 a { color: var(--text); text-decoration: none; }
.news-card h3 a:hover, .news-article h2 a:hover { color: var(--brand); }
.news-card .news-date { order: 1; margin-top: 1rem; }
.news-card .news-desc { order: 3; }
.news-card .news-preview { order: 4; padding: 0 1.375rem; }
.news-preview .mk-preview-img, .news-preview > .center:first-child img { width: 100%; height: 11.25rem; object-fit: cover; border-radius: 10px; margin: 0 0 0.625rem; }
.news-date { display: inline-block; font-size: .78rem; color: var(--soft); text-transform: uppercase; letter-spacing: .05em; }
.news-desc { font-weight: 600; color: var(--soft); margin: 0.375rem 0 0.625rem; }
.news-body, .news-preview { font-size: .95rem; line-height: 1.6; }
.news-article h2 { font-size: 1.8rem; line-height: 1.2; letter-spacing: -.02em; margin: 0.375rem 0 0.625rem; }
.news-sep { display: none; }
.news-actions { display: flex; gap: 1rem; margin-top: 0.75rem; font-size: .88rem; }
.news-actions a { text-decoration: none; font-weight: 600; }
.news-actions img { width: 1rem; vertical-align: -3px; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.375rem; padding: 0.875rem; }
.pagination a, .pagination span { min-width: 2.25rem; text-align: center; padding: 0.375rem 0.625rem; border-radius: 8px; text-decoration: none; border: 1px solid var(--line); }
.pagination span { background: var(--brand); color: #fff; border-color: var(--brand); }
.back-to-news { font-size: .9rem; }
.comment { display: grid; grid-template-columns: 3rem 1fr; gap: 0.875rem; }
.comment-icon { width: 3rem; border-radius: 50%; }
.comment-meta { margin: 0 0 .5em; color: var(--soft); font-size: .88rem; }
.comment-form { display: grid; gap: 0.625rem; }
.comment-form textarea, .comment-form input[type=text] { width: 100%; font: inherit; padding: 0.625rem 0.75rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.comment-form button, .comment-form input[type=submit] { justify-self: start; background: var(--brand); color: #fff; border: 0; padding: 0.625rem 1.25rem; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; }
.comment-form .error { color: #d33; margin: 0; }
.antispam { margin: 0; font-size: .9rem; color: var(--soft); }
.antispam-word { justify-self: start; background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; padding: 0.375rem 1rem; font-size: 1.5rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* --- Footer --------------------------------------------------------------- */
.site-footer { background: var(--hero-1); color: #9fb0bf; padding: 2.125rem 0; font-size: .9rem; }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.footer-brand { display: flex; align-items: center; gap: 0.625rem; color: #fff; font-weight: 700; }
.footer-brand span:last-child { color: #9fb0bf; font-weight: 400; }
.footer-brand .brand-logo { width: 1.6rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.375rem 1.25rem; }
.site-footer a { color: #cfdbe6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* --- Markup aus dem CMS --------------------------------------------------- */
.center { text-align: center; }
.center > img, .center > a > img { margin-left: auto; margin-right: auto; }
.fs-p1 { font-size: 1.2em; } .fs-p2 { font-size: 1.45em; } .fs-p3 { font-size: 1.7em; } .fs-p4 { font-size: 2.1em; }
.fs-m1 { font-size: .85em; } .fs-m2 { font-size: .75em; }
.mk-box { background: var(--bg); max-width: 100%; border-radius: 10px; }
.mk-box-left { float: left; margin: 0 1rem 0.5rem 0; }
.mk-box-right { float: right; margin: 0 0 0.5rem 1rem; }
.mk-box-center { margin-left: auto; margin-right: auto; }
.mk-img { vertical-align: top; border-radius: 6px; }
.mk-img.align-left { float: left; margin: 0 0.75rem 0.375rem 0; }
.mk-img.align-right { float: right; margin: 0 0 0.375rem 0.75rem; }
.mk-img.align-middle { vertical-align: middle; }
.mk-img.align-bottom { vertical-align: bottom; }
.mk-preview-img { width: 15rem; display: block; margin: 0 auto 0.375rem; }
.text::after, .news-body::after, .news-preview::after { content: ""; display: block; clear: both; }
pre, code { white-space: pre-wrap; font-size: .9em; }
.product-box { border: 1px solid var(--line); border-radius: 10px; padding: 0.625rem; }
.product-price { display: flex; justify-content: space-between; background: var(--bg); padding: 0.625rem; border-radius: 8px; font-size: .9rem; }

/* --- Schmal --------------------------------------------------------------- */
@media (max-width: 960px) {
  .columns { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .first-text { grid-template-columns: 1fr; gap: 1.625rem; }
}
@media (max-width: 1240px) {
  .brand small { display: none; }
  .topbar-in { gap: 0.875rem; }
}
@media (max-width: 1040px) {
  .topbar-in { position: relative; gap: 0.625rem; }
  .nav-wide { display: none; }
  .tools { margin-left: auto; }
  .nav-toggle { display: block; }
  .nav-toggle summary { display: flex; flex-direction: column; justify-content: center; gap: 0.25rem; height: 2.125rem; padding: 0 0.5625rem; cursor: pointer; list-style: none; border: 1px solid var(--line); border-radius: 8px; }
  .nav-toggle summary::-webkit-details-marker { display: none; }
  .nav-toggle summary span { width: 1.125rem; height: 2px; background: var(--text); border-radius: 2px; }
  .nav-toggle[open] summary { background: var(--bg); }
  .nav-toggle .nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 0.5rem 0.75rem 0.875rem; }
  .nav-toggle .nav a { padding: 0.6875rem 0.75rem; font-size: 1rem; }
}
@media (max-width: 860px) {
  .hero { padding: 1.75rem 1.375rem 2rem; }
  .hero-wrap { margin-top: 1rem; margin-bottom: 1.25rem; }
  .news-grid { grid-template-columns: 1fr; }
  .box { padding: 1.25rem; }
  .mk-box, .mk-box-left, .mk-box-right { float: none; width: auto !important; margin: 0 0 0.5rem; }
  .mk-img.align-left, .mk-img.align-right { float: none; display: block; margin: 0 auto 0.5rem; }
}
