* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


body {
	margin: 0; 
	padding: 0; 
	overflow: hidden;
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", "Apple Color Emoji", "Segoe UI Emoji";
	font-size: 14px;
	background-color: #2c3e50;
}
#canvas-container { 
	width: 100vw; 
	height: 100vh; 
	display: block; 
	background: transparent;
	}
	
#overlay { 
	position: fixed; 
	top:0;
	left:0;
	width: 100vw; 
	height: 100vh; 
	display: block; 
	background-color: rgba(250, 250, 250, 0.5);
	}

#ui-panel {
	position: absolute; 
	top: 20px; 
	left: 20px;
	background: rgba(255, 255, 255, 0.95);
	padding: 20px; 
	border-radius: 8px;
	box-shadow: 0 4px 15px rgba(250,250,250,0.45); 
	z-index: 10;
	max-width: 30vw;	
	max-height: 80vh; 
	overflow-y: auto;
}
 
#ui-container {
	position: absolute; 
	top: 20px; 
	left: 20px;
	background: rgba(255, 255, 255, 0.95);
	padding: 20px; 
	border-radius: 8px;
	box-shadow: 0 4px 15px rgba(250,250,250,0.45); 
	z-index: 10;
	max-width: 60vw;	
	max-height: 80vh; 
	overflow-y: auto;
}

#ui-container p{
	margin-bottom: 12px;
	margin-top: 12px;
}

.hinweis{
	font-size: 13px; 
	color: #7f8c8d; 
	margin-top: 10px; 
	margin-bottom: 0;
}

.cell-link {
	font-weight: bold;
	margin-bottom: 1em; 
	margin-left: 1em;
}

#object-info {
	position: absolute; 
	bottom: 20px; 
	right: 20px;
	border-radius: 8px;
	box-shadow: 0 4px 15px rgba(250,250,250,0.45); z-index: 10;
	max-width: 40vw; 
	max-height: 40vh; 
	overflow-y: auto;
	margin-top: 15px; 
	padding: 10px; 
	background: #eef2f7; 
	display: none;
}

#obj-title{
	style="color: #333366;
	font-size: 16px;
}

#obj-description{
	font-size: 14px; 
	margin: 5px 0 0 0; 
	color: #333;
	line-height: 1.6;
}

h1 { 
	margin: 0 0 5px 0; 
	font-size: 22px; 
	color: #0ea87c; 
}

h2 { margin: 0 0 15px 0; 
	font-size: 14px; 
	color: #0b875c;
	font-weight: normal; 
}

.btn-group { 
	display: flex; 
	flex-direction: column; 
	gap: 8px; 
	margin-top: 12px;
	
}

.subtitle {
	font-weight: 500;
}

button {
	background: #0ea87c; color: white; border: none;
	padding: 10px 15px; border-radius: 4px; cursor: pointer;
	font-weight: bold; transition: background 0.2s;
}
button:hover { 
	background: #26937b; 
}

#compass-container {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 100px;
	height: 100px;
	z-index: 10;
	background: rgba(255, 255, 255, 0.95);
	padding: 0px; 
	border-radius: 50%;
	box-shadow: 0 4px 15px rgba(250,250,250,0.45); 
	pointer-events: none; /* Klicks durchlassen, damit OrbitControls nicht blockiert wird */
}
#lese-container {
	display: block;
	position: absolute;
	top: 20px;
	right: 140px;
	width: 60px;
	height: 60px;	
	z-index: 10;
	padding: 0px; 
	background-image: url("../pics/lesen.png"); 
	background-repeat: no-repeat;
	box-shadow: 0 4px 15px rgba(250,250,250,0.45); 
	background-size: contain;
}
#tooltip {
	position: absolute;
	z-index: 100;
	padding: 6px 10px;
	background: rgba(0, 0, 0, 0.85);
	color: white;
	font-size: 13px;
	font-weight: bold;
	border-radius: 4px;
	pointer-events: none; /* Verhindert, dass der Tooltip das Raycasting blockiert */
	display: none;
	transform: translate(-50%, -130%); /* Zentriert den Tooltip über dem Mauszeiger */
	white-space: nowrap;
}

