/**
 * Radial Hub – Frontend CSS v1.0.3
 * Hegele Rot: #e2001a
 */

/* ── CSS-Variablen ── */
.radial-hub-wrapper {
    --rh-hub-bg:              #ffffff;
    --rh-hub-border:          #e2001a;
    --rh-hub-text:            #333333;
    --rh-icon-ring:           #d8d8d8;
    --rh-icon-hover:          #e2001a;
    --rh-bubble-bg:           #ffffff;
    --rh-bubble-border:       #d8d8d8;
    --rh-bubble-hover-border: #e2001a;
    --rh-bubble-text:         #333333;
    --rh-connector:           #e2001a;
    --rh-hub-size:            160px;
    --rh-icon-size:           65px;
    --rh-bubble-size:         150px;
    --rh-anim-duration:       280ms;
    --rh-anim-scale:          1.1;
    --rh-canvas:              740px;
}

/* ── Wrapper ── */
.radial-hub-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    position: relative;
}

/* ── Radialansicht ── */
.rh-radial-view {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.rh-canvas {
    position: relative;
    flex-shrink: 0;
    transform-origin: top center;
}

/* ── Zentraler Hub ── */
.rh-hub {
    position: absolute;
    border-radius: 50%;
    background: var(--rh-hub-bg); 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10; 
    padding: 0px;
    box-sizing: border-box;
}

.rh-hub-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    position: relative;
    z-index: 2;
}

.rh-hub-title {
    font-size: clamp(16px, 2.2vw, 22px);
    font-weight: 700;
    color: var(--rh-hub-border);
    line-height: 1.15;
}

.rh-hub-subtitle {
    font-size: clamp(12px, 1.5vw, 15px);
    font-weight: 600;
    color: var(--rh-hub-text);
    line-height: 1.2;
}

.rh-hub-image-bg {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
    z-index: 1;
}

.rh-hub-text--overlay {display:none; position: relative; z-index: 2; }

/* ── Dots ── */
.rh-dot {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--rh-connector);
    z-index: 6;
    pointer-events: none;
    transform: translate(-50%, -50%);  
	display: none;
}

/* ── Icon-Kreise ── */
.rh-icon-item {
    position: absolute;
    border-radius: 50%;
    background: #f5f5f5;
    border: 1.5px solid var(--rh-icon-ring);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 8;
    transition:
        border-color var(--rh-anim-duration) cubic-bezier(0.34, 1.56, 0.64, 1),
        transform    var(--rh-anim-duration) cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow   var(--rh-anim-duration) ease;
    box-sizing: border-box;
    outline: none;
}

.rh-icon-item:hover,
.rh-icon-item.rh-active {
	border: 3px solid var(--rh-icon-hover);
    border-color: var(--rh-icon-hover);
    transform: scale(var(--rh-anim-scale));
    z-index: 12;
}

.rh-icon-item:focus-visible {
    outline: 2px solid var(--rh-icon-hover);
    outline-offset: 3px;
}

.rh-icon-link {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    text-decoration: none;
}

.rh-icon-inner {
    display: flex;
    width: 99%;
    height: 99%;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.rh-icon-inner svg,
.rh-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    fill: #aaaaaa;
    color: #aaaaaa;
    stroke: #aaaaaa;
    transition:
        fill   var(--rh-anim-duration) ease,
        color  var(--rh-anim-duration) ease,
        stroke var(--rh-anim-duration) ease;
}

.rh-icon-item:hover .rh-icon-inner svg,
.rh-icon-item.rh-active .rh-icon-inner svg {
    fill: var(--rh-icon-hover);
    color: var(--rh-icon-hover);
    stroke: var(--rh-icon-hover);
}

/* ── Sprechblasen ── */
.rh-bubble-item {
    position: absolute;
    border-radius: 50%;
    background: var(--rh-bubble-bg);
    border: 1.5px solid var(--rh-bubble-border);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 7;
    box-shadow: 0 1px 10px rgba(0,0,0,0.07);
    transition:
        border-color var(--rh-anim-duration) cubic-bezier(0.34, 1.56, 0.64, 1),
        transform    var(--rh-anim-duration) cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow   var(--rh-anim-duration) ease;
    box-sizing: border-box;
    cursor: pointer;
    overflow: visible;
}

