/* =========================================
   1. GLOBALES SCROLL-VERHALTEN
   ========================================= */
html {
    scroll-padding-top: 120px; 
    scroll-behavior: smooth;  
}

/* =========================================
   FEHLERBEHEBUNG: Die Lücke ganz oben vernichten
   ========================================= */
#outer-wrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
    width: 100% !important; /* Zwingt den Container auf volle Breite */
}

/* =========================================
   1. DER SCHWEBENDE KOPFBEREICH (Garantiert GANZ oben!)
   ========================================= */
#sticky-kopfbereich {
    /* FIXED statt sticky! Das ignoriert alle Fehler im Hintergrund */
    position: fixed !important; 
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    
    background-color: #EAF2F8 !important; 
    border-bottom: 1px solid #dbe6ee !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05) !important;
    
    margin: 0 !important;
    padding: 0 !important;
    
    display: flex !important;
    flex-direction: column !important; 
    align-items: center !important;
}

/* =========================================
   2. TEXT-ABSTAND AUF NORMALEN UNTERSEITEN
   ========================================= */
/* Da der Kopfbereich jetzt schwebt, würde der Text darunter verschwinden. 
   Wir schieben ihn um die Höhe des blauen Balkens (ca. 140px) nach unten! */
#content-wrapper {
    margin-top: 120px !important; /* BITTE ANPASSEN: Exakte Höhe deines blauen Balkens! */
}
/* 2. Der Titel- und Slogan-Bereich (Oberer Teil der Spalte) */
#header-wrapper {
    width: 100% !important;
    margin: 0 !important;
    /* minimaler Abstand oben, damit die Schrift nicht an den Bildschirmrand stößt */
    padding: 15px 0 0 0 !important; 
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

#branding {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Tötet die ungenutzte tote Fläche über dem Titel */
#branding h1.blog-title, 
#branding h2.blog-title {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important; /* Verhindert, dass der Browser unsichtbare Höhe hinzufügt */
}

/* Der Slogan (Direkt unter dem Titel) */
.blog-tagline {
    margin: 0 !important;
    padding: 0 !important;
}

.blog-tagline p {
    margin: 0 !important;
    padding: 5px 0 10px 0 !important; /* Gibt dem Slogan etwas Luft zum Menü darunter */
    line-height: 1.2 !important;
    color: #666666 !important;
}

/* 3. Das Menü (Unterer Teil der Spalte, strikt unter dem Slogan) */
#menu-wrapper {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 0 15px 0 !important; /* Abstand nach unten zum Inhaltsbereich */
    background-color: transparent !important;
}

#menu {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* =========================================
   DAS MENÜ (Jetzt mit automatischem Zeilenumbruch für Handys)
   ========================================= */

#menu ul {
    display: flex !important;
    flex-direction: row !important;
    
    /* HIER IST DIE RETTUNG: Erlaubt den automatischen Zeilenumbruch! */
    flex-wrap: wrap !important; 
    
    justify-content: center !important; 
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

#menu ul li {
    display: block !important; 
    
    /* NEU: 5px Abstand nach oben und unten, 15px nach links und rechts. 
       So kleben die Buttons bei einem Zeilenumbruch nicht aneinander! */
    margin: 5px 15px !important; 
    
    padding: 0 !important;
}

/* =========================================
   MENÜ-LINKS & AKTIVE SEITE (Invertiert)
   ========================================= */

/* 1. Das normale Aussehen der Menü-Links */
#menu ul li a {
    text-decoration: none !important;
    color: #555555 !important; /* Dunkelgraue Schrift */
    font-size: 16px !important;
    
    /* WICHTIG: Etwas Platz um den Text herum, damit der farbige Kasten später gut aussieht */
    padding: 6px 14px !important; 
    border-radius: 6px !important; /* Sanft abgerundete Ecken */
    transition: all 0.2s ease-in-out !important; /* Weicher Übergang beim Hovern */
}

/* 2. Wenn man mit der Maus drüberfährt (Hover) */
#menu ul li a:hover {
    color: #222222 !important; /* Schrift wird fast schwarz */
    background-color: rgba(0, 0, 0, 0.05) !important; /* Ganz leichter, grauer Hintergrund */
}

/* 3. DIE AKTIVE SEITE (Invertierte Darstellung) */
#menu ul li a.active {
    background-color: #4A607A !important; /* Dunkelblauer Hintergrund */
    color: #ffffff !important; /* Weiße Schrift */
    font-weight: 600 !important; /* Ein bisschen fetter */
}

/* =========================================
   3. PARALLAX-EFFEKT (Lückenlos mit Sticky Image)
   ========================================= */

/* Body behält nur noch die Fallback-Farbe */
body.startseite-aktiv {
    background-color: #4A607A !important; 
    margin: 0 !important; 
}