.intro-text {
	line-height: 1.6;
}

.intro-text p{
	margin-top: 6px;
	margin-bottom: 6px;
}
	

#info-toast {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(44, 62, 80, 0.9);
	color: white;
	padding: 10px 20px;
	border-radius: 20px;
	font-size: 14px;
	pointer-events: none;
	display: none;
	z-index: 10;
}

#rotate-warning {

	display: none;
	font-weight: bold;
}

/* Nur Smartphones im Hochformat */
@media (orientation: portrait) {

	#rotate-warning {

		display: block;

	}
}

@media (max-height: 768px) {

	#object-info {
		left: 0;
		right: 0;
		bottom: 0;
		border-radius: 16px 16px 0 0;
		max-height: 35vh;
		max-width: 95vw;
		margin-top: 5px; 
		padding: 5px; 
		width: auto;
	}
	
	#obj-title{
		font-size: 14px;
	}

	#obj-description{
		font-size: 13px; 
		line-height: normal;
	}
	
	#ui-panel {
		top: 10px;
		left: 10px;
		right: 10px;
		max-height: 22vh;
		padding: 3px;
		font-size: 12px;
		opacity: 0.92;
	}

	h1 {
		font-size: 16px;
	}

	h2 {
		font-size: 13px;
		margin-bottom: 8px;
	}

	button {
		padding: 8px;
		font-size: 12px;
	}

	.hinweis {
		font-size: 10px;
	}
	
	#compass-container {
		width: 70px;
		height: 70px;
		top: 0px;
		right: 0px;
	}
	
	#lese-container {
		top: 0px;
		right: 75px;	
	}

}

/* ==========================================================================
   LOGBUCH / INSIGHTS ERWEITERUNG
   ========================================================================== */

/* Spezifischer Body-Typ für die Textseite, damit das 3D-Canvas unberührt bleibt */
body.logbuch-body {
    overflow-y: auto !important;
    overflow-x: hidden;
    background-color: #f6f8fa;
    color: #0b875c;
    line-height: 1.7;
	scroll-behavior: smooth; /* Sorgt für weiches Scrollen beim Sprung */
    scroll-margin-top: 40px;  /* Verhindert, dass die Überschrift ganz oben klebt */
}

/* Zentrierter Textcontainer im modernen Magazin-Layout */
.insight-container {
    max-width: 850px;
    margin: 60px auto;
    padding: 0 20px;
}

/* Titel-Styling */
.insight-container h1 {
    font-size: 36px;
    color: #0b875c; /* Deine bestehende Corporate Color */
    font-weight: 800;
    margin-bottom: 40px;
    border-bottom: 3px solid #0b875c;
    padding-bottom: 15px;
}

.insight-section {
    margin-bottom: 50px;
}

.insight-container h2 {
    font-size: 24px;
    color: #0b875c;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 20px;
}

.insight-container h3 {
    font-size: 20px;
    color: #0b875c;
    margin-bottom: 15px;
}

/* Optimierte Typografie für längere Texte */
.insighttext {
    font-size: 16px;
    color: #4a5568;
    margin-bottom: 20px;
    text-align: justify;
}

/* Interaktive Parzellen-Links im Text */

.parzellen-accordion{
	margin-top: 6px;
}
	
.parzelle-inline-link {
    color: #0b875c;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px dashed #0b875c;
    transition: all 0.2s ease;
}

.parzelle-inline-link:hover {
    color: #26937b; 
    border-bottom-color: #2575fc;
    background-color: rgba(37, 117, 252, 0.05);
}

/* Styling für die Parzellen-Überschriften */
.parzelle-header-link {
    color: #0b875c;
    text-decoration: none;
    transition: color 0.2s;
}

