/* Reset und Basis-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a365d;
    --secondary-color: #2c5282;
    --accent-color: #2b6cb0;
    --accent-soft: #4299e1;
    --text-color: #2d3748;
    --text-light: #718096;
    --bg-color: #f8fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --success-color: #38a169;
    --green-accent: #166534;
    --warning-color: #dd6b20;
    --danger-color: #e53e3e;
    --shadow: 0 1px 3px rgba(26, 54, 93, 0.06);
    --shadow-lg: 0 4px 14px rgba(26, 54, 93, 0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* IT-Netzwerk-Hintergrund (hohe Transparenz) */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg stroke='%231a365d' stroke-width='0.35' opacity='0.05' fill='none'%3E%3Cpath d='M0 40h80 M40 0v80'/%3E%3Cpath d='M0 20h80 M0 60h80 M20 0v80 M60 0v80'/%3E%3C/g%3E%3Ccircle cx='40' cy='40' r='1.2' fill='%231a365d' opacity='0.06'/%3E%3Ccircle cx='0' cy='0' r='1.2' fill='%231a365d' opacity='0.06'/%3E%3Ccircle cx='80' cy='0' r='1.2' fill='%231a365d' opacity='0.06'/%3E%3Ccircle cx='0' cy='80' r='1.2' fill='%231a365d' opacity='0.06'/%3E%3Ccircle cx='80' cy='80' r='1.2' fill='%231a365d' opacity='0.06'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    pointer-events: none;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Limit container width to 80% on wide screens */
@media (min-width: 1200px) {
    .container {
        max-width: 75vw;
    }
}

/* Header Styles – schlanker, weichere Formen; Banner als Overlay über dem blauen Bereich.
   overflow: visible damit das fixierte Ausklappmenü (.nav-list) nicht abgeschnitten wird. */
.header {
    position: sticky;
    background: linear-gradient(160deg, var(--primary-color) 0%, var(--secondary-color) 70%);
    color: var(--white);
    padding: 0.75rem 0 1rem 0;
    box-shadow: 0 2px 20px rgba(26, 54, 93, 0.12);
    top: 0;
    z-index: 1000;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    border-bottom: none;
    transition: padding 0.25s ease, box-shadow 0.25s ease;
    overflow: visible;
}
/* Banner-Overlay: gleiche Leiste für Header (und Footer), skaliert mit jeweiliger Höhe/Breite; Standard 75 % transparent */
.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url(../images/banner_head.png) no-repeat center center;
    background-size: 100% 100%;
    opacity: var(--banner-opacity, 0.2);
    pointer-events: none;
    z-index: 0;
}
.header .container,
.header .header-content {
    position: relative;
    z-index: 1;
}

/* Oberer Bereich (Logo + Auth/Suche) – animiert einklappen, kein display:none (vermeidet Flackern) */
.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    gap: 0.5rem;
    overflow: hidden;
    max-height: 140px;
    opacity: 1;
    transition: max-height 0.35s ease, opacity 0.3s ease;
}
.header.header-scrolled .header-top-row {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    margin: 0;
    padding: 0;
    visibility: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease, visibility 0s linear 0.35s;
}
.header.header-scrolled {
    padding: 0.35rem 0 0.4rem 0;
    box-shadow: 0 1px 12px rgba(26, 54, 93, 0.15);
}
.header.header-scrolled .header-content {
    gap: 0;
}
.header.header-scrolled .isms-horizontal-nav {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    transition: margin-top 0.25s ease, padding-top 0.25s ease;
    /* Nur erste Menüzeile anzeigen (Übersicht, Governance, …), weitere Zeilen abschneiden */
    max-height: 2.65rem;
    overflow: hidden;
}
/* Beim Hover über die Top-Leiste wieder ausklappen (nur Desktop, wenn vorher eingeklappt) */
.header.header-scrolled.header-hover-expand .header-top-row {
    max-height: 140px;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    margin: 0;
    padding: 0;
    transition: max-height 0.35s ease, opacity 0.3s ease, visibility 0s;
}
.header.header-scrolled.header-hover-expand {
    padding: 0.75rem 0 1rem 0;
    box-shadow: 0 2px 20px rgba(26, 54, 93, 0.12);
    transition: padding 0.25s ease, box-shadow 0.25s ease;
}
.header.header-scrolled.header-hover-expand .header-content {
    gap: 0.5rem;
}
.header.header-scrolled.header-hover-expand .isms-horizontal-nav {
    margin-top: 1rem;
    padding-top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    max-height: none;
    overflow: visible;
    transition: margin-top 0.25s ease, max-height 0.25s ease;
}
/* Header auf eigene Compositor-Schicht für flüssigere Animation */
.header {
    transform: translateZ(0);
    backface-visibility: hidden;
}
@media (max-width: 1024px) {
    .header.header-scrolled .header-top-row {
        max-height: 140px;
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
        margin: 0;
        padding: 0;
        transition: none;
    }
    .header.header-scrolled {
        padding: 0.75rem 0 1rem 0;
    }
    .header.header-scrolled .isms-horizontal-nav {
        margin-top: 0.6rem;
        padding-top: 0.6rem;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        max-height: none;
        overflow: visible;
    }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    gap: 0.5rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
    letter-spacing: -0.02em;
}

