/* Grundlegende Reset-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f0f0;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Stellt sicher, dass der Body mindestens die Höhe des Viewports hat */
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header Styling mit Logo und Navigation */
header {
    width: 100%;
    background-color: #333;
    color: white;
    padding: 20px 0; /* Mehr Abstand nach oben und unten */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    height: 100px; /* Fixe Höhe für genügend Platz */
}

/* Logo anpassen */
header img {
    max-height: 80px; /* Logo wird korrekt skaliert */
    margin-left: 20px;
}

/* Navigation */
header nav {
    display: flex;
    gap: 20px;
    margin-right: 20px;
}

header nav a {
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

header nav a:hover {
    color: #BA0E20;
    transition: color 0.3s ease;
}

/* Formular Styling */
main {
    max-width: 800px; /* Begrenzte Breite für bessere Lesbarkeit */
    width: 90%; /* Flexibel für kleinere Bildschirme */
    margin: 120px auto 40px; /* Abstand nach oben & unten */
    padding: 20px;
    background-color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Mehr Abstand zwischen den Feldern */
}

input[type="text"],
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background-color: #f9f9f9;
}

input[type="text"]:focus,
textarea:focus {
    border-color: #BA0E20;
    outline: none;
}

h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
	text-align: center; /* Zentriert den Text horizontal */
}

label {
    font-size: 1.1rem;
    color: #333;
    display: block;
    margin-bottom: 8px;
    text-align: left;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    color: #333;
    background-color: #f9f9f9;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #ff8c00;
    outline: none;
}

button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #BA0E20;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #e77c00;
}

/* Footer Styling */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 15px 0;
    width: 100%;
    font-size: 0.9rem;
    position: relative;
    margin-top: auto;
}


