/*
Theme Name: IT Expert Hub v2
Theme URI: https://phin.network
Author: PHIN IT Solutions
Author URI: https://phin.network
Description: Minimalistisches, sicheres WordPress-Theme für IT Expert Hub. Folgt Plugin-Integrationsrichtlinien 2026, robust gegen Plugin-Styles, nur essenzielle Customizer-Optionen.
Version: 2.0.4
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: it-expert-hub-v2
Tags: custom-header, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready, full-width-template, accessibility-ready, block-styles
*/

/* ===== CSS Variables ===== */
:root {
    /* Layout */
    --container-max-width: 1200px;
    --container-padding: 2rem;
    
    /* Colors - Fixed in template */
    --primary-color: #0066cc;
    --primary-hover: #0052a3;
    --text-color: #333333;
    --heading-color: #1a1a1a;
    --background-color: #ffffff;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
    
    /* Header & Footer - will be set via customizer */
    --header-bg: linear-gradient(135deg, #e3f2fd 0%, #f5f9fc 100%);
    --header-text: #1565c0;
    --header-text-secondary: #64b5f6;
    --header-border: #bbdefb;
    --footer-bg: #2c3e50;
    --footer-text: #ecf0f1;
    
    /* Typography - will be set via customizer */
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-menu: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Layout ===== */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1 0 auto;
    background-color: var(--background-color);
    max-width: var(--container-max-width);
    margin: 0 auto; /* Margin Top ist 0 */
    padding-top: 0; /* Sicherstellen, dass kein Padding oben ist */
    width: 100%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.site-footer {
    flex-shrink: 0;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

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: 1rem; }

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* ===== Accessibility: Enhanced Focus Styles ===== */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    *:focus-visible {
        outline-width: 4px;
        outline-color: #0000ff;
    }
    
    a {
        text-decoration: underline;
    }
}

/* ===== Header ===== */
.site-header {
    background: var(--header-bg);
    border-bottom: 2px solid var(--header-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.08);
    width: 100%;
    max-height: 105px; /* Reduziert von 140px um 1/4 */
    overflow: visible;
    transition: all 0.3s ease;
    margin-bottom: 0; /* Sicherstellen, dass kein Abstand nach unten ist */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-header.scrolled {
    max-height: 70px;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.15);
}

.site-header.scrolled .header-inner {
    padding: 0.5rem 0;
}

.site-header.scrolled .network-icon {
    width: 35px;
    height: 35px;
}

.site-header.scrolled .custom-logo {
    max-height: 35px;
}

.site-header.scrolled .site-title {
    font-size: 1.25rem;
}

.site-header.scrolled .site-description {
    display: none;
}

.site-header.scrolled .site-title {
    border-bottom: none;
    padding-bottom: 0;
}

/* Canvas für Netzwerk-Animation im Hintergrund */
.header-animation-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.header-container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    position: relative;
    z-index: 1;
}

.header-inner {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.5rem 0; /* Reduziertes Padding */
    gap: 2rem;
    max-height: 95px; /* Angepasst an Header-Höhe */
    width: 100%;
}

.site-branding {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.site-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0.125rem 0;
}

.site-logo .custom-logo-link {
    display: flex;
    align-items: center;
    line-height: 0;
}

.site-logo .custom-logo {
    max-height: 50px; /* Reduziert von 65px */
    width: auto;
    height: auto;
    transition: transform 0.3s ease;
    display: block;
}

.network-icon {
    width: 50px; /* Reduziert von 65px */
    height: 50px; /* Reduziert von 65px */
    color: var(--header-text);
    transition: transform 0.3s ease;
}

.network-icon:hover {
    transform: scale(1.05);
}

.site-identity {
    display: inline-flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-shrink: 0;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.5;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(21, 101, 192, 0.2);
}

.site-title a {
    color: var(--header-text);
    transition: color 0.3s ease;
}

.site-title a:hover {
    color: var(--header-text-secondary);
}

.site-description {
    font-size: 0.875rem;
    color: var(--header-text);
    opacity: 0.75;
    margin: 0;
    line-height: 1.5;
    padding-top: 0.25rem;
}

/* ===== Navigation ===== */
.main-navigation {
    font-family: var(--font-menu);
    flex-grow: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-self: center;
    transform: none;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 15px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-navigation a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--header-text);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-radius: var(--radius-sm);
}