/* Firmenlogo aus Admin „Logo hochladen“ – Höhe an Titelzeile angepasst */
.logo-heading-with-img {
    display: flex;
    align-items: center;
    line-height: 1;
}
.header-logo-img {
    max-height: 1.5rem;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
    vertical-align: middle;
}

.logo-subtitle {
    font-size: 0.8rem;
    opacity: 0.88;
    font-weight: 400;
}

/* Globale Suche im Header */
.global-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}
.global-search-result-item:hover {
    background: var(--bg-color);
}

/* ISMS Horizontal Navigation – aufgelockert */
.isms-horizontal-nav {
    width: 100%;
    margin-top: 0.6rem;
    order: 3;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 0.6rem;
}

.isms-nav-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.35rem;
    align-items: center;
}

.isms-nav-list li {
    margin: 0;
    border: none;
}

.isms-nav-link {
    color: var(--white);
    text-decoration: none;
    padding: 0.4rem 0.85rem;
    display: block;
    transition: all 0.25s ease;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0.92;
}

.isms-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.18);
    opacity: 1;
}

.isms-nav-link.active {
    background-color: rgba(255, 255, 255, 0.22);
    opacity: 1;
    font-weight: 600;
}

@media (max-width: 768px) {
    .isms-horizontal-nav {
        order: 2;
        margin-top: 0.5rem;
    }
    
    .isms-nav-list {
        gap: 0.25rem;
    }
    
    .isms-nav-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Navigation */
.main-nav {
    margin-top: 1rem;
    width: 100%;
    position: relative;
    order: 4;
}

/* Header Auth Button */
.header-auth-button {
    display: flex;
    align-items: center;
    margin-left: auto;
    position: relative;
    z-index: 998;
    gap: 0.5rem;
}

@media (min-width: 769px) {
    .header-auth-button {
        margin-right: 3.5rem;
    }
}

@media (max-width: 768px) {
    .header-auth-button {
        margin-right: 0.5rem;
        flex-wrap: wrap;
    }
    
    .header-auth-button span {
        font-size: 0.75rem;
    }
}

.menu-toggle {
    display: flex;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--white);
    flex-direction: column;
    justify-content: space-around;
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 1001;
    border-radius: var(--radius-md);
    transition: background-color 0.25s ease, z-index 0.3s ease;
    pointer-events: auto;
}

/* Burger in Header rechts neben Anmelden/Abmelden: im Fluss, nicht absolut */
.header-burger-next-to-auth .header-right-row .menu-toggle {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
}

/* infosec-startpage (nicht eingeloggt): Burger ganz oben in der Kopfzeile, Menü öffnet nav-list mit öffentlichen Links */
.header-infosec-burger-only .menu-toggle,
.header-infosec-burger-wrap .menu-toggle {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
}

