/* ===== THEME VARIABLES ===== */
:root {
    /* Dark Theme (Default) */
    --bg-primary: #0a0a0a; /* Near Black */
    --bg-secondary: #1a1a1a; /* Dark Gray */
    --bg-tertiary: #2a2a2a; /* Charcoal Gray */
    --text-primary: #f0f0f0; /* Off White */
    --text-secondary: #b0b0b0; /* Light Gray */
    --accent-color: #dc3545; /* Red */
    --border-color: #404040; /* Medium Gray */
    --shadow-color: rgba(0, 0, 0, 0.4); /* Transparent Black */
    --code-bg: #252525; /* Dark Gray */
    --table-border: #404040; /* Medium Gray */
    --table-header-bg: #303030; /* Dark Gray */
    --footer-bg: #050505; /* Very Dark Gray */
    --card-bg: #1a1a1a; /* Dark Gray */
    --card-border: #353535; /* Medium Gray */
    --navbar-bg: #151515; /* Very Dark Gray */
    --navbar-border: #353535; /* Medium Gray */
}

[data-theme="light"] {
    /* Light Theme */
    --bg-primary: #ffffff; /* White */
    --bg-secondary: #f5f5f5; /* Very Light Gray */
    --bg-tertiary: #e8e8e8; /* Light Gray */
    --text-primary: #1a1a1a; /* Near Black */
    --text-secondary: #666666; /* Medium Gray */
    --accent-color: #0d6efd; /* Blue */
    --border-color: #d0d0d0; /* Light Gray */
    --shadow-color: rgba(0, 0, 0, 0.08); /* Very Light Transparent Black */
    --code-bg: #f0f0f0; /* Very Light Gray */
    --table-border: #d0d0d0; /* Light Gray */
    --table-header-bg: #e0e0e0; /* Light Gray */
    --footer-bg: #f0f0f0; /* Very Light Gray */
    --card-bg: #ffffff; /* White */
    --card-border: #e0e0e0; /* Light Gray */
    --navbar-bg: #ffffff; /* White */
    --navbar-border: #e0e0e0; /* Light Gray */
}

/* ===== GLOBAL STYLES ===== */
html {
    position: relative;
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 56px;
    margin: 0;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    flex: 1 0 auto;
}

/* ===== IMAGES ===== */
img {
    max-width: 100%;
}

/* ===== LOGO STYLES ===== */
.navbar-brand img.navbar-logo {
    width: auto;
    max-height: 40px;
    transition: opacity 0.3s ease;
    filter: invert(1); /* Invertiert für Dark Theme als Default */
}

.navbar-brand img.navbar-logo:hover {
    opacity: 0.8;
}

[data-theme="light"] .navbar-brand img.navbar-logo {
    filter: invert(0); /* Keine Invertierung für Light Theme */
}

/* ===== COVER CONTAINER ===== */
.cover-container {
    border-radius: 4px 4px 0 0 !important;
    box-shadow: 0 4px 6px var(--shadow-color);
}

.cover-image {
    width: 100%;
    object-fit: cover;
    display: block;
}

.cover-container-single .cover-image {
    height: 400px;
}

.cover-container-list .cover-image {
    height: 250px;
}

.cover-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 2;
}

.cover-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.cover-content .title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    color: white;
}

.cover-content a {
    text-decoration: none;
}

.cover-content a:hover .title {
    opacity: 0.9;
}

.cover-content .card-subtitle {
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    color: rgba(255, 255, 255, 0.75);
}

.cover-content .bi {
    margin-right: 0.3rem;
}

/* ===== TYPOGRAPHY ===== */
h1.title,
h2.title {
    font-size: 2.3rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    color: var(--accent-color);
    opacity: 0.8;
}

blockquote {
    padding: 34px 34px;
    margin: 0 0 34px 34px;
    border-left: 5px solid var(--border-color);
    font-style: italic;
    background-color: var(--bg-tertiary);
    border-radius: 0 4px 4px 0;
    position: relative;
    overflow: hidden;
    min-height: 80px; /* Optional für bessere Wirkung */
	box-shadow: 0 2px 4px var(--shadow-color);
}

blockquote::before,
blockquote::after {
    content: '"';
    position: absolute;
    font-size: 120px;
    color: var(--accent-color);
    opacity: 0.15;
    font-family: serif;
    font-weight: bold;
    line-height: 1;
    z-index: 0;
}

blockquote::before {
    top: -30px;
    left: 10px;
}

blockquote::after {
    bottom: -60px;
    right: 20px;
}

/* Damit der Text über den Anführungszeichen liegt */
blockquote > * {
    position: relative;
    z-index: 1;
}