/* Pfeil-Spitze: zeigt von Bubble Richtung Hub */
/* Position und Winkel werden per data-arrow-* Attribut + CSS Custom Properties gesetzt */
.rh-bubble-item::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left:  7px solid transparent;
    border-right: 7px solid transparent;
    border-top:   9px solid var(--rh-bubble-border);
    /* Pfeil-Position auf dem Kreis-Rand – wird per JS über style gesetzt */
    top:       var(--rh-arrow-top, 50%);
    left:      var(--rh-arrow-left, 50%);
    transform: translate(-50%, -50%) rotate(var(--rh-arrow-angle, 0deg));
    transition: border-top-color var(--rh-anim-duration) ease;
    z-index: 3;
    pointer-events: none;
}

.rh-bubble-item:hover::before,
.rh-bubble-item.rh-active::before {
    border-top-color: var(--rh-bubble-hover-border);
}

.rh-bubble-item:hover,
.rh-bubble-item.rh-active {
	border: 3px solid var(--rh-bubble-hover-border);
    border-color: var(--rh-bubble-hover-border);
    transform: scale(var(--rh-anim-scale));
    z-index: 12;
}

.rh-bubble-link {
    display: flex;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    text-decoration: none;
    justify-content: center;
    align-items: center;
    padding: 12%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.rh-bubble-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 3px;
    width: 100%;
    pointer-events: none;
    position: relative;
}

.rh-bubble-title {
    font-size: clamp(9px, 1.05vw, 12px);
    font-weight: 700;
    color: var(--rh-bubble-text);
    line-height: 1.25;
    display: block;
    word-break: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    transition: opacity var(--rh-anim-duration) ease;
}

.rh-text-default {
    font-size: clamp(8px, 0.9vw, 10px);
    color: #777;
    line-height: 1.35;
    display: block;
    opacity: 1;
    transition: opacity var(--rh-anim-duration) ease;
    word-break: break-word;
    hyphens: auto;
}

/* Hover-Text liegt absolut über dem Inhalt */
.rh-text-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(8px, 0.9vw, 10px);
    color: #444;
    line-height: 1.35;
    text-align: center;
    padding: 4px;
    opacity: 0;
    transition: opacity var(--rh-anim-duration) ease;
    word-break: break-word;
    hyphens: auto;
}

/* Hover-Zustände */
.rh-bubble-item:hover .rh-bubble-title,
.rh-bubble-item.rh-active .rh-bubble-title { opacity: 0; }

.rh-bubble-item:hover .rh-text-default,
.rh-bubble-item.rh-active .rh-text-default { opacity: 0; }

.rh-bubble-item:hover .rh-text-hover,
.rh-bubble-item.rh-active .rh-text-hover { opacity: 1; }

/* ── Responsive Skalierung Desktop ── */
@media (max-width: 1100px) {
    .rh-canvas {
        transform: scale(0.80);
        margin-top: calc(var(--rh-canvas) * -0.10);
        margin-bottom: calc(var(--rh-canvas) * -0.10);
    }
}
@media (max-width: 850px) {
    .rh-canvas {
        transform: scale(0.65);
        margin-top: calc(var(--rh-canvas) * -0.175);
        margin-bottom: calc(var(--rh-canvas) * -0.175);
    }
}

/* ── Mobile-Ansicht ──
   WICHTIG: Mobile-View ist per !important versteckt.
   JS schaltet über Klassen um – kein Flackern mehr. */
.rh-mobile-view {
    display: none !important;
    width: 100%;
    padding: 16px 0;
}
.rh-mobile-view.rh-mobile-active {
    display: block !important;
}
.rh-radial-view.rh-radial-hidden {
    display: none !important;
}