/* When menu is open, move burger icon behind the menu */
.main-nav.menu-is-open .menu-toggle {
    z-index: 999;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.hamburger-icon {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.hamburger-icon span {
    width: 100%;
    height: 3px;
    background-color: var(--white);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.menu-toggle.active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-list {
    position: fixed;
    top: 0;
    right: 2.5rem;
    width: calc(100% - 2.5rem);
    max-width: calc(350px - 2.5rem);
    height: 100vh;
    background: linear-gradient(160deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    list-style: none;
    margin: 0;
    padding: 5rem 0 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: -4px 0 24px rgba(26, 54, 93, 0.2);
    z-index: 1002;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    pointer-events: auto;
    border-radius: var(--radius-lg) 0 0 0;
}

.nav-list.menu-open {
    transform: translateX(0);
    pointer-events: auto;
    z-index: 1004;
}

/* Mobile Drawer (angemeldeter Bereich): nur unter 1025px, öffnet sich über Burgermenü */
.isms-mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 100%);
    max-width: 100%;
    height: 100vh;
    background: linear-gradient(160deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: -4px 0 24px rgba(26, 54, 93, 0.25);
    z-index: 1003;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: var(--radius-lg) 0 0 0;
}

.isms-mobile-drawer.open {
    transform: translateX(0);
    pointer-events: auto;
    z-index: 1005;
}

.isms-mobile-drawer-inner {
    padding: 4.5rem 0 2rem 0;
}

.isms-mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.isms-mobile-nav-list li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.isms-mobile-nav-list li:last-child {
    border-bottom: none;
}

.isms-mobile-nav-list .isms-nav-link {
    padding: 1rem 1.5rem;
    display: block;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.isms-mobile-nav-list .isms-nav-link:hover,
.isms-mobile-nav-list .isms-nav-link.active {
    background: rgba(255, 255, 255, 0.12);
    border-left-color: rgba(255, 255, 255, 0.8);
}

.isms-mobile-drawer-sections {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.isms-mobile-drawer-sections-title {
    padding: 0 1.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.7);
}

.nav-list li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-list li:last-child {
    border-bottom: none;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    padding: 1rem 1.5rem;
    display: block;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: rgba(255, 255, 255, 0.5);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    border-left-color: var(--white);
    font-weight: 600;
}

/* Submenu Styles */
.nav-item-with-submenu {
    position: relative;
}

.submenu-indicator {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.7;
}

.submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-item-with-submenu:hover .submenu,
.nav-item-with-submenu:focus-within .submenu {
    max-height: 500px;
}

.submenu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.submenu .nav-link {
    padding: 0.75rem 1.5rem 0.75rem 3rem;
    font-size: 0.9rem;
}

.submenu .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-left-color: rgba(255, 255, 255, 0.7);
}

.submenu .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-left-color: var(--white);
}

.submenu .nav-link[href*="logout"] {
    color: #ffcccc !important;
}

.submenu .nav-link[href*="logout"]:hover {
    background-color: rgba(255, 204, 204, 0.2);
    border-left-color: #ffcccc;
}

/* Submenu in collapsed menu */
.nav-list.menu-collapsed .submenu {
    position: static;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid rgba(255, 255, 255, 0.4);
}

.nav-list.menu-collapsed .nav-item-with-submenu:hover .submenu,
.nav-list.menu-collapsed .nav-item-with-submenu:focus-within .submenu {
    max-height: 500px;
}

/* Overlay removed - no longer needed */

/* Hover effect for main-nav - show menu preview */
.main-nav:hover .nav-list:not(.menu-open) {
    transform: translateX(calc(100% - 250px));
    pointer-events: auto;
    z-index: 1001;
}

.main-nav:hover .nav-list:not(.menu-open) .nav-link {
    opacity: 0.9;
    pointer-events: auto;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

/* When hovering over preview, clicking a link opens menu fully */
.main-nav:hover .nav-list:not(.menu-open) .nav-link:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.15);
}

/* When menu is open via click, don't close on mouse leave */
.main-nav .nav-list.menu-open {
    pointer-events: auto;
    z-index: 1004;
}

/* Ensure links are always clickable when menu is visible */
.nav-list .nav-link {
    pointer-events: auto !important;
    cursor: pointer;
    position: relative;
    z-index: 1;
    user-select: none;
    -webkit-user-select: none;
}

/* Make sure menu container doesn't block clicks */
.nav-list {
    pointer-events: auto !important;
}

.nav-list li {
    pointer-events: auto;
}

/* Mobile/Tablet: Fensterbreite < 1025px – Top-Menü ausblenden, nur Burgermenü */
@media (max-width: 1024px) {
    .logo-subtitle {
        display: none !important;
    }

    /* isms4all: Burger immer rechts neben Anmelden/Abmelden, nicht unter dem Top-Menü */
    .header-burger-next-to-auth .main-nav {
        flex: 0 0 0;
        min-width: 0;
        width: 0;
        padding: 0;
        margin: 0;
        overflow: visible;
    }
    .header-burger-next-to-auth .header-right-row {
        flex-shrink: 0;
    }

    /* Nur bei angemeldeten Benutzern: Top-Menü ausblenden, Burgermenü nutzen */
    body.isms-logged-in .isms-horizontal-nav {
        display: none !important;
    }

    body.isms-logged-in .isms-mobile-drawer {
        display: block;
    }

    /* Angemeldet: altes Ausklappmenü (nav-list) ausblenden, nur Burgermenü-Drawer nutzen */
    body.isms-logged-in .main-nav .nav-list {
        display: none !important;
    }

    /* Angemeldet: Seiten-Ausklappmenüs (Section-Toggles) ausblenden, nur über Burgermenü erreichbar */
    body.isms-logged-in .section-toggle {
        display: none !important;
    }

    body.isms-logged-in .section-content[style*="display: none"] {
        display: none !important;
    }

    /* Abgemeldet: rechtes Ausklappmenü am rechten Rand gar nicht anzeigen, nur über Burgermenü öffnen */
    body:not(.isms-logged-in) .main-nav .nav-list:not(.menu-open) {
        display: none !important;
    }

    /* Layout schmale Geräte: keine horizontalen Leerräume, Inhalte fließen */
    body {
        overflow-x: hidden;
    }
    .main-content,
    .container {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    .page-content {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* Angemeldet: leere content-sections ausblenden, wenn nur der (versteckte) Toggle + zugeklappter Inhalt da sind */
    body.isms-logged-in .content-section:has(.section-toggle):has(.section-content[style*="display: none"]) {
        padding: 0 !important;
        margin: 0 0 0.5rem 0 !important;
        min-height: 0 !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: hidden !important;
    }
    body.isms-logged-in .content-section:has(.section-toggle):has(.section-content[style*="display:none"]) {
        padding: 0 !important;
        margin: 0 0 0.5rem 0 !important;
        min-height: 0 !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: hidden !important;
    }
    /* Grid/Cards auf schmalen Geräten: kleinere Mindestbreite, kein Überlauf */
    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    }
    .content-section {
        min-width: 0;
        overflow-wrap: break-word;
    }
    /* Übersicht (isms2go): Karten „Risiken/Assets/Geschäftsprozesse“ – Text und Charts im Bereich halten */
    .dashboard-charts-grid {
        min-width: 0;
    }
    .dashboard-chart-card {
        min-width: 0;
        overflow: hidden;
    }
    .dashboard-chart-title {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
    }
    .dashboard-chart-card [id*="chart-container"] {
        min-width: 0;
        max-width: 100%;
        overflow: auto;
    }
}

/* For very small screens */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    /* isms4all: Logo und Anmelden/Burger oben in einer Zeile halten */
    .header-burger-next-to-auth .header-content {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    /* infosec-startpage (nicht eingeloggt): Logo und Burger ganz oben in einer Zeile */
    .header-infosec-public .header-content {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
    .header-infosec-public .header-infosec-burger-wrap {
        margin-left: auto;
    }
    .header-burger-next-to-auth .header-content .header-right-row {
        margin-left: auto;
    }
    .header-burger-next-to-auth .header-content .isms-horizontal-nav {
        width: 100%;
        order: 10;
    }
    
    .main-nav {
        width: 100%;
        margin-top: 1rem;
    }
    
    .menu-toggle {
        position: relative;
        margin-left: auto;
        top: auto;
        transform: none;
    }
    
    .nav-list {
        max-width: 100%;
        padding-top: 4rem;
    }
    
    .main-nav:hover .nav-list:not(.menu-open) {
        transform: translateX(100%);
    }
}

/* Main Content – Gitternetz einmal unten rechts (nicht wiederholend), 30 % transparent */
.main-content {
    flex: 1;
    padding: 2rem 0;
    position: relative;
    background-color: var(--bg-color);
}
.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url(../images/bg.png);
    background-repeat: no-repeat;
    background-position: right bottom;
    opacity: 0.7;
    pointer-events: none;
    z-index: 0;
}
.main-content > * {
    position: relative;
    z-index: 1;
}

.page-content {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-title {
    font-size: 2.25rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
    border-bottom: none;
    padding-bottom: 0.75rem;
    position: relative;
    padding-left: 1rem;
    border-left: 4px solid var(--accent-color);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: linear-gradient(90deg, rgba(43, 108, 176, 0.06) 0%, transparent 100%);
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text-light);
    font-style: normal;
    margin-bottom: 2rem;
    display: block;
}

.content-section {
    background: var(--white);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 0;
}

.content-section h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.content-section h4 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.content-section p {
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1.8;
}

/* Grid Container */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.card[onclick]:hover {
    background: linear-gradient(145deg, #f0f7ff 0%, #e8f2fc 100%);
    border-left-color: var(--primary-color);
    border-color: rgba(43, 108, 176, 0.25);
    box-shadow: var(--shadow-lg);
}

.card h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Governance textarea styles */
.governance-textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.governance-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.12);
}

.save-btn {
    padding: 0.5rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--green-accent);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.save-btn:hover {
    background: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(26, 54, 93, 0.2);
}

/* Grüner Rahmen für alle Buttons (Form und Größe unverändert); !important damit Inline-Styles überschrieben werden */
button:not(.menu-toggle) {
    border: 2px solid var(--green-accent) !important;
    box-sizing: border-box;
}

input[type="submit"],
input[type="button"] {
    border: 2px solid var(--green-accent) !important;
    box-sizing: border-box;
}

.header-auth-button > a {
    border: 2px solid var(--green-accent) !important;
    box-sizing: border-box;
}

/* Link als Button – gleiche Gestaltung wie „Anmelden“ (Header-Auth-Button) */
a.isms-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.875rem;
    white-space: nowrap;
    border: 2px solid var(--green-accent) !important;
    box-sizing: border-box;
    transition: background 0.25s ease;
}
a.isms-btn:hover {
    background: var(--secondary-color);
}