.parzelle-header-link:hover {
    color: #26937b; 
}

/* Spezielle Card-Hervorhebung für einzelne Parzellenbeschreibungen */
.parzellen-detail-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #0b875c;
    margin-top: 30px;
	scroll-margin-top: 40px;
}

.insight-illustration {
    margin: 35px 0;
    padding: 0;
    width: 100%;
}

.insight-illustration img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

figcaption {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 10px;
    text-align: center;
    font-style: italic;
}

/* Mobile Optimierungen für das Logbuch */
@media (max-width: 768px) {
    .insight-container {
        margin: 30px auto;
    }
    
    .insight-container h1 {
        font-size: 28px;
    }
    
    .insighttext {
        font-size: 15px;
        text-align: left; /* Blocksatz deaktivieren auf Smartphones */
    }
    
    .visual-section {
        padding: 20px;
        box-shadow: inset 0 0 0 2000px rgba(255, 255, 255, 0.95);
    }
}

/* Styling für die optischen Textbrecher (Key Facts) */
.fact-badge-container {
    gap: 10px;
    margin: 20px 0 25px 0;
}

.fact-badge {
    background-color: #f0f4f8;
    color: #333366;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    border-left: 3px solid #333366;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* Besondere Hervorhebung für Nachhaltigkeits-Erfolge */
.fact-badge.highlight-badge {
    background-color: #d6f7dd;
    color: #0b875c;
    border-left-color: #0b875c;
}

/* Mobil-Optimierung */
@media (max-width: 600px) {
    .fact-badge-container {
        flex-direction: column;
        gap: 8px;
    }
    .fact-badge {
        border-left: 4px solid #333366;
    }
}

.intro-teaser {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.6;
    color: #2d3748; /* Etwas dunkler als normaler Fließtext für bessere Lesbarkeit */
    margin-bottom: 20px;
    padding-left: 16px;
    border-left: 4px solid #0b875c; /* Subtiler Farbakzent am linken Rand */
    background-color: rgba(11, 135, 92, 0.03); /* Ganz zarter Hintergrund */
    padding-top: 10px;
    padding-bottom: 10px;
    padding-right: 15px;
    border-radius: 0 6px 6px 0;
}

/* Mobile Anpassung für kleine Bildschirme */
@media (max-width: 768px) {
    .intro-teaser {
        font-size: 16px;
        padding-left: 12px;
        margin-bottom: 15px;
    }
}

.app-container {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 1400px;
  height: 720px;
  background-color: #0d192b;
  border: 1px solid #1e2d42;
  border-radius: 12px;
  padding: 15px;
  gap: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Linke Filter-Sidebar */
.sidebar {
  width: 160px;
  background-color: #122035;
  border: 1px solid #1e314b;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar h2 {
  font-size: 1.1rem;
  color: #ffffff;
  margin-bottom: 5px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #b0c4de;
}

.filter-item input[type="radio"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid #3a506b;
  border-radius: 50%;
  outline: none;
  cursor: pointer;
  position: relative;
}

.filter-item input[type="radio"]:checked {
  border-color: #d6f7dd;
}

.filter-item input[type="radio"]:checked::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 6px;
  height: 6px;
  background-color: #d6f7dd;
  border-radius: 50%;
}

.color-badge {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
}

.divider {
  height: 1px;
  background-color: #1e314b;
  margin: 5px 0;
}

.metric-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 0.75rem;
  color: #8da4c4;
}

.metric-value {
  font-size: 1.1rem;
  font-weight: bold;
  color: #d6f7dd;
}

