/* Grundlegende Stile (angepasst für Johanniter-Look) */
@font-face {
    font-family: 'Maven Pro';
    src: url('../fonts/MavenPro-Regular.ttf') format('truetype'),
         url('../fonts/MavenPro-Bold.ttf') format('truetype'),
         url('../fonts/MavenPro-Medium.ttf') format('truetype'),
         url('../fonts/MavenPro-Black.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.font-check {
    font-family: 'Maven Pro', sans-serif;
    visibility: hidden;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: "Maven Pro", Arial, sans-serif;
    /* Johanniter-Farben: Rot, Weiß, Grau, Dunkelblau */
    background-color: #f0f0f0; /* Heller Grauton für den Hintergrund */
    color: #333; /* Dunkleres Grau für Text */
    font-size: 14px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Platz für den fixierten Header im Hauptinhalt */
.content {
    padding-top: 80px; /* Platz für den Header (anpassen) */
    margin: 0 20px;
    padding-bottom: 50px;
    flex: 1;
}

/* Main Content */
main.content {
    flex: 1;
    max-width: 90%; /* Breite anpassen */
    margin: 0 auto;
    width: 100%;
    background-color: #fff; /* Weißer Hintergrund für Hauptinhalt */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Leichter Schatten */
    padding: 20px;
}

/* Überschriften */
h1, h2, h3 {
    color: #eb003c; /* Johanniter-Rot für Überschriften */
    font-weight: bold;
    margin-bottom: 0.5em;
}

/* Links */
a {
    color: #000548; /* Johanniter-Dunkelblau für Links */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Tabellen */
.table-container {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: auto;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 12px;
}

th, td {
    padding: 12px;
    text-align: center; /* Standardmäßig linksbündig */
    border-bottom: 1px solid #ddd;
}

/* Sticky erste Spalte - ungerade Zeilen */
tr:nth-child(odd) td:first-child {
    position: sticky;
    left: 0;
    background-color: #ffffff;
    z-index: 1;
}

/* Sticky erste Spalte - gerade Zeilen */
tr:nth-child(even) td:first-child {
    position: sticky;
    left: 0;
    background-color: #f9f9f9;
    z-index: 1;
}

th {
    background-color: #eb003c;
    color: #ffffff;
    font-weight: bold;
    text-align: left; /* Standardmäßig linksbündig */
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1;
}

.absent {
    background-color: #deff00;
}

/* Formulare */
form {
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap; /* Für bessere Responsivität */
    align-items: center;
    gap: 10px 20px; /* Zeilen- und Spaltenabstand */
}

form label {
    font-weight: 500;
    color: #000548;
    margin-right: 5px;
    display: block;
    width: auto;
}

form select,
form input[type="date"],
form input[type="text"],
form textarea {
    padding: 10px 12px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #ffffff;
    color: #333;
    font-family: 'Maven Pro', sans-serif;
    transition: border-color 0.3s ease;
    width: 200px; /* Standardbreite, anpassbar */
    max-width: 100%;
}

form select:focus,
form input[type="date"]:focus,
form input[type="text"]:focus,
form textarea:focus {
    border-color: #eb003c;
    outline: none;
}

/* Formular-Container mit ID "ausbildung" */
form#ausbildung {
    display: flex;
    flex-direction: column; /* Stellt die Elemente untereinander dar */
    align-items: flex-start; /* Ausrichtung der Elemente links */
    background-color: rgba(255, 255, 255, 0.9); /* Leicht transparenter Hintergrund für bessere Lesbarkeit */
    padding: 15px 20px; /* Etwas mehr Padding für mehr Platz */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    gap: 20px; /* Etwas mehr Abstand zwischen den Elementen */
}

/* Labels innerhalb des Formulars mit ID "ausbildung" */
form#ausbildung label {
    font-weight: 500;
    color: #000548; /* Farbe der Johanniter */
    margin-bottom: 5px; /* Etwas Abstand unter den Labels */
}

/* Select-Felder innerhalb des Formulars mit ID "ausbildung" */
form#ausbildung select, 
form#ausbildung textarea,
form#ausbildung [type="text"],
form#ausbildung [type="datetime-local"] {
    padding: 10px 15px; /* Größerer Abstand für bessere Usability */
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #ffffff;
    color: #000548;
    font-family: 'Maven Pro', sans-serif;
    transition: border-color 0.3s ease;
    width: 100%; /* Breite an den Container anpassen */
}

form#ausbildung select:focus {
    border-color: #eb003c; /* Farbe der Johanniter */
    outline: none;
}

/* Datum und Textfelder innerhalb des Formulars mit ID "ausbildung" */
form#ausbildung [type="date"], form#ausbildung [type="text"] {
    padding: 10px 15px; /* Größerer Abstand für bessere Usability */
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #ffffff;
    color: #000548;
    font-family: 'Maven Pro', sans-serif;
    transition: border-color 0.3s ease;
    width: 100%; /* Breite an den Container anpassen */
}

/* Formular-Container mit ID "kontaktformular */
form#kontaktformular {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    gap: 20px;
}

