/* ==========================================================================
   04 – AUFGABEN DER KOMMUNE
   Seitenspezifisch – benötigt NkomVG_Style.css als Basis
   ========================================================================== */

:root {
  --blue-eigen: #1A5276;
  --green-fsv: #27AE60;
  --green-fsv-dark: #1E8449;
  --orange-psv: #D35400;
  --orange-psv-dark: #A04000;
  --purple-uebertragen: #6C3483;
  --purple-light: #8E44AD;
}

/* --- Body --- */
body { line-height: 1.65; }

/* --- Header --- */
header { text-align: center; }

/* --- Textbalken-Wrapper (lokaler Override) --- */
.textbalken {
  background: var(--klee);
  margin-bottom: 0.4rem;
}

.textbalken h2 {
  font-size: clamp(1.1rem, 3.5vw, 1.6rem);
}

/* --- Node-Varianten (Aufgaben) --- */
.n-kommune     { background: var(--tanne); color: var(--sand); min-width: 220px; }
.n-eigen       { background: var(--blue-eigen); color: white; min-width: 170px; border: 2px solid rgba(41,128,185,0.3); }
.n-uebertragen { background: var(--purple-uebertragen); color: white; min-width: 170px; border: 2px solid rgba(142,68,173,0.3); }
.n-fsv         { background: var(--green-fsv); color: white; min-width: 120px; }
.n-psv         { background: var(--orange-psv); color: white; min-width: 120px; }
.n-auftrag     { background: var(--purple-light); color: white; min-width: 140px; }

.node-ttl {
  text-transform: uppercase;
}

.aufsicht-tag {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.12rem 0.5rem;
  border-radius: 10px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.9);
}
.aufsicht-tag.fach { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.35); }

/* --- Callout Farbvarianten (Aufgaben) --- */
.callout.blue   { background: rgba(26,82,118,0.05);  border-left-color: var(--blue-eigen); }
.callout.green  { background: rgba(39,174,96,0.06);  border-left-color: var(--green-fsv); }
.callout.orange { background: rgba(211,84,0,0.05);   border-left-color: var(--orange-psv); }
.callout.purple { background: rgba(108,52,131,0.05);  border-left-color: var(--purple-uebertragen); }

/* --- Example Tags --- */
.ex-grid { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.ex-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1.4;
}
.ex-tag.green  { background: rgba(39,174,96,0.1);  color: var(--green-fsv-dark); border: 1px solid rgba(39,174,96,0.2); }
.ex-tag.orange { background: rgba(211,84,0,0.1);   color: var(--orange-psv);     border: 1px solid rgba(211,84,0,0.2); }
.ex-tag.purple { background: rgba(108,52,131,0.1); color: var(--purple-uebertragen); border: 1px solid rgba(108,52,131,0.2); }

/* --- OB-WIE Table --- */
.ow-table    { width: 100%; border-collapse: collapse; margin: 0.7rem 0; font-size: 0.82rem; }
.ow-table th { text-align: center; font-weight: 700; padding: 0.45rem 0.5rem; background: var(--sand); border-bottom: 2px solid var(--sand-dark); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; }
.ow-table td { padding: 0.5rem; border-bottom: 1px solid var(--sand-dark); text-align: center; vertical-align: middle; }
.ow-table td:first-child { text-align: left; font-weight: 700; font-size: 0.78rem; }
.ow-check  { font-size: 1rem; }
.ow-free   { color: var(--green-fsv); }
.ow-pflicht { color: var(--red-signal); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0.5rem -0.5rem; padding: 0 0.5rem; }

/* --- Comparison Table --- */
.comp-card {
  background: white;
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--sand-dark);
  max-width: 800px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.comp-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; min-width: 480px; }
.comp-table thead th {
  padding: 0.6rem 0.5rem;
  text-align: left;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  border-bottom: 3px solid var(--sand-dark);
  position: sticky;
  top: 0;
  background: white;
}
.comp-table thead th:first-child { width: 22%; }
.comp-table tbody td { padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--sand-dark); vertical-align: top; font-size: 0.82rem; }
.comp-table tbody tr:last-child td { border-bottom: none; }
.col-fsv  { color: var(--green-fsv); }
.col-psv  { color: var(--orange-psv); }
.col-auf  { color: var(--purple-uebertragen); }
.comp-head { font-weight: 700; font-size: 0.78rem; }

/* --- Aufsicht Cards --- */
.aufsicht-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.2rem 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--sand-dark);
}
.aufsicht-card h4 { font-size: 0.88rem; margin-bottom: 0.5rem; line-height: 1.4; }
.aufsicht-card p  { font-size: 0.9rem; line-height: 1.65; }

/* --- Layout für Organigramm --- */
@media (min-width: 800px) {
  .organi-col { flex: 0 0 480px; position: sticky; top: 1rem; max-width: none; margin: 0; }
}

.organi-col { max-width: 520px; margin: 0 auto; }

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
  .comp-card { padding: 0.7rem; }
  .org-card { padding: 1.2rem 0.7rem 0.8rem; }
  .aufsicht-card { padding: 1rem 0.85rem; }
  .ow-table th, .ow-table td { padding: 0.35rem 0.3rem; font-size: 0.72rem; }
  .ow-table td:first-child { font-size: 0.7rem; }
}

@media (max-width: 520px) {
  .row-dual { gap: 0.5rem; flex-direction: column; align-items: center; }
  .node { padding: 0.5rem 0.8rem; min-width: 180px !important; max-width: 100% !important; }
  .node-ttl { font-size: 0.82rem; }
}

@media (max-width: 800px) {
  .info-panel { scroll-margin-top: 0.5rem; }
}