/* Rechter Visualisierungs-Bereich */
.visualization-container {
  flex: 1;
  background-color: #09121f;
  border: 1px solid #1a2a40;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

svg {
  width: 100%;
  height: 100%;
}

/* Styling der Knoten/Parzellen */
.node rect {
  rx: 8px;
  ry: 8px;
  stroke-width: 2px;
  transition: all 0.3s ease;
}

.node-default rect {
  fill: #101e33;
  stroke: #d6f7dd;
}

.node-external rect {
  fill: #172a45;
  stroke: #5c7899;
  stroke-dasharray: 4 4;
}

.node-title {
  font-size: 12px;
  font-weight: bold;
  fill: #ffffff;
  text-anchor: middle;
  dominant-baseline: central;
}

.node-subtext {
  font-size: 9px;
  fill: #8da4c4;
  text-anchor: middle;
}

/* Styling der Verbindungs-Pfeile */
.flow-path {
  fill: none;
  stroke-linecap: round;
  opacity: 0.85;
  transition: opacity 0.3s ease, stroke-width 0.3s ease;
  cursor: pointer;
}

.flow-path:hover {
  opacity: 1;
  stroke-width: 5px !important;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
}

	/* Tooltip */
.tooltipi {
  position: fixed !important;
  padding: 10px 14px;
  background: rgba(13, 25, 43, 0.95);
  border: 1px solid #d6f7dd;
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
  pointer-events: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
  z-index: 99999;
  line-height: 1.4;
}

/* Sortierbare Tabellenköpfe */
.flow-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.flow-table th.sortable:hover {
  background-color: #1a2a40;
  color: #ffffff;
}

.flow-table th .sort-icon {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.75rem;
  color: #d6f7dd;
}


.node-html-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3px 4px;
  box-sizing: border-box;
  pointer-events: none;
  user-select: none;
}

.node-html-content .node-title {
  font-size: 11px;
  font-weight: bold;
  color: #ffffff;
  line-height: 1.1;
}

.node-html-content .node-subtext {
  font-size: 8.5px;
  color: #8da4c4;
  line-height: 1.15;
  margin-top: 2px;

  /* Native deutsche Silbentrennung */
  hyphens: auto;
  -webkit-hyphens: auto;
  word-break: break-word;
  overflow-wrap: break-word;
}

.seo-fallback {
	display: none;
}

/* View Toggle Buttons */
.view-toggle-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toggle-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toggle-btn {
  background: #101e33;
  color: #8da4c4;
  border: 1px solid #1e314b;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  transition: all 0.2s ease;
}

.toggle-btn:hover {
  background: #172a45;
  color: #ffffff;
}

.toggle-btn.active {
  background: #d6f7dd;
  color: #0d192b;
  border-color: #d6f7dd;
}

/* Chord Diagramm Styling */
.chord-group path {
  transition: opacity 0.2s ease;
}

.chord-ribbon {
  fill-opacity: 0.65;
  transition: fill-opacity 0.2s ease;
  cursor: pointer;
}

.chord-ribbon:hover {
  fill-opacity: 0.95;
}

.chord-label {
  font-size: 11px;
  font-weight: bold;
  fill: #ffffff;
}

/* Tabellen-Ansicht */
.table-container {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 10px;
}

.flow-table {
  width: 100%;
  border-collapse: collapse;
  color: #e2e8f0;
  font-size: 0.85rem;
}

.flow-table th {
  position: sticky;
  top: 0;
  background-color: #122035;
  color: #d6f7dd;
  padding: 10px;
  text-align: left;
  border-bottom: 2px solid #1e314b;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.flow-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #1a2a40;
}

.flow-table tbody tr:hover {
  background-color: #101e33;
}

.type-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  color: #fff;
  text-transform: capitalize;
}

#landing {
	background-image: url("../pics/landing.png"); 
	background-repeat: no-repeat;
	background-size: cover;
}

.fest {
	font-size: 0.75em;
    position: absolute; 
	bottom: 20px; 
	right: 20px;
	background: rgba(0, 0, 0, 0.2);
	color: rgba(255, 255, 255, 0.95);
	border-radius: 8px;
	padding: 10px; 
}

.fest a{
	color: rgba(255, 255, 255, 0.95);

}