/* =====================================================
   Friedrich II – Digitale Ausgabe
   Farbschema: Blau (Universität Trier)
   ===================================================== */

:root {
    --bg: #f6f5f1;          /* warmes Papierweiß */
    --card-bg: #fff;
    --dark: #13294b;        /* tiefes Marineblau (Titel, Footer) */
    --text: #1d2228;
    --muted: #5f6873;
    --accent: #1f5a92;      /* gedecktes Uni-Blau */
    --accent-hover: #163f68;
    --accent-soft: #e8eef5; /* helle Flächen (Pills, Buttons) */
    --gold: #b08d57;        /* feine Akzentlinie */
    --border: #e2e0da;
    --disabled-bg: #f0efeb;
    --disabled-text: #a3a8ae;
    --serif: Georgia, "Times New Roman", serif;
    --sans: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--serif);
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;

    /* Header & Footer fixiert, nur der Inhalt scrollt */
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

a { color: inherit; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =====================================================
   Header
   ===================================================== */
.site-header {
    flex-shrink: 0;
    background: #fff;
    color: var(--text);
}

/* Logo + Titel in einer Zeile */
.header-top {
    display: flex;
    align-items: center;
    gap: 28px;
    padding-top: 16px;
    padding-bottom: 16px;
}
.logo-link { display: inline-block; flex-shrink: 0; }
.logo-link img {
    display: block;
    height: 52px;
    width: auto;
}
.brand {
    padding-left: 28px;
    border-left: 1px solid var(--border);
}
.brand-title {
    display: inline-block;
    font-size: 26px;
    font-weight: bold;
    line-height: 1.2;
    color: var(--dark);
    text-decoration: none;
}
.brand-title:hover { color: var(--accent); }
.brand-subtitle {
    margin-top: 2px;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--muted);
}

/* Hauptnavigation */
.main-nav {
    background: linear-gradient(180deg, #1b3a66 0%, var(--dark) 100%);
    border-top: 3px solid var(--gold);
}
.main-nav .container {
    display: flex;
    gap: 32px;
    padding-top: 12px;
    padding-bottom: 12px;
}
.main-nav a {
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
}
.main-nav a {
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
    letter-spacing: .02em;
    opacity: .9;
}
.main-nav a:hover,
.main-nav a.active { border-bottom-color: var(--gold); opacity: 1; }

/* =====================================================
   Inhalt (scrollbar)
   ===================================================== */
.site-main {
    flex: 1;
    overflow-y: auto;
    padding: 44px 0 72px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.eyebrow {
    color: var(--accent);
    font-size: 14px;
    font-weight: bold;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.lead {
    color: var(--muted);
    font-size: 19px;
    margin: 0 0 32px;
    max-width: 720px;
}

/* Startseite: Hero */
.hero {
    max-width: 820px;
    margin-bottom: 32px;
}
.hero h1 {
    font-size: 40px;
    line-height: 1.15;
    margin: 0 0 12px;
    color: var(--dark);
}
.hero .lead { font-size: 17px; margin-bottom: 0; }

/* Innenseiten */
.page h1 { font-size: 40px; margin-top: 0; }

.page-header { margin-bottom: 40px; }
.page-header h1 { font-size: 44px; margin: 0 0 16px; }
.page-header .lead { max-width: 860px; font-size: 17px; }

.page-content h2 {
    font-size: 28px;
    margin: 32px 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--border);
}
.page-content p { font-size: 18px; margin: 0 0 16px; }
.h2-count { font-size: 18px; color: var(--muted); font-weight: normal; }

/* Zurück-Button */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 7px 16px 7px 12px;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: background .2s, color .2s, border-color .2s;
}
.back-link span { transition: transform .2s; }
.back-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.back-link:hover span { transform: translateX(-3px); }

/* =====================================================
   Inhaltsseite & Kachellisten
   ===================================================== */

/* Schnellnavigation */
.inhalt-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
}
.inhalt-jump a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: border-color .15s, color .15s;
}
.inhalt-jump a:hover { border-color: var(--accent); color: var(--accent); }
.inhalt-jump span {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
}

