/* KIM Hilfecenter - Statische Hilfeseite
   Design inspiriert von Stripe/HubSpot Help Centers
   Farben basierend auf kim-bewertung.de */

:root {
    --color-primary: #084780;
    --color-primary-dark: #063562;
    --color-primary-light: #e8f0f8;
    --color-accent: #de6605;
    --color-accent-light: #fff5eb;
    --text-primary: #1a1a2e;
    --text-secondary: #3a3a4a;
    --text-muted: #6b7280;
    --text-placeholder: #9ca3af;
    --bg-body: #f5f7fa;
    --bg-white: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --border-hover: #084780;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 2px 8px rgba(8,71,128,0.1);
    --shadow-lg: 0 4px 16px rgba(8,71,128,0.12);
    --radius: 10px;
    --radius-sm: 8px;
    --transition: 0.15s ease;
    --max-width: 1100px;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-family);
    background: var(--bg-body);
    color: var(--text-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===== TOP BAR (wie kim-bewertung.de) ===== */
.top-bar {
    background: var(--color-primary-dark);
    color: white;
    font-size: 0.9rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.top-bar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-text {
    opacity: 1;
}

.top-bar-links {
    display: flex;
    gap: 1.25rem;
}

.top-bar-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: opacity var(--transition);
}

.top-bar-links a:hover {
    opacity: 0.8;
    text-decoration: none;
}

.top-bar-links a:hover {
    color: white;
    text-decoration: none;
}

/* ===== MAIN HEADER ===== */
.site-header {
    background: var(--bg-white);
    color: var(--text-primary);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-bottom: 1px solid var(--border-color);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
}

.header-logo:hover {
    text-decoration: none;
    opacity: 0.85;
}

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

.header-logo .logo-divider {
    width: 1px;
    height: 30px;
    background: var(--border-color);
    margin: 0 0.35rem;
}

.header-logo .logo-label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: 0.01em;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.header-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

.header-nav a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.header-nav .btn-login {
    background: var(--color-primary);
    color: white;
    padding: 0.55rem 1.4rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background var(--transition);
}

.header-nav .btn-login:hover {
    background: var(--color-primary-dark);
    color: white;
    text-decoration: none;
}

/* ===== HERO SECTION (Stripe/HubSpot Style) ===== */
.hero-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 3rem 2rem 2.5rem;
    text-align: center;
}

.hero-inner {
    max-width: 680px;
    margin: 0 auto;
}

.hero-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.01em;
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.85;
    margin: 0 0 1.75rem 0;
}

.hero-search {
    max-width: 560px;
    margin: 0 auto;
}

.hero-search .search-input-wrapper {
    background: var(--bg-white);
    border: none;
    border-radius: var(--radius);
    padding: 0.85rem 1.25rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.hero-search .search-input {
    font-size: 0.95rem;
}

.hero-search .search-input::placeholder {
    color: var(--text-placeholder);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 2rem 3rem;
    overflow: hidden;
}

/* Kontakt-Leiste (kompakter als vorher) */
.support-contact-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.75rem;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.support-contact-bar .contact-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.support-contact-bar a {
    color: var(--color-primary);
    font-weight: 500;
}

.support-contact-bar .separator {
    width: 1px;
    height: 20px;
    background: var(--border-color);
}

/* Sektionen */
.support-section {
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Meistgefragt Grid */
.top-articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.top-article-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    min-height: 3.5rem;
}

.top-article-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    color: var(--color-primary);
    transform: translateY(-2px);
    text-decoration: none;
}

.top-article-title {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.35;
}

/* Kollabierbare Kategorie-Header */
.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.8rem 1.1rem;
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 0.5rem;
    font-family: var(--font-family);
    text-align: left;
}

.category-header:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 6px rgba(8,71,128,0.06);
}

.category-header-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.category-icon {
    font-size: 1.1rem;
}

.category-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.category-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-body);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 500;
}

.category-chevron {
    color: var(--text-placeholder);
    font-size: 0.75rem;
    transition: transform var(--transition);
    width: 16px;
    height: 16px;
}

.category-header.expanded .category-chevron {
    transform: rotate(180deg);
}

/* Artikelliste */
.article-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.article-list.hidden {
    display: none;
}

.article-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.75rem 1.1rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.article-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 6px rgba(8,71,128,0.06);
    text-decoration: none;
}

.article-item-content {
    flex: 1;
    min-width: 0;
}

.article-item-content h3 {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-item-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.2rem 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-category-badge {
    display: inline-block;
    font-size: 0.68rem;
    color: var(--color-primary);
    background: var(--color-primary-light);
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
    margin-bottom: 0.15rem;
    font-weight: 500;
}

.article-item .chevron-icon {
    color: var(--text-placeholder);
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

/* Suche (für Hero) */
.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    transition: all var(--transition);
}

.search-input-wrapper:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(8,71,128,0.1);
}

