/* Layout "tub": angelehnt an das Erscheinungsbild der TU Berlin (Leitfarbe TU-Rot), modern interpretiert.
   Original-Logo und Hausschrift liegen nicht im Repo: Logo per Konfiguration `logo = "..."` einbinden. */
:root {
  --akzent: #c50e1f;
  --akzent-dunkel: #9d0b18;
  --link: #b00d1c;                     /* etwas dunkler als die Leitfarbe: gut lesbar auf Weiß */
  --link-hover: #7f0914;
  --text: #333333;                     /* wie die Webapp (@gray-dark) */
  --text-stark: #333333;
  --leise: #5e5e5e;
  --linie: #e4e4e4;
  --linie-stark: #d0d0d0;
  --flaeche: #f2f2f2;
  --hintergrund: #f7f7f7;
  --karte: #ffffff;
  --fuss-bg: #2d2d2d;
  --fuss-text: #e8e8e8;
  --fokus: #c50e1f;
  --radius: 6px;
  --radius-klein: 4px;
  --tint: color-mix(in srgb, var(--akzent) 7%, var(--karte));
}

/* Kopf */
.tub-kopf { background: var(--karte); border-top: 4px solid var(--akzent); }
.tub-kopf-innen { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding-top: 18px; padding-bottom: 14px; }
.tub-marke { text-decoration: none; color: var(--text-stark); }
.tub-marke img { height: 68px; width: auto; display: block; margin: -6px 0 -6px -8px; }
.tub-wortmarke { display: inline-flex; align-items: center; gap: 12px; font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.tub-balken { display: inline-block; width: 8px; height: 36px; background: var(--akzent); border-radius: 1px; }
.tub-portal { font-size: .95rem; color: var(--leise); font-weight: normal; margin-left: auto; }
.tub-sprache { order: 2; font-size: .9rem; color: var(--text); text-decoration: none; padding: 6px 12px; border: 1px solid var(--linie-stark); border-radius: var(--radius-klein); white-space: nowrap; }
.tub-sprache:hover { border-color: var(--akzent); color: var(--link); }
.tub-login { order: 2; font-size: .9rem; font-weight: 600; color: var(--akzent-text); background: var(--akzent); text-decoration: none; padding: 6px 14px; border: 1px solid var(--akzent); border-radius: var(--radius-klein); white-space: nowrap; }
.tub-login:hover { background: var(--akzent-dunkel); color: var(--akzent-text); }
.tub-nav { background: var(--karte); border-bottom: 1px solid var(--linie); }
.tub-nav .wrap { display: flex; gap: 0 28px; }
.tub-nav a { position: relative; color: var(--text); text-decoration: none; padding: 12px 0 13px; font-weight: normal; font-size: .95rem; white-space: nowrap; }
.tub-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: transparent; border-radius: 3px 3px 0 0; }
.tub-nav a:hover { color: var(--link); }
.tub-nav a:hover::after { background: var(--linie-stark); }
.tub-nav a.aktiv { color: var(--link); }
.tub-nav a.aktiv::after { background: var(--akzent); }

/* Brotkrumen */
.tub-krumen { font-size: .85rem; color: var(--leise); padding: 18px 0 0; }
.tub-krumen a { color: var(--leise); text-decoration: none; }
.tub-krumen a:hover { color: var(--link); text-decoration: underline; }
.tub-krumen span[aria-hidden] { display: inline-block; margin: 0 .35em; opacity: .55; }
.tub-krumen nav > span:last-child { color: var(--text); font-weight: normal; }

/* Überschriften mit TU-Akzent */
main h1::after { content: ""; display: block; width: 48px; height: 4px; background: var(--akzent); margin-top: 14px; border-radius: 2px; }
.einstieg h1::after { width: 64px; }
main h2::before { content: ""; display: inline-block; width: 4px; height: .85em; background: var(--akzent); margin-right: 10px; vertical-align: -1px; border-radius: 1px; }
.karte h2::before, .flaeche h2::before { display: none; }
.kachel { border-top: 3px solid var(--akzent); }
.kachel strong::after { color: var(--akzent); }

