/* NORDDAMPF Brand Style for THE BRAIN Dashboard */
/* Based on Official Brand Guidelines 2025 */

/* ========== FONTS ========== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

/* NORDDAMPF Official Fonts - Gotham (lokal) */
@font-face {
    font-family: 'Gotham';
    src: url('/brain/static/fonts/Gotham-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gotham';
    src: url('/brain/static/fonts/Gotham-Book.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gotham';
    src: url('/brain/static/fonts/Gotham-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gotham';
    src: url('/brain/static/fonts/Gotham-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* RELICT Sub-Brand Font - Deltha (lokal) */
@font-face {
    font-family: 'Deltha';
    src: url('/brain/static/fonts/Deltha.ttf') format('truetype'),
         url('/brain/static/fonts/Deltha.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ========== CSS VARIABLES (Brand Colors) ========== */
:root {
    /* NORDDAMPF Primary Colors */
    --nd-lightblue: #C3CFDC;     /* Hellblau (Primary) */
    --nd-black: #231F20;          /* Schwarz */
    --nd-darkblue: #435B6C;       /* Dunkelblau (Secondary) */
    --nd-white: #FFFFFF;          /* Weiß */
    
    /* Typography */
    --font-gotham: 'Gotham', 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    
    /* Spacing (based on guidelines) */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 60px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(35, 31, 32, 0.08);
    --shadow-md: 0 4px 16px rgba(35, 31, 32, 0.12);
    --shadow-lg: 0 8px 32px rgba(35, 31, 32, 0.16);
    
    /* Transitions */
    --transition-fast: 200ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-gotham);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: var(--nd-black);
    background: var(--nd-white);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--nd-black);
}

h1 { font-size: 48px; margin-bottom: 20px; } /* Gotham Bold */
h2 { font-size: 36px; margin-bottom: 16px; } /* Gotham Bold */
h3 { font-size: 28px; margin-bottom: 14px; } /* Gotham Medium */
h4 { font-size: 22px; margin-bottom: 12px; font-weight: 600; } /* Gotham Medium */

p {
    font-weight: 400; /* Gotham Book */
    margin-bottom: var(--spacing-sm);
}

small {
    font-size: 14px;
    font-weight: 300; /* Gotham Light */
}

/* ========== HEADER (Sticky Navigation) ========== */
.header {
    background: var(--nd-black);
    padding: var(--spacing-md) var(--spacing-lg);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--nd-white);
    letter-spacing: 0.5px;
}

.logo-divider {
    height: 30px;
    width: 2px;
    background: rgba(255, 255, 255, 0.2);
}

.brain-title {
    font-size: 22px;
    font-weight: normal;
    color: var(--nd-white);
    font-family: 'Deltha', 'Gotham', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ========== BUTTONS (Based on Guidelines) ========== */
.btn {
    font-family: var(--font-gotham);
    font-weight: 700; /* Gotham Bold */
    font-size: 16px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

/* Primary CTA - NORDDAMPF Gradient */
.btn-primary {
    background: linear-gradient(135deg, var(--nd-darkblue) 0%, var(--nd-lightblue) 100%);
    color: var(--nd-white);
    box-shadow: 0 4px 12px rgba(67, 91, 108, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--nd-lightblue) 0%, var(--nd-darkblue) 100%);
    transition: left var(--transition-normal);
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(67, 91, 108, 0.4);
}

.btn-primary > * {
    position: relative;
    z-index: 1;
}

/* Secondary CTA */
.btn-secondary {
    background: var(--nd-white);
    border: 2px solid var(--nd-darkblue);
    color: var(--nd-darkblue);
    padding: 10px 22px;
    box-shadow: 0 2px 8px rgba(67, 91, 108, 0.15);
}

.btn-secondary:hover {
    background: var(--nd-darkblue);
    color: var(--nd-white);
    box-shadow: 0 4px 16px rgba(67, 91, 108, 0.3);
    transform: translateY(-2px);
}

/* Ghost CTA - For Dark Backgrounds */
.btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: var(--nd-white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 22px;
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    background: var(--nd-white);
    color: var(--nd-black);
    border-color: var(--nd-white);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
}

/* Success Button - NORDDAMPF Green-Blue */
.btn-success {
    background: linear-gradient(135deg, var(--nd-darkblue) 0%, #5a7990 100%);
    color: var(--nd-white);
    box-shadow: 0 4px 12px rgba(67, 91, 108, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #5a7990 0%, var(--nd-darkblue) 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(67, 91, 108, 0.4);
}

/* ========== CONTAINER & LAYOUT ========== */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
    position: relative;
    z-index: 1;
}

/* ========== HERO SECTION ========== */
.hero {
    position: relative;
    background: var(--nd-lightblue); /* Hellblau Background */
    color: var(--nd-black);
    padding: var(--spacing-xl) var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    overflow: hidden;
    min-height: 400px;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    color: var(--nd-black);
    margin-bottom: 20px;
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 2;
}

.hero p {
    font-size: 18px;
    font-weight: 400;
    color: var(--nd-black);
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
    line-height: 1.7;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 4px rgba(255, 255, 255, 0.3);
}

/* ========== STATS ========== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    position: relative;
    z-index: 2;
}

.stat-box {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-normal);
    border: 2px solid rgba(67, 91, 108, 0.2);
    box-shadow: 0 4px 16px rgba(67, 91, 108, 0.15);
}

.stat-box:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-6px) scale(1.02);
    border-color: var(--nd-darkblue);
    box-shadow: 0 8px 24px rgba(67, 91, 108, 0.25);
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--nd-darkblue);
}

.stat-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--nd-black);
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========== ACTION BAR ========== */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    gap: var(--spacing-md);
}

.search-box {
    flex: 1;
    max-width: 600px;
}

.search-input {
    width: 100%;
    padding: 16px 28px;
    border: 2px solid var(--nd-lightblue);
    border-radius: 30px;
    font-family: var(--font-gotham);
    font-size: 16px;
    font-weight: 500;
    transition: all var(--transition-normal);
    background: var(--nd-white);
    box-shadow: 0 2px 12px rgba(195, 207, 220, 0.15);
}

.search-input:focus {
    outline: none;
    border-color: var(--nd-darkblue);
    box-shadow: 0 4px 20px rgba(67, 91, 108, 0.25);
    transform: translateY(-2px);
}

.search-input::placeholder {
    color: #999;
    font-weight: 400;
}

/* ========== CATEGORIES GRID ========== */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--spacing-md);
}

.category-card {
    background: var(--nd-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: 0 2px 12px rgba(35, 31, 32, 0.08);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
}

/* NORDDAMPF Brand Gradient Border Effect */
.category-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--nd-darkblue) 0%, var(--nd-lightblue) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.category-card:hover::after {
    transform: scaleX(1);
}

.category-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--nd-lightblue) 0%, transparent 70%);
    opacity: 0;
    transition: all var(--transition-normal);
    pointer-events: none;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 32px rgba(67, 91, 108, 0.2);
    border-color: var(--nd-lightblue);
}

