/* ============================================================
   Header, Menüleiste, Footer – abgestimmt auf header.php v2.5
   ============================================================ */

/* ---------- Header-Grundgerüst ---------- */
.site-header {
    background: linear-gradient(135deg, #1a365d 0%, #2b6cb0 100%);
    color: #ffffff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.site-title a {
    color: #ffffff;
    text-decoration: none;
}
.site-title h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #ffffff;
}
.subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    opacity: 0.85;
    color: #ffffff;
}

/* ---------- Header rechts (Sprachflaggen + Suche) ---------- */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}
.lang-flags {
    display: flex;
    gap: 0.5rem;
}
.lang-flags a {
    text-decoration: none;
    font-size: 1.4rem;
    filter: grayscale(20%);
    transition: transform 0.2s, filter 0.2s;
}
.lang-flags a:hover,
.lang-flags a.active {
    filter: none;
    transform: scale(1.2);
}

/* ---------- Suchfeld ---------- */
.search-form {
    margin: 0;
}
.search-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 0.3rem 0.6rem;
    transition: background-color 0.2s;
}
.search-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.25);
}
.search-input {
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    width: 240px;
    outline: none;
}
.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}
.search-button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    color: #ffffff;
}

/* ---------- Menüleiste ---------- */
.main-nav {
    background: #ffffff;
    padding: 0.4rem 2rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
}
.main-nav a {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    color: #1a365d;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 20px;
    transition: background-color 0.2s, color 0.2s;
}
.main-nav a:hover,
.main-nav a.active {
    background-color: #2b6cb0;
    color: #ffffff;
}

/* ---------- Footer ---------- */
.site-footer {
    background: linear-gradient(135deg, #1a365d 0%, #2b6cb0 100%);
    color: #ffffff;
    padding: 1.5rem 2rem;
    text-align: center;
    font-family: var(--font-family, 'Ubuntu', Arial, sans-serif);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 3rem;
}
.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer-links a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}
.footer-links .separator {
    color: rgba(255, 255, 255, 0.5);
}
.last-modified {
    background-color: #ffffff;
    color: #888888;
    text-align: center;
    padding: 1rem 2rem;
    font-size: 0.85rem;
    font-family: var(--font-family, 'Ubuntu', Arial, sans-serif);
    border-top: 1px solid #e2e8f0;
}

/* ---------- Globale Links im Hauptbereich ---------- */
main a,
main a:visited {
    color: #1a365d;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s, text-decoration 0.2s;
}
main a:hover,
main a:focus {
    color: #2b6cb0;
    text-decoration: underline;
}

a.index-ref {
    color: inherit;
    text-decoration: underline dotted;
}
a.index-ref:hover {
    text-decoration: underline;
}

/* ---------- Mobile Optimierung ---------- */
@media (max-width: 700px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-right {
        width: 100%;
        align-items: flex-end;
    }
    .search-input {
        width: 100%;
    }
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }
}

/* ---------- Leseformular & Baum ---------- */
.lesen-form {
    max-width: 400px;
    margin-bottom: 2rem;
    background: #fff;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
}
.lesen-form fieldset {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}
.lesen-form legend {
    font-weight: 600;
    padding: 0 0.5rem;
}
.lesen-form label {
    font-weight: 400;
}

.lesen-button {
    background: #2b6cb0;
    color: #fff;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: background-color 0.2s;
}
.lesen-button:hover {
    background: #1a365d;
}

.lesen-baum {
    max-width: 900px;
    margin: 0 auto;
}
.lesen-gruppe {
    margin-bottom: 2rem;
}
.lesen-gruppe h3 {
    background: #1a365d;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
}
.lesen-gruppe ul {
    list-style: none;
    padding-left: 1rem;
    margin: 0.5rem 0;
}
.lesen-gruppe li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1rem;
}

/* ---------- Sprachwahl (zwei Spalten) ---------- */
.language-columns {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.language-columns fieldset {
    flex: 1;
    min-width: 200px;
}

/* ---------- Grafische Baumstruktur (Tree) ---------- */
.tree {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #1a365d;
    margin-top: 1.5rem;
}
.tree a {
    color: #1a365d;
    text-decoration: none;
    font-weight: 500;
}
.tree a:hover {
    color: #2b6cb0;
    text-decoration: underline;
}

/* ---------- Unveröffentlichte Bänder ---------- */
.unpublished {
    color: #999999;
    text-decoration: none;
}
.unpublished:hover {
    color: #666666;
    text-decoration: underline;
}

/* ---------- Baum in farbiger Kachel (stat-block) ---------- */
.stat-block .tree {
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 0;
    padding: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #1a365d;
}
.stat-block .tree a {
    color: #000000;           /* veröffentlichte Bänder schwarz */
    text-decoration: none;
}
.stat-block .tree a.unpublished {
    color: #999999;           /* unveröffentlichte Bänder grau */
}
.stat-block .tree a.group-link {
    font-weight: bold;        /* Gruppenüberschriften fett */
}
.stat-block .language-columns {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.stat-block .language-columns fieldset {
    flex: 1;
    min-width: 200px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0;
}
.stat-block .language-columns legend {
    font-weight: 600;
    padding: 0 0.5rem;
}

/* ---------- Sprachzeilen (horizontal) ---------- */
.language-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;      /* Abstand zwischen Haupt- und Zweitsprache */
}
.language-label {
    font-weight: 600;
    min-width: 120px;
}
.language-option {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

/* ---------- Buttons mit Abstand nach oben ---------- */
.button-row {
    margin-top: 1.5rem;
}

/* ---------- Baumstruktur: Wurzelname ---------- */
.tree-root {
    font-size: 1.6em;
    font-weight: bold;
    color: #2b6cb0;
}

/* ---------- Veröffentlichte Bänder: fett ---------- */
.band-published {
    font-weight: bold;
}

/* ---------- Unveröffentlichte Bänder: grau (zusätzlich zu .unpublished) ---------- */
.band-unpublished {
    color: #999999;
}

/* ---------- Horizontale grüne Tasten für Indizes ---------- */
.index-tasten {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
    margin: 1rem 0;
}

/* Einheitliche Definition für alle Index-Tasten */
.index-taste,
.index-taste:visited {
    display: inline-block;
    background: linear-gradient(135deg, #63b3ed 0%, #3182ce 100%);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    transition: background 0.2s, transform 0.2s;
}
.index-taste:hover,
.index-taste:focus {
    background: linear-gradient(135deg, #90cdf4 0%, #4299e1 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ---------- Einleitungskasten ---------- */
.einleitung p {
    margin-bottom: 1rem;
    line-height: 1.6;
}
.einleitung-ueberschrift {
    color: #2688F5!important; 
    margin-bottom: 1rem;
}

.einleitung p { color: #1a365d!important;}

/* ---------- Datenstand ---------- */
.datenstand {
    font-size: 0.85rem;
    color: #888888;
    margin: -1rem 0 1.5rem;
    text-align: center;
}

/* ---------- Leichter Verlauf für Statistik-Kacheln ---------- */
.stat-block {
    background-image: linear-gradient(
        rgba(255, 255, 255, 0.5),
        rgba(0, 0, 0, 0.5)
    );
    background-blend-mode: overlay;
}