/*
 * Hub & Spoke – Stylesheet
 * Erbt Farbpalette von Kundenreferenzen wenn aktiv, sonst eigene Fallbacks.
 */

:root {
    --hs-accent:  var(--kref-accent,  #3b82f6);
    --hs-accent2: var(--kref-accent2, #1d4ed8);
    --hs-dark:    var(--kref-dark,    #1c2340);
    --hs-muted:   var(--kref-muted,   #64748b);
    --hs-bg:      var(--kref-bg,      #f1f5f9);
    --hs-card:    var(--kref-card,    #ffffff);
    --hs-text:    var(--kref-text,    #1e293b);
    --hs-border:  var(--kref-border,  #e2e8f0);
    --hs-radius:  var(--kref-radius,  12px);
    --hs-shadow:       var(--kref-shadow,       0 2px 16px rgba(0,0,0,.07));
    --hs-shadow-hover: var(--kref-shadow-hover, 0 8px 32px rgba(0,0,0,.14));
}

/* ── Spoke Grid ──────────────────────────────────────────────────────────── */

.hs-grid {
    display: grid;
    grid-template-columns: repeat(var(--hs-cols, 3), 1fr);
    gap: 28px;
    margin: 40px 0;
}
.hs-grid--cols-1 { --hs-cols: 1; }
.hs-grid--cols-2 { --hs-cols: 2; }
.hs-grid--cols-3 { --hs-cols: 3; }
.hs-grid--cols-4 { --hs-cols: 4; }

/* ── Spoke Card ──────────────────────────────────────────────────────────── */

.hs-card {
    background: var(--hs-card);
    border-radius: var(--hs-radius);
    box-shadow: var(--hs-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
    text-decoration: none;
    color: inherit;
}
.hs-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hs-shadow-hover);
}
.hs-card-img {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--hs-bg);
}
.hs-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--hs-focus, 50% 50%);
    display: block;
    transition: transform .4s ease;
}
.hs-card:hover .hs-card-img img { transform: scale(1.06); }
.hs-card-img-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--hs-bg) 0%, #dde4ef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hs-border);
}
.hs-card-body {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.hs-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--hs-dark);
    margin: 0 0 10px;
    line-height: 1.35;
}
.hs-card-excerpt {
    font-size: .9rem;
    color: var(--hs-muted);
    line-height: 1.6;
    flex: 1;
    margin: 0 0 18px;
}
.hs-card-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--hs-accent);
    text-decoration: none;
    margin-top: auto;
}
.hs-card-more svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */

.hs-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: var(--hs-muted);
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}
.hs-breadcrumb li { display: flex; align-items: center; gap: 6px; }
.hs-breadcrumb a { color: var(--hs-muted); text-decoration: none; transition: color .15s; }
.hs-breadcrumb a:hover { color: var(--hs-accent); }
.hs-breadcrumb-sep { color: var(--hs-border); font-size: .7rem; }
.hs-breadcrumb li:last-child { color: var(--hs-text); font-weight: 500; }

/* ── FAQ Accordion ───────────────────────────────────────────────────────── */

.hs-faq { margin: 32px 0; }
.hs-faq-item {
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius);
    margin-bottom: 8px;
    overflow: hidden;
    background: var(--hs-card);
}
.hs-faq-q {
    width: 100%;
    background: none;
    border: none;
    padding: 16px 20px;
    text-align: left;
    font-size: .95rem;
    font-weight: 600;
    color: var(--hs-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    line-height: 1.4;
    transition: background .15s;
}
.hs-faq-q:hover { background: var(--hs-bg); }
.hs-faq-q[aria-expanded="true"] { color: var(--hs-accent); background: var(--hs-bg); }
.hs-faq-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--hs-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    transition: transform .2s, background .15s;
}
.hs-faq-q[aria-expanded="true"] .hs-faq-icon { transform: rotate(45deg); background: var(--hs-accent2); }
.hs-faq-a {
    display: none;
    padding: 0 20px 18px;
    font-size: .9rem;
    color: var(--hs-muted);
    line-height: 1.7;
}
.hs-faq-a p:first-child { margin-top: 0; }
.hs-faq-a p:last-child  { margin-bottom: 0; }
.hs-faq-item.is-open .hs-faq-a { display: block; }

/* ── CTA Block ───────────────────────────────────────────────────────────── */

