/* --- Farben --- */
:root {
    /* Wir übernehmen das etwas kräftigere Blau aus dem Logo als Akzent */
    --bs-primary: #007bff; /* Ein Standard helleres Bootstrap Blau passt gut zum Logo */
    --bs-body-bg: #f8f9fa;
    --pille-dark-blue: #2c5282; /* Das gediegene Blau für Texte */
}

body {
    color: #333;
}

/* --- Header & Navigation --- */
.bg-primary-subtle {
    /* Ein sehr heller, sauberer Hintergrund, damit das Logo wirkt */
    background-color: #f0f7ff !important;
}

.border-primary {
    /* Eine dezente Linie unter dem Header */
    border-color: #dceefc !important;
}

/* Navbar Styling */
.navbar-nav {
    gap: 0.5rem;
}

/* Navbar Links / Modul-Buttons */
.navbar-nav .nav-link,
.navbar-nav .mod-menu,
.navbar-nav ul.menu,
.navbar-nav li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
}

.navbar-nav a,
.navbar-nav .nav-link {
    color: var(--pille-dark-blue) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.navbar-nav a:hover,
.navbar-nav .nav-link:hover {
    color: var(--bs-primary) !important;
    background-color: rgba(0, 123, 255, 0.05);
}

/* Fix for nested Joomla menu lists */
.navbar-nav ul {
    display: flex;
    flex-direction: row;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Offcanvas Styling */
.offcanvas-body .navbar-nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 0;
}

.offcanvas-body .navbar-nav ul {
    flex-direction: column !important;
}

.offcanvas-body .nav-item,
.offcanvas-body li {
    width: 100%;
    border-bottom: 1px solid #eee;
}

.offcanvas-body li:last-child {
    border-bottom: none;
}

.offcanvas-body a,
.offcanvas-body .nav-link {
    display: block !important;
    width: 100%;
    padding: 1rem !important;
    font-size: 1.1rem;
}

/* Desktop Menu Visibility Fix */
@media (min-width: 992px) {
    .navbar-expand-lg .navbar-collapse {
        display: flex !important;
        flex-basis: auto !important;
    }
    .navbar-toggler {
        display: none !important;
    }
}

/* Login Screen Optimization */
#login-form, 
.com-users-login__form,
#login-form-form,
.login-form {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.com-users-login__form .control-label,
#login-form label,
.login-form label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--pille-dark-blue);
}

.com-users-login__form .form-control,
#login-form .form-control,
.login-form .form-control {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.com-users-login__form .btn-primary,
#login-form .btn-primary,
.login-form .btn-primary,
#login-form .btn-login {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    margin-top: 1rem;
}

/* Joomla Specific Login Classes */
.login-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

/* Image in Login (User Icon) */
.login-image, .com-users-login__image {
    display: block;
    max-width: 150px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
}

/* Logo Anpassung für Mobilgeräte */
@media (max-width: 768px) {
    .navbar-brand img {
        max-height: 40px !important; /* Etwas kleiner auf Handys */
    }
}

/* Hamburger Icon Farbe anpassen (optional, falls es zu hell ist) */
.navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(44, 82, 130, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-toggler {
    border-color: rgba(44, 82, 130, 0.3);
}

/* Ergonomic adjustments for touch */
button, .btn {
    min-height: 44px;
}

/* --- Allgemeine Links --- */
a {
    color: var(--pille-dark-blue);
    text-decoration: none;
}
a:hover {
    color: var(--bs-primary);
    text-decoration: underline;
}

/* --- Footer --- */
footer {
    background-color: var(--pille-dark-blue) !important;
}

.content-wrapper {
    background: #fff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}