.discard-btn {
    padding: 0.5rem 1.5rem;
    background: var(--text-light);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.25s ease;
}

.discard-btn:hover {
    background: #5a6c7d;
}

/* Version info styles */
.version-info {
    position: relative;
}

.version-entry {
    position: relative;
}

.version-tooltip {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.version-entry:hover .version-tooltip {
    pointer-events: auto;
}

/* Section toggle styles */
.section-toggle {
    user-select: none;
}

.section-toggle:hover {
    opacity: 0.8;
}

.section-content {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

.section-arrow {
    flex-shrink: 0;
}

.uploaded-documents {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Diagram Styles */
.diagram-container {
    margin: 2rem 0;
    text-align: center;
}

.connection-diagram {
    margin: 2rem 0;
}

.diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
}

.diagram-node {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
}

.diagram-node.center {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    font-size: 1.25rem;
    padding: 1.5rem 3rem;
}

.diagram-connections {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.diagram-description {
    margin-top: 1.5rem;
    font-style: italic;
    color: var(--text-light);
}

/* PDCA Cycle */
.pdca-cycle {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}

.pdca-item {
    background: var(--accent-color);
    color: var(--white);
    padding: 1.5rem 2rem;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.pdca-item:hover {
    transform: scale(1.1);
}

/* Process Steps */
.process-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.process-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
}

.step-number {
    background: linear-gradient(145deg, var(--accent-soft) 0%, var(--primary-color) 100%);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--green-accent);
    box-shadow: 0 2px 8px rgba(22, 101, 52, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-content h4 {
    margin-bottom: 0.5rem;
}

.step-content p {
    margin: 0;
    color: var(--text-light);
}

/* Datensicherheit: offeneres, modernes Design mit Grün-Akzent und Farbverlauf */
.datensicherheit-steps {
    gap: 1.75rem;
}

.datensicherheit-steps .process-step {
    padding: 1.75rem 2rem;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border-color);
    border-left: none;
    border-radius: var(--radius-xl);
    box-shadow: 0 2px 12px rgba(22, 101, 52, 0.06);
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.datensicherheit-steps .process-step:hover {
    box-shadow: 0 6px 20px rgba(22, 101, 52, 0.1);
}

.datensicherheit-steps .step-content h4 {
    color: var(--primary-color);
    font-weight: 600;
}

.datensicherheit-steps .step-content p {
    line-height: 1.65;
}

/* Risk Matrix */
.risk-matrix-container {
    margin: 2rem 0;
    overflow-x: auto;
}

.risk-matrix {
    width: 100%;
    border-collapse: collapse;
    box-shadow: var(--shadow);
    background: var(--white);
}

.risk-matrix th {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    text-align: center;
    font-weight: 600;
}

.risk-matrix td {
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
    font-weight: 600;
}

.risk-low {
    background-color: #c6f6d5;
    color: #22543d;
}

.risk-medium {
    background-color: #feebc8;
    color: #7c2d12;
}

.risk-high {
    background-color: #fed7d7;
    color: #742a2a;
}

.risk-critical {
    background-color: #fc8181;
    color: #ffffff;
}

.matrix-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    font-style: italic;
}

/* RACI Matrix */
.raci-matrix-container {
    margin: 2rem 0;
    overflow-x: auto;
}

.raci-matrix {
    width: 100%;
    border-collapse: collapse;
    box-shadow: var(--shadow);
    background: var(--white);
    font-size: 0.9rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.raci-matrix th {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 0.75rem;
    text-align: center;
    font-weight: 600;
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

.raci-matrix th:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 10;
    background: var(--primary-color);
}

.raci-matrix td {
    padding: 0.75rem;
    text-align: center;
    border: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 50px;
}

.raci-matrix tbody th {
    background: var(--secondary-color);
    color: var(--white);
    text-align: left;
    font-weight: 600;
    position: sticky;
    left: 0;
    z-index: 5;
}

.raci-a {
    background-color: #dc2626;
    color: #ffffff;
}

.raci-r {
    background-color: #2563eb;
    color: #ffffff;
}

.raci-c {
    background-color: #f59e0b;
    color: #ffffff;
}

.raci-i {
    background-color: #6b7280;
    color: #ffffff;
}

.raci-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
    justify-content: center;
}

.raci-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.raci-legend-item span:first-child {
    width: 2rem;
    height: 2rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

/* Asset Categories */
.asset-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.asset-category {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--accent-color);
    box-shadow: var(--shadow);
}

.asset-category ul {
    list-style: none;
    margin-top: 1rem;
}

.asset-category li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-color);
}

.asset-category li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* Asset Process */
.asset-process {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.asset-step {
    padding: 1.25rem;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-color);
    border: 1px solid var(--border-color);
    border-left-width: 4px;
    border-left-color: var(--accent-color);
}

.asset-step h4 {
    margin-bottom: 0.5rem;
}

.asset-step p {
    margin: 0;
    color: var(--text-light);
}

/* Classification Table */
.classification-table {
    margin: 2rem 0;
    overflow-x: auto;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: var(--shadow);
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.info-table th {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.info-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Technische Details (Preise & Hosting): blauer Header mit grünem Rahmen */
.tech-details-table th {
    background: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--green-accent);
    box-sizing: border-box;
}

.classification-label {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.875rem;
}

.classification-label.public {
    background-color: #c6f6d5;
    color: #22543d;
}

.classification-label.internal {
    background-color: #bee3f8;
    color: #2c5282;
}

.classification-label.confidential {
    background-color: #feebc8;
    color: #7c2d12;
}

.classification-label.secret {
    background-color: #fed7d7;
    color: #742a2a;
}

/* BCM Styles */
.bcm-cycle {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.bcm-phase {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--accent-color);
    box-shadow: var(--shadow);
    text-align: center;
}

.bcm-phase h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.bcm-phase p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.bcm-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.metric-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.metric-card h4 {
    color: var(--white);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.metric-card p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* Unser Versprechen (Über uns): grüne Umrandung der Kästchen */
.versprechen-section .metric-card {
    border: 2px solid var(--green-accent);
    box-sizing: border-box;
}

/* ROI (Ihr Nutzen): helles Layout mit positiven Symbolen, ohne blauen Hintergrund */
.roi-section .roi-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--green-accent);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow);
    max-width: 640px;
}