.hs-cta {
    background: linear-gradient(135deg, var(--hs-dark) 0%, #2d3a6e 100%);
    border-radius: var(--hs-radius);
    padding: 40px 36px;
    margin: 40px 0;
    text-align: center;
    color: #fff;
}
.hs-cta-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 10px;
    color: #fff;
}
.hs-cta-text {
    font-size: .95rem;
    color: rgba(255,255,255,.8);
    margin: 0 0 24px;
    line-height: 1.6;
}
.hs-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--hs-accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    transition: background .18s, transform .18s;
}
.hs-cta-btn:hover { background: var(--hs-accent2); transform: translateY(-2px); color: #fff; }

/* ── Spoke-Navigation (Vorheriger | Hub | Nächster) ─────────────────────── */

.hs-spoke-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin: 52px 0 0;
    padding-top: 32px;
    border-top: 2px solid var(--hs-border);
}
.hs-spoke-nav-prev  { }
.hs-spoke-nav-next  { text-align: right; }
.hs-spoke-nav-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--hs-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0 0 5px;
}
.hs-spoke-nav-next .hs-spoke-nav-label { justify-content: flex-end; }
.hs-spoke-nav-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--hs-dark);
    text-decoration: none;
    display: block;
    line-height: 1.3;
    transition: color .18s;
}
.hs-spoke-nav-name:hover { color: var(--hs-accent); }
.hs-spoke-nav-hub-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    border: 2px solid var(--hs-border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--hs-dark);
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: border-color .18s, color .18s, background .18s;
    text-align: center;
    line-height: 1.35;
}
.hs-spoke-nav-hub-btn:hover {
    border-color: var(--hs-accent);
    color: var(--hs-accent);
    background: var(--hs-bg);
}
.hs-spoke-nav-hub-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.hs-spoke-nav-hub-label { font-size: 10px; color: var(--hs-muted); font-weight: 400; }

@media (max-width: 600px) {
    .hs-spoke-nav {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }
    .hs-spoke-nav-hub { grid-column: 1 / -1; text-align: center; order: -1; }
    .hs-spoke-nav-next { grid-column: 2; }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .hs-related-grid { grid-template-columns: 1fr 1fr; }
    .hs-related-hub { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .hs-grid,
    .hs-grid--cols-1,
    .hs-grid--cols-2,
    .hs-grid--cols-3,
    .hs-grid--cols-4 { --hs-cols: 1; gap: 14px; }
    .hs-related-grid { grid-template-columns: 1fr; }
    .hs-cta { padding: 28px 20px; }
}

/* ── [hs_toc] – Inhaltsverzeichnis-Box ──────────────────────────────────── */

.hs-toc {
    background: var(--hs-card);
    border: 1.5px solid var(--hs-border);
    border-radius: var(--hs-radius);
    overflow: hidden;
    margin: 36px 0;
    box-shadow: var(--hs-shadow);
}

/* Header-Balken */
.hs-toc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: linear-gradient(135deg, var(--hs-dark) 0%, #2d3a6e 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .35px;
    text-transform: uppercase;
}
.hs-toc-icon {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    opacity: .8;
}

/* Listen-Grid */
.hs-toc-list {
    display: grid;
    grid-template-columns: repeat(var(--hs-toc-cols, 1), 1fr);
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Items */
.hs-toc-item {
    border-bottom: 1px solid var(--hs-border);
}
.hs-toc-item:last-child,
.hs-toc--cols-2 .hs-toc-item:nth-last-child(-n+2) {
    border-bottom: none;
}

/* Trennlinie zwischen Spalten */
.hs-toc--cols-2 .hs-toc-item:nth-child(odd) {
    border-right: 1px solid var(--hs-border);
}

/* Link-Zeile */
.hs-toc-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    text-decoration: none;
    color: var(--hs-text);
    transition: background .15s, color .15s, padding-left .18s;
    min-height: 52px;
}
.hs-toc-link:hover {
    background: var(--hs-bg);
    color: var(--hs-accent);
    padding-left: 24px;
}

/* Nummer-Badge */
.hs-toc-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: var(--hs-bg);
    border: 1.5px solid #d1d9e0;
    border-radius: 50%;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--hs-accent);
    transition: background .15s, border-color .15s, color .15s;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.hs-toc-link:hover .hs-toc-num {
    background: var(--hs-accent);
    border-color: var(--hs-accent);
    color: #fff;
}

/* Seitentitel */
.hs-toc-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

/* Pfeil-Icon */
.hs-toc-arrow {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: #cbd5e1;
    transition: color .15s, transform .18s;
}
.hs-toc-link:hover .hs-toc-arrow {
    color: var(--hs-accent);
    transform: translateX(4px);
}

/* Auszug */
.hs-toc-excerpt {
    margin: 0;
    padding: 0 18px 13px 58px; /* eingerückt auf Höhe des Titels */
    font-size: 12px;
    color: var(--hs-muted);
    line-height: 1.55;
}
.hs-toc--cols-2 .hs-toc-excerpt {
    display: none; /* zu eng in 2-Spalten */
}

