/* ============================================================
   NOETISCHE WESEN · GEDANKENPFADE · PHASE 3.2
   Bereinigte Gestaltung mit unabhängiger Auswahl/Vorschau.
   Alle Regeln gelten ausschließlich innerhalb des Gedankenfelds.
   ============================================================ */

/* 01. Grundbereich und Typografie */
#nw-thought-field {
    padding: clamp(65px, 9vw, 120px) 20px;
    background: radial-gradient(ellipse at 50% 40%, #11253b 0%, #060d19 60%, #030710 100%);
    color: #dcecf5;
}

#nw-thought-field .nw-tf-inner {
    max-width: 1120px;
    margin: auto;
}

#nw-thought-field .nw-tf-kicker {
    font-size: 11px;
    letter-spacing: 0.24em;
    color: #a4c9df;
    text-transform: uppercase;
}

#nw-thought-field h2 {
    font-weight: 400;
    font-size: clamp(29px, 4vw, 50px);
    line-height: 1.2;
    margin: 15px 0;
}

#nw-thought-field .nw-tf-intro {
    max-width: 680px;
    line-height: 1.8;
    color: #b5c7d4;
}

/* 02. Gedankenfeld und Detailkarte */
#nw-thought-field .nw-tf-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
    gap: 24px;
    margin-top: 30px;
    align-items: stretch;
}

#nw-thought-field .nw-tf-map {
    position: relative;
    min-height: 470px;
    border: 1px solid #779bb83d;
    border-radius: 22px;
    background: radial-gradient(circle at 50% 48%, #17314a70, transparent 58%), #060e1b;
    overflow: hidden;
}

/* 03. Verbindungslinien: normal, ausgewählt, Vorschau */
#nw-thought-field .nw-tf-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#nw-thought-field .nw-tf-line {
    stroke: #8cc5e3;
    stroke-width: 0.3;
    opacity: 0.38;
    animation: nw-tf-line-pulse 5s ease-in-out infinite;
    transition: stroke 0.3s, stroke-width 0.3s;
}

/* Aktive Linien bleiben sichtbar, auch während einer Vorschau. */
#nw-thought-field .nw-tf-line.is-active {
    stroke: #e9bf86;
    stroke-width: 0.65;
    animation: nw-tf-active-pulse 2.8s ease-in-out infinite;
}

/* Vorschau ohne Auswahl: kühles, helles Blau. */
#nw-thought-field .nw-tf-line.is-preview:not(.is-active) {
    stroke: #c1edff;
    stroke-width: 0.6;
    animation: nw-tf-preview-pulse 2.8s ease-in-out infinite;
}

/* Auswahl und Vorschau gleichzeitig: goldene Linie bleibt erhalten. */
#nw-thought-field .nw-tf-line.is-active.is-preview {
    stroke: #ffe0a9;
    stroke-width: 0.75;
}

/* 04. Anklickbare Gedankenpunkte */
#nw-thought-field .nw-tf-node {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 7px;
    border: 0;
    background: none;
    color: #d7e7f2;
    font: inherit;
    font-size: 12px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    cursor: pointer;
    z-index: 1;
    transition: opacity 0.3s;
}

#nw-thought-field .nw-tf-node.is-dimmed {
    opacity: 0.48;
}

#nw-thought-field .nw-tf-node.is-related,
#nw-thought-field .nw-tf-node[aria-pressed="true"] {
    opacity: 1;
}

#nw-thought-field .nw-tf-dot {
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #a8ddf5;
    animation: nw-tf-breathe 3.8s ease-in-out infinite;
    transition: transform 0.3s;
}

#nw-thought-field .nw-tf-node[data-group="nera"] .nw-tf-dot {
    background: #f1c58f;
    animation: nw-tf-breathe-gold 4.5s ease-in-out infinite;
}

#nw-thought-field .nw-tf-node:hover .nw-tf-dot,
#nw-thought-field .nw-tf-node[aria-pressed="true"] .nw-tf-dot {
    transform: scale(1.6);
}

#nw-thought-field .nw-tf-node:focus-visible {
    outline: 2px solid #e9bf86;
    outline-offset: 2px;
    border-radius: 8px;
}

/* 05. Textkarte */
#nw-thought-field .nw-tf-detail {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 280px;
    padding: clamp(22px, 3vw, 36px);
    border: 1px solid #779bb83d;
    border-radius: 22px;
    background: #091523;
}

#nw-thought-field .nw-tf-source {
    font-size: 11px;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    color: #b9a17f;
}

#nw-thought-field .nw-tf-detail h3 {
    font-weight: 400;
    font-size: 30px;
    margin: 12px 0;
}

#nw-thought-field .nw-tf-quote {
    font-size: 17px;
    line-height: 1.7;
    color: #dce7ed;
}

