/* ==========================================================================
   01 – NORMENHIERARCHIE (Pyramide & Level-Farben)
   Seitenspezifisch – benötigt NkomVG_Style.css als Basis
   ========================================================================== */

/* --- Header-Anpassungen für Seite 01 --- */
header {
  text-align: left;
  padding: 2rem 1.25rem 1.75rem;
}

header::before {
  content: '§';
  position: absolute;
  right: -20px; top: -30px;
  font-size: 12rem;
  font-weight: 900;
  font-style: italic;
  opacity: 0.06;
  color: var(--grashalm);
  pointer-events: none;
}

header::after {
  /* Override: Gradient-Linie entfernen, stattdessen .header-accent */
  display: none;
}

.header-tag {
  transform: skewX(-12deg);
  border-radius: 0;
}

.header-tag span {
  display: inline-block;
  transform: skewX(12deg);
}

.header-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--klee), var(--grashalm), var(--sonne));
}

.niedersachsen-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  background: rgba(138,189,36,0.2);
  border: 1px solid rgba(138,189,36,0.4);
  color: var(--grashalm);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* --- Body-Anpassung --- */
body { line-height: 1.3; }

.intro .tap-hint {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--klee);
  font-weight: 700;
}

/* --- Pyramiden-Level-Farben --- */
:root {
  --level-1: #C4705A;
  --level-2: #6B8EC2;
  --level-3: #5D5D7A;
  --level-4: #9A8574;
  --level-5: #5A8BAE;
  --level-6: #5C9AB5;
  --level-7: #6A9E7A;
  --level-8: #8EA36E;
  --level-9: #B8C468;
}

/* --- Main Layout --- */
.main-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.pyramid-column {
  flex: 0 0 380px;
  position: sticky;
  top: 1rem;
}

.pyramid-wrapper {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--sand-dark);
}

