/* TKITS Webseite – Stylesheet
   Gestaltung: sachlich-reduziert, weißer Grund, rote Akzente, kräftige Überschriften.
   Farben aus dem Logo: Rot #CC0033 (Kontrast zu Weiß 5,81:1), Schwarz, Weiß.
   Eigene Umsetzung. Keine externen Schriften, Skripte oder Ressourcen. */

:root {
    --red: #CC0033;
    --red-dark: #A00026;
    --ink: #1F2933;
    --muted: #52606D;
    --line: #D9DEE3;
    --line-strong: #B8C0C8;
    --bg: #FFFFFF;
    --bg-alt: #F3F4F6;
    --focus: #0B57D0;
    --radius: 0.25rem;
    --maxw: 71.25rem;
    --font: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
}

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

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

body {
    margin: 0;
    font: 1rem/1.6 var(--font);
    color: var(--ink);
    background: var(--bg);
}

img { max-width: 100%; height: auto; }

.container { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Sprunglink */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* Hinweis in der Vorschau */
.notice {
    background: #FFF4CE;
    color: var(--ink);
    border-bottom: 2px solid #8A6D00;
    padding: 0.75rem 0;
    font-size: 0.95rem;
}
.notice p { margin: 0; }
.notice ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }

/* Kopfbereich */
.site-header {
    background: var(--bg);
    border-top: 0.25rem solid var(--red);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    padding-block: 1.25rem;
}
.brand { display: inline-block; line-height: 0; }
.brand img { display: block; width: 14rem; height: auto; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.site-nav a {
    display: block;
    padding: 0.25rem 0;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 2px solid var(--line-strong);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--red); border-bottom-color: var(--red); }

.nav-toggle {
    display: none;
    padding: 0.55rem 1rem;
    font: inherit;
    font-weight: 700;
    color: var(--ink);
    background: var(--bg);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    cursor: pointer;
}

@media (max-width: 48rem) {
    .brand img { width: 11rem; }
    .js .nav-toggle { display: inline-flex; }
    .js .site-nav { display: none; flex-basis: 100%; }
    .js .nav-toggle[aria-expanded="true"] + .site-nav { display: block; }
    .site-nav ul { flex-direction: column; gap: 0.25rem; }
    .site-nav a { padding: 0.6rem 0; }
}

/* Inhalt */
main { display: block; min-height: 50vh; border-top: 1px solid var(--line); }

.content { max-width: 52rem; padding-block: 2.5rem 3rem; }
.content--wide { max-width: none; }

h1, h2, h3 { line-height: 1.2; }

h1 {
    margin: 0 0 1.25rem;
    font-size: clamp(1.9rem, 4vw, 2.5rem);
    font-weight: 700;
}

h2 { margin: 2.25rem 0 0.75rem; font-size: 1.5rem; font-weight: 700; }
h3 { margin: 1.75rem 0 0.5rem; font-size: 1.15rem; font-weight: 700; }

p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.4rem; }

.content a,
.row-text a { color: var(--red); }
.content a:hover,
.row-text a:hover { color: var(--red-dark); }

/* E-Mail-Adresse, die per JavaScript bedienbar wird (assets/js/mail.js) */
.mail-active { cursor: pointer; text-decoration: underline; }
.content .mail-active,
.row-text .mail-active { color: var(--red); }
.content .mail-active:hover,
.row-text .mail-active:hover { color: var(--red-dark); }
.site-footer .mail-active:hover { color: var(--red); }

.lead { font-size: 1.3rem; line-height: 1.5; }