/* Container für die Suchergebnisse */
.search-results {
    width: 50%; /* Begrenzte Breite für bessere Lesbarkeit */
    max-width: 600px;
    margin: 150px auto 50px; /* Zentrieren mit auto */
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Styling für die Ergebnisliste */
.search-results ul {
    list-style-type: none;
    padding: 0;
    margin: 20px auto; /* Automatisch mittig */
    display: flex;
    flex-direction: column;
    align-items: center; /* Sorgt dafür, dass alle Listenelemente mittig sind */
}

/* Einzelne Suchergebnisse */
.search-results li {
    width: 100%;
    max-width: 500px; /* Begrenzung der Breite */
    padding: 12px;
    font-size: 1.2rem;
    color: #333;
    background: #f9f9f9;
    border-radius: 5px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
    text-align: center;
}

/* Links in der Liste */
.search-results li a {
    display: block;
    width: 100%;
    text-decoration: none;
    color: #BA0E20;
    font-weight: bold;
}

/* Hover-Effekt */
.search-results li:hover {
    background-color: #e0e0e0;
}



/* Hauptcontainer für Formulare */
.form-container {
    width: 100%;
    max-width: 600px; /* Maximale Breite für bessere Lesbarkeit */
    margin: 120px auto 50px; /* Abstand zum Header + zentrieren */
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Textfelder anpassen */
.form-container input[type="text"],
.form-container textarea,
.form-container input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    color: #333;
    background-color: #f9f9f9;
}

/* Formular-Button */
.form-container button {
    width: 100%;
    padding: 12px;
    background-color: #BA0E20;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.form-container button:hover {
    background-color: #9a0d19;
}


/* Allgemeine Struktur für Artikel-Karten */
.articles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.article-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* Hover-Effekt für die Karten */
.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Titel und Meta-Daten */
.article-title {
    font-size: 1.4rem;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title:hover {
    color: #BA0E20; /* Farbe beim Hover */
}

/* Vorschautext */
.article-preview {
    font-size: 1rem;
    color: #555;
    margin-bottom: 15px;
}

/* Mehr lesen Button */
.read-more {
    display: inline-block;
    padding: 10px 15px;
    background-color: #BA0E20;
    color: white; /* Standard-Schriftfarbe */
    font-weight: bold;
    text-align: center;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease; /* Übergang für beide */
    text-decoration: none;
}

/* Hover-Effekt für Mehr lesen Link */
.read-more:hover {
    background-color: #9a0d19; /* Button-Hintergrundfarbe bei Hover */
    color: white; /* Schriftfarbe bleibt weiß */
}

/* Optional: Stil für den Text des Links außerhalb des Hover-Effekts */
.read-more:focus, .read-more:active {
    color: #fff; /* Hier bleibt die Schriftfarbe weiß */
}



/* Responsive Anpassungen */
@media (max-width: 768px) {
    .articles-container {
        grid-template-columns: 1fr; /* Eine Spalte auf kleineren Bildschirmen */
    }
}


/* Responsive Design */
@media (max-width: 768px) {
    header img {
        max-width: 120px;
    }

    header nav {
        gap: 15px;
    }

    form {
        padding: 20px;
        max-width: 90%;
    }

    h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    header img {
        max-width: 100px;
    }

    header nav {
        flex-direction: column;
        align-items: center;
    }

    header nav a {
        margin-bottom: 10px;
    }

    form {
        padding: 15px;
        max-width: 90%;
    }

    button[type="submit"] {
        padding: 10px;
    }
}


/* Admin-Bereich Styling */
.admin-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Stellt sicher, dass der Inhalt nach oben ausgerichtet ist */
    align-items: center;         /* Zentriert den Inhalt horizontal */
    padding: 20px;
    background-color: #f0f0f0;
    margin-top: 100px; /* Sicherstellen, dass der Abstand zum Header ausreichend ist */
}

h1, h2 {
    font-size: 2rem;
    color: #333;
    text-align: center; /* Zentriert den Text */
    margin-bottom: 20px;
}

/* Spezifischer Abstand für h2 (Benutzer verwalten) */
h2 {
    margin-top: 40px; /* Mehr Abstand nach oben für die Benutzer verwalten Überschrift */
}

/* Tabellen Styling */
table {
    width: 100%;
    max-width: 1200px;
    margin: 20px 0;
    border-collapse: collapse;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #333;
    color: white;
}

tr:hover {
    background-color: #f5f5f5;
}

a {
    color: #BA0E20;
    font-weight: bold;
    text-decoration: none;
}

a:hover {
    color: #9a0d19;
}

/* Formulare Styling */
form {
    width: 100%;
    max-width: 500px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

label {
    font-size: 1rem;
    color: #333;
    display: block;
    margin-bottom: 8px;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    color: #333;
    background-color: #f9f9f9;
}

button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #BA0E20;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #9a0d19;
}

/* Footer Styling für Admin-Bereich */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 15px 0;
    position: relative;
    bottom: 0;
    width: 100%;
    font-size: 0.9rem;
}


/* Login-Container */
.login-container {
    width: 100%;
    max-width: 600px; /* Maximale Breite für bessere Lesbarkeit */
    margin: 120px auto 50px; /* Abstand zum Header + zentrieren */
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Formular Styling */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Eingabefelder */
input[type="text"],
input[type="password"] {
    padding: 12px;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #ddd;
    width: 100%; /* Formularfelder nehmen die gesamte Breite ein */
    margin-bottom: 20px;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #ff8c00;
    outline: none;
}

/* Button Styling */
button[type="submit"] {
    padding: 12px;
    background-color: #BA0E20;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%; /* Der Button nimmt die gesamte Breite ein */
}

button[type="submit"]:hover {
    background-color: #9a0d19;
}

/* Passwort ändern Formular */
.edit-password-container {
    width: 100%;
    max-width: 600px; /* Maximale Breite für bessere Lesbarkeit */
    margin: 120px auto 50px; /* Abstand zum Header + zentrieren */
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.edit-password-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.edit-password-container input[type="password"] {
    padding: 12px;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #ddd;
    width: 100%;
    margin-bottom: 20px;
}

.edit-password-container button[type="submit"] {
    padding: 12px;
    background-color: #BA0E20;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.edit-password-container button[type="submit"]:hover {
    background-color: #9a0d19;
}