.category-card:hover::before {
    opacity: 0.08;
    top: -30%;
    right: -30%;
}

.category-icon {
    font-size: 56px;
    margin-bottom: var(--spacing-sm);
    line-height: 1;
    text-shadow: 0 2px 8px rgba(67, 91, 108, 0.15);
    transition: all var(--transition-normal);
}

.category-card:hover .category-icon {
    transform: scale(1.1);
    text-shadow: 0 4px 16px rgba(67, 91, 108, 0.25);
}

.category-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--nd-black);
    margin-bottom: 12px;
    transition: color var(--transition-normal);
}

.category-card:hover .category-title {
    color: var(--nd-darkblue);
}

.category-desc {
    font-size: 15px;
    font-weight: 400;
    color: #666;
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
}

.category-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 2px solid var(--nd-lightblue);
    opacity: 0.9;
}

.category-count {
    background: linear-gradient(135deg, var(--nd-lightblue) 0%, var(--nd-darkblue) 100%);
    color: var(--nd-white);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(67, 91, 108, 0.2);
}

/* ========== VISIBILITY BADGES (NORDDAMPF Style) ========== */
.visibility-badge {
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.visibility-public { 
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    color: white; 
}
.visibility-public::before { content: "🌐 "; }

.visibility-internal { 
    background: linear-gradient(135deg, var(--nd-darkblue) 0%, var(--nd-lightblue) 100%);
    color: white; 
}
.visibility-internal::before { content: "🏢 "; }

.visibility-confidential { 
    background: linear-gradient(135deg, #F44336 0%, #E57373 100%);
    color: white; 
}
.visibility-confidential::before { content: "🔒 "; }

.visibility-owner-only { 
    background: linear-gradient(135deg, var(--nd-black) 0%, var(--nd-darkblue) 100%);
    color: white; 
}
.visibility-owner-only::before { content: "👑 "; }

/* ========== FLASH MESSAGES (NORDDAMPF Style) ========== */
.flash-messages {
    position: fixed;
    top: 80px;
    right: var(--spacing-md);
    z-index: 1000;
    max-width: 450px;
}

.flash-message {
    background: var(--nd-white);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(35, 31, 32, 0.2);
    margin-bottom: 12px;
    border-left: 5px solid;
    animation: slideIn var(--transition-normal);
    font-weight: 600;
    font-size: 14px;
}

.flash-success { 
    border-left-color: #4CAF50;
    background: linear-gradient(to right, rgba(76, 175, 80, 0.05), var(--nd-white));
}

.flash-error { 
    border-left-color: #F44336;
    background: linear-gradient(to right, rgba(244, 67, 54, 0.05), var(--nd-white));
}

.flash-warning { 
    border-left-color: var(--nd-darkblue);
    background: linear-gradient(to right, rgba(67, 91, 108, 0.05), var(--nd-white));
}

@keyframes slideIn {
    from {
        transform: translateX(500px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .container {
        padding: var(--spacing-md) var(--spacing-sm);
    }
}

@media (max-width: 768px) {
    /* Header */
    .header {
        padding: var(--spacing-sm);
        flex-wrap: wrap;
    }
    
    .logo-img {
        height: 32px;
    }
    
    .brain-title {
        font-size: 16px;
    }
    
    .header-actions {
        width: 100%;
        margin-top: var(--spacing-sm);
        justify-content: space-between;
        gap: 8px;
    }
    
    .btn {
        font-size: 13px;
        padding: 8px 14px;
    }
    
    /* Hero */
    .hero {
        padding: var(--spacing-lg) var(--spacing-md);
        min-height: 300px;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 15px;
    }
    
    .logo-overlay {
        width: 250px;
        height: 250px;
    }
    
    /* Categories */
    .categories {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .category-card {
        padding: var(--spacing-md);
    }
    
    .category-icon {
        font-size: 44px;
    }
    
    .category-title {
        font-size: 20px;
    }
    
    /* Action Bar */
    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .search-input {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    /* Stats */
    .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-sm);
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .stat-label {
        font-size: 11px;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .header, .action-bar, .btn, .flash-messages {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .category-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