#nw-thought-field .nw-tf-hint {
    font-size: 12px;
    color: #9eb2c2;
    margin-top: 16px;
}

/* 06. Ruhige Lichtanimationen */
@keyframes nw-tf-breathe {
    0%, 100% {
        opacity: 0.65;
        box-shadow: 0 0 0 5px rgba(135, 200, 230, 0.08),
                    0 0 10px rgba(139, 205, 235, 0.35);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 0 11px rgba(135, 200, 230, 0.18),
                    0 0 28px rgba(139, 205, 235, 0.85);
    }
}

@keyframes nw-tf-breathe-gold {
    0%, 100% {
        opacity: 0.65;
        box-shadow: 0 0 0 5px rgba(233, 191, 134, 0.08),
                    0 0 10px rgba(233, 191, 134, 0.35);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 0 11px rgba(233, 191, 134, 0.18),
                    0 0 28px rgba(233, 191, 134, 0.85);
    }
}

@keyframes nw-tf-line-pulse {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.70; }
}

@keyframes nw-tf-active-pulse {
    0%, 100% { opacity: 0.65; }
    50% { opacity: 1; }
}

@keyframes nw-tf-preview-pulse {
    0%, 100% { opacity: 0.75; }
    50% { opacity: 1; }
}

/* 07. Schmale Bildschirme */
@media (max-width: 760px) {
    #nw-thought-field .nw-tf-layout {
        grid-template-columns: 1fr;
    }

    #nw-thought-field .nw-tf-map {
        min-height: 390px;
    }

    #nw-thought-field .nw-tf-node {
        font-size: 10px;
        padding: 4px;
    }
}

/* 08. Barrierefreiheit */
@media (prefers-reduced-motion: reduce) {
    #nw-thought-field *,
    #nw-thought-field *::before {
        animation: none !important;
        transition: none !important;
    }
}

/* ============================================================
   09. PHASE 3.3 – GEDANKEN WERDEN ZU WEGEN

   Zusätzliche Navigation innerhalb der bestehenden Detailkarte.
   Alle Regeln bleiben auf #nw-thought-field begrenzt.
   ============================================================ */

/* Mehr Platz für Originalzitat und Gedankenwege */
#nw-thought-field .nw-tf-detail {
    justify-content: flex-start;
}

#nw-thought-field .nw-tf-journey {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid rgba(154, 200, 226, 0.20);
}

#nw-thought-field .nw-tf-journey-heading {
    margin: 0 0 14px;
    color: #aacbdf;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

#nw-thought-field .nw-tf-journey-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

#nw-thought-field .nw-tf-journey-button {
    padding: 9px 13px;
    border: 1px solid rgba(147, 201, 232, 0.35);
    border-radius: 999px;
    background: rgba(18, 43, 65, 0.72);
    color: #d6eaf7;
    font: inherit;
    font-size: 12px;
    line-height: 1.3;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s;
}

#nw-thought-field .nw-tf-journey-button[data-group="nera"] {
    border-color: rgba(241, 197, 143, 0.45);
    color: #f0d4b0;
}

#nw-thought-field .nw-tf-journey-button:hover,
#nw-thought-field .nw-tf-journey-button:focus-visible {
    background: rgba(61, 113, 150, 0.38);
    border-color: #c6e9fc;
}

#nw-thought-field .nw-tf-journey-button.is-visited::before {
    content: "✓ ";
    color: #a4d9ed;
}

#nw-thought-field .nw-tf-node.is-visited .nw-tf-dot {
    outline: 1px solid rgba(230, 240, 255, 0.48);
    outline-offset: 5px;
}

#nw-thought-field .nw-tf-journey-note {
    color: #9eb2c2;
    font-size: 12px;
    line-height: 1.6;
}

#nw-thought-field .nw-tf-transition {
    margin-top: 20px;
    padding: 16px 18px;
    border-left: 2px solid rgba(233, 191, 134, 0.65);
    background: rgba(233, 191, 134, 0.055);
}

#nw-thought-field .nw-tf-transition-heading {
    margin: 0 0 9px;
    color: #e6c49b;
    font-size: 11px;
    letter-spacing: 0.05em;
}

#nw-thought-field .nw-tf-transition-text {
    margin: 0;
    color: #c9d7df;
    font-size: 13px;
    line-height: 1.75;
}

#nw-thought-field .nw-tf-transition[hidden],
#nw-thought-field .nw-tf-journey[hidden] {
    display: none;
}

#nw-thought-field .nw-tf-journey-button:focus-visible {
    outline: 2px solid #e9bf86;
    outline-offset: 3px;
}