@media (max-width: 600px) {
    .hs-toc--cols-2 .hs-toc-list   { grid-template-columns: 1fr; }
    .hs-toc--cols-2 .hs-toc-item:nth-child(odd) { border-right: none; }
    .hs-toc--cols-2 .hs-toc-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--hs-border); }
    .hs-toc--cols-2 .hs-toc-item:last-child { border-bottom: none; }
}

/* ── [hs_sitemap] – Komplette Website-Übersicht ─────────────────────────── */

.hs-sitemap-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--hs-dark);
    margin: 0 0 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--hs-border);
}

.hs-sitemap {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Section (Hauptmenü / Footer) */
.hs-sitemap-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.hs-sitemap-section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--hs-muted);
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 1.5px solid var(--hs-border);
}
.hs-sitemap-section-title svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--hs-accent);
}

/* Grid der Hub-Gruppen */
.hs-sitemap-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Hub-Gruppe (eine Menü-Position) */
.hs-sitemap-group {
    background: var(--hs-card);
    border: 1.5px solid var(--hs-border);
    border-radius: var(--hs-radius);
    overflow: hidden;
    transition: box-shadow .2s;
}
.hs-sitemap-group:hover {
    box-shadow: var(--hs-shadow);
}

/* Hub-Link */
.hs-sitemap-hub {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 14px 16px 12px;
    background: linear-gradient(135deg, var(--hs-dark) 0%, #2d3a6e 100%);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    transition: background .15s;
}
.hs-sitemap-hub:hover {
    background: linear-gradient(135deg, var(--hs-accent) 0%, var(--hs-accent2) 100%);
    color: #fff;
}
.hs-sitemap-hub-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: .7;
    transition: transform .18s, opacity .15s;
}
.hs-sitemap-hub:hover .hs-sitemap-hub-icon {
    transform: translateX(3px);
    opacity: 1;
}

/* Spoke-Liste unter dem Hub */
.hs-sitemap-spokes {
    list-style: none;
    margin: 0;
    padding: 0;
}
.hs-sitemap-spokes li {
    border-bottom: 1px solid var(--hs-border);
}
.hs-sitemap-spokes li:last-child {
    border-bottom: none;
}
.hs-sitemap-spokes a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    font-size: 12.5px;
    color: var(--hs-text);
    text-decoration: none;
    transition: color .15s, background .15s, padding-left .15s;
}
.hs-sitemap-spokes a:hover {
    color: var(--hs-accent);
    background: var(--hs-bg);
    padding-left: 20px;
}
.hs-sitemap-spoke-dot {
    width: 6px;
    height: 6px;
    min-width: 6px;
    border-radius: 50%;
    background: var(--hs-border);
    transition: background .15s;
}
.hs-sitemap-spokes a:hover .hs-sitemap-spoke-dot {
    background: var(--hs-accent);
}

/* Footer-Menü – kompakte horizontale Liste */
.hs-sitemap-section--footer {
    padding-top: 28px;
    border-top: 2px solid var(--hs-border);
}
.hs-sitemap-footer-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.hs-sitemap-footer-list a {
    display: inline-block;
    padding: 6px 14px;
    background: var(--hs-bg);
    border: 1.5px solid var(--hs-border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--hs-text);
    text-decoration: none;
    transition: border-color .15s, color .15s, background .15s;
    font-weight: 500;
}
.hs-sitemap-footer-list a:hover {
    border-color: var(--hs-accent);
    color: var(--hs-accent);
    background: #eff6ff;
}

/* Abschnitte innerhalb einer Gruppe (2. Menüebene + deren Spokes) */
.hs-sitemap-sections {
    display: flex;
    flex-direction: column;
}
.hs-sitemap-section {
    border-bottom: 1px solid var(--hs-border);
}
.hs-sitemap-section:last-child {
    border-bottom: none;
}

/* 2. Ebene: Abschnitts-Header-Link */
.hs-sitemap-section-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--hs-dark);
    text-decoration: none;
    background: #f8fafc;
    transition: color .15s, background .15s;
}
.hs-sitemap-section-link svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    color: var(--hs-accent);
    transition: transform .18s;
}
.hs-sitemap-section-link:hover {
    color: var(--hs-accent);
    background: #eff6ff;
}
.hs-sitemap-section-link:hover svg {
    transform: translateX(3px);
}

/* Spokes unter 2. Ebene: leicht eingerückt */
.hs-sitemap-spokes--sub {
    padding-left: 10px;
    border-top: 1px solid var(--hs-border);
}
.hs-sitemap-spokes--sub a {
    padding-top: 5px;
    padding-bottom: 5px;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 600px) {
    .hs-sitemap-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .hs-sitemap-grid { grid-template-columns: 1fr; }
    .hs-sitemap-title { font-size: 1.25rem; }
}