/* Fuß */
.tub-fuss { background: var(--fuss-bg); color: var(--fuss-text); margin-top: 32px; font-size: .9rem; }
.tub-fuss-innen { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 32px; line-height: 1.7; }
.tub-fuss strong { color: #fff; }

@media (max-width: 700px) {
  .tub-kopf-innen { padding-top: 12px; padding-bottom: 8px; column-gap: 12px; flex-wrap: wrap; }
  .tub-marke { min-width: 0; flex: 1 1 0; }
  .tub-marke img { height: 52px; margin: -4px 0 -4px -6px; }
  .tub-wortmarke { font-size: 1.02rem; gap: 10px; }
  .tub-balken { height: 28px; width: 6px; }
  .tub-portal { font-size: .85rem; width: 100%; order: 3; margin-left: 0; }
  .tub-sprache { order: 1; margin-left: auto; padding: 6px 10px; }
  .tub-login { order: 1; padding: 6px 10px; }
  .tub-nav .wrap { overflow-x: auto; scrollbar-width: none; gap: 0 20px; }
  .tub-nav .wrap::-webkit-scrollbar { display: none; }
  .tub-nav a { font-size: .92rem; padding: 10px 0 11px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --akzent: #c50e1f;                 /* Flächen bleiben TU-Rot (Weiß darauf ausreichend kontrastreich) */
    --akzent-dunkel: #a30c19;
    --link: #ff8f99;
    --link-hover: #ffb8be;
    --text: #e6e6e6;
    --text-stark: #f7f7f7;
    --leise: #a8a8a8;
    --linie: #333333;
    --linie-stark: #444444;
    --flaeche: #262626;
    --hintergrund: #131313;
    --karte: #1c1c1c;
    --fuss-bg: #0c0c0c;
    --fuss-text: #c8c8c8;
    --fokus: #ff8f99;
    --tint: color-mix(in srgb, var(--akzent) 18%, var(--karte));
  }
}

@media print { .tub-nav, .tub-krumen, .tub-fuss, .sprunglink { display: none !important; } .tub-kopf { border-top-width: 3px; } }
.tub-nav a:focus-visible { outline-offset: -3px; }

/* Menüknopf: nur in der Mobilansicht und nur mit JavaScript (ohne JS bleibt die Leiste sichtbar) */
.tub-menueknopf { display: none; order: 2; align-items: center; gap: 8px; margin-left: 0; padding: 7px 12px; border: 1px solid var(--linie-stark); border-radius: var(--radius-klein); background: var(--karte); color: var(--text); font: inherit; font-size: .9rem; font-weight: normal; cursor: pointer; }
.tub-menueknopf:hover { border-color: var(--akzent); color: var(--link); }
.tub-burger, .tub-burger::before, .tub-burger::after, .tub-burger span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 1px; transition: transform .15s, opacity .15s; }
.tub-burger { position: relative; background: transparent; }
.tub-burger::before, .tub-burger::after { content: ""; position: absolute; left: 0; }
.tub-burger::before { top: -6px; }
.tub-burger::after { top: 6px; }
.tub-menueknopf[aria-expanded="true"] .tub-burger span { opacity: 0; }
.tub-menueknopf[aria-expanded="true"] .tub-burger::before { transform: translateY(6px) rotate(45deg); }
.tub-menueknopf[aria-expanded="true"] .tub-burger::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 700px) {
  .js .tub-menueknopf { display: inline-flex; }
  .js .tub-nav { display: none; }
  .js .tub-nav.offen { display: block; }
  .js .tub-nav .wrap { flex-direction: column; overflow: visible; gap: 0; padding-bottom: 6px; }
  .js .tub-nav a { padding: 12px 0 12px 14px; border-top: 1px solid var(--linie); font-size: 1rem; }
  .js .tub-nav a:first-child { border-top: 0; }
  .js .tub-nav a::after { left: 0; right: auto; top: 8px; bottom: 8px; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
}
