/* ==========================================================================
   LKK – Ludger Knuffmann + Kollegen – Stylesheet
   Basierend auf der Original-CI, modernisiert und responsiv
   ========================================================================== */

/* --- CSS Custom Properties (Farbschema) --- */
:root {
    --color-primary: #184788;
    --color-secondary: #c8d2d9;
    --color-bg: #f3f3f3;
    --color-white: #ffffff;
    --color-text: #333333;
    --color-text-dark: #000000;
    --color-link: #184788;
    --color-footer-bg: #c8d2d9;
    --color-footer-text: #ffffff;
    --font-family: Helvetica, Arial, sans-serif;
    --max-width: 960px;
    --header-height: auto;
    --spacing: 1.5rem;
    --radius: 4px;
}

/* --- Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    background-color: var(--color-bg);
    background-image: url('../images/Verlauf3.gif');
    background-repeat: repeat-y;
    background-position: center top;
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    min-height: 100vh;
}

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

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* --- Site Wrapper --- */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
    background-color: var(--color-white);
    background-image: url('../images/welle_oben.gif');
    background-repeat: no-repeat;
    background-position: right top;
    box-shadow: 0 2px 8px rgba(24, 71, 136, 0.20);
    position: relative;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

/* Logo */
.logo {
    flex-shrink: 0;
}

.logo-img {
    width: 130px;
    height: auto;
}

/* Banner */
.banner {
    flex: 1;
    min-width: 200px;
}

.banner-img {
    width: 100%;
    max-width: 690px;
    height: auto;
    display: block;
}

/* Header right: lang switch + nav */
.header-right {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Sprachumschaltung */
.lang-switch {
    flex-shrink: 0;
}

.lang-link {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius);
    font-weight: bold;
    font-size: 0.85rem;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background-color 0.2s, color 0.2s;
}

.lang-link:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    text-decoration: none;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.main-nav {
    flex: 1;
}

