* {
    font-family: 'Roboto', sans-serif;
}

body {
    hyphens: auto;
    word-break: break-word;
    background-color: whitesmoke;
    /* background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Crect width='200' height='200' fill='%23f7f9fc'/%3E%3Ccircle cx='30' cy='30' r='5' fill='%236a11cb'/%3E%3Ccircle cx='170' cy='30' r='5' fill='%236a11cb'/%3E%3Ccircle cx='100' cy='70' r='5' fill='%236a11cb'/%3E%3Ccircle cx='50' cy='150' r='5' fill='%236a11cb'/%3E%3Ccircle cx='150' cy='150' r='5' fill='%236a11cb'/%3E%3Ccircle cx='100' cy='190' r='5' fill='%236a11cb'/%3E%3Cline x1='30' y1='30' x2='170' y2='30' stroke='%232575fc' stroke-width='1'/%3E%3Cline x1='30' y1='30' x2='100' y2='70' stroke='%232575fc' stroke-width='1'/%3E%3Cline x1='170' y1='30' x2='100' y2='70' stroke='%232575fc' stroke-width='1'/%3E%3Cline x1='100' y1='70' x2='50' y2='150' stroke='%232575fc' stroke-width='1'/%3E%3Cline x1='100' y1='70' x2='150' y2='150' stroke='%232575fc' stroke-width='1'/%3E%3Cline x1='50' y1='150' x2='150' y2='150' stroke='%232575fc' stroke-width='1'/%3E%3Cline x1='50' y1='150' x2='100' y2='190' stroke='%232575fc' stroke-width='1'/%3E%3Cline x1='150' y1='150' x2='100' y2='190' stroke='%232575fc' stroke-width='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-attachment: fixed; */
    margin: 0;
}

@media (max-width: 480px) {
    .w3-mobile-no-margin {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 20px;
    }
}

.clickable-li {
    cursor: pointer;
}

.contact-bar {
    position: fixed;
    right: 10px;
    bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    border-radius: 5px;
    border: 1px solid lightgrey;
    /* width: fit-content; */
    justify-content: center;
}

.contact-bar a img {
    width: 35px;
    height: 35px;
    margin: 10px;
}

html,
body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    /* Für weiches Scrollen bei Sprungmarken */
    overflow-x: hidden;
    /* Verhindert horizontales Scrollen */
}

.body-no-scroll {
    overflow: hidden;
}

/* Header Styling */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px !important;
    padding-top: 10px !important;
    background: #333;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100000;
    background: linear-gradient(90deg, yellow, orange, red, orange, yellow);
}

.header a {
    text-decoration: none;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    margin-left: 5px;
}

.logo img {
    height: 50px;
    width: auto;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

nav ul li {
    display: inline;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background: #555;
    border-radius: 5px;
}

/* Desktop Menu */
.desktop-menu {
    display: flex;
    margin-right: 50px;
}

/* Burger Menu */
.burger-menu {
    display: none;
}

.burger-button {
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
    margin-right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 11;
}

.burger-button span {
    display: block;
    width: 100%;
    height: 4px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: absolute;
}

.burger-button span:nth-child(1) {
    top: 0;
}

.burger-button span:nth-child(2) {
    top: 10px;
}

.burger-button span:nth-child(3) {
    top: 20px;
}

/* Transformation für das X */
.burger-button.open span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.burger-button.open span:nth-child(2) {
    opacity: 0;
}

.burger-button.open span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    max-height: calc(100vh - 50px);
    background: linear-gradient(90deg, yellow, orange, red, orange, yellow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-bottom: 200px;

    /* Animation */
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9;

    /* Anfangszustand */
    overflow-y: hidden;
    overflow-x: hidden;
}

/* Sichtbarer Zustand mit sanfter Einblendung */
.mobile-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    overflow-y: auto;
}

/* Mobile Menu Styling */
.mobile-menu ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.mobile-menu ul li {
    margin: 10px 0;
    width: 100%;
    text-align: center;
}

.mobile-menu ul li a {
    display: block;
    text-align: center;
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 10px;
    background: #555;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.mobile-menu ul li a:hover {
    background: #666;
}

.mobile-menu .sort-links {
    margin: 10px 0;
    text-align: center;
    font-size: 0.9rem;
}

.mobile-menu .sort-links a {
    color: white;
    text-decoration: none;
    margin: 0 5px;
}

.mobile-menu .sort-links a:hover {
    text-decoration: underline;
}

.mobile-menu .article-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 0;
    margin: 0;
}

