/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

/* --- 1. FARB-DEFINITIONEN (VARIABLEN) --- */
:root {
    /* Allgemeine Farben */
    --bg-color: #ffffff;
    --text-color: #333333;
    --header-bg: #f8f9fa;
    --menu-link: #333;
    --footer-bg: #f1f1f1;
    --modal-bg: #fff;
    --border-color: #ddd;
    --heading-color: #FAC075; 

    /* Formular Farben (Hell) */
    --form-bg: rgba(0,0,0,0.05);      /* Hintergrund des Formular-Containers */
    --input-bg: #ffffff;              /* Hintergrund der Eingabefelder */
    --input-text: #000000;            /* Textfarbe im Eingabefeld */
    --input-border: #cccccc;          /* Rahmenfarbe */
    --btn-bg: #333333;                /* Button Hintergrund */
    --btn-text: #ffffff;              /* Button Text */
}

/* --- 2. DARK MODE ÜBERSCHREIBUNGEN --- */
[data-theme="dark"] {
    /* Allgemeine Farben Dunkel */
    --bg-color: #1a1a1a;
    --text-color: rgb(196, 196, 196);
    --header-bg: #2c2c2c;
    --menu-link: #ddd;
    --footer-bg: #242424;
    --modal-bg: #333;
    --border-color: #444;

    /* Formular Farben (Dunkel) */
    --form-bg: rgba(255,255,255,0.1); /* Hellerer Container auf dunklem Grund */
    --input-bg: #2d2d2d;              /* Dunkle Felder */
    --input-text: #f1f1f1;            /* Heller Text */
    --input-border: #555555;          /* Dunklerer Rahmen */
    --btn-bg: #e0e0e0;                /* Heller Button */
    --btn-text: #333333;              /* Dunkler Text auf Button */
}

/* --- 3. BASIS STYLES --- */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Open Sans', sans-serif;
    font-size: 1.2em;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

p {
    text-align: justify;
    /* Aktiviert die Silbentrennung */
    -webkit-hyphens: auto; /* Wichtig für Safari / iOS */
    -ms-hyphens: auto;     /* Für ältere Microsoft Browser */
    hyphens: auto;         /* Standard */
}

/* Überschriften Farbe */
h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    margin-top: 0;
}

a {
  color: var(--heading-color);
  text-decoration: none;
  background-color: transparent;
  -webkit-text-decoration-skip: objects;
}

a:not(.header-logo-a):hover {
  color: rgba(250,192,117, 0.8);
}

/* Der Container begrenzt die Breite auf 1160px und zentriert alles */
.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Hero Bild */
.hero-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

/* Spezifische Bild-Positionierung */
.hero-image[src="header2.jpg"] {
    object-position: center center; 
}

.hero-image[src="header.jpg"] {
    object-position: center 70%; 
}

/* --- 4. NAVIGATION --- */
header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
}

nav {
    padding: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--menu-link);
    font-weight: 600;
    font-size: 16px;
    transition: color 0.2s;
}
nav a:hover { color: var(--heading-color); }

nav li { position: relative; }

/* Dropdown */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--header-bg);
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 10;
    border-radius: 4px;
    padding: 5px 0;
}
.dropdown:hover .dropdown-content { display: block; }

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--menu-link);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    margin-left: 10px;
    display: flex;
    align-items: center;
}

/* --- 5. MAIN CONTENT & FOOTER --- */
main {
    padding: 40px 0;
    flex: 1;
}

footer {
    background-color: var(--footer-bg);
    margin-top: auto;
    padding: 20px 0;
}

blockquote {
    font-size: 0.7em;
    margin-top: -20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-links a {
    margin-right: 15px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9em;
}
.fb-icon {
    background: #1877F2;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
}

/* --- 6. FORMULARE & BUTTONS --- */

/* Nutzt jetzt die Variablen von oben -> passt sich automatisch an */
.form-container {
    background: var(--form-bg);
    padding: 20px; 
    border-radius: 8px;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.form-input {
    width: 100%; 
    padding: 10px; 
    box-sizing: border-box;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    background-color: var(--input-bg);
    color: var(--input-text);
    font-size: 16px;
    font-family: inherit;
}

/* Damit Labels sicher die richtige Farbe haben */
.form-container label {
    color: var(--text-color);
}

.form-btn {
    background-color: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    padding: 10px 25px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
}
.form-btn:hover {
    opacity: 0.9;
}

/* Editor Buttons */
.edit-btn {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    margin-bottom: 20px;
    float: right;
}

/* --- 7. MODAL & EDITOR FIXES --- */
#editorModal { display: none; position: fixed; z-index: 1000 !important; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); overflow-y: auto; }
.modal-content { background-color: var(--modal-bg); margin: 50px auto; padding: 20px; width: 90%; max-width: 800px; border-radius: 8px; color: #333; }
.note-editor { background-color: white !important; color: black !important; }

/* Summernote Ebenen-Management */
.note-modal { z-index: 9999 !important; }
.note-modal-backdrop { z-index: 9998 !important; }
.note-dropdown-menu, .note-popover { z-index: 10000 !important; }

/* --- 8. LAYOUT HELFER (Floats & Columns) --- */
.float-left {
    float: left;
    margin: 0 1rem 1rem 0;
}

.float-right {
    float: right;
    margin: 0.3rem 0 1rem 1rem;
}

.column {
  float: left;
  width: 32%;
  padding: 5px;
  margin-top: 1rem;
}

.row::after {
  content: "";
  clear: both;
  display: table;
}

/* --- 9. RESPONSIVE (HANDY) --- */
@media (max-width: 768px) {
    /* p {
        text-align: left;
    } */
    .hero-image { height: 100px; } 
    nav ul { gap: 10px; }
    .footer-content { flex-direction: column; gap: 10px; text-align: center; }

    .float-left, .float-right {
        float: none;
        display: block;
        margin: 1rem auto;
        width: 100%;
    }
    .column {
        width: 100%;
        display: block;
        float: none;
    }
}
