* {
    box-sizing: border-box; /* Verhindert unerwünschte Scrollbars durch Padding und Borders */
    margin: 0;
    padding: 0;
}

html, body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    height: 100%; /* Stellt sicher, dass der Body die gesamte Höhe einnimmt */
    overflow-x: hidden; /* Verhindert horizontales Scrollen */
    background-color: #f4f4f4;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem;
    text-align: center;
    position: relative;
}

nav {
    position: absolute;
    top: 50%;
    right: 6rem;
    transform: translateY(-50%);
}

nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 2rem;
    background-color: #555;
    border-radius: 4px;
}

nav a:hover {
    background-color: #777;
}

main {
    flex: 1;
    padding: 1rem;
}

.post-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.post {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 1rem;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
    display: block;
    width: calc(33.333% - 2rem);
    height: 200px; /* Feste Höhe */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    overflow: hidden; /* Verhindert Überlauf des Inhalts */
}

.post h2 {
    margin-bottom: 1rem; /* Fügt Abstand zwischen h2 und p hinzu */
}

.post h2, .post p {
    overflow: hidden;
    text-overflow: ellipsis; /* Ellipsis für überlaufenden Text */
    white-space: nowrap;
}

.post:hover {
    background-color: #e0e0e0;
}

footer {
    background-color: #333;
    color: #fff;
    padding: 1rem 0.25rem;
    position: relative;
    bottom: 0;
    width: 100%;
    text-align: center;
}

footer a.white-link {
    color: #fff !important;
    text-decoration: none !important; /* Entfernt die Unterstreichung */
}

footer a.white-link:hover {
    text-decoration: underline !important; /* Fügt die Unterstreichung hinzu */
}

@media (max-width: 768px) {
    .post {
        width: calc(50% - 2rem);
    }

    nav {
        top: auto;
        bottom: 1rem;
        right: 1rem;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .post {
        width: calc(100% - 2rem);
    }

    nav {
        top: auto;
        bottom: 1rem;
        right: 1rem;
        transform: translateY(0);
    }
}