* {
    box-sizing: border-box;
    font-family: var(--font-main);
    z-index: auto;  /* Reihenfolge der Definition in HTML */
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-primary);    
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
}

.header h1 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
}

.logo img {
    max-height: 70px;      /* Desktop-Größe */
    width: auto;
}

.burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.burger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: #333;
    transition: all 0.3s ease;
}

.burger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.burger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav {
    /* Menü liegt immer über allem (vor allem in der mobilen Version) */
    z-index: 1050;
}

.nav a {
    position: relative;
    text-decoration: none;
    color: var(--color-primary);
    margin-left: 20px;
    padding: 6px 0;
    transition: color 0.2s ease;
}

/* Hover-Effekt */
.nav a:hover {
    color: var(--color-accent);
}

/* Unterstrich (Hover & Active) */
.nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width 0.25s ease;
}

/* Hover: Linie fährt aus */
.nav a:hover::after {
    color: var(--color-accent);
    width: 100%;
}

/* Aktive Seite dauerhaft markiert */
.nav a.active {
    font-weight: 600;
}

.nav a.active::after {
    width: 100%;
}

.hero-wrapper {
    position: relative;
}

.hero {
    position: relative;
    z-index: 2;            /* liegt über dem Logo */
    max-width: var(--max-width);
    margin: 80px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-logo {
    position: absolute;
    top: 10px;
    left: 80px;
    max-width: 330px;
    opacity: 0.08;         /* sehr dezent */
    pointer-events: none;
    z-index: 1;
}

.hero-media {
    display: flex;
    justify-content: center;   /* horizontal zentrieren */
}

@media (max-width: 768px) {

    .hero-wrapper {
        padding-top: 80px;   /* Formular rutscht nach unten */
    }

    .hero-logo {
        left: 10px;
        width: 260px;         /* etwas kleiner */
        opacity: 0.06;        /* dezenter */
    }

}

.hero-text h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-text h2 {
    font-size: 24px;
    font-weight: 600;
}


.hero-text p {
    font-size: 18px;
    color: var(--color-secondary);
    margin-bottom: 30px;
}

/* Slideshow-Container */
.slideshow-container {
    width: 100%;    /* Container darf die verfügbare Breite nutzen */
    max-width: 80%; /* Slideshow 20% kleiner am Desktop */
    margin: 0;
    position: relative;
}

/* Slideshow-Bilder */
.slideshow {
    position: relative;
    height: auto; /* Höhe wird per JS gesetzt */
}

.slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slides.active {
    opacity: 1;
}

.slides img {
    width: 100%; /* Slideshow etwas kleiner */
    height: auto;
    border-radius: var(--image-radius);
    /*box-shadow: 0 15px 40px rgba(0,0,0,0.12);*/
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

}

/* Navigation unter der Slideshow */
.navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    gap: 10px; /* Abstand zwischen Pfeilen und Dots */
}


/* Pfeile unterhalb, neben Dots */
.prev, .next {
    cursor: pointer;
    font-size: 24px;
    padding: 6px 10px;
    color: var(--color-buttonBackground);
    border-radius: 50%;
    user-select: none;
}


.prev:hover, .next:hover {
    color: var(--color-accent);
    transform: translateY(-1px);
}

/* Dots */
.dots-container {
    display: flex;
    gap: 8px;
}

.dot {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background-color: #bbb;
    cursor: pointer;
}

.dot.active {
    background-color: #333;
}

.btn-primary {
    display: inline-block;
    padding: 14px 28px;
    background: var(--color-buttonBackground);
    color: var(--color-buttonForeground);
    text-decoration: none;
    border-radius: 30px;
    font-size: 15px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background: var(--color-accent);
    transform: translateY(-1px);
}

/* Footer */
footer.footer {
    padding: 20px;
    text-align: center;
    background: var(--color-light);
    border-top: 1px solid var(--color-border);
    color: var(--color-secondary);
}

.footer a {
    color: inherit;
    text-decoration: none;
    font-size: 0.8em;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.footer p {
    margin: 5px 0;
}

.footer {
    position: relative; /* wichtig für absolute Positionierung */
}

/* Desktop: Logos rechts unten */
.footer-seals {
    position: absolute;
    right: 20px;
    bottom: 5px;
    display: flex;
    gap: 8px;
}

.footer-seals img {
    width: 70px;
    height: auto;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.footer-seals img:hover {
    opacity: 1;
}

/* Mobile: Logos wieder normal im Flow und zentriert */
@media (max-width: 768px) {

    .footer-seals {
        position: static;
        justify-content: center;
        margin-top: 10px;
    }

}

.admin-hidden {
    text-decoration: none;
    color: inherit;
    opacity: 0.25;
    /* margin-left: 10px; */
    font-size: 0.8em;
}

.success {
    background: var(--bckgnd-success);
    color: var(--color-success);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.error {
    background: var(--bckgnd-error);
    color: var(--color-error);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.elements-box {
    width: 300px;
    margin: 100px auto;
    padding: 20px;
    background: var(--color-boxBackground);
    border-radius: var(--border-radius);
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.wide-box {
    width: 500px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.maitenance-box {
    text-align: center; 
    padding: 50px;
}

.maitenance-box img {
    max-width: 50%; 
    height: auto;
}

/* Mobile */
@media (max-width: 768px) {
    .wide-box {
        width: 90%;
    }
}

.blackButton {
    width: 100%;
    padding: 8px;
    background: var(--color-buttonBackground);
    color: var(--color-buttonForeground);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.blackButton:hover {
    background: var(--color-accent);
    transform: translateY(-1px);
}

.blackButton.busy {
    cursor: wait;      /* das kleine Sanduhr-/Kreis-Symbol */
    opacity: 0.6;      /* optional, deutlicher Sperreffekt */
}

input, textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--color-inputBorder);
}

/* Desktop: nur bei Hover deutlich sichtbar */
@media (hover: hover) {
    .admin-hidden {
        opacity: 0;
    }

    .footer:hover .admin-hidden {
        opacity: 0.4;
    }
}

/* Mobile: immer leicht sichtbar */
@media (hover: none) {
    .admin-hidden {
        opacity: 0.25;
    }
}

/* Mobile */
@media (max-width: 768px) {
     /* Burger anzeigen */
    .burger {
        display: block;
    }

    /* Navigation verstecken */
    .nav {
        position: absolute;
        top: 80px; /* unter Header */
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        align-items: center;
        display: none;
        border-top: 1px solid #eee;
    }

    .nav a {
        margin: 15px 0;
        font-size: 18px;
    }

    /* Feedback beim Antippen */
    .nav a:active {
        background-color: #f2f2f2;
    }


    /* Navigation sichtbar */
    .nav.open {
        display: flex;
    }
    
    .header .logo img {
        max-height: 50px;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-logo {
        margin: 0 auto 20px;
    }

    .slideshow-container { max-width: 100%; }

    .prev, .next { font-size: 24px; left: 10px; right: 10px; }

}

@media (max-width: 600px) {
    .footer-links {
        flex-direction: column;
    }
    .footer-links p {
        margin: 3px 0;
    }
}