/* Untertitel (Slogan) unter der Seitenüberschrift; wird nur ausgegeben, wenn er im Admin gepflegt ist */
.subtitle { margin: -0.5rem 0 1.25rem; font-size: 1.15rem; color: var(--muted, #4a5561); }

mark { background: #FFE08A; color: var(--ink); padding: 0.1em 0.3em; }

/* Schaltflächen */
.btn,
.content .btn,
.home .btn {
    display: inline-block;
    margin: 0 0.5rem 0.5rem 0;
    padding: 0.75rem 1.4rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fff;
    background: var(--red);
    border: 2px solid var(--red);
    border-radius: var(--radius);
    text-decoration: none;
}
.btn:hover,
.content .btn:hover,
.home .btn:hover { color: #fff; background: var(--red-dark); border-color: var(--red-dark); }

.btn--light,
.content .btn--light,
.home .btn--light { color: var(--red); background: #fff; border-color: #fff; }
.btn--light:hover,
.content .btn--light:hover,
.home .btn--light:hover { color: var(--red-dark); background: var(--bg-alt); border-color: var(--bg-alt); }

/* "Mehr"-Link */
.more { font-weight: 700; white-space: nowrap; text-decoration: none; }
.more::after { content: " \203A"; }
.more:hover { text-decoration: underline; }

/* Startseite: Hero. Die Überschrift steht über der vollen Breite und bleibt auf dem Desktop einzeilig.
   Das Bild ist optional: ohne Bild nutzt der Text die volle Breite. */
.hero {
    padding-block: 2.5rem 3rem;
    border-bottom: 1px solid var(--line);
}
.hero h1 {
    margin-bottom: 1.5rem;
    font-size: clamp(1.75rem, 3.6vw, 2.75rem);
}
@media (min-width: 64rem) {
    .hero h1 { white-space: nowrap; }
}
.hero-body { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: start; }
.hero-body--image { grid-template-columns: 1.2fr 1fr; }
.hero-text { max-width: none; }
.hero .lead { margin-bottom: 1.5rem; font-size: clamp(1.15rem, 2vw, 1.5rem); }
.hero-media { margin: 0; }
.hero-media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
}
@media (max-width: 48rem) {
    .hero { padding-block: 2rem; }
    .hero-body--image { grid-template-columns: 1fr; }
}

/* Startseite: Leistungsbereiche mit Icon */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
    gap: 2rem;
    padding-block: 2.5rem;
    border-bottom: 1px solid var(--line);
}
.feature h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.75rem;
    font-size: 1.375rem;
}
.feature p { margin: 0; }

.icon {
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #111 center / 58% no-repeat;
}
/* Kacheln mit Logo (Seitenvorlage "tiles") und Logo statt Symbol auf der Startseite */
.tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    padding-block: 1.5rem;
}
@media (max-width: 60rem) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 38rem) { .tiles { grid-template-columns: minmax(0, 1fr); } }
.tile { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); }
.tile h2 { margin: 0 0 .25rem; font-size: 1.25rem; }
.tile p { margin: 0 0 .5rem; }
.tile-sub { color: var(--muted, #4a5561); }
.tile-logo { display: flex; align-items: center; min-height: 4.5rem; margin: 0 0 1rem; }
.tile-logo img, .feature-logo { display: block; width: auto; height: auto; max-width: 11rem; max-height: 4rem; object-fit: contain; }
.feature-logo { max-width: 3.5rem; max-height: 3.5rem; flex: none; }
.icon--hardware { background-image: url("/assets/img/icon-hardware.svg"); }
.icon--network  { background-image: url("/assets/img/icon-network.svg"); }
.icon--security { background-image: url("/assets/img/icon-security.svg"); }
.icon--support  { background-image: url("/assets/img/icon-support.svg"); }
.icon--backup   { background-image: url("/assets/img/icon-backup.svg"); }
.icon--mail     { background-image: url("/assets/img/icon-mail.svg"); }

/* News: Meldungen auf Startseite und News-Seite */
.news { padding-block: 2.5rem; border-bottom: 1px solid var(--line); }
.news > h2 { margin: 0 0 1.5rem; font-size: 1.375rem; }
.news-list { display: grid; gap: 1.5rem; }
.news-item { padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.news-item:last-child { padding-bottom: 0; border-bottom: 0; }
.news-item h2, .news-item h3 { margin: 0 0 0.25rem; font-size: 1.25rem; }
.news-item p { margin: 0 0 0.75rem; }
.news-item .news-date { margin: 0 0 0.5rem; font-size: 0.875rem; color: var(--muted); }
.news-item a, .news-all a { color: var(--red); }
.news-item a:hover, .news-all a:hover { color: var(--red-dark); }
.news-all { margin: 1.5rem 0 0; }
.news-page .news-list { padding-block: 1rem; }

/* Zeilen: Bezeichnung links, Text rechts */
.rows { padding-block: 0.5rem; }
.row {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 2rem;
    padding-block: 1.75rem;
    border-bottom: 1px solid var(--line);
}
.row-label h2,
.row-label h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.row-label p { margin: 0; font-size: 0.875rem; color: var(--muted); }
.row-text p { margin: 0; }
@media (max-width: 48rem) {
    .row { grid-template-columns: 1fr; gap: 0.5rem; }
}
/* Zeile mit Bild: Bild und Text je etwa die halbe Breite, abwechselnd links und rechts */
.row--media {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
}
.row--flip .row-media { order: 2; }
.row-media img { display: block; width: 100%; height: auto; max-height: 22rem; object-fit: contain; border-radius: var(--radius); }
.row-body h2 { margin: 0 0 0.25rem; font-size: 1.35rem; }
.row-sub { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 48rem) {
    .row--media { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .row--flip .row-media { order: 0; }
    .row-media img { max-width: 28rem; }
}

/* Aktionsband */
.cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-block: 2.5rem;
    padding: 1.5rem 2rem;
    color: #fff;
    background: var(--red);
}
.cta p { margin: 0; font-size: clamp(1.15rem, 2.2vw, 1.5rem); }
.cta .btn { margin: 0; }

/* Fußbereich */
.site-footer {
    margin-top: 3rem;
    padding-top: 2.5rem;
    background: var(--bg);
    border-top: 1px solid var(--line);
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding-bottom: 2rem;
}
.footer-cols > section { min-width: 0; }
.footer-title {
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--red);
}
.site-footer p { margin: 0 0 1rem; font-size: 0.9375rem; }
.site-footer a { color: var(--ink); }
.site-footer a:hover { color: var(--red); }
.footer-list { margin: 0; padding: 0; list-style: none; }
.footer-list li { padding-block: 0.5rem; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.footer-list li:first-child { padding-top: 0; }
.footer-list a { font-weight: 700; text-decoration: none; }
.footer-list a:hover { text-decoration: underline; }
.footer-bottom {
    padding-block: 1.25rem;
    border-top: 1px solid var(--line);
}
.fineprint { margin: 0; font-size: 0.8125rem; color: var(--muted); }
.footer-bottom .fineprint + .fineprint { margin-top: 0.35rem; }
@media (max-width: 48rem) {
    .footer-cols { grid-template-columns: 1fr; }
}

/* Schlichte Seiten (Fehler, Wartung) */
.bare { background: var(--bg-alt); }
.bare-main { max-width: 34rem; min-height: 0; margin: 4rem auto; padding: 0 1rem; text-align: center; border-top: 0; }
.bare-logo { display: block; margin: 0 auto 2rem; }
.error-detail {
    margin: 0 0 1.5rem;
    padding: 0.75rem 1rem;
    text-align: left;
    font: 0.875rem/1.5 ui-monospace, Menlo, Consolas, monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
}

/* Blocksatz für Fließtexte (nur ab mittlerer Breite; mit automatischer Silbentrennung, lang="de") */
@media (min-width: 40rem) {
    .content p:not(.lead):not(.subtitle):not(.tile-logo),
    .row-text p,
    .feature p,
    .tile p:not(.tile-logo):not(.tile-sub),
    .content li {
        text-align: justify;
        hyphens: auto;
        -webkit-hyphens: auto;
    }
}