/* Hamburger Toggle (nur mobil sichtbar) */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle-bar {
    display: block;
    width: 26px;
    height: 3px;
    background-color: var(--color-primary);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* Nav Menu */
.nav-menu {
    list-style: none;
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-item a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--color-secondary);
    font-weight: bold;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

.nav-item a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.nav-item.active a {
    color: var(--color-primary);
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
.site-content {
    flex: 1;
    background-color: var(--color-white);
    background-image: url('../images/welle_unten.gif');
    background-repeat: no-repeat;
    background-position: bottom center;
    max-width: var(--max-width);
    width: 100%;
    margin: 2rem auto;
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(24, 71, 136, 0.10);
}

.content-inner {
    padding: 2rem var(--spacing);
}

/* Typografie im Content */
.content-inner h1 {
    font-size: 1.6rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.content-inner h2 {
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-weight: bold;
}

.content-inner h3 {
    font-size: 1.1rem;
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.content-inner p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.content-inner ul {
    margin: 0 0 1rem 1.2rem;
    padding: 0;
}

.content-inner ul li {
    list-style-image: url('../images/qu_blue.gif');
    padding: 0.15rem 0;
    line-height: 1.6;
    margin-left: 0.5rem;
}

.content-inner strong {
    color: var(--color-text-dark);
}

/* Verschachtelte Listen (Leistungsprofil) */
.content-inner ul ul {
    margin-top: 0.3rem;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   STARTSEITE (Hero)
   ========================================================================== */
.hero {
    text-align: center;
    padding: 3rem 1rem;
}

.hero h1 {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.hero .subtitle {
    font-size: 1rem;
    color: var(--color-text);
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.hero .tagline {
    font-size: 1.1rem;
    color: var(--color-text);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   MITARBEITER / STAFF – Card Layout
   ========================================================================== */
.staff-section-title {
    font-size: 1.3rem;
    color: var(--color-primary);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-secondary);
}

.staff-section-title:first-child {
    margin-top: 0;
}

/* Maximal 2 Kacheln pro Zeile */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.staff-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--color-secondary);
    border-radius: var(--radius);
    background: var(--color-bg);
    transition: box-shadow 0.2s;
    /* Verhindert Textüberlauf aus der Kachel */
    overflow: hidden;
    min-height: 140px;
}

.staff-card:hover {
    box-shadow: 0 2px 8px rgba(24, 71, 136, 0.12);
}

.staff-photo {
    flex-shrink: 0;
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--color-secondary);
    align-self: flex-start;
}

.staff-info {
    flex: 1;
    min-width: 0; /* verhindert Überlauf aus Flexbox-Kind */
    overflow: hidden;
}

.staff-info h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    /* langen Namen umbrechen */
    word-wrap: break-word;
}

.staff-info a {
    font-size: 0.85rem;
    word-break: break-all;
    display: block;
    margin-bottom: 0.1rem;
}

.staff-info ul {
    margin-top: 0.5rem;
    margin-left: 1rem;
    font-size: 0.85rem;
}

.staff-info ul li {
    padding: 0.1rem 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Placeholder für Personen ohne Foto */
.staff-photo-placeholder {
    flex-shrink: 0;
    width: 110px;
    height: 110px;
    border-radius: var(--radius);
    border: 1px solid var(--color-secondary);
    align-self: flex-start;
    background-color: var(--color-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 2.5rem;
    font-weight: bold;
    user-select: none;
}

/* ==========================================================================
   KONTAKT / CONTACT
   ========================================================================== */
.contact-info {
    line-height: 1.8;
}

.contact-info p {
    margin-bottom: 0.8rem;
}

.contact-links {
    margin-top: 1.5rem;
}

.contact-links a {
    display: inline-block;
    margin-right: 1rem;
}

/* ==========================================================================
   DATENSCHUTZ / PRIVACY
   ========================================================================== */
.privacy-content h2,
.privacy-content h3 {
    margin-top: 1.5rem;
}

.privacy-content ul {
    margin-bottom: 0.8rem;
}

.privacy-content ul ul {
    margin-top: 0.3rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    margin-top: auto;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem var(--spacing);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: bold;
}

.footer-inner p {
    margin: 0;
    color: var(--color-footer-text);
}

.footer-nav a {
    color: var(--color-footer-text);
}

.footer-nav a:hover {
    text-decoration: underline;
}

.footer-sep {
    margin: 0 0.5rem;
}

/* ==========================================================================
   404 ERROR PAGE
   ========================================================================== */
.error-page {
    text-align: center;
    padding: 4rem 1rem;
}

.error-page h1 {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.error-page p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.error-page a {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius);
    font-weight: bold;
}

.error-page a:hover {
    background-color: #0f3060;
    text-decoration: none;
}

/* ==========================================================================
   RESPONSIVE – Tablet
   ========================================================================== */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .banner {
        width: 100%;
    }

    .banner-img {
        max-width: 100%;
    }

    .header-right {
        flex-direction: row-reverse;
    }

    /* Hamburger sichtbar */
    .nav-toggle {
        display: flex;
    }

    /* Nav-Menü versteckt */
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--color-white);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        z-index: 200;
        padding: 0.5rem 0;
    }

    .nav-menu.is-open {
        display: flex;
    }

    .nav-item a {
        padding: 0.75rem 1.5rem;
        border-bottom: 1px solid var(--color-bg);
    }

    .main-nav {
        position: relative;
    }

    .site-content {
        margin: 1rem;
        border-radius: var(--radius);
    }

    .content-inner {
        padding: 1.5rem 1rem;
    }

    .hero {
        padding: 2rem 0.5rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    /* Auf Tablet: 1 Spalte */
    .staff-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   RESPONSIVE – Handy
   ========================================================================== */
@media (max-width: 480px) {
    :root {
        --spacing: 1rem;
    }

    body {
        background-image: none;
    }

    .logo-img {
        width: 100px;
    }

    .content-inner h1 {
        font-size: 1.3rem;
    }

    .content-inner h2 {
        font-size: 1.1rem;
    }

    .hero h1 {
        font-size: 1.3rem;
    }

    .staff-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .staff-photo,
    .staff-photo-placeholder {
        width: 100px;
        height: 100px;
    }

    .staff-info ul {
        text-align: left;
    }
}

/* ==========================================================================
   PRINT
   ========================================================================== */
@media print {
    .nav-toggle,
    .lang-switch,
    .site-footer {
        display: none;
    }

    .site-content {
        box-shadow: none;
        margin: 0;
    }

    body {
        background: white;
        background-image: none;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}