.roi-section .roi-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.roi-section .roi-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.5;
}

.roi-section .roi-list li:last-child {
    border-bottom: none;
}

.roi-section .roi-icon {
    color: var(--green-accent);
    font-weight: bold;
    font-size: 1.25rem;
    flex-shrink: 0;
    line-height: 1.4;
}

.roi-section .roi-list span:not(.roi-icon) {
    color: var(--text-color);
}

.criticality-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.criticality-item {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border-left: 4px solid;
}

.criticality-item.critical {
    background-color: #fed7d7;
    border-left-color: #f56565;
}

.criticality-item.high {
    background-color: #feebc8;
    border-left-color: #ed8936;
}

.criticality-item.medium {
    background-color: #fefcbf;
    border-left-color: #d69e2e;
}

.criticality-item.low {
    background-color: #c6f6d5;
    border-left-color: #48bb78;
}

.emergency-measures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.measure-item {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--accent-color);
    box-shadow: var(--shadow);
}

.measure-item h4 {
    margin-bottom: 0.5rem;
}

.measure-item p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Connection List */
.connection-list {
    list-style: none;
    margin-top: 1rem;
}

.connection-list li {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5rem;
}

.connection-list strong {
    color: var(--primary-color);
}

/* Footer – gleiche Banner-Leiste wie im Header, skaliert mit Footer-Größe */
.footer {
    position: relative;
    background: linear-gradient(160deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 2rem 0;
    margin-top: auto;
    border-radius: var(--radius-xl) 0 0 0;
    overflow: hidden;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url(../images/banner_head.png) no-repeat center center;
    background-size: 100% 100%;
    opacity: var(--banner-opacity, 0.2);
    pointer-events: none;
    z-index: 0;
}
.footer .container,
.footer .footer-content {
    position: relative;
    z-index: 1;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    margin: 0.5rem 0;
    color: rgba(255, 255, 255, 0.9);
}

.footer-note {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        align-items: center;
    }
    
    .logo {
        flex: 1;
    }

    .main-nav {
        width: auto;
        margin-top: 0;
    }
    
    .menu-toggle {
        position: relative;
        top: auto;
        transform: none;
    }

    .nav-list.menu-collapsed {
        max-width: 100%;
        left: 0;
        right: 0;
        border-radius: 0 0 8px 8px;
    }

    .page-title {
        font-size: 2rem;
    }

    .content-section {
        padding: 1.5rem;
    }

    .diagram-connections {
        flex-direction: column;
    }

    .pdca-cycle {
        flex-direction: column;
        align-items: center;
    }

    .raci-matrix {
        font-size: 0.75rem;
    }

    .raci-matrix th,
    .raci-matrix td {
        padding: 0.5rem 0.25rem;
    }

    .raci-legend {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Startpage (infosec-startpage.de): RSS-Feeds */
.startpage-rss .startpage-intro {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    max-width: 60em;
}
.startpage-feeds {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .startpage-feeds {
        grid-template-columns: repeat(2, 1fr);
    }
}
.startpage-feed-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.startpage-rss .page-title {
    font-size: 1.25rem;
}
.startpage-section-title {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 1.75rem 0 0.5rem 0;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--green-accent);
}
.startpage-vendor-intro {
    margin-bottom: 1rem;
}
.startpage-vendor-feeds {
    margin-top: 0;
}
.startpage-feed-title {
    font-size: 0.95rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--green-accent);
}
.startpage-entry-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}
.startpage-entry {
    margin-bottom: 0.5rem;
}
.startpage-entry-link {
    color: var(--accent-color);
    text-decoration: none;
}
.startpage-entry-link:hover {
    text-decoration: underline;
}
.startpage-entry-date {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.15rem;
}
.startpage-feed-empty {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}
.startpage-overlay-btn {
    margin-top: 0.5rem;
    align-self: flex-start;
}
/* Overlay (Dialog) – mittig im sichtbaren Bereich, ohne Seite zu scrollen */
.startpage-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    max-width: 90vw;
    width: 640px;
    max-height: 85vh;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.startpage-overlay::backdrop {
    background: rgba(26, 54, 93, 0.35);
}
.startpage-overlay-inner {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}
.startpage-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.startpage-overlay-title {
    font-size: 0.95rem;
    margin: 0;
    color: var(--white);
}
.startpage-overlay-close {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.9;
}
.startpage-overlay-close:hover {
    opacity: 1;
}
.startpage-overlay-content {
    padding: 1rem 1.25rem;
    overflow-y: auto;
    flex: 1;
}
.startpage-overlay-entry {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.startpage-overlay-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.startpage-overlay-entry-title {
    font-size: 0.9rem;
    margin: 0 0 0.35rem 0;
}
.startpage-overlay-entry-title a {
    color: var(--accent-color);
    text-decoration: none;
}
.startpage-overlay-entry-title a:hover {
    text-decoration: underline;
}
.startpage-overlay-entry-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0 0 0.5rem 0;
}
.startpage-overlay-entry-body {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.5;
}

