/* 🎨 PREMIUM DESIGN SYSTEM V2.0 */
/* ============================= */
/* Einheitliches Design für alle Module mit Branding-Support */

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Light Theme Variables */
    --sc-bg: #ffffff;
    --sc-text: #111827;
    --sc-text-muted: #6b7280;
    --sc-border: #e5e7eb;
    --sc-surface: #f3f4f6;
    --sc-card-bg: #ffffff;
    
    /* Image Border System */
    --sc-image-border-width: 3px;
    --sc-image-border-color: #3b82f6;
    --sc-image-border-radius: 8px;
    --sc-image-border-style: solid;
}

[data-theme="dark"] {
    /* Dark Theme Variables */
    --sc-bg: #0f1726;
    --sc-text: #e7eefc;
    --sc-text-muted: #9fb1d1;
    --sc-border: #1b2942;
    --sc-surface: #1a2332;
    --sc-card-bg: #1a2332;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: var(--brand-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
    color: var(--sc-text);
    background: var(--sc-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    transition: color 0.3s ease, background-color 0.3s ease;
}

/* Flexbox layout: ensure footer stays at bottom with spacing */
body.sc-premium-v2 {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sc-main {
    flex: 1 1 auto;
    min-height: 0;
}

/* Container System */
.sc-container,
.scp-container {
    max-width: var(--brand-max-width, 1200px);
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================= */
/* HEADER (Sticky Navigation with Logo)     */
/* ========================================= */
.sc-header,
.scp-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 2px solid #3b82f6;
    transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .sc-header,
[data-theme="dark"] .scp-header {
    background: rgba(15, 23, 38, 0.92);
    border-bottom: 2px solid #3b82f6;
}

.sc-header .sc-container,
.scp-header .scp-container {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 64px;
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Brand / Logo */
.sc-brand,
.scp-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: #1d1d1f;
}

/* Remove unintended focus outline / border around brand & composite logo text */
.sc-brand:focus, .sc-brand:focus-visible,
.sc-brand *:focus, .sc-brand *:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Ensure no default border appears (UA variations) */
.sc-brand img:focus { border: none !important; }

/* Hard suppression for residual blue link/focus styling (composite spans) */
.sc-brand-text,
.sc-brand-text span {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}
.sc-header :focus { outline: none !important; box-shadow:none !important; }
.sc-header :focus-visible { outline: none !important; box-shadow:none !important; }

[data-theme="dark"] .sc-brand,
[data-theme="dark"] .scp-brand {
    color: #e7eefc;
}

.sc-logo {
    display: block;
    max-height: 40px;
    width: auto;
}

.sc-brand-text {
    font-weight: 700;
    font-size: 18px;
}

/* Navigation */
.sc-nav,
.scp-nav {
    margin-left: auto;
    display: flex;
    gap: 24px;
    align-items: center;
}

.sc-nav-link,
.scp-link {
    text-decoration: none;
    color: #1d1d1f;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 8px 12px;
    border-radius: 8px;
}

[data-theme="dark"] .sc-nav-link,
[data-theme="dark"] .scp-link {
    color: #cbd5e1;
}

.sc-nav-link:hover,
.scp-link:hover {
    color: var(--brand-primary, #0A84FF);
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .sc-nav-link:hover,
[data-theme="dark"] .scp-link:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
}

/* ========================================= */
/* MAIN CONTENT AREA                         */
/* ========================================= */
.sc-main,
.scp-main {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* ========================================= */
/* MODULE HEADER (Standard für alle Module) */
/* ========================================= */
.sc-module-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: var(--brand-radius, 16px);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--brand-shadow, 0 10px 30px rgba(0, 0, 0, 0.08));
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .sc-module-header {
    background: linear-gradient(135deg, #1a2332 0%, #2d3748 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.sc-module-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.sc-module-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.85);
    padding: 6px 14px;
        border-radius: 20px;
    }
.sc-module-title {
    font-size: 32px;
    font-weight: 800;
    color: #1d1d1f;
    margin-bottom: 12px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

[data-theme="dark"] .sc-module-title {
    color: #e7eefc;
}

.sc-module-description {
    font-size: 16px;
    color: #6e6e73;
    line-height: 1.6;
    max-width: 800px;
    transition: color 0.3s ease;
}

[data-theme="dark"] .sc-module-description {
    color: #94a3b8;
}
.sc-module-description {
    font-size: 16px;
    color: #6e6e73;
    line-height: 1.6;
    max-width: 800px;
}

/* ========================================= */
/* CARD SYSTEM (für Content-Blöcke)         */
/* ========================================= */
.sc-card,
.scp-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--brand-radius, 16px);
    box-shadow: var(--brand-shadow, 0 10px 30px rgba(0, 0, 0, 0.08));
    padding: 28px;
    margin-bottom: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .sc-card,
[data-theme="dark"] .scp-card {
    background: #1a2332;
    border: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.sc-card:hover,
.scp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .sc-card:hover,
[data-theme="dark"] .scp-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.sc-card-title,
.scp-card-title {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-primary, #3b82f6) 0%, var(--brand-secondary, #8b5cf6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--brand-primary, #3b82f6), var(--brand-secondary, #8b5cf6)) 1;
    letter-spacing: -0.02em;
    transition: all 0.3s ease;
}

[data-theme="dark"] .sc-card-title,
[data-theme="dark"] .scp-card-title {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-image: linear-gradient(90deg, #60a5fa, #a78bfa) 1;
}

.sc-card-body,
.scp-card-body {
    font-size: 16px;
    color: #1d1d1f;
    line-height: 1.7;
    transition: color 0.3s ease;
}

[data-theme="dark"] .sc-card-body,
[data-theme="dark"] .scp-card-body {
    color: #cbd5e1;
}

/* ========================================= */
/* NOTICE BOXES (Info, Success, Warning)    */
/* ========================================= */
.sc-notice {
    padding: 16px 20px;
    border-radius: 12px;
    border-left: 4px solid;
    margin: 20px 0;
    font-size: 15px;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

.sc-notice-info {
    background: #f0f9ff;
    border-color: var(--brand-primary, #0A84FF);
    color: #0c4a6e;
}

[data-theme="dark"] .sc-notice-info {
    background: #172537;
    color: #93c5fd;
}

.sc-notice-success {
    background: #f0fdf4;
    border-color: var(--brand-success, #30D158);
    color: #14532d;
}

[data-theme="dark"] .sc-notice-success {
    background: #17261d;
    color: #86efac;
}

.sc-notice-warning {
    background: #fffbeb;
    border-color: var(--brand-warning, #FF9500);
    color: #78350f;
}

[data-theme="dark"] .sc-notice-warning {
    background: #2d2416;
    color: #fcd34d;
}

.sc-notice-danger {
    background: #fef2f2;
    border-color: var(--brand-danger, #FF3B30);
    color: #7f1d1d;
}

[data-theme="dark"] .sc-notice-danger {
    background: #2d1616;
    color: #fca5a5;
}

/* ========================================= */
/* BUTTONS (Primary, Secondary)             */
/* ========================================= */
.sc-btn,
.scp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.sc-btn-primary,
.scp-btn-primary {
    background: var(--brand-primary, #0A84FF);
    color: #ffffff;
}

.sc-btn-primary:hover,
.scp-btn-primary:hover {
    background: var(--brand-primary-hover, #0066CC);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
}

.sc-btn-secondary,
.scp-btn-secondary {
    background: #f5f5f7;
    color: #1d1d1f;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .sc-btn-secondary,
[data-theme="dark"] .scp-btn-secondary {
    background: #1a2332;
    color: #e7eefc;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.sc-btn-secondary:hover,
.scp-btn-secondary:hover {
    background: #e8e8ed;
}

[data-theme="dark"] .sc-btn-secondary:hover,
[data-theme="dark"] .scp-btn-secondary:hover {
    background: #2d3748;
}

/* ========================================= */
/* PROGRESS BAR                              */
/* ========================================= */
.sc-progress {
    position: relative;
    height: 16px;
    background: #f5f5f7;
    border-radius: 999px;
    overflow: hidden;
    margin: 16px 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .sc-progress {
    background: #1a2332;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.sc-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-primary, #0A84FF) 0%, var(--brand-secondary, #5E5CE6) 100%);
    transition: width 0.3s ease;
    border-radius: 999px;
}

.sc-progress-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 700;
    color: #1d1d1f;
    transition: color 0.3s ease;
}

[data-theme="dark"] .sc-progress-label {
    color: #e7eefc;
}

/* ========================================= */
/* FOOTER - Premium Design                  */
/* ========================================= */
.sc-footer,
.scp-footer {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 48px 0 32px;
    margin-top: 64px;
    color: #1d1d1f;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .sc-footer,
[data-theme="dark"] .scp-footer {
    background: linear-gradient(135deg, #0f1726 0%, #1a2332 100%);
    border-top: 1px solid rgba(59, 130, 246, 0.15);
    color: #cbd5e1;
}

.sc-footer .sc-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

@media (max-width: 900px) {
    .sc-footer .sc-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 600px) {
    .sc-footer .sc-footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.sc-footer-col {
    display: flex;
    flex-direction: column;
}

.sc-footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
}

[data-theme="dark"] .sc-footer-brand {
    color: #e7eefc;
}

.sc-footer-brand img {
    height: 32px;
    width: auto;
}

.sc-footer-tagline {
    font-size: 14px;
    color: #6e6e73;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 280px;
}

[data-theme="dark"] .sc-footer-tagline {
    color: #94a3b8;
}

.sc-footer-social {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.sc-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    color: #6e6e73;
    text-decoration: none;
    transition: all 0.2s ease;
}

[data-theme="dark"] .sc-footer-social a {
    background: rgba(59, 130, 246, 0.1);
    color: #94a3b8;
}

.sc-footer-social a:hover {
    background: var(--brand-primary, #0A84FF);
    color: #ffffff;
    transform: translateY(-2px);
}

.sc-footer-title {
    font-size: 13px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

[data-theme="dark"] .sc-footer-title {
    color: #cbd5e1;
}

.sc-footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sc-footer-list li {
    margin-bottom: 10px;
}

.sc-footer-link {
    color: #6e6e73;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

[data-theme="dark"] .sc-footer-link {
    color: #94a3b8;
}

.sc-footer-link:hover {
    color: var(--brand-primary, #0A84FF);
}

[data-theme="dark"] .sc-footer-link:hover {
    color: #60a5fa;
}

.sc-footer p {
    color: #6e6e73;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

[data-theme="dark"] .sc-footer p {
    color: #94a3b8;
}

.sc-disclaimer {
    margin-top: 16px;
    padding: 14px 18px;
    background: rgba(255, 59, 48, 0.06);
    border-left: 3px solid #ff3b30;
    border-radius: 8px;
    font-size: 13px;
    color: #991b1b;
    line-height: 1.6;
}

[data-theme="dark"] .sc-disclaimer {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

.sc-footer-copy {
    text-align: center;
    padding-top: 28px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 13px;
    color: #6e6e73;
    transition: border-color 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

[data-theme="dark"] .sc-footer-copy {
    border-top: 1px solid rgba(59, 130, 246, 0.1);
    color: #64748b;
}

.sc-footer-copy a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.sc-footer-copy a:hover {
    color: var(--brand-primary, #0A84FF);
}

/* ========================================= */
/* RESPONSIVE                                */
/* ========================================= */
@media (max-width: 480px) {
    .sc-header .sc-container {
        flex-direction: column;
        gap: 16px;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .sc-nav {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    .sc-module-header {
        padding: 24px;
    }

    .sc-module-title {
        font-size: 24px;
    }

    .sc-footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* ========================================= */
/* UTILITY CLASSES                           */
/* ========================================= */
.sc-text-center {
    text-align: center;
}

.sc-text-muted {
    color: #6e6e73;
    transition: color 0.3s ease;
}

[data-theme="dark"] .sc-text-muted {
    color: #94a3b8;
}

.sc-mt-1 {
    margin-top: 8px;
}

.sc-mt-2 {
    margin-top: 16px;
}

.sc-mt-3 {
    margin-top: 24px;
}

.sc-mt-4 {
    margin-top: 32px;
}

.sc-mb-1 {
    margin-bottom: 8px;
}

.sc-mb-2 {
    margin-bottom: 16px;
}

.sc-mb-3 {
    margin-bottom: 24px;
}

.sc-mb-4 {
    margin-bottom: 32px;
}

/* ========================================= */
/* IMAGE BORDER SYSTEM                      */
/* ========================================= */
img,
.sc-image,
.image-container img,
.question-image,
.pattern-image,
.cell-image,
.diagnostic-image {
    border: var(--sc-image-border-width) var(--sc-image-border-style) var(--sc-image-border-color);
    border-radius: var(--sc-image-border-radius);
}

/* === BRAND / LOGO EXCLUSION FROM GLOBAL IMAGE BORDER SYSTEM === */
/* Der blaue Rahmen kam von der globalen img Border-Regel.      */
/* Logo & Brand-Bilder werden vollständig ausgenommen.          */
.sc-logo,
.sc-brand img,
.scp-brand img,
header .sc-brand img,
header .scp-brand img {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Zusätzliche harte Unterdrückung für Fokuszustände am Brand */
.sc-brand:focus, .sc-brand:focus-visible,
.sc-brand *:focus, .sc-brand *:focus-visible,
.scp-brand:focus, .scp-brand:focus-visible,
.scp-brand *:focus, .scp-brand *:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}