.search-input-wrapper svg {
    color: var(--text-placeholder);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.search-input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 0.88rem;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-family);
}

.search-input::placeholder {
    color: var(--text-placeholder);
}

.search-clear {
    background: none;
    border: none;
    color: var(--text-placeholder);
    cursor: pointer;
    padding: 0.25rem;
    display: none;
    font-size: 1.1rem;
    line-height: 1;
}

.search-clear.visible {
    display: block;
}

.search-clear:hover {
    color: var(--text-secondary);
}

/* Keine Ergebnisse */
.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== ARTIKEL-SEITE ===== */

/* Breadcrumb */
.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.article-breadcrumb a {
    color: var(--color-primary);
}

.article-breadcrumb .sep {
    font-size: 0.6rem;
    color: var(--text-placeholder);
}

.article-breadcrumb .current {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Zurueck-Button */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--color-primary);
    text-decoration: none;
    margin-bottom: 1rem;
}

.btn-back:hover {
    text-decoration: underline;
}

/* 2-Spalten Layout */
.article-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Artikel-Content */
.article-content {
    flex: 1;
    min-width: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.75rem 2rem;
    line-height: 1.75;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.article-content h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.article-content h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.5rem 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.article-content h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

.article-content p {
    margin: 0.5rem 0;
}

.article-content strong {
    color: var(--text-primary);
}

.article-content ul, .article-content ol {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.article-content li {
    margin: 0.35rem 0;
}

.article-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.article-content img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
    border: 1px solid var(--border-color);
}

/* Tabellen in Artikeln */
.article-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.85rem;
}

.article-table th {
    background: var(--bg-body);
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    padding: 0.6rem 0.85rem;
    border-bottom: 2px solid var(--border-color);
}

.article-table td {
    padding: 0.5rem 0.85rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.article-table tbody tr:hover {
    background: var(--bg-secondary);
}

.article-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.25rem 0;
}

.article-content blockquote {
    margin: 1rem 0;
    padding: 0.75rem 1.25rem;
    border-left: 3px solid var(--color-primary);
    background: var(--color-primary-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.article-content blockquote p {
    margin: 0.25rem 0;
}

/* Sidebar */
.article-sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 5rem;
}

.sidebar-section {
    margin-bottom: 1.25rem;
}

.sidebar-section-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border-color);
}

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

.related-list li {
    margin: 0;
}

.related-list a {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    line-height: 1.35;
    transition: all var(--transition);
}

.related-list a:hover {
    color: var(--color-primary);
    background: var(--color-primary-light);
    text-decoration: none;
}

/* Sidebar Kontakt-Card */
.sidebar-contact {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    margin-top: 0.5rem;
}

.sidebar-contact h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 0.3rem 0;
}

.sidebar-contact p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0 0 0.2rem 0;
}

.sidebar-contact a {
    font-size: 0.82rem;
    color: var(--color-primary);
    font-weight: 500;
}

/* Footer */
.site-footer {
    background: var(--color-primary-dark);
    color: rgba(255,255,255,0.7);
    padding: 1.5rem 2rem;
    margin-top: 2rem;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
}

.footer-links {
    display: flex;
    gap: 1.25rem;
}

.footer-links a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: white;
}

/* ===== RESPONSIVE ===== */

@media (min-width: 1200px) {
    .article-list {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .article-list .article-item {
        overflow: hidden;
    }

    .article-list .article-item-content {
        overflow: hidden;
    }
}

@media (max-width: 1099px) {
    .article-layout {
        display: block;
    }
    .article-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1.5rem 1.25rem 2.5rem;
    }
    .top-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .article-list {
        grid-template-columns: 1fr;
    }
    .hero-section {
        padding: 2rem 1.25rem 1.75rem;
    }
    .hero-section h1 {
        font-size: 1.4rem;
    }
    .support-contact-bar {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .support-contact-bar .separator {
        display: none;
    }
    .header-inner {
        padding: 0.65rem 1.25rem;
    }
    .top-bar {
        display: none;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 1.25rem 1rem 2rem;
    }
    .top-articles-grid {
        grid-template-columns: 1fr;
    }
    .hero-section h1 {
        font-size: 1.2rem;
    }
    .hero-search .search-input-wrapper {
        padding: 0.7rem 1rem;
    }
    .article-content {
        padding: 1.25rem 1rem;
        font-size: 0.88rem;
    }
    .article-item-content p {
        white-space: normal;
    }
    .header-nav {
        gap: 1rem;
    }
    .header-nav a:not(.btn-login) {
        display: none;
    }
    .header-logo .logo-label {
        display: none;
    }
    .footer-inner {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
}