.rh-mobile-hub-title {
    text-align: center;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.rh-mobile-hub-title span:first-child {
    font-size: 20px;
    font-weight: 700;
    color: var(--rh-hub-border);
}
.rh-mobile-hub-title span:last-child {
    font-size: 14px;
    color: #555;
    font-weight: 600;
}

/* Karten */
.rh-mobile-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 0 8px;
}
.rh-mobile-card {
    border-radius: 10px;
    border: 1.5px solid var(--rh-bubble-border);
    background: var(--rh-bubble-bg);
    overflow: hidden;
    transition: border-color var(--rh-anim-duration) ease, transform var(--rh-anim-duration) ease, box-shadow var(--rh-anim-duration) ease;
}
.rh-mobile-card:hover, .rh-mobile-card:focus-within {
    border-color: var(--rh-bubble-hover-border);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(226,0,26,0.14);
}
.rh-mobile-card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 10px;
    text-decoration: none;
    gap: 8px;
}
.rh-card-icon { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }
.rh-card-icon svg { width: 100%; height: 100%; fill: #aaa; stroke: #aaa; }
.rh-card-title { font-size: 12px; font-weight: 700; color: var(--rh-bubble-text); text-align: center; display: block; line-height: 1.3; }
.rh-card-text { font-size: 10px; color: #666; text-align: center; line-height: 1.4; margin: 0; }

/* Akkordeon */
.rh-accordion-item { border-bottom: 1px solid var(--rh-bubble-border); }
.rh-accordion-trigger { width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 8px; background: none; border: none; cursor: pointer; text-align: left; font-size: 13px; font-weight: 600; color: var(--rh-hub-text); transition: color var(--rh-anim-duration) ease; }
.rh-accordion-trigger:hover, .rh-accordion-trigger[aria-expanded="true"] { color: var(--rh-icon-hover); }
.rh-acc-icon { width: 26px; height: 26px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.rh-acc-icon svg { width: 100%; height: 100%; fill: currentColor; stroke: currentColor; }
.rh-acc-title { flex: 1; }
.rh-acc-chevron { font-size: 10px; transition: transform var(--rh-anim-duration) ease; flex-shrink: 0; }
.rh-accordion-trigger[aria-expanded="true"] .rh-acc-chevron { transform: rotate(180deg); }
.rh-accordion-body { padding: 0 8px 14px 44px; font-size: 13px; color: #555; line-height: 1.6; }
.rh-accordion-body[hidden] { display: none; }

/* Liste */
.rh-mobile-list { list-style: none; margin: 0; padding: 0; }
.rh-mobile-list-item a { display: flex; align-items: flex-start; gap: 12px; padding: 13px 8px; text-decoration: none; border-bottom: 1px solid var(--rh-bubble-border); transition: background var(--rh-anim-duration) ease; }
.rh-mobile-list-item a:hover { background: #f9f9f9; }
.rh-list-icon { width: 28px; height: 28px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.rh-list-icon svg { width: 100%; height: 100%; fill: #aaa; stroke: #aaa; }
.rh-list-title { display: block; font-size: 13px; font-weight: 700; color: var(--rh-hub-text); line-height: 1.3; }
.rh-list-text { display: block; font-size: 11px; color: #666; line-height: 1.4; margin-top: 3px; }

.rh-mobile-cta { margin-top: 10px; display: inline-block; background: var(--rh-hub-border); color: #fff !important; border: none; padding: 7px 14px; border-radius: 4px; font-size: 12px; cursor: pointer; text-decoration: none; transition: opacity var(--rh-anim-duration) ease; }
.rh-mobile-cta:hover { opacity: 0.85; }

/* Modal */
.rh-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.48); z-index: 99999; display: flex; justify-content: center; align-items: center; padding: 20px; box-sizing: border-box; backdrop-filter: blur(3px); opacity: 0; transition: opacity 220ms ease; }
.rh-modal-overlay:not([hidden]) { opacity: 1; }
.rh-modal-overlay[hidden] { display: none; }
.rh-modal-container { background: #fff; border-radius: 14px; max-width: 680px; width: 100%; max-height: 85vh; overflow-y: auto; position: relative; padding: 32px; box-shadow: 0 24px 64px rgba(0,0,0,0.18); transform: scale(0.94); transition: transform 220ms ease; }
.rh-modal-overlay:not([hidden]) .rh-modal-container { transform: scale(1); }
.rh-modal-close { position: absolute; top: 14px; right: 14px; background: none; border: none; font-size: 26px; cursor: pointer; color: #888; line-height: 1; padding: 4px 8px; border-radius: 4px; transition: background 150ms ease, color 150ms ease; }
.rh-modal-close:hover { background: #f0f0f0; color: #333; }
.rh-modal-title { margin: 0 0 16px; font-size: 22px; font-weight: 700; color: #222; padding-right: 40px; }
.rh-modal-body { font-size: 15px; line-height: 1.7; color: #444; }
.rh-modal-body p:first-child { margin-top: 0; }

/* Fehler */
.radial-hub-error { padding: 12px 16px; background: #fff3cd; border: 1px solid #ffc107; border-radius: 4px; color: #856404; font-size: 14px; }
