/* =========================================
   WISSENSDATENBANK & KOMPENDIUM STYLES (wissen.css)
   Exklusiv für Wissensdatenbank & PHP-Passwortschutz (ohne Inline-Styles)
   ========================================= */

/* 1. SEKTION-ABSTÄNDE & ABSCHLUSSTEXT */
.wissen-section-header {
    margin-top: var(--grid-double);
}

.wissen-closing-note {
    font-style: italic;
    margin-top: var(--grid-triple);
}

/* 2. MEHRZEILIGE SUBLINES (h6 + h6) IM TITLE-BLOCK */
.title-block h1 + h6:has(+ h6),
.title-block-content h1 + h6:has(+ h6),
.title-block h2 + h6:has(+ h6),
.title-block-content h2 + h6:has(+ h6),
.title-block h3 + h6:has(+ h6),
.title-block-content h3 + h6:has(+ h6) {
    margin-bottom: 0;
}

.title-block h6 + h6,
.title-block-content h6 + h6 {
    margin-top: 0;
    margin-bottom: 0.7rem;
}

/* 3. MENÜ-BLÖCKE DER WISSENSDATENBANK (Striktes Hover-Verhalten) */
.title-block a.menu-block {
    display: block;
    padding: 0;
    text-decoration: none !important;
    transform: none !important;
    opacity: 1 !important;
}

.title-block a.menu-block:hover {
    transform: none !important;
    opacity: 1 !important;
}

.title-block a.menu-block h3,
.title-block a.menu-block h6,
.title-block a.menu-block p.subhead {
    transition: color 0.3s ease;
}

.title-block a.menu-block:hover h3,
.title-block a.menu-block:hover h6,
.title-block a.menu-block:hover p.subhead {
    color: var(--accent-orange);
}

/* =========================================
   4. PHP-PASSWORTSCHUTZ / LOGIN-FENSTER
   ========================================= */
.login-page-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    position: relative;
}

.modal-content {
    position: relative;
    max-width: 926px;
    width: 100%;
    text-align: center;
    margin: 0 auto;
}

.login-bg {
    width: 100%;
    height: auto;
    display: block;
}

/* Ausnahme von der globalen a:hover img Regel für das Schließen-Kreuz */
.modal-content a.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--accent-blue);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    text-decoration: none !important;
    transition: color 0.3s ease;
    line-height: 1;
}

.modal-content a.close-modal:hover {
    color: var(--accent-orange);
}

.login-form-container {
    position: absolute;
    bottom: 8%;
    left: 0;
    width: 100%;
    text-align: center;
}

.login-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--accent-blue);
    color: var(--accent-brown);
    font-family: 'Libre Caslon Text', Georgia, serif;
    font-size: 1.2rem;
    text-align: center;
    width: 300px;
    max-width: 90%;
    padding: 5px;
    outline: none;
}

.login-error-msg {
    color: var(--accent-orange);
    font-family: 'Libre Caslon Text', Georgia, serif;
    font-size: 1rem;
    margin-top: 15px;
    font-weight: bold;
}

.login-hint-text {
    font-family: 'Libre Caslon Text', Georgia, serif;
    color: var(--accent-brown);
    font-size: 1.1rem;
    margin-top: 20px;
    line-height: 1.6;
}

.login-submit-btn {
    margin-top: 20px;
    padding: 8px 30px;
    background-color: var(--accent-orange);
    color: #ffffff;
    border: none;
    font-family: 'Libre Caslon Text', Georgia, serif;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-submit-btn:hover {
    background-color: var(--accent-blue);
}

.legal-links {
    margin-top: 20px;
    font-family: 'Libre Caslon Text', Georgia, serif;
    font-size: 0.9rem;
}

.legal-links a {
    color: var(--accent-brown);
    text-decoration: none !important;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: var(--accent-orange);
}

/* =========================================
   5. MOBIL-WEICHE FÜR WISSENSDATENBANK & LOGIN
   ========================================= */
@media (max-width: 768px) {
    .title-block-content {
        padding: 0 1rem;
    }

    .wissen-section-header {
        margin-top: var(--grid-base);
    }

    .wissen-closing-note {
        margin-top: var(--grid-double);
    }

    .modal-content {
        display: flex;
        flex-direction: column;
        background-color: var(--bg-base);
        border: 2px solid var(--accent-blue);
    }

    .login-bg {
        position: relative;
        width: 100%;
        height: auto;
        object-fit: contain;
        z-index: 1;
    }

    .login-form-container {
        position: relative;
        padding: 10px 20px 25px 20px;
        z-index: 2;
        bottom: auto;
    }

    .modal-content a.close-modal {
        z-index: 10;
        background-color: var(--bg-base);
        color: var(--accent-blue);
        border-radius: 50%;
        width: 30px;
        height: 30px;
        line-height: 30px;
        text-align: center;
        top: 10px;
        right: 10px;
    }
}