/* ============================================================
   KPS Martin Keller e. Kfm. – Stylesheet
   Basis: originale KPS.css
   Bereinigt: veraltete -moz-Eigenschaften entfernt, pt → px,
   Pfade an neue Verzeichnisstruktur angepasst,
   Frame-spezifische Klassen entfernt (.bodyTop, .bodyLeft),
   Nicht verwendete Klassen entfernt (.cellcolor, .rev_type,
   .g_nav_cellcolor, .a_type_color, .Error, .noteFixPos,
   .note, div.footer, .floatleft, blockquote, pre, tr, table,
   td/th, h3–h6, address, dd, dt, dl, hr),
   Responsive Design und Hamburger-Navigation ergänzt.
   ============================================================ */

/* --- Web Fonts -------------------------------------------- */
@font-face {
    font-family: 'kpsf';
    src: url('../fonts/PermianSansTypeface-webfont.woff') format('woff'),
         url('../fonts/PermianSansTypeface-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'kpsf';
    src: url('../fonts/PermianSansTypeface-Bold-webfont.woff') format('woff'),
         url('../fonts/PermianSansTypeface-Bold-webfont.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* --- Box-Sizing (moderner Standard) ----------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

/* --- Basis: html und body --------------------------------- */
html {
    height: 100%;
}

body, h1, h2, div, p, ul, ol, li {
    margin: 0;
    padding: 0;
    font-family: 'kpsf', verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
    font-style: normal;
    font-variant: normal;
    font-weight: normal;
    font-size: 12pt;
    line-height: 130%;
    letter-spacing: -0.5px;
}

body {
    height: 100%;
    border-top: 1px solid silver;
    color: black;
    background-color: rgb(240, 240, 240);
}

/* --- Seitenlayout (ersetzt Frames) ------------------------ */
#page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Kopfzeile (ersetzt FrameTop) */
#site-header {
    margin: 0;
    padding: 4px 12px;
    background-image: url('../images/HG1.gif');
    background-repeat: repeat;
    text-align: right;
    border-bottom: 1px solid #ccc;
}

#site-header img {
    height: 46px;
    width: auto;
    max-width: 342px;
}

/* Hauptbereich: Navigation + Inhalt nebeneinander */
#content-wrapper {
    display: flex;
    flex: 1;
}

/* Navigation (ersetzt FrameLeft) */
#site-nav {
    width: 183px;
    min-width: 183px;
    margin: 0;
    padding: 6px;
    color: black;
    background-color: rgb(200, 200, 200);
    background-image: url('../images/HG1.gif');
    background-repeat: repeat;
    flex-shrink: 0;
}

/* Hauptinhalt (ersetzt FrameMain) */
#site-main {
    flex: 1;
    padding: 12px 16px;
    background-color: rgb(240, 240, 240);
    border-top: 1px solid silver;
    min-width: 0;
}

/* --- Absätze ---------------------------------------------- */
p {
    margin: 0 0 15px;
    color: black;
    font-size: 1em;
}

/* --- Überschriften ---------------------------------------- */
h1 {
    border-style: none;
    margin: 15px 0;
    color: #0000CC;
    font-size: 150%;
    font-weight: bold;
    background-position: left top;
    letter-spacing: -1px;
}

h2 {
    border-bottom: 1px solid rgb(180, 180, 180);
    margin: 10px 0;
    color: #0000CC;
    font-size: 130%;
    font-weight: bold;
    letter-spacing: -1px;
}

/* --- Bilder ----------------------------------------------- */
img {
    border: 0;
    max-width: 100%;
    height: auto;
}

/* --- Listen ----------------------------------------------- */
ol {
    color: rgb(78, 110, 147);
    font-size: 1em;
}

ul {
    margin: 20px 0 10px;
    list-style-position: inside;
}

/* --- Links ------------------------------------------------ */
a {
    color: rgb(25, 61, 169);
    font-size: 0.95em;
    text-decoration: none;
}

a:visited {
    color: rgb(0, 0, 189);
    font-size: 0.95em;
}

