/* --- 0. VOLLBREITE ERZWINGEN (nur bekannte Elemente, kein blindes Raten) --- */
html, body { width: 100% !important; max-width: 100% !important; margin: 0 !important; padding: 0 !important; overflow-x: hidden; }
.grid-container { width: 100% !important; max-width: 100% !important; gap: 0 !important; column-gap: 0 !important; row-gap: 0 !important; }
.subpage-hero { width: 100% !important; }

/* --- 1. GRUNDGERÜST --- */
html, body { background: #f8fafc !important; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important; }
.grid-container { display: grid !important; grid-template-columns: 293px 1fr !important; min-height: 100vh !important; background: linear-gradient(to right, #DCE6F3 293px, #f8fafc 293px) !important; }

/* --- 2. SIDEBAR --- */
.grid-header { background: #DCE6F3 !important; padding: 20px !important; width: 293px !important; min-width: 293px !important; max-width: 293px !important; box-sizing: border-box; overflow-x: hidden !important; overflow-y: visible !important; }
.logo-container { width: 100% !important; max-width: 220px !important; margin: 0 auto 20px auto !important; text-align: center !important; }
.logo-container img { width: 100% !important; height: auto !important; display: block !important; }
.sidebar-search { margin-bottom: 20px; padding: 0 10px; position: relative; }
.sidebar-search input { width: 100%; padding: 8px; border: 1px solid #B9CCE8; border-radius: 4px; box-sizing: border-box; }

.site-search-results {
	display: none;
	position: absolute;
	top: 100%;
	left: 10px;
	right: 10px;
	background: #fff;
	border: 1px solid #B9CCE8;
	border-radius: 4px;
	box-shadow: 0 4px 10px rgba(0,0,0,.15);
	max-height: 60vh;
	overflow-y: auto;
	z-index: 50;
}
.site-search-results.is-open { display: block; }
.site-search-result {
	display: block;
	padding: 8px 10px;
	text-decoration: none;
	border-bottom: 1px solid #eee;
	color: inherit;
}
.site-search-result:last-child { border-bottom: none; }
.site-search-result:hover { background: #EEF3FA; }
.site-search-result-title { display: block; font-weight: 700; font-size: 14px; color: #17488E; }
.site-search-result-snippet { display: block; font-size: 12px; color: #555; margin-top: 2px; }
.site-search-result-snippet mark { background: #fde68a; padding: 0 1px; }
.site-search-empty { padding: 10px; font-size: 13px; color: #666; }

/* --- 3. MENÜ-DESIGN --- */
.cy-nav, .cy-nav ul, .cy-nav li { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.cy-nav a { text-decoration: none !important; border-bottom: 1px solid #B9CCE8 !important; display: block !important; padding: 8px 10px; color: #1e293b !important; width: 270px !important; }
.cy-nav a:hover { background-color: #B9CCE8 !important; }
.cy-nav .active > a { color: #17488E !important; font-weight: 700 !important; }
.cy-nav > li > a { font-weight: 700 !important; color: #1e293b !important; padding: 10px 0 !important; display: block !important; }
.cy-nav ul li a { font-weight: 400 !important; padding: 5px 0 5px 12px !important; position: relative !important; color: #475569 !important; display: block !important; }

/* --- 4. CONTENT-LAYOUT --- */
.grid-main { padding: 0 !important; margin: 0 !important; }
.grid-main > *:first-child,
.subpage-hero { margin-top: 0 !important; }
.subpage-hero { background-size: cover; background-position: center; padding: 60px 20px; text-align: center; color: white; min-height: 200px; display: flex; align-items: center; justify-content: center; background-color: #17488E; }
.grid-main > .breadcrumb {
    width: calc(100% - 48px);
    max-width: 1040px;
    margin-right: auto;
    margin-left: auto;
    padding: 20px 0 0;
    box-sizing: border-box;
    font-size: 0.9rem;
    color: #64748b;
}
.grid-main > .subpage-content {
    width: calc(100% - 48px);
    max-width: 1040px;
    margin-right: auto;
    margin-left: auto;
    padding: 20px 0 40px;
    box-sizing: border-box;
    line-height: 1.6;
    color: #1e293b;
}
.project-footer { margin-top: 50px; padding-top: 20px; border-top: 1px solid #e2e8f0; font-size: 0.85rem; color: #64748b; text-align: center; }

/* --- 5. DIGITALRAUM-KOMPASS DESIGN-SYSTEM ---
   Info-Box (strong) = Marke Navy. Gefahr/Hinweis-Box (a) = Marke Rot.
   Erfolg (em) = Gruen, Warnung (code) = Orange - bewusst als semantische
   Signalfarben unveraendert gelassen, nicht Teil der Markenpalette. */
blockquote { margin: 20px 0 !important; padding: 0 !important; border: none !important; display: block !important; }
blockquote strong { display: block !important; border-left: 6px solid #17488E !important; background: #EEF3FA !important; padding: 20px !important; margin: 0 !important; color: #17488E !important; font-weight: normal !important; font-size: 1.05rem !important; }
blockquote a { display: block !important; border-left: 6px solid #9C1B22 !important; background: #FBEAEB !important; padding: 20px !important; margin: 0 !important; color: #9C1B22 !important; text-decoration: none !important; font-size: 1.05rem !important; }
blockquote em { display: block !important; border-left: 6px solid #22c55e !important; background: #dcfce7 !important; padding: 20px !important; margin: 0 !important; color: #166534 !important; font-style: normal !important; font-size: 1.05rem !important; }
blockquote code { display: block !important; border-left: 6px solid #f59e0b !important; background: #fff7ed !important; padding: 20px !important; margin: 0 !important; color: #92400e !important; font-family: inherit !important; font-size: 1.05rem !important; }

/* --- 6. HILFSKLASSEN --- */
.shadow { box-shadow: 0 4px 12px rgba(0,0,0,0.15); border-radius: 6px; border: 1px solid #e5e7eb; }
.badge { background: #e2e8f0 !important; padding: 2px 8px !important; border-radius: 12px !important; font-size: 0.8rem !important; color: #475569 !important; }
.button { display: inline-block; padding: 10px 20px; background: #17488E; color: white !important; border-radius: 6px; text-decoration: none; transition: background 0.2s ease; }
.button:hover { background: #123870; }

/* --- 7. MOBILE --- */
@media screen and (max-width: 768px) {

    /* GLOBAL FIX: verhindert Überbreite durch Padding */
    * {
        box-sizing: border-box;
    }

    /* GRID auf 1 Spalte */
    .grid-container {
        grid-template-columns: 1fr !important;
    }

    /* SIDEBAR AUSBLENDEN */
    .grid-header {
        display: none !important;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    /* BURGER BUTTON SICHTBAR */
    .mobile-menu-toggle {
        display: block !important;
        background: #17488E;
        color: white;
        padding: 12px 16px;
        font-size: 20px;
        cursor: pointer;
        text-align: center;
        margin-bottom: 10px;
    }

    /* SIDEBAR ALS VOLLBREITES OVERLAY (statt 80%-Off-Canvas-Panel) */
    body.sidebar-open .grid-header {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh; /* korrekte Höhe auch bei ein-/ausblendender iOS-Adressleiste */
        max-height: 100vh;
        max-height: 100dvh;
        background: #DCE6F3;
        z-index: 9999;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 20px;
        transform: translateX(0);
    }

    /* Alle Links über die volle Breite, größere Tap-Fläche */
    body.sidebar-open .cy-nav a {
        width: 100% !important;
        padding: 14px 16px !important;
        font-size: 1.05rem !important;
        box-sizing: border-box;
    }

    /* Verhindert, dass innere Menü-Elemente aus dem Grund-Theme
       (z.B. #contentnav) selbst eine feste Höhe mit overflow:hidden
       mitbringen und dadurch das Scrollen der Sidebar wirkungslos machen */
    body.sidebar-open .grid-header #contentnav,
    body.sidebar-open .grid-header .cy-nav,
    body.sidebar-open .grid-header nav {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    /* CONTENT-BEREICH FIX: verhindert Überbreite */
    .grid-main,
    .grid-content,
    .tm-content,
    #content {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 15px;
        overflow-x: hidden;
    }

    .grid-main > .breadcrumb,
    .grid-main > .subpage-content {
        width: 100%;
    }

    .grid-main > .breadcrumb {
        padding: 20px 16px 0;
    }

    .grid-main > .subpage-content {
        padding: 20px 16px 40px;
    }

    .grid-main > .subpage-content h1,
    .grid-main > .subpage-content h2,
    .grid-main > .subpage-content h3 {
        overflow-wrap: anywhere;
    }
}

/* verhindert das Verrutschen der Seite */
body.sidebar-open {
    overflow: hidden;
}

/* Burger-Menü auf großen Bildschirmen ausblenden */
.mobile-menu-toggle {
    display: none !important;
}

/* Nur auf Handy anzeigen */
@media screen and (max-width: 768px) {
    .mobile-menu-toggle {
        display: block !important;
    }
}


/* --- 8. BACK TO TOP BUTTON — modernisiert --- */
.back-to-top {
    position: fixed;
    bottom: 22px;
    right: 22px;

    width: 48px;
    height: 48px;
    border-radius: 50%;

    background: rgba(23, 72, 142, 0.85); /* Navy, leicht transparent */
    color: #ffffff !important;

    border: 2px solid rgba(255,255,255,0.8); /* weißer Rand */
    backdrop-filter: blur(4px); /* moderner Frosted-Glass-Effekt */

    font-size: 22px;
    text-decoration: none !important;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transition: all 0.25s ease;
}
/* --- GLOBALER HEADER-FIX FÜR ALLE SEITEN --- */
.subpage-hero {
    width: 100%;
    height: 260px; /* Standardhöhe für Handy/Tablet */
    background-size: cover; /* Bild füllt den Container */
    background-position: center; /* Fokus zentriert */
    background-repeat: no-repeat;
}

/* Große Monitore */
@media screen and (min-width: 1200px) {
    .subpage-hero {
        height: 200px; /* etwas flacher */
    }
}

@media screen and (min-width: 1600px) {
    .subpage-hero {
        height: 160px; /* noch flacher */
    }
}


.back-to-top:hover {
    background: rgba(23, 72, 142, 0.95);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}
/* Footer-Logo gezielt verkleinern */
.footer-logo {
    max-width: 250px !important; /* Passe diesen Wert an, z.B. 150px, 200px etc. */
    height: auto !important;
    display: block !important;
    margin: 0 auto !important; /* Zentriert das Logo im Footer */
}

/* --- 9. HÄUFIGE FRAGEN --- */
.faq-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 34px;
}

.faq-jump a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 16px;
    border: 1px solid #b9cbe2;
    border-radius: 999px;
    background: #eef4fb;
    color: #17488e !important;
    font-weight: 700;
    text-decoration: none !important;
}

.faq-jump a:hover,
.faq-jump a:focus-visible {
    border-color: #17488e;
    background: #17488e;
    color: #fff !important;
}

.faq-section {
    scroll-margin-top: 24px;
    margin: 0 0 34px;
}

.faq-section h2 {
    margin: 0 0 13px;
    color: #17488e;
    font-size: 1.35rem;
}

.faq-item {
    margin: 0 0 10px;
    overflow: hidden;
    border: 1px solid #d6e0ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(15, 53, 108, .05);
}

.faq-item summary {
    position: relative;
    padding: 15px 48px 15px 17px;
    color: #123f7b;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 17px;
    transform: translateY(-50%);
    color: #9c1b22;
    font-size: 1.45rem;
    line-height: 1;
}

.faq-item[open] summary {
    background: #eef4fb;
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-item > div {
    padding: 3px 17px 16px;
    border-top: 1px solid #e4ebf3;
}

.faq-item p {
    margin: 10px 0 0;
}

@media screen and (max-width: 600px) {
    .faq-jump {
        display: grid;
        grid-template-columns: 1fr;
    }

    .faq-jump a {
        justify-content: center;
    }
}
