/* CMS Default Theme - Modern & Responsiv */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    background-color: #fff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5em;
    color: #2d3748;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.1rem; }

p {
    margin-bottom: 1em;
    line-height: 1.7;
}

a {
    color: #3182ce;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #2c5282;
    text-decoration: underline;
}

/* Lists */
ul, ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

li {
    margin-bottom: 0.5em;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Code */
code {
    background-color: #f7fafc;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.9em;
    color: #e53e3e;
}

pre {
    background-color: #f7fafc;
    padding: 1em;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1em;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #3182ce;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn:hover {
    background-color: #2c5282;
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background-color: #cbd5e0;
    color: #2d3748;
}

/* Header */
.site-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-branding {
    flex: 1;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
}

.site-title a {
    color: #2d3748;
    text-decoration: none;
}

.site-title a:hover {
    color: #3182ce;
    text-decoration: none;
}

.site-description {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
}

/* Navigation */
.main-navigation {
    position: relative;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #4a5568;
    margin: 2px 0;
    transition: 0.3s;
}

.menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 2rem;
}

.menu a {
    color: #4a5568;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu a:hover {
    color: #3182ce;
    text-decoration: none;
}

.menu a .menu-icon {
    font-size: 1rem;
}

/* Main Menu Styles */
.main-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 2rem;
}

.main-menu-item {
    position: relative;
}

.main-menu-item > a {
    color: #4a5568;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.main-menu-item > a:hover {
    color: #3182ce;
    text-decoration: none;
}

.main-menu-item.active > a {
    color: #3182ce;
    font-weight: 600;
}

/* Footer Menu Styles */
.footer-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 1.5rem;
}

.footer-menu-item > a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-menu-item > a:hover {
    color: white;
}

/* Sidebar Menu Styles */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
}

.sidebar-menu-item > a {
    color: #4a5568;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: #f7fafc;
}

.sidebar-menu-item > a:hover {
    background-color: #edf2f7;
    color: #3182ce;
}

.sidebar-menu-item.active > a {
    background-color: #3182ce;
    color: white;
}

/* Submenu */
.menu .menu,
.main-menu .submenu,
.footer-menu .submenu,
.sidebar-menu .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 200px;
    display: none;
    flex-direction: column;
    gap: 0;
    z-index: 1000;
}

.menu li:hover > .menu,
.main-menu-item:hover > .submenu,
.footer-menu-item:hover > .submenu,
.sidebar-menu-item:hover > .submenu {
    display: flex;
}

.menu .menu a,
.main-menu .submenu a,
.footer-menu .submenu a,
.sidebar-menu .submenu a {
    padding: 0.75rem 1rem;
    color: #4a5568;
    font-weight: normal;
}

.menu .menu a:hover,
.main-menu .submenu a:hover,
.footer-menu .submenu a:hover,
.sidebar-menu .submenu a:hover {
    background-color: #f7fafc;
}

/* Sidebar submenu adjustments */
.sidebar-menu .submenu {
    position: static;
    display: block;
    box-shadow: none;
    background: transparent;
    padding: 0;
    margin-top: 0.5rem;
    margin-left: 1rem;
}

.sidebar-menu .submenu a {
    background-color: #edf2f7;
    margin-bottom: 0.25rem;
    border-radius: 6px;
}

/* Main Content */
.site-main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #718096;
}

.breadcrumb a {
    color: #718096;
}

.breadcrumb-separator {
    color: #cbd5e0;
}

.breadcrumb-current {
    color: #4a5568;
    font-weight: 500;
}

/* Page Content */
.page-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.page-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.page-title {
    margin: 0;
    color: #2d3748;
}

.page-body {
    padding: 2rem;
}

.page-body > *:last-child {
    margin-bottom: 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background-color: #f7fafc;
    font-weight: 600;
    color: #4a5568;
}

tr:last-child td {
    border-bottom: none;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #4a5568;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3182ce;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.site-footer {
    background-color: #2d3748;
    color: #e2e8f0;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-links > a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links > a:hover {
    color: white;
}

/* Footer-Links Container unterstützt sowohl direkte Links als auch Menü-Listen */
.footer-links .footer-menu {
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links .footer-menu-item a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links .footer-menu-item a:hover {
    color: white;
}

/* Sidebar */
.site-sidebar {
    background-color: #f7fafc;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.sidebar-widget {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.75rem;
}

.widget-content {
    color: #4a5568;
    line-height: 1.6;
}

/* Layout mit Sidebar */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

.content-with-sidebar .page-content {
    min-width: 0; /* Verhindert overflow */
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #718096; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .main-navigation .menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        display: none;
    }
    
    .main-navigation.menu-open .menu {
        display: flex;
    }
    
    .page-header,
    .page-body {
        padding: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .content-with-sidebar {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .site-sidebar {
        order: -1; /* Sidebar oben auf mobilen Geräten */
    }
    
    .footer-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .page-header,
    .page-body {
        padding: 1rem;
    }
    
    .breadcrumb {
        flex-wrap: wrap;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a202c;
        color: #e2e8f0;
    }
    
    .site-header {
        background-color: #2d3748;
        border-bottom: 1px solid #4a5568;
    }
    
    .page-content {
        background-color: #2d3748;
    }
    
    .page-header {
        border-bottom-color: #4a5568;
    }
    
    .site-title a {
        color: #e2e8f0;
    }
    
    .menu a {
        color: #cbd5e0;
    }
    
    table {
        background-color: #2d3748;
    }
    
    th {
        background-color: #4a5568;
        color: #e2e8f0;
    }
    
    td {
        border-bottom-color: #4a5568;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .menu-toggle,
    .breadcrumb {
        display: none;
    }
    
    .site-main {
        padding: 0;
    }
    
    .page-content {
        box-shadow: none;
    }
    
    a {
        color: inherit;
        text-decoration: underline;
    }
}