/* ---- Allgemeine Stile ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    text-align: center;
    padding-top: 65px;
    transition: background 0.3s, color 0.3s;
}

body.dark-mode {
    background-color: #1a1a1a;
    color: #f4f4f4;
}

/* ---- Navigationsleiste ---- */
.mobile-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: #007BFF;
    padding: 5px 20px;
    z-index: 1000;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.mobile-nav a,
.mobile-nav button {
    color: white;
    text-decoration: none;
    text-align: center;
    padding: 10px 15px;
    font-size: 18px;
    border: none;
    background: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    min-width: 100px;
    max-width: 150px;
}

.mobile-nav a:hover,
.mobile-nav button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

.dark-mode .mobile-nav {
    background: #0056b3;
}

#dark-mode-toggle {
    font-size: 18px;
    padding: 8px 10px;
    position: static;
}

/* ---- Navigation: Dropdown-Menü (nur für Kontakt) ---- */
.nav-item {
    position: relative;
}

.nav-link {
    cursor: pointer;
    padding: 10px 15px;
    display: inline-block;
    color: white;
    font-size: 18px;
    transition: background 0.3s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

.submenu-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 150px;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.submenu-nav li {
    border-bottom: 1px solid #ddd;
}

.submenu-nav li:last-child {
    border-bottom: none;
}

.submenu-nav a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #333;
    transition: background 0.3s;
}

.submenu-nav a:hover {
    background: #f4f4f4;
}

.dark-mode .submenu-nav {
    background: #2a2a2a;
    box-shadow: 0px 4px 6px rgba(255, 255, 255, 0.1);
}

.dark-mode .submenu-nav a {
    color: white;
}

.dark-mode .submenu-nav a:hover {
    background: #444;
}

@media (min-width: 769px) {
    .nav-item:hover .submenu-nav {
        display: block;
    }
}

@media (max-width: 768px) {
    .submenu-nav {
        position: relative;
        width: 100%;
    }

    .nav-item.open .submenu-nav {
        display: block;
    }
}
/* ---- Menü für Wahlarten ---- */
.menu {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.menu-item {
    position: relative;
    list-style: none;
    min-width: 220px;
    text-align: center;
}

.menu-item > a {
    display: block;
    padding: 15px 20px;
    background: #007BFF;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s, transform 0.2s;
    width: 100%;
}

.menu-item > a:hover {
    background: #0056b3;
    transform: scale(1.05);
}

/* ---- Dropdown für Wahlarten (bleibt .submenu!) ---- */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateY(5px);
    z-index: 1000;
}

.menu-item:hover .submenu,
.menu-item:focus-within .submenu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    padding: 5px 0;
}

.submenu a {
    display: block;
    padding: 12px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
}

.submenu a:hover {
    background: #f4f4f4;
}

.dark-mode .menu-item > a {
    background: #444;
    color: white;
}

.dark-mode .menu-item > a:hover {
    background: #666;
}

.dark-mode .submenu {
    background: #2a2a2a;
}

.dark-mode .submenu a {
    color: white;
}

.dark-mode .submenu a:hover {
    background: #444;
}

/* ---- Wahljahre untereinander ---- */
.wahljahre {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
    width: 100%;
}

.wahljahre a {
    display: block;
    padding: 15px 20px;
    background: #007BFF;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s, transform 0.2s;
    min-width: 220px;
    text-align: center;
    width: 100%;
    max-width: 300px;
}

.wahljahre a:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.dark-mode .wahljahre a {
    background: #444;
    color: white;
}

.dark-mode .wahljahre a:hover {
    background: #666;
}

/* ---- Kommunenauswahl ---- */
.kommunen-auswahl {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.kommunen-auswahl a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background 0.3s;
    width: 250px;
    text-align: center;
}

.kommunen-auswahl a:hover {
    transform: scale(1.05);
    box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.15);
}

.kommunen-auswahl img {
    width: 100px;
    height: auto;
    margin-bottom: 10px;
}

.kommunen-auswahl span {
    font-size: 1.2rem;
    color: #333;
    font-weight: bold;
}

.dark-mode .kommunen-auswahl a {
    background: #747474 !important;
    color: #ffffff !important;
    box-shadow: 0px 4px 8px rgba(255, 255, 255, 0.1) !important;
}

.dark-mode .kommunen-auswahl a:hover {
    background: #747474 !important;
    box-shadow: 0px 6px 12px rgba(255, 255, 255, 0.2) !important;
}

.dark-mode .kommunen-auswahl span {
    color: #f0f0f0 !important;
}

/* ---- Wahlseiten mit Wappen ---- */
.wahl-seite {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    width: 80%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.wahl-seite img {
    width: 150px;
    height: auto;
    margin-bottom: 20px;
}

.wahl-seite p {
    font-size: 1.2rem;
    color: #333;
    font-weight: bold;
}

.dark-mode .wahl-seite {
    background: #2a2a2a;
    color: white;
    box-shadow: 0px 4px 8px rgba(255, 255, 255, 0.1);
}

.dark-mode .wahl-seite p {
    color: #f8f8f8;
}

/* ---- Countdown ---- */
.countdown {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007BFF;
    margin-top: 20px;
    padding: 10px 15px;
    border-radius: 5px;
    background: rgba(0, 123, 255, 0.1);
    display: block;
    text-align: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.dark-mode .countdown {
    color: #ffcc00;
    background: rgba(255, 204, 0, 0.2);
}

/* ---- Mobile Anpassungen ---- */
@media (max-width: 768px) {
    .mobile-nav {
        justify-content: space-around;
    }

    .mobile-nav a,
    .mobile-nav button {
        flex: 1;
        min-width: auto;
    }

    .menu {
        flex-direction: column;
        align-items: center;
    }

    .menu-item {
        width: 100%;
        text-align: center;
    }

    .submenu,
    .submenu-nav {
        position: relative;
        width: 100%;
        left: 0;
        top: auto;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: none;
        box-shadow: none;
    }

    .menu-item:focus-within .submenu,
    .menu-item:hover .submenu {
        display: block;
    }

    .nav-item.open .submenu-nav {
        display: block;
    }

    #dark-mode-toggle {
        font-size: 16px;
        padding: 6px;
    }
}
.wahl-info {
    margin: 40px auto 20px;
    padding: 20px 30px;
    max-width: 500px;
    background: #e8f0ff;
    color: #003366;
    border-left: 6px solid #007BFF;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.05);
    font-size: 1.1rem;
    line-height: 1.5;
}

.wahl-info h2 {
    margin-bottom: 10px;
    font-size: 1.4rem;
    color: #0056b3;
}

/* Dark Mode Anpassung */
.dark-mode .wahl-info {
    background: #2a2a2a;
    color: #f0f0f0;
    border-left-color: #ffcc00;
}

.dark-mode .wahl-info h2 {
    color: #ffcc00;
}