#startbild-container {
    position: -webkit-sticky !important;
    position: sticky !important;
    
    /* Startet exakt unter dem schwebenden Balken und klebt dann dort */
    top: 120px !important; 
    margin-top: 120px !important; /* BITTE ANPASSEN: Gleicher Wert wie oben! */
    
    z-index: 1 !important; 
    width: 100% !important;
}

#startbild-container img {
    width: 100% !important;
    height: auto !important; /* Höhe passt sich IMMER perfekt automatisch an */
    display: block !important;
}

/* =========================================
   4. DER TEXT AUF DER STARTSEITE
   ========================================= */
/* Auf der Startseite drückt das echte Bild den Text ganz automatisch 
   nach unten. Wir müssen den margin-top hier also auf 0 setzen. */
body.startseite-aktiv #content-wrapper {
    margin-top: 0 !important; 
    
    background-color: #ffffff !important; 
    border-radius: 12px 12px 0 0; 
    padding-top: 40px; 
    box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.15); 
    position: relative;
    z-index: 10; /* Schiebt sich majestätisch ÜBER das Startbild */
}

/* Hauptcontainer und Footer aufräumen */
body.startseite-aktiv #outer-wrapper { background-color: transparent !important; box-shadow: none !important; margin: 0 !important; padding: 0 !important; }
body.startseite-aktiv .footer-wrapper { background-color: #ffffff !important; position: relative; z-index: 10; margin-top: 0 !important; border-top: none !important; }


/*-------------------------
	Simple reset
--------------------------*/

* {
    margin: 0;
    padding: 0;
}

body {
    font-family: Georgia, sans-serif, Arial;
    font-size: 17px;
    line-height: 1.6;
    color: #343A3F;
    padding: 0;
    margin: 0;
}

section, footer, header, aside, nav {
    display: block;
}

img {
    border: 0 none;
    height: auto;
    max-width: 100%;
    outline: 0 none;
}

/*-------------------------
	Heading
--------------------------*/

h1, h2, h3, h4, h5, h6 {
    font-family: 'Source Sans', sans-serif;
    line-height: 1.3;
    margin: 0.5em 0;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 18px;
}

h4 {
    font-size: 16px;
}

h5 {
    font-size: 14px;
}

h6 {
    font-size: 12px;
}


/*-------------------------
	Link
--------------------------*/

a, a:visited {
    outline: none;
    color: #2E9FFF;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.tab {
    width: 100%;
    margin: 1.5em 0 0 0;
    line-height: 1;
    border-bottom: 1px solid #E4E7EE;
}

.tab ul {
	padding:0;
	margin:0;
}

.tab  li {
    display: inline-block;
	margin:0;
	padding:0;
}

.tab a {
    background: #E4E7EE;
    border-radius: 6px 6px 0px 0;
    color: #555555;
    text-align: center;
    padding: 8px 14px;
    display: inline-block;
    margin: 0 5px;
    font-size: 12px;
    font-weight: bold;
    font-family: 'Source Sans', sans-serif;
}

/*-------------------------
	Text element
--------------------------*/

blockquote:before {
    color: #BBBBBB;
    content: "''";
    font-size: 3em;
    line-height: 0.1em;
    margin-right: 0.2em;
    vertical-align: -0.4em;
}

blockquote:after {
    color: #BBBBBB;
    content: "''";
    font-size: 3em;
    line-height: 0.1em;
    vertical-align: -0.45em;
}

blockquote {
    font-style: italic;
    margin: 1em 0 1em 1em;
}

blockquote p {
    display: inline;
}

pre {
    margin: 1em 0;
    overflow: auto;
    background: #F1F1FF;
    color: #333333;
    display: block;
    font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;
    font-size: 14px;
    padding: 10px;
    line-height: 1.3;
}

code {
    color: #333333;
    font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;
    font-size: 15px;
    padding: 3px 8px;
    background: #F1F1FF;
}

pre code {
    color: #333333;
    display: block;
    font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;
    font-size: 14px;
    padding: 0;
    line-height: 1.6;
}

.thumbnail {
    float: left;
    height: 80px;
    width: 80px;
    margin: 5px 15px 0 0;
    overflow: hidden;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

ul, ol {
    padding-left: 30px;
    margin: 1em 0;
}

ul li, ol li {
    margin: 0.25em 0;
}

input[type=text], input[type=password] {
    padding: 4px 6px;
    font-size: 14px;
    background-color: #F6F7F9;
    border: 1px solid #CFDAE5;
}

input[type=text]:hover, input[type=password]:hover {
    background-color: #F6F7F9;
    border: 1px solid #CCCCCC;
}

input[type=submit] {
    padding: 4px 6px;
    font-size: 14px;
    cursor: pointer;
}

input.text {
    width: 75%;
    padding: 5px;
    font-size: 14px;
    background-color: #F6F7F9;
    border: 1px solid #CFDAE5;
}

input.error, textarea.error {
    border: 1px solid red;
}

textarea {
    font-size: 15px;
    font-family: Georgia, sans-serif;
    line-height: 1.4;
    background-color: #F6F7F9;
    border: 1px solid #CFDAE5;
    padding: 2%;
    width: 96%;
    min-height: 5em;
    overflow: auto;
}

textarea:hover {
    border: 1px solid #CCCCCC;
}

.error-message {
    color: red;
    background: #f4f4f4;
    padding: 10px 0;
    margin-bottom: 2em;
}

span.required {
    color: red;
}

span.help {
    font-size: 12px;
    font-style: italic;
}

.category {
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #333;
    display: block;
    font-size: 13px;
    margin: 20px 0;
    padding: 0 1em;
}

.tags a:after {
    content:", ";
}
.tags a:last-child:after {
    content:"";
}

/*-------------------------
	Table
--------------------------*/

table {
    font-size: 12px;
    border: none;
    width: 100%;
    color: #333333;
    border: 1px solid #E3E3E3;
    margin: 1em 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

table h2.title {
    margin: 5px 0;
}

th, td {
    padding: 5px 10px;
    border: none;
}

th.title {
    margin: 5px 0;
    font-family: 'Source Sans', sans-serif;
    font-size: 16px;
    font-weight: normal;
}

td.title {
    font-weight: normal;
    background-color: #f6f6f6;
    font-family: 'Source Sans', sans-serif;
}

th {
    background-color: #f6f6f6;
    border-bottom: 1px solid #E3E3E3;
    border-right: 1px solid #E3E3E3;
    font-family: 'Source Sans', sans-serif;
    font-size: 16px;
}

td {
    background-color: #fafafa;
    border: 1px solid #E3E3E3;
    border-top: none;
    border-left: none;
}

table.post-list td a {
    margin: 0 5px;
}


/*----------------------------
	Search form
-----------------------------*/

#search-form {
    position: relative;
    float: right;
}

.error-404 .post #search-form,
.error-404-search .post #search-form {
    float: none;
}

.search-input {
    margin: 0;
    padding: 4px 15px;
    font-size: 14px;
    border: 1px solid #0076a3 !important;
    background: #FFFFFF !important;
    border-top-left-radius: 5px 5px;
    border-bottom-left-radius: 5px 5px;
    width: 120px;
    color: #888888;
}

.search-button {
    margin: 0;
    padding: 4px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    color: #ffffff;
    border: solid 1px #546673;
    border-right: 0px;
    background: #0095cd;
    background: -webkit-gradient(linear, left top, left bottom, from(#2E9FFF), to(#2E9CCC));
    background: -moz-linear-gradient(top, #2E9FFF, #2E9CCC);
    border-top-right-radius: 5px 5px;
    border-bottom-right-radius: 5px 5px;
    width: 60px;
}

.search-button:hover {
    text-decoration: none;
    background: #007ead;
    background: -webkit-gradient(linear, left top, left bottom, from(#0095cc), to(#00678e));
    background: -moz-linear-gradient(top, #0095cc, #00678e);
}

/* Fixes submit button height problem in Firefox */
.search-button::-moz-focus-inner {
    border: 0;
}


*----------------------------
	The 404 page
-----------------------------*/

.message {
    padding: 50px 20px 20px 20px;
}

.message h1 {
    font-size: 36px;
    margin-bottom: 18px;
}

.message p {
    font-size: 13px;
}

.center {
    text-align: center;
}

.search-404 {
    position: relative;
    float: left;
    width: 100%;
    margin-bottom: 1.2em;
}

.search-404 #search-form {
    float: none;
}


/* =========================================
   4. SEITENRÄNDER (10% Platz links und rechts)
   ========================================= */
.container {
    width: 80%; /* Nimmt 80% der Breite ein, lässt also exakt 10% links und 10% rechts frei */
    max-width: 1200px; /* Verhindert, dass der Text auf riesigen Monitoren endlos in die Breite wächst */
    margin: 0 auto; /* Zentriert den gesamten Container auf dem Bildschirm */
}

/* Auf kleinen Smartphone-Bildschirmen den Rand etwas verkleinern, 
   damit der Text dort nicht zu stark zusammengequetscht wird */
@media all and (max-width: 700px) {
    .container {
        width: 90%; /* Auf Handys nur noch 5% Rand auf jeder Seite */
    }
}

/* =========================================
   5. BREADCRUMBS AUSBLENDEN
   ========================================= */
.breadcrumb, 
.breadcrumbs {
    display: none !important;
}