/* Abschnitte */
.inhalt-block { margin-bottom: 64px; scroll-margin-top: 20px; }
.inhalt-kopf {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid #cfccc4;
    position: relative;
}
.inhalt-kopf::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 72px;
    height: 3px;
    background: var(--gold);
}
.inhalt-titel { font-size: 30px; margin: 0 0 6px; line-height: 1.15; color: var(--dark); }
.inhalt-text {
    margin: 0;
    max-width: 760px;
    font-size: 15px;
    color: var(--muted);
}
.inhalt-zahl {
    flex-shrink: 0;
    font-size: 34px;
    font-weight: bold;
    line-height: 1;
    color: var(--dark);
}
.inhalt-zahl small {
    display: block;
    margin-top: 4px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: right;
}

/* Raster */
.kachel-grid {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    display: grid;
    gap: 14px;
}
.kachel-grid-baende { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.kachel-grid-werke  { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.kachel-grid li { display: flex; }

/* Kachel (Basis) */
.kachel {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s;
}
a.kachel:hover,
.kachel-werk:not(.is-disabled):hover {
    border-color: var(--accent);
    box-shadow: 0 14px 28px -18px rgba(19, 41, 75, .45);
}
.kachel.is-disabled {
    background: var(--disabled-bg);
    border-style: dashed;
    border-color: #dcd9d2;
    cursor: default;
}

/* Band-Kachel */
.kachel-band {
    padding: 14px 16px 12px 18px;
    gap: 2px;
    overflow: hidden;
}
a.kachel-band::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--gold);
}
.kachel-name {
    font-family: var(--sans);
    font-size: 11px;
    color: #8a949f;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kachel-nr { font-size: 28px; font-weight: bold; line-height: 1.15; }
.kachel-status {
    margin-top: 6px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    opacity: 0;
    transition: opacity .15s;
}
a.kachel-band:hover .kachel-nr { color: var(--accent); }
a.kachel-band:hover .kachel-status,
a.kachel-band:focus-visible .kachel-status { opacity: 1; }
.kachel-band.is-disabled .kachel-nr { color: var(--disabled-text); }
.kachel-band.is-disabled .kachel-status {
    opacity: 1;
    color: var(--disabled-text);
    font-weight: normal;
}

/* Bände-Pill */
.werk-pill {
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
}

/* Werk-Kachel */
.kachel-werk { padding: 18px 20px 16px; gap: 10px; }
.kachel-werk-kopf {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--sans);
    font-size: 12px;
}
.kachel-jahr { color: var(--muted); }
.kachel-werk-titel {
    margin: 0;
    font-size: 19px;
    line-height: 1.3;
}
.kachel-werk-titel a { text-decoration: none; }
.kachel-werk-titel a::after {   /* ganze Kachel klickbar */
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 10px;
}
.kachel-werk:not(.is-disabled):hover .kachel-werk-titel { color: var(--accent); }
.kachel-werk-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.kachel-werk-fuss { margin-top: auto; padding-top: 4px; }
.kachel-btn {
    display: inline-block;
    padding: 7px 14px;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 6px;
    transition: background .15s, color .15s;
}
.kachel-werk:not(.is-disabled):hover .kachel-btn { background: var(--accent); color: #fff; }
.kachel-btn.is-off { color: var(--disabled-text); background: #ebe9e4; }
.kachel-werk.is-disabled .kachel-werk-titel { color: #737a82; }

/* =====================================================
   Impressum
   ===================================================== */
.impressum {
    max-width: 900px;
    padding-left: 32px;
    border-left: 2px solid var(--border);
}
.impressum h1 { font-size: 36px; margin: 0 0 32px; }
.impressum h2 { font-size: 16px; margin: 0 0 6px; }
.impressum h3 { font-size: 15px; margin: 0 0 6px; }
.impressum section { margin-bottom: 24px; }
.impressum p {
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 10px;
}
.impressum a { color: var(--accent); }

/* =====================================================
   Kontakt
   ===================================================== */
.kontakt { max-width: 760px; margin: 0 auto; }
.kontakt-head { text-align: center; margin-bottom: 28px; }
.kontakt-head h1 { font-size: 40px; margin: 0 0 10px; }
.kontakt-head p { color: var(--muted); margin: 0; }
.kontakt-head a { color: var(--accent); }

.kontakt-form {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-top: 4px solid var(--accent);
    border-radius: 12px;
    padding: 28px 32px;
    box-shadow: 0 10px 30px -18px rgba(11, 47, 79, .35);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.form-field { margin-bottom: 18px; }
.form-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 15px;
}
.form-field label span { font-weight: normal; color: var(--muted); font-size: 13px; }
.form-field input,
.form-field textarea {
    width: 100%;
    padding: 10px 12px;
    font-family: var(--sans);
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
}
.form-field textarea { resize: vertical; }
.form-field input:focus,
.form-field textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: transparent;
}
.form-field .is-invalid { border-color: #b3261e; background: #fff6f5; }

.captcha-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.captcha-row img { height: 50px; border: 1px solid var(--border); border-radius: 6px; }
.btn-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}
.btn-primary,
.btn-secondary {
    padding: 11px 22px;
    font-family: var(--serif);
    font-weight: bold;
    font-size: 15px;
    border-radius: 6px;
    cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; border: 0; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: none; color: var(--muted); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--muted); color: var(--text); }

.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-family: var(--sans);
    font-size: 14px;
}
.alert ul { margin: 0; padding-left: 18px; }
.alert-success { background: #e8f3e6; color: #2d5a27; border: 1px solid #c4dfc0; }
.alert-error { background: #fbecea; color: #8a1f17; border: 1px solid #f0c9c4; }

/* =====================================================
   Footer
   ===================================================== */
.site-footer {
    flex-shrink: 0;
    background: var(--dark);
    color: #fff;
    border-top: 3px solid var(--gold);
    padding: 20px 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
}
.footer-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 4px;
}
.footer-heading {
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #c9b38c;
    margin-bottom: 10px;
}
.site-footer p { margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 2px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* =====================================================
   Responsive
   ===================================================== */

/* Kleine Bildschirme: normal scrollen (sonst bleibt kaum Platz) */
@media (max-width: 700px), (max-height: 600px) {
    body { display: block; height: auto; overflow: visible; }
    .site-main { overflow: visible; }
}

@media (max-width: 900px) {
    .hero h1 { font-size: 36px; }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .header-top { flex-direction: column; align-items: flex-start; gap: 12px; }
    .brand { padding-left: 0; border-left: 0; }
    .logo-link img { height: 38px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .kontakt-form { padding: 22px 18px; }
    .inhalt-kopf { flex-direction: column; align-items: flex-start; }
    .inhalt-zahl small { text-align: left; }
    .kachel-grid-werke { grid-template-columns: 1fr; }
}

/* Zierlinie unter der Überschrift */
.hero-rule {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 320px;
    margin: 4px 0 16px;
    color: var(--gold);
}
.hero-rule::before,
.hero-rule::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.hero-rule span { font-size: 20px; line-height: 1; }

/* Sprungmarken: noch nicht umgesetzte Bereiche (ausgegraut) */
.inhalt-jump .is-disabled {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--disabled-text);
    background: var(--disabled-bg);
    border: 1px dashed #d6d3cc;
    border-radius: 999px;
    cursor: not-allowed;
}

/* =====================================================
   Über-Seite (Startseite)
   ===================================================== */
.ueber { max-width: 820px; }

.ueber-hinweis {
    padding: 28px 32px;
    margin-bottom: 40px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold);
    border-radius: 10px;
}
.ueber-hinweis p { font-size: 18px; margin: 0 0 14px; }
.ueber-anrede { font-weight: bold; color: var(--dark); }

.ueber-weiter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 11px 26px;
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: var(--accent);
    border-radius: 6px;
    transition: background .2s;
}
.ueber-weiter span { transition: transform .2s; }
.ueber-weiter:hover { background: var(--accent-hover); }
.ueber-weiter:hover span { transform: translateX(4px); }

.ueber-text h2 {
    font-size: 26px;
    color: var(--dark);
    margin: 0 0 12px;
}
.ueber-text p { font-size: 17px; line-height: 1.7; margin: 0 0 14px; }

.ueber-text a,
.ueber-hinweis a:not(.ueber-weiter) { color: var(--accent); }

.ueber-trenner {
    margin: 56px 0;
    border: 0;
    border-top: 1px solid var(--border);
}

/* DFG-Logo im Footer (weißes Logo direkt auf Marineblau) */
.footer-dfg {
    display: inline-block;
}
.footer-dfg img {
    display: block;
    height: 70px;
    width: auto;
}

/* Über-Seite: Sprungmarke DE ↔ EN */
.ueber-sprache {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}
.ueber-sprache a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: border-color .15s, background .15s, color .15s;
}
.ueber-sprache a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
#deutsch, #english { scroll-margin-top: 20px; }