form#kontaktformular div {
    width: 100%;
}


/* Labels im Formular */
form#kontaktformular label {
    font-weight: 500;
    color: #000548;
    margin-bottom: 5px;
    width: 100% !important;
}

/* Inputs, Selects und Textareas im Formular */
form#kontaktformular select,
form#kontaktformular textarea,
form#kontaktformular input[type="text"],
form#kontaktformular input[type="number"],
form#kontaktformular input[type="date"],
form#kontaktformular input[type="datetime-local"],
form#kontaktformular input[type="email"],
form#kontaktformular input[type="tel"] {
    width: 100% !important;
    padding: 10px 15px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #ffffff;
    color: #000548;
    font-family: 'Maven Pro', sans-serif;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

/* Fokus-Stil */
form#kontaktformular input:focus,
form#kontaktformular textarea:focus,
form#kontaktformular select:focus {
    border-color: #eb003c;
    outline: none;
}

/* Optional: Button-Stil im Formular */
form#kontaktformular button,
form#kontaktformular input[type="submit"] {
    background-color: #eb003c;
    color: #ffffff;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

form#kontaktformular button:hover,
form#kontaktformular input[type="submit"]:hover {
    background-color: #c8002f;
}

/* Formular-Container mit ID "passwordForm" */
form#passwordForm {
    display: flex;
    flex-direction: column; /* Stellt die Elemente untereinander dar */
    align-items: flex-start; /* Ausrichtung der Elemente links */
    background-color: rgba(255, 255, 255, 0.9); /* Leicht transparenter Hintergrund für bessere Lesbarkeit */
    padding: 15px 20px; /* Etwas mehr Padding für mehr Platz */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    gap: 20px; /* Etwas mehr Abstand zwischen den Elementen */
}

/* Labels innerhalb des Formulars mit ID "ausbildung" */
form#passwordForm label {
    font-weight: 500;
    color: #000548; /* Farbe der Johanniter */
    margin-bottom: 5px; /* Etwas Abstand unter den Labels */
}

/* Select-Felder innerhalb des Formulars mit ID "ausbildung" */
form#passwordForm select, 
form#passwordForm textarea,
form#passwordForm [type="text"],
form#passwordForm [type="datetime-local"] {
    padding: 10px 15px; /* Größerer Abstand für bessere Usability */
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #ffffff;
    color: #000548;
    font-family: 'Maven Pro', sans-serif;
    transition: border-color 0.3s ease;
    width: 100%; /* Breite an den Container anpassen */
}

form#passwordForm select:focus {
    border-color: #eb003c; /* Farbe der Johanniter */
    outline: none;
}

/* Datum und Textfelder innerhalb des Formulars mit ID "ausbildung" */
form#passwordForm [type="date"], form#passwordForm [type="text"] {
    padding: 10px 15px; /* Größerer Abstand für bessere Usability */
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #ffffff;
    color: #000548;
    font-family: 'Maven Pro', sans-serif;
    transition: border-color 0.3s ease;
    width: 100%; /* Breite an den Container anpassen */
}

/* Buttons */
.custom-button {
    background-color: #eb003c;
    color: #ffffff;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.custom-button:hover {
    background-color: #c8002f; /* Etwas dunkleres Rot */
}

.custom-button-inverted {
    background-color: #000548;
    color: #ffffff;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.custom-button-inverted:hover {
    background-color: #000330; /* Etwas dunkleres Blau */
}

/* Infoboxen */
.infobox {
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    padding: 10px;
    margin-bottom: 1em;
    font-size: 0.9em;
    color: #555;
}

/* Loader */
.loader {
    border: 16px solid #f3f3f3;
    border-top: 16px solid #eb003c; /* Johanniter-Rot */
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
    margin: 100px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dateinamen-Anzeige */
#file-names {
    margin-top: 10px;
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
    color: #333;
    display: none;
}

#file-names strong {
    color: #d9534f;
}

/* Media Queries (angepasst) */
@media (max-width: 768px) {
    .content {
        padding-top: 70px;
        margin: 0 10px;
        padding-bottom: 40px;
    }

    main.content {
        max-width: 100%;
        padding: 15px;
    }

    form {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    form label {
        margin-bottom: 5px;
    }

    form select,
    form input[type="date"],
    form input[type="text"],
    form textarea {
        width: 100%;
    }

    .table-container {
        padding: 1rem;
        max-height: 60vh;
    }

    th, td {
        padding: 8px;
        font-size: 10px;
    }

    .custom-button,
    .custom-button-inverted {
        padding: 8px 12px;
        font-size: 0.9em;
    }

    .infobox {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .content {
        padding-top: 60px;
        margin: 0 5px;
        padding-bottom: 30px;
    }

    main.content {
        padding: 10px;
    }

    th, td {
        padding: 6px;
        font-size: 9px;
    }

    form {
        padding: 10px;
        gap: 8px;
    }

    .custom-button,
    .custom-button-inverted {
        padding: 6px 10px;
        font-size: 0.8em;
    }

    .infobox {
        font-size: 0.75em;
    }
}