.pyramid-title {
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 0.25rem;
  color: var(--tanne);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pyramid-subtitle {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: #888;
  text-align: center;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pyramid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

/* Pyramiden-Stufen */
.pyramid-level {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 10px;
  transition: all 0.25s ease;
  position: relative;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  padding: 0.55rem 0.8rem;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
  -webkit-tap-highlight-color: transparent;
  animation: fadeUp 0.4s ease backwards;
}

.pyramid-level:hover {
  transform: scale(1.03);
  filter: brightness(1.08);
  z-index: 2;
}

.pyramid-level:active {
  transform: scale(0.98);
}

.pyramid-level.active {
  border-color: var(--tanne);
  filter: brightness(1.05);
  transform: scale(1.04);
  z-index: 3;
  box-shadow: 0 0 0 3px rgba(0,85,56,0.2);
}

.level-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  width: 19px; height: 19px;
  font-size: 0.62rem;
  margin-right: 0.4rem;
  flex-shrink: 0;
  text-shadow: none;
  font-weight: 700;
}

/* Level-Zuordnung */
.level-1 { width: 34%; min-height: 46px; background: var(--level-1); font-size: 0.64rem; }
.level-2 { width: 36%; min-height: 42px; background: var(--level-2); }
.level-3 { width: 44%; min-height: 42px; background: var(--level-3); }
.level-4 { width: 52%; min-height: 42px; background: var(--level-4); }
.level-5 { width: 60%; min-height: 42px; background: var(--level-5); }
.level-6 { width: 68%; min-height: 42px; background: var(--level-6); }
.level-7 { width: 76%; min-height: 42px; background: var(--level-7); }
.level-8 { width: 86%; min-height: 42px; background: var(--level-8); }
.level-9 { width: 96%; min-height: 46px; background: var(--level-9); color: #2a3a10; text-shadow: none; }
.level-9 .level-num { background: rgba(0,0,0,0.12); color: #2a3a10; }

/* Animation-Delays */
.level-1 { animation-delay: 0.05s; }
.level-2 { animation-delay: 0.1s; }
.level-3 { animation-delay: 0.15s; }
.level-4 { animation-delay: 0.2s; }
.level-5 { animation-delay: 0.25s; }
.level-6 { animation-delay: 0.3s; }
.level-7 { animation-delay: 0.35s; }
.level-8 { animation-delay: 0.4s; }
.level-9 { animation-delay: 0.45s; }

/* Separator */
.level-separator {
  width: 70%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.2rem 0;
}

.sep-line {
  flex: 1;
  height: 1px;
  background: var(--klee);
  opacity: 0.3;
}

.sep-label {
  font-size: 0.55rem;
  color: var(--klee);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Legend */
.pyramid-legend {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.legend-dot {
  width: 10px; height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.hint-text {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.72rem;
  color: var(--klee);
  font-weight: 700;
}

/* Arrow-Chain (Kette in Info-Panel) */
.arrow-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin: 0.75rem 0;
  font-size: 0.8rem;
  font-weight: 700;
}

.chain-item {
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
}

.chain-arrow {
  color: var(--klee);
  font-weight: 400;
}

/* Principle-Card Variante (statt .principle) */
.principle-banner {
  max-width: 700px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}

.principle-card {
  background: var(--tanne);
  color: var(--sand);
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.principle-card::before {
  content: '§';
  position: absolute;
  right: -10px; top: -20px;
  font-size: 7rem;
  font-weight: 900;
  opacity: 0.08;
  color: var(--grashalm);
}

.principle-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--sonne);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.principle-card p {
  font-size: 0.9rem;
  line-height: 1.55;
  opacity: 0.9;
}

/* --- Callout-Farben spezifisch für Level-Farben --- */
.callout.level-red    { background: rgba(196,112,90,0.08);  border-left-color: var(--level-1); }
.callout.level-blue   { background: rgba(90,139,174,0.08);  border-left-color: var(--level-5); }
.callout.level-green  { background: rgba(184,196,104,0.12); border-left-color: var(--level-9); }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .main-container {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 0 0.75rem 2.5rem;
  }

  .pyramid-column {
    position: static;
    flex: none;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .pyramid-wrapper {
    padding: 1.25rem 0.75rem 1rem;
    border-radius: 10px;
  }

  .pyramid-title { font-size: 0.9rem; }
  .pyramid-subtitle { font-size: 0.65rem; margin-bottom: 1rem; }
  .pyramid { gap: 3px; }

  .pyramid-level {
    font-size: 0.65rem;
    padding: 0.4rem 0.55rem;
    min-height: 38px !important;
    border-radius: 8px;
  }

  .level-1 { width: 36%; min-height: 40px !important; }
  .level-2 { width: 43%; }
  .level-3 { width: 50%; }
  .level-4 { width: 57%; }
  .level-5 { width: 64%; }
  .level-6 { width: 72%; }
  .level-7 { width: 80%; }
  .level-8 { width: 89%; }
  .level-9 { width: 98%; }

  .level-num { width: 16px; height: 16px; font-size: 0.58rem; margin-right: 0.25rem; }
  .level-separator { width: 82%; }
  .sep-label { font-size: 0.5rem; }

  .arrow-chain { font-size: 0.72rem; gap: 0.25rem; }
  .chain-item { padding: 0.2rem 0.4rem; }

  .principle-banner { padding: 0 0.6rem; margin-bottom: 1.5rem; }
  .principle-card { padding: 1.25rem 1.15rem; border-radius: 10px; }
  .principle-card h3 { font-size: 0.88rem; }
  .principle-card p { font-size: 0.84rem; }
}

@media (max-width: 370px) {
  .pyramid-level {
    font-size: 0.58rem;
    padding: 0.35rem 0.45rem;
    min-height: 34px !important;
  }

  .level-1 { min-height: 36px !important; width: 40%; }
  .level-num { width: 14px; height: 14px; font-size: 0.52rem; margin-right: 0.2rem; }
}