pre,
code {
    background: var(--code-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

pre {
    border-left: 3px solid var(--accent-color);
    padding: 10px;
    border-radius: 4px;
}

code {
    display: inline-block;
    padding: 0 0.5em;
    line-height: 1.4em;
    border-radius: 3px;
}

/* ===== PAGES ===== */
.page-link {
	position: relative;
	display: block;
	padding: .5rem .75rem;
	margin-left: -1px;
	line-height: 1.25;
	color: var(--accent-color);
	background-color: var(--bg-tertiary);
	border: 1px solid var(--border-color);
}

.page-item.disabled .page-link {
	color: var(--text-primary);
	background-color: var(--bg-secondary);
	border-color: var(--border-color);
}

.page-item.active .page-link {
	z-index: 3;
	color: #fff;
	background-color: var(--accent-color);
	border-color: var(--accent-color);
}

.page-link:hover {
	z-index: 2;
	color: #fff;
	background-color: var(--accent-color);
	border-color: var(--accent-color);
}

.badge {
	color: #fff;
	background-color: var(--accent-color);
	border-color: var(--accent-color);
}

/* ===== CARDS ===== */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: 0 2px 4px var(--shadow-color);
}

.card-body {
    margin: 0 20px 0 20px;
}

.card.border-0 {
    border: none !important;
    box-shadow: 0 4px 8px var(--shadow-color);
}

/* ===== TABLES ===== */
table {
    empty-cells: show;
    border: 1px solid var(--table-border);
    width: 100%;
    font-size: 0.9em;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

thead {
    background-color: var(--table-header-bg);
    color: var(--text-primary);
    text-align: left;
    vertical-align: bottom;
}

th,
td {
    padding: 0.5em 1em;
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background-color: var(--bg-secondary);
}

/* ===== NAVBAR ===== */
/* Hamburger Menu Styles */
.navbar-toggler {
    border-color: var(--text-primary) !important;
}

.navbar-toggler-icon {
    /* Dark Mode als Default: Helles Hamburger Menu */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(248, 249, 250, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

[data-theme="light"] .navbar-toggler-icon {
    /* Light Mode: Dunkles Hamburger Menu */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(33, 37, 41, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar {
    background-color: var(--navbar-bg) !important;
    border-bottom: 1px solid var(--navbar-border);
    box-shadow: 0 2px 4px var(--shadow-color);
}

.navbar-brand,
.nav-link {
    color: var(--text-primary) !important;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--accent-color) !important;
}

.nav-link.active {
    color: var(--accent-color) !important;
    font-weight: 500;
}

.nav-link {
    font-size: 0.8em;
}

/* Navbar Icons */
img.nav-svg-icon {
    width: 1rem;
    height: 1rem;
    padding-bottom: 2px;
    filter: invert(1); /* Invertiert für Dark Theme als Default */
}

[data-theme="light"] img.nav-svg-icon {
    filter: invert(0); /* Keine Invertierung für Light Theme */
}

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle-button {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0 8px;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-primary);
    opacity: 0.8;
    transition: opacity 0.3s ease;
    outline: none !important;
    box-shadow: none !important;
}

.theme-toggle-button:hover {
    opacity: 1;
    background: transparent !important;
    border: none !important;
}

.theme-toggle-button:focus,
.theme-toggle-button:focus-visible,
.theme-toggle-button:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.theme-toggle-button::-moz-focus-inner {
    border: 0;
}

/* ===== FOOTER ===== */
footer {
    flex-shrink: 0;
    width: 100%;
}

.footer {
    background-color: var(--footer-bg);
    padding-top: 3rem;
    padding-bottom: 2rem;
    border-top: 1px solid var(--border-color);
	color: var(--text-primary);
}

/* Footer Logo */
.footer-logo {
    max-height: 88px;
    width: auto;
    filter: invert(1); /* Invertiert für Dark Theme als Default */
}

[data-theme="light"] .footer-logo {
    filter: invert(0); /* Keine Invertierung für Light Theme */
}

/* Footer Text */
.footer-text-secondary {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Footer Links */
.footer-link-primary {
    color: var(--text-primary);
    text-decoration: none;
}

.footer-link-primary:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.footer-link-secondary {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-link-secondary:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.footer-link-accent {
    color: var(--accent-color);
    text-decoration: none;
}

.footer-link-accent:hover {
    opacity: 0.8;
    text-decoration: none;
}

/* Footer Headings */
.footer-heading,
.footer h5 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Divider */
hr {
	border-top: 2px solid color-mix(in srgb, var(--accent-color) 10%, transparent);
	margin: 2rem;
}

.footer-divider,
.footer hr {
    border-color: var(--border-color);
    opacity: 0.5;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* Copyright Section */
.footer-copyright,
.footer-powered {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0;
}

.footer-powered-link {
    color: var(--accent-color);
    text-decoration: none;
}

.footer-powered-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Mini Logo */
.mini-logo {
    height: 16px;
    width: auto;
    vertical-align: middle;
    margin-right: 4px;
    /* filter: invert(1); /* Invertiert für Dark Theme als Default */
}

[data-theme="light"] .mini-logo {
    filter: invert(0); /* Keine Invertierung für Light Theme */
}

/* Footer Brand */
.footer-brand a.text-decoration-none span {
    color: var(--text-primary);
}

/* Category List Styles */
.footer ul.list-unstyled li {
    margin-bottom: 0.5rem;
}

.footer ul.list-unstyled li a {
    display: block;
    color: var(--text-secondary);
    opacity: 0.8;
    text-decoration: none;
}

.footer ul.list-unstyled li a:hover {
    opacity: 1;
    color: var(--accent-color);
}

/* Contact Info */
.footer-contact-text.small,
.footer-email.small {
    font-size: 0.875rem;
}

/* Theme-specific adjustments */
[data-theme="light"] .footer {
    background-color: var(--footer-bg);
}

[data-theme="light"] .footer-link,
[data-theme="light"] .footer-brand p,
[data-theme="light"] .footer-text,
[data-theme="light"] .footer ul.list-unstyled li a {
    color: rgba(33, 37, 41, 0.8) !important;
}

[data-theme="light"] .footer-link:hover,
[data-theme="light"] .footer ul.list-unstyled li a:hover {
    color: var(--accent-color) !important;
}

/* ===== PLUGINS ===== */
.plugin {
    margin-top: 3rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
}

.plugin-label {
    font-size: 1em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.plugin ul {
    list-style: none;
    padding: 0 0 0 10px;
}

.plugin li {
    padding: 0.25rem 0;
    color: var(--text-primary);
}

.plugin li a {
    color: var(--text-primary);
    text-decoration: none;
}

.plugin li a:hover {
    color: var(--accent-color);
}

/* ===== BOOTSTRAP ICONS ===== */
.bi {
    margin-right: .5rem;
}

/* ===== FORM ELEMENTS ===== */
.form-control {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.form-control:focus {
    background-color: var(--bg-secondary);
    border-color: var(--accent-color);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.form-label {
    color: var(--text-primary);
}

/* ===== BUTTONS ===== */
.btn-primary {
	color: var(--text-primary);
	background-color: var(--bg-tertiary);
	border-color: var(--border-color);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    opacity: 0.9;
}

.btn-primary:focus {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-color-rgb), 0.25); /* Sichtbarer Focus-Indikator */
}

.btn-primary:not(:disabled):not(.disabled):active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    opacity: 0.8;
}

.btn.focus, .btn:focus {
	box-shadow: none;
}

/* ===== RESPONSIVE STYLES ===== */

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    .footer {
        text-align: center;
        padding-top: 2rem;
        padding-bottom: 1.5rem;
    }
    
    .footer-heading {
        margin-top: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .footer-brand p,
    .footer-contact-text {
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .navbar-brand img.navbar-logo {
        height: 25px;
    }
    
    .footer-copyright,
    .footer-powered {
        text-align: center !important;
        margin-top: 0.5rem;
    }
    
    /* Center footer content on mobile */
    .footer .row > div {
        text-align: center;
    }
    
    .footer .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer ul.list-unstyled {
        display: inline-block;
        text-align: left;
    }
    
    .mini-logo {
        margin-right: 3px;
    }
    
    .cover-container-single .cover-image {
        height: 300px;
    }
    
    .cover-container-list .cover-image {
        height: 250px;
    }
    
    .cover-content {
        bottom: 15px;
        left: 15px;
        right: 15px;
    }
    
    .cover-content .title {
        font-size: 1.5rem;
    }
    
    .cover-content .card-subtitle {
        font-size: 0.8rem;
    }
    
    .theme-toggle-button {
        margin: 0 5px;
        font-size: 1.3rem;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .cover-container-single .cover-image {
        height: 250px;
    }
    
    .cover-container-list .cover-image {
        height: 200px;
    }
    
    .cover-content .title {
        font-size: 1.3rem;
    }
    
    h1.title,
    h2.title {
        font-size: 1.8rem;
    }
    
    .theme-toggle-button {
        font-size: 1.2rem;
    }
    
    .footer {
        padding-top: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .footer-heading {
        margin-top: 1rem;
        font-size: 0.8rem;
    }
    
    .footer-brand p,
    .footer-contact-text,
    .footer-email {
        font-size: 0.8125rem;
    }
    
    .footer-copyright,
    .footer-powered {
        font-size: 0.75rem;
    }
    
    .footer-logo {
        max-height: 60px;
    }
}