/**
Theme Name: MCC Theme
Author: CyberForge GmbH
Version: 1.0.0
 */

/*
Theme Name: MCC Theme
Author: CyberForge
Version: 1.0
*/

body {
    font-family: 'Exo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.image-bar {
    height: 200px;
    display: flex;
}

.image-bar img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.text-logo { margin: 0; font-size: 1.5rem; color: var(--primary-color); }

.user-meta { font-size: 0.9rem; color: #666; }

/* Navigation */
.handbook-navbar {
    border-bottom: 3px solid var(--primary-color);
    background: #fff;
}

.hb-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.hb-menu a {
    text-decoration: none;
    color: #444;
    font-weight: 600;
    display: block;
    padding: 15px 0;
    font-size: 0.95rem;
}

.hb-menu a:hover {
    color: var(--primary-color);
}

.menu-item-emergency a {
    color: #e74c3c;
    text-transform: uppercase;
    font-weight: 800;
}

.menu-item-toc {
    margin-left: auto; /* Schiebt Inhalt nach rechts */
    color: #888;
    padding: 15px 0;
}

/* Content Area */
.site-content {
    background: #fff;
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 40px; /* Innenabstand */
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 0.9rem;
}
/* --- HANDBOOK GRID LAYOUT --- */

/* Das Raster: 280px Sidebar | Rest Content */
.handbook-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* Sidebar Styling */
.handbook-sidebar {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    position: sticky; /* Bleibt beim Scrollen stehen! */
    top: 20px;
}

.sidebar-title {
    margin-top: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #888;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.chapter-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chapter-nav li {
    margin-bottom: 2px;
}

.chapter-nav a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: #444;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.chapter-nav a:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Aktiver Menüpunkt (Die Seite, auf der man ist) */
.chapter-nav li.active a {
    background: #fff;
    color: var(--primary-color); /* Fallback */
    color: var(--active-color, #003366); /* Dynamische Farbe */
    font-weight: 700;
    border-left: 4px solid var(--active-color, #003366);
}

/* Main Content Styling */
.handbook-main {
    background: #fff;
    /* Optional: Papier-Look */
    /* padding: 40px; border: 1px solid #eee; */
}

.mcc-action-bar {
    display: flex;
    justify-content: space-between; /* Einer links, einer rechts */
    align-items: center;
    margin-bottom: 20px;
}

.mcc-action-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}


.mcc-icon {
    position: relative;
}

/* WICHTIG: Beim Drucken die komplette Leiste ausblenden! */
@media print {
    .mcc-action-bar {
        display: none !important;
    }
}

.entry-title {
    font-size: 2.5rem;
    margin: 0 0 30px 0;
    line-height: 1.2;
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #2c3e50;
}

.entry-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 0.9rem;
    font-style: italic;
}

/* --- TABELLEN STYLING (Auto-Breite) --- */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.95rem;
    table-layout: auto;
}

.entry-content th,
.entry-content td {
    border: 1px solid #ddd;
    padding: 10px;
    vertical-align: top;
    word-break: break-word;
}

.entry-content table.has-fixed-layout {
    table-layout: auto !important;
    width: 100% !important;
}

/* Responsive: Auf Handy untereinander */
@media (max-width: 900px) {
    .handbook-grid {
        grid-template-columns: 1fr; /* Alles untereinander */
    }
    .handbook-sidebar {
        position: static; /* Nicht mehr sticky */
        margin-bottom: 30px;
    }
    .site-content {
        padding: 24px; /* Innenabstand */
    }
}

/* --- LINKS IM HANDBUCH CONTENT --- */
.entry-content a:not(svg a) {
    color: var(--primary); /* Holt sich automatisch die dynamische Handbuch-Farbe */
    font-weight: bold;     /* Macht die Schrift fett */
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.entry-content a:not(svg a):hover {
    opacity: 0.7; /* Leichter Hover-Effekt */
}

/* Wichtig: Buttons (falls du den Gutenberg Button-Block nutzt) ausschließen,
   damit die nicht plötzlich auch unterstrichen werden */
.entry-content .wp-block-button__link {
    text-decoration: none;
    font-weight: normal;
}

/* Handbook Cover */
.cover-title {
    font-size: 2rem;
    margin-bottom: 20px;
    line-height: 1.1;
}

.cover-intro {
    font-size: 1rem;
    color: #555;
    max-width: 800px;
    margin-bottom: 30px;
}

.cover-meta {
    display: flex;
    gap: 30px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px; /* Kasten drumherum für Fokus */
    display: inline-flex; /* Damit der Kasten nicht über die ganze Breite geht */
}

.meta-item {
    font-size: 0.95rem;
    color: #666;
}

.meta-item strong {
    color: #333;
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

/* Grid Layout */
.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.chapter-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.chapter-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.chapter-card h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.read-more {
    font-size: 0.85rem;
    font-weight: 600;
    display: block;
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.2s;
}

.chapter-card:hover .read-more {
    opacity: 1;
}


/* Tables */
tbody tr:first-child td {
    position: sticky;
    top: 60px;
    background-color: #f4f6f8;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

body,
.site-content,
.content-area,
main,
.entry-content,
article,
.wp-block-table  {
    overflow: visible !important;
}

table {
    border-collapse: collapse;
    width: 100%;
}