a:hover {
    color: rgb(0, 0, 189);
    font-size: 0.95em;
    text-decoration: none;
}

a:active {
    color: rgb(25, 61, 169);
    font-size: 0.95em;
}

/* --- Navigation (ul#navlist) ------------------------------ */
ul#navlist {
    border-left: 1px solid rgb(128, 128, 128);
    border-right: 1px solid rgb(128, 128, 128);
    border-bottom: 1px solid rgb(128, 128, 128);
    margin: 0;
    padding: 0;
    background: white;
    width: 158px;
    font-family: 'kpsf', verdana, helvetica, arial, sans-serif;
    font-style: normal;
    font-variant: normal;
    font-weight: bold;
    font-size: 12px;
    line-height: normal;
    list-style: none;
}

ul#navlist li {
    border-top: 1px solid rgb(128, 128, 128);
    margin: 0;
    list-style-type: none;
    list-style-image: none;
    list-style-position: outside;
}

ul#navlist li a {
    border-left: 20px solid rgb(170, 170, 187);
    padding: 4px 8px;
    background: rgb(233, 233, 233);
    display: block;
    width: 100%;
    text-decoration: none;
    text-align: right;
    color: rgb(102, 102, 119);
}

ul#navlist li a:link {
    color: rgb(102, 102, 119);
}

ul#navlist li a:visited {
    color: rgb(102, 102, 119);
}

ul#navlist li a:hover,
ul#navlist li a:focus {
    border-left-color: #0000CC;
    background: rgb(0, 13, 51);
    color: rgb(255, 255, 255);
    outline: none;
}

/* Aktiver Menüpunkt */
ul#navlist li.active a,
ul#navlist li a[aria-current="page"] {
    border-left-color: #0000CC;
    background: rgb(0, 13, 51);
    color: rgb(255, 255, 255);
}

/* Social-Links im Nav */
#nav-social {
    margin-top: 16px;
    width: 160px;
}

#nav-social a {
    display: block;
    margin-bottom: 8px;
}

#nav-social img {
    display: block;
    border: 0;
}

/* --- Bild-Hilfsklassen ------------------------------------ */
.floatright {
    border: 1px solid rgb(102, 102, 102);
    margin: 0 0 10px 10px;
    padding: 2px;
    float: right;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* --- Formulare -------------------------------------------- */
form p {
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    font-family: 'kpsf', verdana, arial, sans-serif;
    font-size: 1em;
    padding: 4px 6px;
    border: 1px solid #aaa;
    border-radius: 3px;
    width: 100%;
    max-width: 400px;
    background: #fff;
}

button,
input[type="submit"] {
    font-family: 'kpsf', verdana, arial, sans-serif;
    font-size: 1em;
    padding: 5px 16px;
    background: rgb(0, 13, 51);
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

button:hover,
input[type="submit"]:hover {
    background: #0000CC;
}

/* --- Hamburger-Button (nur mobil sichtbar) ---------------- */
#nav-toggle {
    display: none;
    background: rgb(0, 13, 51);
    color: #fff;
    border: none;
    padding: 8px 14px;
    font-size: 1.2em;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

/* --- Responsive Design ------------------------------------ */
@media (max-width: 768px) {
    #content-wrapper {
        flex-direction: column;
    }

    #site-nav {
        width: 100%;
        min-width: 0;
        padding: 0;
    }

    #nav-toggle {
        display: block;
    }

    ul#navlist {
        width: 100%;
        display: none;
    }

    ul#navlist.open {
        display: block;
    }

    ul#navlist li a {
        text-align: left;
    }

    #nav-social {
        display: none;
    }

    #site-main {
        padding: 10px;
    }

    .floatright {
        float: none;
        display: block;
        margin: 0 auto 12px;
        max-width: 90%;
    }

    h1 { font-size: 130%; }
    h2 { font-size: 115%; }
}

@media (max-width: 480px) {
    #site-header img {
        max-width: 220px;
        height: auto;
    }
}