/* 5.13.15 – Gedanken vertiefen, ursprüngliche Lichtkarte bewahren */
#nw-thought-field .nw-tf-reflection { margin: 1.1rem 0 1.4rem; line-height: 1.8; color: #d5dfeb; font-size: clamp(.92rem, 1.25vw, 1.03rem); }
#nw-thought-field .nw-tf-journey-list { display: grid; gap: .65rem; }
#nw-thought-field .nw-tf-journey-button { text-align: left; white-space: normal; }
#nw-thought-field .nw-tf-journey-reason { display: block; margin-top: .4rem; font-size: .84rem; font-weight: 400; line-height: 1.55; opacity: .83; text-transform: none; letter-spacing: normal; }
#nw-thought-field .nw-tf-link { display: none !important; }


/* ============================================================
   5.13.15a – Drei ausgewogene Bereiche auf Desktop
   Lichtkarte | Reflexion | Verbundene Gedanken
   Überschreibt nur die Gestaltung des Gedankenfeldes.
   ============================================================ */
@media (min-width: 1021px) {
  #nw-thought-field { padding: clamp(30px, 4.2vh, 48px) 18px 24px; }
  #nw-thought-field .nw-tf-inner { max-width: 1560px; width: 100%; }
  #nw-thought-field h2 { font-size: clamp(27px, 2.8vw, 39px); margin: 8px 0; }
  #nw-thought-field .nw-tf-intro { max-width: 1050px; font-size: 13px; line-height: 1.5; margin: 8px 0; }
  #nw-thought-field .nw-tf-layout {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr) minmax(0, .98fr);
    gap: clamp(10px, 1.2vw, 18px);
    margin-top: 17px;
    align-items: stretch;
    height: clamp(360px, calc(100vh - 285px), 550px);
  }
  #nw-thought-field .nw-tf-map { min-height: 0; height: 100%; border-radius: 18px; }
  #nw-thought-field .nw-tf-detail,
  #nw-thought-field .nw-tf-journey {
    min-height: 0; min-width: 0; height: 100%; box-sizing: border-box;
    overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: #49677e transparent;
    border: 1px solid #779bb83d; border-radius: 18px;
    padding: clamp(15px, 1.7vw, 25px);
  }
  #nw-thought-field .nw-tf-detail { justify-content: flex-start; }
  #nw-thought-field .nw-tf-journey { margin-top: 0; padding-top: clamp(15px, 1.7vw, 25px); background: #091523; }
  #nw-thought-field .nw-tf-detail h3 { font-size: clamp(22px, 2.2vw, 28px); margin: 8px 0; }
  #nw-thought-field .nw-tf-quote { font-size: 14px; line-height: 1.5; margin: 6px 0; }
  #nw-thought-field .nw-tf-reflection { font-size: 13px; line-height: 1.65; margin: 12px 0; }
  #nw-thought-field .nw-tf-journey-heading { margin-bottom: 11px; }
  #nw-thought-field .nw-tf-journey-list { gap: 8px; }
  #nw-thought-field .nw-tf-journey-button { width: 100%; border-radius: 12px; padding: 9px 12px; font-size: 12px; }
  #nw-thought-field .nw-tf-journey-reason { font-size: 11.5px; line-height: 1.45; margin-top: 4px; }
  #nw-thought-field .nw-tf-transition { margin-top: 12px; padding: 11px 12px; }
  #nw-thought-field .nw-tf-transition-text { font-size: 12px; line-height: 1.5; }
  #nw-thought-field .nw-tf-hint { margin-top: 10px; font-size: 11px; }
}
/* Bei mittleren Fensterbreiten bleiben Grafik und Text nebeneinander;
   die Verbindungen erhalten darunter eine eigene, gut lesbare Fläche. */
@media (min-width: 761px) and (max-width: 1020px) {
  #nw-thought-field { padding: 45px 16px; }
  #nw-thought-field .nw-tf-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; }
  #nw-thought-field .nw-tf-map { min-height: 370px; }
  #nw-thought-field .nw-tf-detail { padding: 20px; }
  #nw-thought-field .nw-tf-journey {
    grid-column: 1 / -1; margin: 0; padding: 20px;
    border: 1px solid #779bb83d; border-radius: 18px; background: #091523;
  }
  #nw-thought-field .nw-tf-journey-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  #nw-thought-field { padding: 45px 14px; }
  #nw-thought-field .nw-tf-layout { gap: 14px; margin-top: 20px; }
  #nw-thought-field .nw-tf-map { min-height: 340px; }
  #nw-thought-field .nw-tf-detail { padding: 20px; }
  #nw-thought-field .nw-tf-journey {
    margin: 0; padding: 20px; border: 1px solid #779bb83d;
    border-radius: 18px; background: #091523;
  }
}