.mobile-menu .article-list .article-item {
    width: 90%;
    max-width: 600px;
    color: white;
    text-decoration: none;
    display: block;
    text-align: center;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid;
    border-color: white;
    border-radius: 5px;
    background: #555;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}


.mobile-menu .article-list a:hover {
    background: #555;
}

/* Search Container Styling */
.search-container {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

.search-wrapper {
    position: relative;
    width: 90%;
    /* Abstand zu den Rändern */
    max-width: 600px;
    /* Optional: Begrenzung der Breite */
}

.search-input {
    width: 100%;
    padding: 10px 45px 10px 15px;
    /* Platz für das Icon rechts */
    border: 1px solid #ccc;
    /* Optional: Rahmenfarbe */
    border-radius: 20px;
    /* Vollständig abgerundete Ecken */
    outline: none;
    font-size: 1rem;
    box-sizing: border-box;
    /* Berücksichtigt Padding in der Breite */
}

.search-icon {
    position: absolute;
    right: 15px;
    /* Abstand vom rechten Rand des Wrappers */
    top: 50%;
    /* Vertikale Zentrierung */
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: gray;
    pointer-events: none;
    /* Damit das Icon nicht klickbar ist */
}

mark {
    background-color: yellow;
    color: black;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .desktop-menu {
        display: none;
    }

    .burger-menu {
        display: block;
    }
}

@media (min-width: 768px) {
    .header {
        display: flex;
        justify-content: space-around;
    }

    .burger-menu {
        display: block;
    }
}

/* Modal Styling */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    /* Black background with opacity */
    justify-content: center;
    align-items: center;

    /* Initial animation state */
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Visible modal */
.modal.show {
    display: flex;
    /* Show the modal */
    opacity: 1;
    transform: scale(1);
    /* Scale to full size */
}

/* Modal Content */
.modal-content {
    background-color: white;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    position: relative;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);

    /* Slide-in effect */
    animation: slideIn 0.4s ease-out;
}

/* Close Button */
.close-button {
    position: absolute;
    top: 0px;
    right: 10px;
    font-size: 30px;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-button:hover {
    color: #000;
}

/* Keyframes for slide-in effect */
@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    /* Ermöglicht Zeilenumbrüche bei Platzmangel */
    margin: 10px 0;
    /* Abstand zu anderen Elementen */
    gap: 5px;
    /* Abstand zwischen den Tags */
}

.tags-container .w3-tag {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 5px;
    background-color: #f0f0f0;
    /* Heller Hintergrund für die Tags */
    color: #555;
    /* Textfarbe */
    display: inline-block;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tags-container .w3-tag:hover {
    background-color: #ddd;
    /* Etwas dunkler beim Hover */
    color: #333;
}

.article-item-wrapper {
    border: 1px solid #ccc;
    padding: 10px;
    margin-bottom: 15px;
    background-color: #fff;
    transition: box-shadow 0.2s ease;
}

.article-item-wrapper:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tag-item {
    background-color: #f1f1f1;
    border-radius: 3px;
    padding: 2px 5px;
    margin-right: 5px;
    font-size: 0.8rem;
    color: #333;
    display: inline-block;
}

.article-tags .tag-item:hover {
    background-color: #ddd;
}



.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Abstand zwischen Bild und Text */
    margin: 15px 0;
    /* Abstand nach oben und unten */
}

.author-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    /* Rundes Profilbild */
    object-fit: cover;
    /* Zuschneiden, falls das Bild nicht quadratisch ist */
    border: 2px solid #ddd;
    /* Dezenter Rahmen */
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: bold;
    color: #333;
    /* Dunklerer Text */
    font-size: 16px;
}

.author-date {
    font-size: 14px;
    color: #777;
    /* Leicht gedimmter Text */
    margin-top: 2px;
}

.w3-tag {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.w3-tag:hover {
    background-color: #ddd;
    color: #333;
}

.w3-selected {
    background-color: #4CAF50 !important;
    /* Grüner Hintergrund */
    color: white !important;
    /* Weißer Text */
    border: 1px solid #388E3C !important;
    /* Grüner Rand */
    font-weight: bold !important;
    /* Fettschrift */
}

#tag-filter {
    display: flex;
    flex-wrap: wrap;
    /* Ermöglicht Zeilenumbruch */
    justify-content: center;
    /* Zentriert die Inhalte horizontal */
    gap: 10px;
    /* Abstand zwischen den Tags */
    margin: 10px;
    /* Abstand zu anderen Elementen */
}

.tag-filter {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 5px;
    background-color: #f0f0f0;
    color: #555;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.tag-filter:hover {
    background-color: #ddd;
    color: #333;
}

.tag-filter.selected {
    background-color: #4CAF50;
    /* Grün für ausgewählte Tags */
    color: white;
    font-weight: bold;
    border: 1px solid #388E3C;
    /* Grüner Rand */
}

/* Variante für Tags im Artikelbereich */
.tag-inside-article {
    background-color: #f0f0f0;
    border-radius: 5px;
    padding: 4px 8px;
    margin-right: 5px;
    font-size: 0.75rem;
    color: #333;
    display: inline-block;
    margin-bottom: 4px;
}

.article-preview {
    padding: 10px;
    border: 1px solid #ccc;
    background: white;
    border-radius: 5px;
    margin-bottom: 10px;
    width: 90%;
    max-width: 600px;
    box-sizing: border-box;
}

.article-title-link {
    text-decoration: none;
    color: black;
}

.article-title {
    font-size: 1.2em;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.article-date {
    font-size: 0.9em;
    color: gray;
    display: block;
    margin-bottom: 10px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.article-tags .tag-filter {
    background-color: #4CAF50;
    color: white;
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 20px;
}

.tag-display {
    background-color: #f0f0f0;
    border-radius: 5px;
    padding: 4px 8px;
    margin-right: 5px;
    font-size: 0.75rem;
    color: #333;
    display: inline-block;
    margin-bottom: 4px;
    cursor: default;
}

.article-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Zentriert Kinder horizontal */
    gap: 10px;
}