.main-navigation a:hover {
    background: rgba(21, 101, 192, 0.1);
    color: var(--header-text-secondary);
}

.main-navigation .current-menu-item > a {
    background: rgba(21, 101, 192, 0.15);
    color: var(--header-text);
    font-weight: 700;
}

/* ===== Header Actions ===== */
.header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem;
    flex-shrink: 0 !important;
    margin-left: auto !important;
}

.theme-toggle,
.search-toggle {
    background: transparent;
    border: 1px solid var(--header-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--header-text);
}

.theme-toggle:hover,
.search-toggle:hover {
    background: rgba(21, 101, 192, 0.1);
    border-color: var(--header-text-secondary);
    transform: scale(1.05);
}

.theme-toggle-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.theme-toggle .light-icon {
    display: none;
}

body.dark-mode .theme-toggle .dark-icon {
    display: none;
}

body.dark-mode .theme-toggle .light-icon {
    display: inline;
}

.search-toggle svg {
    width: 20px;
    height: 20px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--header-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(21, 101, 192, 0.1);
    border-color: var(--header-text-secondary);
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 28px;
}

.hamburger .line {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--header-text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.is-active .hamburger .line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.is-active .hamburger .line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.is-active .hamburger .line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-inner {
    position: relative;
    width: 90%;
    max-width: 600px;
}

.search-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.search-close:hover {
    transform: scale(1.1);
}

.search-close svg {
    width: 32px;
    height: 32px;
}

.search-form-wrapper {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.search-form-wrapper .search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form-wrapper input[type="search"] {
    flex: 1;
    padding: 1rem;
    font-size: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
}

.search-form-wrapper input[type="search"]:focus {
    border-color: var(--primary-color);
}

.search-form-wrapper button[type="submit"] {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-form-wrapper button[type="submit"]:hover {
    background: var(--primary-hover);
}

/* Mobile Menu - Öffnet sich im Content-Bereich */
.mobile-menu {
    position: absolute;
    top: 60px; /* Direkt unter dem Header */
    left: -100%;
    width: 100%;
    max-width: 100%;
    min-height: calc(100vh - 60px);
    background: var(--background-color);
    z-index: 100;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--border-color);
}

.mobile-menu.is-active {
    left: 0;
}

/* Body-Klasse wenn Mobile-Menü offen ist */
body.mobile-menu-open {
    overflow: hidden;
}

/* Site-Container Anpassung für Mobile-Menü */
.site {
    position: relative;
}

.mobile-menu-inner {
    padding: calc(var(--spacing-xl) + 2rem) var(--spacing-lg) var(--spacing-xl) var(--spacing-lg);
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-menu li {
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-menu a {
    display: block;
    padding: var(--spacing-md) var(--spacing-sm);
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.mobile-nav-menu a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ===== Main Content ===== */
.site-main {
    padding: 0 0 var(--spacing-md) 0;
}

/* Content with Sidebar */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

.content-wrapper.has-sidebar {
    grid-template-columns: 1fr 300px;
}

.content-area {
    min-width: 0;
}

/* ===== Sidebar ===== */
.sidebar {
    position: sticky;
    top: calc(var(--spacing-xl) + 60px);
    align-self: start;
}

.widget {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

/* ===== Footer ===== */
.site-footer {
    margin-top: auto;
    font-family: var(--font-menu);
    width: 100%;
}

/* Footer Menu Band (heller) */
.footer-menu-band {
    background: #34495e;
    border-top: 2px solid #4a5f7f;
    width: 100%;
    padding: 0.2rem 0;
    max-height: 29.75px;
    display: flex;
    align-items: center;
}

/* Footer Content Band (dunkler) */
.footer-content-band {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 0.75rem 0;
    width: 100%;
    max-height: 62.5px;
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer Container - bündig mit Content */
.footer-container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Footer Navigation */
.footer-navigation {
    display: flex;
    justify-content: flex-start;
}

.footer-menu {
    display: flex;
    justify-content: flex-start;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.footer-menu li a {
    display: block;
    padding: 0.25rem 0.75rem;
    color: var(--footer-text);
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.3s ease;
    line-height: 1.2;
}

.footer-menu li a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Footer Widgets */
.footer-widgets {
    display: none;
}

.footer-widget-area {
    background: transparent;
}

.footer-widget-area .widget-title {
    color: var(--footer-text);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-sm);
}

/* Footer Bottom */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.footer-bottom p {
    margin: 0;
}

.footer-login-btn,
.footer-dashboard-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: rgba(21, 101, 192, 0.7);
    color: white !important;
    text-decoration: none;
    border-radius: 3px;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.footer-login-btn::before,
.footer-dashboard-btn::before {
    content: "→";
    font-size: 1rem;
    font-weight: bold;
}

.footer-login-btn:hover,
.footer-dashboard-btn:hover {
    background: rgba(21, 101, 192, 0.85);
    color: white !important;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background: var(--primary-hover);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== Cards Grid ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.card {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ===== Plugin Style Protection ===== */
/* Ensure theme styles take precedence over plugin styles */
.site-footer,
.main-navigation {
    all: revert;
}

/* Reset plugin interference */
.site * {
    box-sizing: border-box;
}

/* ===== Dark Mode ===== */
body.dark-mode {
    --header-bg: linear-gradient(135deg, #0d1b3e 0%, #1a2847 100%);
    --header-text: #e3f2fd;
    --header-text-secondary: #90caf9;
    --header-border: #2a3f5f;
    --background-color: #121212;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --light-bg: #1e1e1e;
    --border-color: #333333;
    --footer-bg: #0a0a0a;
    --footer-text: #b0b0b0;
    background: linear-gradient(to bottom, #1a1a1a 0%, #2a2a2a 100%);
}

body.dark-mode .footer-menu-band {
    background: #1a2847;
    border-top: 2px solid #2a3f5f;
}

body.dark-mode .footer-menu li a {
    color: #90caf9;
}

body.dark-mode .footer-menu li a:hover {
    color: #e3f2fd;
}

body.dark-mode .site-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .main-navigation a:hover {
    background: rgba(144, 202, 249, 0.15);
}

body.dark-mode .main-navigation .current-menu-item > a {
    background: rgba(144, 202, 249, 0.2);
}

body.dark-mode .theme-toggle:hover,
body.dark-mode .search-toggle:hover {
    background: rgba(144, 202, 249, 0.15);
}

body.dark-mode .mobile-menu-toggle:hover {
    background: rgba(144, 202, 249, 0.15);
}

/* ===== Accessibility Improvements ===== */

/* Focus Styles - WCAG 2.2 Compliant */
*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --text-color: #000000;
        --background-color: #ffffff;
        --border-color: #000000;
    }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 1.5rem;
    }
    
    .main-navigation ul {
        gap: 1.5rem;
    }
    
    .main-navigation a {
        padding: 0.5rem 0.75rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    /* Header in Mobilansicht: Nur Titel + Icons */
    .site-header {
        max-height: 60px;
        min-height: 60px;
        height: 60px;
        justify-content: center;
    }
    
    .header-inner {
        padding: 0.5rem 0;
        min-height: 60px;
        max-height: 60px;
        height: 60px;
        flex-wrap: nowrap; /* Keine Umbrüche - alles in einer Zeile */
        gap: 0.5rem;
    }
    
    /* Logo und Icon komplett verstecken */
    .site-logo,
    .network-icon {
        display: none !important;
    }
    
    /* Site Branding: Nur Titel, kein Icon */
    .site-branding {
        flex-direction: row;
        align-items: center;
        gap: 0;
        flex-shrink: 1;
        min-width: 0;
    }
    
    .site-identity {
        gap: 0;
        flex-shrink: 1;
        min-width: 0;
    }
    
    .site-title {
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .site-description {
        display: none;
    }
    
    /* Scrolled-Styles in Mobilansicht - keine Änderung nötig */
    .site-header.scrolled {
        max-height: 60px;
        min-height: 60px;
    }
    
    .site-header.scrolled .header-inner {
        padding: 0.5rem 0;
        min-height: 60px;
        max-height: 60px;
    }
    
    .site-header.scrolled .site-title {
        font-size: 1.1rem;
    }
    
    /* Footer-Menü-Band in Mobilansicht verstecken */
    .footer-menu-band {
        display: none;
    }
    
    /* Mobile Menu Divider */
    .mobile-menu-divider {
        height: 1px;
        background: var(--border-color);
        margin: 1rem 0;
    }
    
    /* Footer-Menü im mobilen Menü */
    .mobile-footer-menu {
        margin-top: 0.5rem;
    }
    
    .mobile-footer-menu li {
        opacity: 0.8;
    }
    
    :root {
        --container-padding: 1rem;
        --spacing-xl: 2rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .header-container {
        padding: 0 1rem;
    }
    
    /* Header Actions: Dark Mode, Suche, Burger-Menü rechts */
    .header-actions {
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem;
        flex-shrink: 0 !important;
        margin-left: auto !important;
    }
    
    .main-navigation {
        display: none !important;
    }
    
    .theme-toggle,
    .search-toggle {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        visibility: visible;
        opacity: 1;
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        margin-left: 0;
    }
    
    .content-wrapper.has-sidebar {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

/* ===== Accessibility ===== */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.screen-reader-text:focus {
    background-color: var(--light-bg);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    clip: auto !important;
    color: var(--text-color);
    display: block;
    font-size: 0.875rem;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ===== WordPress Core ===== */
.alignleft {
    float: left;
    margin-right: var(--spacing-md);
}

.alignright {
    float: right;
    margin-left: var(--spacing-md);
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Member Dashboard Styles ===== */
.dashboard-main {
    padding: 0;
    background: #f5f7fa;
}

.dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 200px);
    max-width: 100%;
    margin: 0 auto;
}

/* ===== Dashboard Sidebar ===== */
.dashboard-sidebar {
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.dashboard-sidebar-inner {
    padding: 1.5rem 0;
}

/* User Card */
.dashboard-user-card {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
}

.dashboard-user-avatar {
    margin: 0 auto 1rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
}

.dashboard-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-user-info {
    text-align: center;
}

.dashboard-user-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem;
}

.dashboard-user-email {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navigation */
.dashboard-nav {
    padding: 0;
}

.dashboard-nav-section {
    margin-bottom: 1.5rem;
}

.dashboard-nav-heading {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    padding: 0 1.5rem;
    margin: 0 0 0.5rem;
}

.dashboard-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dashboard-nav-item {
    margin: 0;
}

.dashboard-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #475569;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.dashboard-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dashboard-nav-link:hover {
    background: #f8fafc;
    color: var(--primary-color);
}

.dashboard-nav-item.active .dashboard-nav-link {
    background: #eff6ff;
    color: var(--primary-color);
    font-weight: 600;
}

.dashboard-nav-item.active .dashboard-nav-link::before {
    opacity: 1;
}

.dashboard-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dashboard-nav-icon svg {
    display: block;
}

.dashboard-nav-label {
    flex: 1;
}

/* Logout Link */
.dashboard-nav-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.dashboard-logout {
    color: #dc2626 !important;
}

.dashboard-logout:hover {
    background: #fef2f2;
    color: #b91c1c !important;
}

/* ===== Dashboard Content ===== */
.dashboard-content {
    background: #f5f7fa;
    overflow-y: auto;
}

.dashboard-content-inner {
    padding: 2rem;
    max-width: 1200px;
}

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* Dashboard Widgets */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.dashboard-widget {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.dashboard-widget:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.dashboard-widget-header {
    padding: 1.25rem;
    border-bottom: 1px solid #e0e0e0;
}

.dashboard-widget-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.dashboard-widget-body {
    padding: 1.25rem;
}

/* Dashboard Placeholder */
.dashboard-placeholder {
    background: #ffffff;
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
}

.dashboard-placeholder-icon {
    margin: 0 auto 1.5rem;
    color: #cbd5e1;
}

.dashboard-placeholder h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #475569;
    margin: 0 0 0.5rem;
}

.dashboard-placeholder p {
    color: #64748b;
    margin: 0;
}

/* Access Denied */
.dashboard-access-denied {
    text-align: center;
    padding: 4rem 2rem;
}

.access-denied-icon {
    margin: 0 auto 2rem;
    color: #cbd5e1;
}

.dashboard-access-denied h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1rem;
}

.dashboard-access-denied p {
    font-size: 1.125rem;
    color: #64748b;
    margin: 0 0 2rem;
}

.access-denied-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.dash-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dash-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: #ffffff;
    border: none;
}

.dash-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.dash-btn-secondary {
    background: #ffffff;
    color: #475569;
    border: 2px solid #e0e0e0;
}

.dash-btn-secondary:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

/* ===== Responsive Dashboard ===== */
@media (max-width: 1024px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .dashboard-content-inner {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .dashboard-content-inner {
        padding: 1rem;
    }
    
    .dashboard-title {
        font-size: 1.5rem;
    }
    
    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
    
    .dashboard-nav-section {
        margin-bottom: 1rem;
    }
    
    .dashboard-nav-link {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
}
