/**
 * Selbstständig Portal - Styles
 * CuiveMedia 2025
 */

/* ===== Variables ===== */
:root {
    --selbst-primary: #2563eb;
    --selbst-secondary: #64748b;
    --selbst-success: #10b981;
    --selbst-warning: #f59e0b;
    --selbst-danger: #ef4444;
    --selbst-info: #3b82f6;
    --selbst-dark: #1e293b;
    --selbst-light: #f8fafc;
}

/* ===== General ===== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e293b;
    background-color: #ffffff;
}

/* ===== Portal Header (wie Tracker) ===== */
.selbst-header {
    background: var(--bg-primary, #ffffff);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.selbst-header .header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.selbst-header .header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.selbst-header .header-logo {
    display: flex;
    align-items: center;
}

.selbst-header .logo-img {
    height: 40px;
    width: auto;
}

.selbst-badge {
    background: linear-gradient(135deg, var(--selbst-primary) 0%, #1d4ed8 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.selbst-brand {
    text-decoration: none;
}

.selbst-nav {
    display: flex;
    gap: 5px;
}

.selbst-nav .nav-item {
    color: var(--text-secondary, #6b7280);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.selbst-nav .nav-item:hover,
.selbst-nav .nav-item.active {
    color: var(--selbst-primary);
    background: rgba(37, 99, 235, 0.1);
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.header-btn:hover {
    background: var(--bg-secondary, #f3f4f6);
    color: var(--text-primary);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary, #1f2937);
    transition: all 0.3s;
}

/* Mobile Navigation */
.mobile-selbst-nav .mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary, #1f2937);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.mobile-selbst-nav .mobile-nav-item:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--selbst-primary);
}

.mobile-selbst-nav .mobile-nav-item i {
    width: 20px;
    text-align: center;
}

/* Dark Mode für Header */
[data-theme="dark"] .selbst-header {
    background: var(--bg-primary, #1f2937);
    border-bottom-color: var(--border-color, #374151);
}

[data-theme="dark"] .selbst-nav .nav-item {
    color: var(--text-secondary, #d1d5db);
}

[data-theme="dark"] .selbst-nav .nav-item:hover,
[data-theme="dark"] .selbst-nav .nav-item.active {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .header-btn {
    color: var(--text-secondary, #d1d5db);
}

[data-theme="dark"] .header-btn:hover {
    background: var(--bg-secondary, #374151);
    color: var(--text-primary, #f9fafb);
}

[data-theme="dark"] .mobile-menu-btn span {
    background: var(--text-primary, #f9fafb);
}

/* ===== Hero Section ===== */
.selbst-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: white;
    padding: 60px 0;
}

.selbst-hero h1 {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.selbst-hero .lead {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* ===== Category Cards ===== */
.category-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #e2e8f0;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

.category-card .icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.category-card p {
    color: var(--selbst-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.category-card .article-count {
    font-size: 0.85rem;
    color: var(--selbst-secondary);
}

/* ===== Article Cards ===== */
.article-card {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    display: block;
    text-decoration: none;
    color: inherit;
}

.article-card:hover {
    border-color: var(--selbst-primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    color: inherit;
}

.article-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--selbst-dark);
    margin-bottom: 0.5rem;
}

.article-card .meta {
    font-size: 0.8rem;
    color: var(--selbst-secondary);
}

/* ===== Article Page ===== */
.article-content {
    max-width: 800px;
}

.article-content h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--selbst-dark);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--selbst-dark);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--selbst-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 1.25rem;
}

.article-content ul, .article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.article-content li {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* ===== Quick Answer Box ===== */
.quick-answer {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 4px solid var(--selbst-success);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.quick-answer h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--selbst-success);
    margin: 0 0 0.75rem 0;
    padding: 0;
    border: none;
}

.quick-answer p {
    font-size: 1.1rem;
    color: #065f46;
    margin: 0;
    font-weight: 500;
}

/* ===== Example Box ===== */
.example-box {
    background: #eff6ff;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.example-box .label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--selbst-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.example-box .content {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    border: 1px solid #bfdbfe;
}

/* ===== Warning Box ===== */
.warning-box {
    background: #fef3c7;
    border-left: 4px solid var(--selbst-warning);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.warning-box .icon {
    color: var(--selbst-warning);
    margin-right: 0.75rem;
}

.warning-box strong {
    color: #92400e;
}

/* ===== Error Box ===== */
.error-box {
    background: #fef2f2;
    border-left: 4px solid var(--selbst-danger);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.error-box .icon {
    color: var(--selbst-danger);
    margin-right: 0.75rem;
}

.error-box strong {
    color: #991b1b;
}

/* ===== Steps List ===== */
.steps-list {
    counter-reset: step-counter;
    list-style: none;
    padding-left: 0;
}

.steps-list li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 3.5rem;
    margin-bottom: 1.5rem;
}

.steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--selbst-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

/* ===== Author Box ===== */
.author-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 3rem;
    border: 1px solid #e2e8f0;
}

.author-box .author-avatar {
    width: 60px;
    height: 60px;
    background: var(--selbst-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.author-box .author-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.author-box .author-info .role {
    font-size: 0.9rem;
    color: var(--selbst-secondary);
    margin-bottom: 0.5rem;
}

.author-box .author-info p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

/* ===== Disclaimer ===== */
.disclaimer {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: #64748b;
}

.disclaimer i {
    color: var(--selbst-primary);
}

/* ===== Calculator Widget ===== */
.calculator-widget {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid #e2e8f0;
    margin: 2rem 0;
}

.calculator-widget h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--selbst-dark);
}

.calculator-widget .form-label {
    font-weight: 500;
    font-size: 0.9rem;
}

.calculator-widget .form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
}

.calculator-widget .form-control:focus {
    border-color: var(--selbst-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.calculator-widget .result-box {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 1rem;
}

.calculator-widget .result-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--selbst-success);
}

/* ===== Table Styles ===== */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.comparison-table th {
    background: var(--selbst-dark);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.comparison-table tr:hover td {
    background: #f8fafc;
}

.comparison-table .highlight {
    background: #ecfdf5;
}

/* ===== Related Articles ===== */
.related-articles {
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem;
}

.related-articles h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.related-articles .article-link {
    display: block;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.related-articles .article-link:hover {
    border-color: var(--selbst-primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.related-articles .article-link h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--selbst-dark);
    margin-bottom: 0.25rem;
}

.related-articles .article-link .category {
    font-size: 0.8rem;
    color: var(--selbst-secondary);
}

/* ===== Sidebar ===== */
.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

.sidebar-widget h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--selbst-primary);
}

.sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-widget li {
    margin-bottom: 0.5rem;
}

.sidebar-widget a {
    color: var(--selbst-dark);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    transition: color 0.2s;
}

.sidebar-widget a:hover {
    color: var(--selbst-primary);
}

/* ===== FAQ Accordion ===== */
.faq-section .accordion-button {
    font-weight: 600;
    font-size: 1rem;
    color: var(--selbst-dark);
}

.faq-section .accordion-button:not(.collapsed) {
    background: #eff6ff;
    color: var(--selbst-primary);
}

.faq-section .accordion-body {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #374151;
}

/* ===== Meta Info ===== */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--selbst-secondary);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.article-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-meta .meta-item i {
    color: var(--selbst-primary);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .selbst-hero {
        padding: 40px 0;
    }

    .selbst-hero h1 {
        font-size: 1.75rem;
    }

    .article-content h1 {
        font-size: 1.5rem;
    }

    .article-content h2 {
        font-size: 1.25rem;
    }

    .category-card {
        padding: 1.5rem;
    }

    .steps-list li {
        padding-left: 3rem;
    }

    .steps-list li::before {
        width: 2rem;
        height: 2rem;
        font-size: 0.9rem;
    }
}
