/* bizzworxx cms v1 – Grundgestaltung. Alle CD-Werte kommen als Variablen aus config.php (:root). */

/* Schrift lokal (keine Anfrage an Google) */
@font-face { font-family: 'Titillium Web'; font-style: normal; font-weight: 300; font-display: swap; src: url(../fonts/titillium-web-v19-latin-300.woff2) format('woff2'); }
@font-face { font-family: 'Titillium Web'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/titillium-web-v19-latin-regular.woff2) format('woff2'); }
@font-face { font-family: 'Titillium Web'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/titillium-web-v19-latin-600.woff2) format('woff2'); }
@font-face { font-family: 'Titillium Web'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/titillium-web-v19-latin-700.woff2) format('woff2'); }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-base);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
    margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p  { margin: 0 0 1em; }

a { color: var(--color-link); }
a:hover { color: var(--color-primary); }
img { max-width: 100%; height: auto; display: block; }

.wrap { width: min(100% - 2.5rem, var(--width-content)); margin-inline: auto; }
.narrow { max-width: 48rem; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: #fff; padding: .5rem 1rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: .7em 1.5em;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius);
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2;
    transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--color-primary-2); border-color: var(--color-primary-2); color: #fff; }
.btn.accent { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-primary); }
.btn.accent:hover { background: #fff; border-color: #fff; color: var(--color-primary); }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.btn.ghost:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.btn.light { background: #fff; border-color: #fff; color: var(--color-primary); }
.btn.light:hover { background: var(--color-accent); border-color: var(--color-accent); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* ---------- Kopf ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--color-primary); color: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}
/* Sprungziele (#anker) nicht unter dem Kopf verstecken */
html { scroll-padding-top: 6rem; }
/* Auf dem Handy mit offenem Menü: Menü scrollbar halten */
@media (max-width: 52rem) {
    .site-header { max-height: 100vh; overflow-y: auto; }
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 5rem; flex-wrap: wrap; }

.brand { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-logo { display: block; height: 3.5rem; width: auto; } /* Original-Logo, Seitenverhältnis bleibt */
.brand-mark { width: 3rem; height: 3rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-size: 1.6rem; font-weight: 600; letter-spacing: .01em; }
.brand-tld { font-weight: 300; opacity: .8; }
.brand-claim { font-size: .95rem; font-weight: 300; opacity: .8; }

.main-nav ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
.main-nav a {
    display: block; padding: .5rem .9rem; color: #fff; text-decoration: none;
    font-weight: 400; border-bottom: 3px solid transparent;
}
.main-nav a:hover { border-bottom-color: rgba(255,255,255,.4); }
.main-nav a[aria-current="page"] { border-bottom-color: var(--color-accent); }

.nav-toggle { display: none; }
.nav-toggle summary {
    list-style: none; cursor: pointer; padding: .4rem .9rem;
    border: 1px solid rgba(255,255,255,.5); color: #fff;
}
.nav-toggle summary::-webkit-details-marker { display: none; }

@media (max-width: 52rem) {
    .nav-toggle { display: block; }
    .main-nav { display: none; flex-basis: 100%; padding-bottom: 1rem; }
    .nav-toggle[open] + .main-nav { display: block; }
    .main-nav ul { flex-direction: column; }
    .main-nav a { border-bottom: 0; border-left: 3px solid transparent; }
    .main-nav a[aria-current="page"] { border-left-color: var(--color-accent); }
}

/* ---------- Blöcke allgemein ---------- */
.block { padding-block: clamp(3rem, 7vw, 5.5rem); }
.block.alt { background: var(--color-bg-alt); }
.intro { color: var(--color-muted); max-width: 46rem; font-size: 1.1rem; }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-2) 100%);
    color: #fff;
}
.hero h1 { color: #fff; max-width: 40rem; }
.hero .lead { font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 300; max-width: 38rem; opacity: .92; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; font-weight: 600; color: var(--color-accent); margin-bottom: .75rem; }

/* Kacheln – immer gleich hoch, Titel max. zwei Zeilen */
.tile-grid {
    list-style: none; margin: 2rem 0 0; padding: 0;
    display: grid; gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.tile {
    height: 100%;
    display: flex; flex-direction: column;
    padding: 1.5rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--color-accent);
}
.tile h3 {
    min-height: 2.4em;
    display: -webkit-box; -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; line-clamp: 2;
    overflow: hidden; text-overflow: ellipsis;
}
.tile-text { color: var(--color-muted); flex: 1; margin-bottom: 1em; }
.tile .more { font-weight: 600; text-decoration: none; }

/* Text + Bild */
.split { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr 1fr; align-items: center; }
.text-image.reverse .split-text { order: 2; }
.split-media img { border-radius: var(--radius-box); box-shadow: 0 1rem 2.5rem rgba(20, 50, 80, .15); }
.media-placeholder {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-box);
    background: linear-gradient(135deg, var(--color-primary-2), var(--color-accent));
    opacity: .85;
}
@media (max-width: 48rem) {
    .split { grid-template-columns: 1fr; }
    .text-image.reverse .split-text { order: 0; }
}

/* Handlungsaufforderung */
.cta-box {
    display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
    padding: clamp(2rem, 5vw, 3rem);
    background: var(--color-primary-2);
    border-radius: var(--radius-box);
    color: #fff;
}
.cta-box h2 { color: #fff; }
.cta-box p { margin: 0; opacity: .9; }

/* Fließtext aus Markdown – bündig mit den anderen Blöcken, Zeilen aber nicht zu lang */
.block.text .narrow { max-width: none; }
.prose > * { max-width: 48rem; }
.block.text { padding-block: clamp(2rem, 4vw, 3rem); }
.block.text:first-child { padding-top: clamp(3rem, 7vw, 5rem); }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .3em; }
.prose blockquote {
    margin: 1.5em 0; padding: 1em 1.5em;
    border-left: 4px solid var(--color-accent);
    background: var(--color-bg-alt);
    color: var(--color-primary);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--color-border); margin: 2.5em 0; }
.prose code { font-size: .9em; background: var(--color-bg-alt); padding: .1em .35em; }
.prose pre { background: var(--color-primary); color: #fff; padding: 1em 1.25em; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 1.5em; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { text-align: left; padding: .6em .8em; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.prose th { color: var(--color-primary); font-weight: 600; border-bottom-width: 2px; }
.tile-text p:last-child, .split-text p:last-child { margin-bottom: 0; }

/* ---------- Kennwort-Abfrage ---------- */
.login-form { display: grid; gap: .5rem; max-width: 22rem; margin-top: 1.5rem; }
.login-form label { font-weight: 600; }
.login-form input { font: inherit; padding: .6em .8em; border: 1px solid var(--color-border); border-radius: var(--radius); }
.login-form input:focus { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.login-form .btn { justify-self: start; margin-top: .5rem; cursor: pointer; font: inherit; font-weight: 600; }
.login-error { color: #b3261e; font-weight: 600; margin: 0; }

/* ---------- Fuß ---------- */
.site-footer { background: var(--color-primary); color: rgba(255,255,255,.8); padding-block: 2.5rem; font-size: .95rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; align-items: flex-end; }
.site-footer address { font-style: normal; line-height: 1.6; }
.site-footer strong { color: #fff; font-weight: 600; }
.site-footer a { color: #fff; }
.footer-nav { display: flex; gap: 1.5rem; }
.copy { margin: 0; opacity: .7; }
