/* Globale Basis und Gummiband-Effekt direkt auf dem Body */
html {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f5f5f5;
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Macht den Text 'Navigation überspringen' unsichtbar */
.invisible {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    padding: 14px 24px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.header-inner {
    display: flex;
    align-items: center;
}

.header-inner .brand {
    display: flex;
    align-items: center;
    font-size: 17px;
    font-weight: 700;
    color: #222222;
    text-decoration: none;
}

.header-inner .brand img {
    display: block;
    height: 40px;
    width: auto;
}

/* Das Hauptmenü rechtsbündig formatieren */
header .mod_customnav {
    margin: 0 0 0 auto;
    padding: 0;
}

header .mod_customnav ul.level_1 {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 24px;
}

header .mod_customnav li a,
header .mod_customnav li strong {
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

header .mod_customnav li a:hover {
    color: #000000;
}

/* Der Menüpunkt wird sprachunabhängig per CSS zum Button transformiert */
header .mod_customnav li.login-trigger {
    position: relative;
}

header .mod_customnav li.login-trigger > a,
header .mod_customnav li.login-trigger > strong {
    display: inline-block;
    color: #333333;
    background-color: #ffffff;
    padding: 8px 18px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

header .mod_customnav li.login-trigger:hover > a {
    background-color: #222222;
    color: #ffffff;
    border-color: #222222;
}

/* Blendet den Navigations-Button aus, wenn die Login-Seite active aufgerufen ist */
header li.login-trigger.active {
    display: none !important;
}

/* Blendet den Navigations-Button komplett aus, sobald ein Mitglied eingeloggt ist */
header:has(.mod_login.logout) li.login-trigger {
    display: none !important;
}

/* Das eigenständige Login-Modul dient im Hintergrund unsichtbar als technischer Andockpunkt */
header .mod_login {
    position: absolute;
    top: 100%;
    right: 24px;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Das Formular-Dropdown-Styling */
header .mod_login form {
    margin: 8px 0 0 0;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    padding: 24px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    width: 300px;
    box-sizing: border-box;
}

/* Unsichtbare Brücke für den reibungslosen Maus-Hover */
header .mod_login form::before {
    content: "";
    position: absolute;
    top: -24px;
    left: 0;
    right: 0;
    height: 24px;
}

/* Steuerung des Dropdowns über den Menüpunkt oder das Formular selbst */
header:has(li.login-trigger:hover) .mod_login,
header .mod_login:hover,
header .mod_login:focus-within {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}

/* Sprachneutrales Styling für den eingeloggten Zustand (Avatar) */
header .mod_login.logout {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    display: inline-block;
    margin-left: 24px;
}

header .mod_login.logout::before {
    content: "👤";
    font-size: 16px;
    padding: 8px 12px;
    display: inline-block;
    border: 1px solid #cccccc;
    border-radius: 6px;
    background-color: #ffffff;
    cursor: pointer;
}

header .mod_login.logout:hover::before {
    background-color: #222222;
    border-color: #222222;
}

header .mod_login.logout form {
    position: absolute;
    top: 100%;
    right: 0;
    display: none;
}

header .mod_login.logout:hover form {
    display: block;
}

/* FIX: Hauptbereich zentriert Inhalte nur noch horizontal, blockiert aber nicht mehr die Höhe */
main {
    flex: 1 0 auto;
    width: 100%;
    padding: 40px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.mod_article {
    text-align: center;
    max-width: 800px;
    width: 100%;
}

h1, h2 {
    color: #333333;
    font-size: 28px;
    margin: 0 0 10px 0;
}

p {
    color: #666666;
    font-size: 16px;
    margin: 0;
}

/* RIGOROSER FIX FÜR DEN NATIVEN CONTAO FRAMEWORK-SLIDER */
.ce_sliderStart {
    width: 100%;
    max-width: 800px;
    margin: 32px auto 0 auto;
    position: relative;
}

.content-slider {
    overflow: hidden;
    position: relative;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    background-color: #ffffff;
}

/* WICHTIG: Überschreibt Flexbox, damit Swipe.js die Breiten mathematisch exakt berechnen kann */
.content-slider .slider-wrapper {
    display: block !important;
    overflow: hidden;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Jedes Slide MUSS als floatendes Element exakt nebeneinanderliegen für Swipe.js */
.content-slider .content-image {
    float: left;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.content-slider figure {
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Erzwingt das saubere 16:9 Verhältnis bei voller Breite */
.content-slider img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

/* Blendet die manuelle Text-Steuerung aus */
.ce_sliderStart .slider-control {
    display: none !important;
}

/* Fluid zentrierter Footer über die volle Breite */
footer {
    width: 100%;
    background-color: #ffffff;
    border-top: 1px solid #e5e5e5;
    padding: 14px 24px;
    box-sizing: border-box;
    font-size: 13px;
    color: #666666;
    flex-shrink: 0;
    margin-top: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 32px;
}

footer .mod_customnav {
    margin: 0;
    padding: 0;
}

footer .mod_customnav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 16px;
}

footer .mod_customnav a {
    color: #666666;
    text-decoration: none;
    transition: color 0.2s ease;
}

footer .mod_customnav a:hover {
    color: #222222;
}

/* Login-Formular Basis-Styling */
main .mod_login {
    margin: 0 auto;
    padding: 24px;
    max-width: 340px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-align: left;
}

.mod_login .widget {
    margin-bottom: 14px;
}

.mod_login label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444444;
    margin-bottom: 5px;
}

.mod_login input[type="text"],
.mod_login input[type="password"] {
    width: 100%;
    padding: 9px 11px;
    font-size: 14px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.mod_login input[type="text"]:focus,
.mod_login input[type="password"]:focus {
    outline: none;
    border-color: #333333;
}

.mod_login button[type="submit"],
.mod_login input[type="submit"] {
    width: 100%;
    padding: 10px;
    background-color: #222222;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mod_login button[type="submit"]:hover,
.mod_login input[type="submit"]:hover {
    background-color: #000000;
}

.mod_login p.error {
    color: #c0392b;
    font-size: 13px;
    margin-bottom: 12px;
}