/* Moderne Oberfläche der öffentlichen FT-Schney-Seiten.
   Bewusst über .public-site gekapselt, damit interner Bereich und Personalpläne unverändert bleiben. */
:root {
  --ft-navy: #333333;
  --ft-navy-2: #444444;
  --ft-red: #c82333;
  --ft-red-dark: #a71927;
  --ft-bg: #f3f5f8;
  --ft-card: #ffffff;
  --ft-text: #202938;
  --ft-muted: #667085;
  --ft-line: #e3e8ef;
  --ft-radius: 16px;
  --ft-shadow: 0 12px 35px rgba(0, 0, 0, .10);
}

.public-site {
  margin: 0;
  min-height: 100vh;
  background: var(--ft-bg);
  color: var(--ft-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  text-align: left;
}

.public-site *,
.public-site *::before,
.public-site *::after { box-sizing: border-box; }

.public-site header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 104px;
  height: auto;
  padding: 12px clamp(18px, 4vw, 56px);
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 22px;
  background: rgba(51, 51, 51, .98);
  color: #fff;
  border-bottom: 3px solid var(--ft-red);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  backdrop-filter: blur(10px);
}

.public-site header .logo { height: 80px; width: auto; text-align: left; }
.public-site header .responsive-logo { height: 80px; max-height: 80px; width: auto; display: block; }
.public-site .header-title {
  padding: 0;
  font-size: clamp(1.25rem, 1.8vw, 1.6rem);
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
}

.public-site header nav { width: auto; text-align: right; }
.public-site header nav ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}
.public-site header nav ul li { margin: 0; }
.public-site header nav ul li a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #fff;
  font-size: .96rem;
  font-weight: 650;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.public-site header nav ul li a:hover,
.public-site header nav ul li a:focus-visible,
.public-site header nav ul li a[aria-current="page"] {
  background: rgba(255,255,255,.12);
  color: #fff;
  transform: translateY(-1px);
  outline: none;
}
.public-site header nav ul li:last-child a {
  margin-left: 5px;
  background: var(--ft-red);
}
.public-site header nav ul li:last-child a:hover,
.public-site header nav ul li:last-child a:focus-visible { background: var(--ft-red-dark); }

.public-site .menu-icon {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-size: 0;
  cursor: pointer;
}
.public-site .menu-icon::before,
.public-site .menu-icon::after,
.public-site .menu-icon span {
  content: "";
  position: absolute;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.public-site .menu-icon { position: relative; }
.public-site .menu-icon::before { transform: translateY(-7px); }
.public-site .menu-icon::after { transform: translateY(7px); }
.public-site .menu-icon span { transform: translateY(0); }
.public-site .menu-icon[aria-expanded="true"]::before { transform: rotate(45deg); }
.public-site .menu-icon[aria-expanded="true"]::after { transform: rotate(-45deg); }
.public-site .menu-icon[aria-expanded="true"] span { opacity: 0; }

.public-site main {
  width: min(1180px, calc(100% - 32px));
  max-width: 1180px;
  min-height: calc(100vh - 170px);
  margin: 28px auto;
  padding: 0 0 38px;
  overflow: hidden;
  background: var(--ft-card);
  border-radius: 20px;
  box-shadow: var(--ft-shadow);
}
.public-site section { margin: 0; }
.public-site .wide-image {
  width: 100%;
  max-width: none;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
  margin: 0;
  display: block;
}
.public-site .text-container {
  width: min(920px, calc(100% - 48px));
  max-width: 920px;
  margin: 0 auto;
  padding: 42px 0 10px;
  text-align: left;
}
.public-site h1,
.public-site h2,
.public-site h3 { color: var(--ft-navy); line-height: 1.2; }
.public-site h1 {
  margin: 0 0 22px;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  letter-spacing: -.035em;
}
.public-site h2 { margin: 34px 0 12px; font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.public-site h3 { margin: 28px 0 10px; font-size: clamp(1.12rem, 2vw, 1.35rem); }
.public-site p { margin: 0 0 18px; }
.public-site a { color: var(--ft-red-dark); text-underline-offset: 3px; }
.public-site hr { border: 0; border-top: 1px solid var(--ft-line); margin: 32px 0; }

.public-site .table-responsive {
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.07);
}
.public-site table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; }
.public-site th,
.public-site td {
  padding: 15px 16px;
  border: 0;
  border-bottom: 1px solid var(--ft-line);
  vertical-align: top;
  text-align: left;
}
.public-site th {
  background: var(--ft-navy);
  color: #fff;
  font-size: .8rem;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.public-site tr:last-child td { border-bottom: 0; }
.public-site tbody tr:nth-child(even) td { background: #f8fafc; }
.public-site tbody tr:hover td { background: #f1f5f9; }
.public-site .poster-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 9px;
  background: #fff0f2;
  color: var(--ft-red-dark);
  font-weight: 700;
  text-decoration: none;
}

.public-site .flex-container { gap: 18px; }
.public-site .flex-item {
  flex: 1 1 calc(50% - 18px);
  margin: 0;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  box-shadow: 0 6px 20px rgba(23,35,59,.06);
}

.public-site footer {
  padding: 26px 20px;
  background: var(--ft-navy);
  color: #dbe3ef;
  text-align: center;
}
.public-site footer p { margin: 0; }
.public-site footer a { color: #fff !important; }

@media (max-width: 900px) {
  .public-site header {
    grid-template-columns: auto 1fr auto;
    min-height: 88px;
    padding: 8px 16px;
  }
  .public-site header .logo,
  .public-site header .responsive-logo { height: 68px; max-height: 68px; }
  .public-site .header-title { font-size: 1.12rem; overflow: hidden; text-overflow: ellipsis; }
  .public-site .menu-icon { display: inline-flex; justify-self: end; }
  .public-site header nav { position: static; width: auto; padding: 0; }
  .public-site header nav ul,
  .public-site #nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 12px;
    right: 12px;
    width: auto;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    border: 1px solid var(--ft-line);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 18px 36px rgba(0,0,0,.20);
  }
  .public-site #nav-menu.active { display: flex; }
  .public-site #nav-menu li { border: 0; }
  .public-site #nav-menu li a,
  .public-site #nav-menu li:last-child a {
    margin: 0;
    padding: 13px 14px;
    background: transparent;
    color: var(--ft-navy);
    border-radius: 10px;
  }
  .public-site #nav-menu li a:hover,
  .public-site #nav-menu li a:focus-visible,
  .public-site #nav-menu li a[aria-current="page"] { background: #f1f4f8; color: var(--ft-red-dark); }
  .public-site #nav-menu li:last-child a { background: #fff0f2; color: var(--ft-red-dark); }
  .public-site main { width: min(100% - 20px, 1180px); margin: 14px auto; border-radius: 16px; }
  .public-site .text-container { width: min(100% - 34px, 920px); padding-top: 30px; }
  .public-site .wide-image { max-height: 300px; }
}

@media (max-width: 680px) {
  .public-site .header-title { display: block; white-space: normal; line-height: 1.15; }
  .public-site main { width: 100%; margin: 0; border-radius: 0; box-shadow: none; }
  .public-site .wide-image { display: block; height: 180px; max-height: 180px; }
  .public-site .text-container { width: calc(100% - 30px); padding: 26px 0 6px; }
  .public-site h1 { font-size: clamp(1.5rem, 6.5vw, 2rem); }

  .public-site .table-responsive {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .public-site table,
  .public-site tbody,
  .public-site tr,
  .public-site td { display: block; width: 100%; }
  .public-site thead,
  .public-site table > tr:first-child:has(th) { display: none; }
  .public-site tr {
    margin: 0 0 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--ft-line);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,.07);
  }
  .public-site tr:has(th) { display: none; }
  .public-site td {
    display: grid;
    grid-template-columns: minmax(105px, 36%) 1fr;
    gap: 12px;
    padding: 11px 14px;
    border: 0;
    border-bottom: 1px solid var(--ft-line);
    background: #fff !important;
    font-size: .95rem;
  }
  .public-site td:last-child { border-bottom: 0; }
  .public-site td::before {
    content: attr(data-label);
    display: block;
    color: var(--ft-muted);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
  }
  .public-site td[data-label=""],
  .public-site td:empty { min-height: 0; }
  .public-site td[data-label=""]::before { display: none; }
  .public-site td:first-child { font-weight: 700; }
  .public-site .flex-item { flex-basis: 100%; padding: 18px; }
  .public-site footer { font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .public-site *, .public-site *::before, .public-site *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Dezentere Feinabstimmung – kompaktere Proportionen und ruhigere Flächen */
:root {
  --ft-radius: 10px;
  --ft-shadow: 0 5px 18px rgba(0, 0, 0, .07);
}

.public-site header {
  min-height: 98px;
  padding: 10px clamp(18px, 3vw, 42px);
  gap: 17px;
  border-bottom-width: 2px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .13);
}

.public-site header .logo,
.public-site header .responsive-logo {
  height: 76px;
  max-height: 76px;
}

.public-site .header-title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.48rem, 2.15vw, 1.88rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.25;
}

.public-site header nav ul { gap: 1px; }
.public-site header nav ul li a {
  padding: 8px 10px;
  border-radius: 7px;
  font-size: .92rem;
  font-weight: 500;
}

.public-site header nav ul li:last-child a { margin-left: 3px; }

.public-site main {
  margin: 20px auto;
  border-radius: 12px;
}

.public-site .text-container {
  width: min(960px, calc(100% - 44px));
  padding-top: 34px;
}

.public-site h1 {
  margin-bottom: 18px;
  font-size: clamp(1.55rem, 2.7vw, 2.15rem);
  letter-spacing: -.02em;
  font-weight: 650;
}
.public-site h2 {
  margin-top: 29px;
  font-size: clamp(1.28rem, 2.1vw, 1.65rem);
  font-weight: 650;
}
.public-site h3 { font-weight: 650; }

.public-site .table-responsive {
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(0,0,0,.055);
}
.public-site th,
.public-site td { padding: 13px 14px; }
.public-site th { font-size: .77rem; }

.public-site .flex-item {
  padding: 19px;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(0,0,0,.045);
}

@media (max-width: 900px) {
  .public-site header {
    min-height: 84px;
    padding: 8px 14px;
  }
  .public-site header .logo,
  .public-site header .responsive-logo {
    height: 64px;
    max-height: 64px;
  }
  .public-site .header-title {
    font-size: 1.2rem;
    font-weight: 400;
  }
  .public-site .menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
  }
  .public-site header nav ul,
  .public-site #nav-menu {
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 24px rgba(0,0,0,.15);
  }
  .public-site #nav-menu li a,
  .public-site #nav-menu li:last-child a {
    padding: 11px 12px;
    border-radius: 7px;
  }
}

@media (max-width: 680px) {
  .public-site .text-container { padding-top: 22px; }
  .public-site h1 { font-size: clamp(1.42rem, 6vw, 1.85rem); }
  .public-site tr {
    border-radius: 9px;
    box-shadow: 0 2px 8px rgba(0,0,0,.055);
  }
  .public-site td { padding: 10px 12px; }
}

/* Kompaktere mobile Karten für Abteilungen und Veranstaltungen */
.public-site .header-title {
  font-size: clamp(1.78rem, 2.65vw, 2.2rem);
}

@media (max-width: 900px) {
  .public-site .header-title {
    font-size: clamp(1.42rem, 4.6vw, 1.72rem);
  }
}

@media (max-width: 680px) {
  .departments-page .table-responsive,
  .events-page .table-responsive {
    margin-top: 18px;
  }

  .departments-page .table-responsive tr,
  .events-page .table-responsive tr {
    position: relative;
    margin-bottom: 13px;
  }

  /* Abteilungen: Wochentag als Überschrift oberhalb der ersten Karte des Tages. */
  .departments-page .table-responsive tr[data-day-start="true"] {
    margin-top: 40px;
  }
  .departments-page .table-responsive tr[data-day-start="true"]::before {
    content: attr(data-day);
    position: absolute;
    left: 2px;
    bottom: calc(100% + 8px);
    color: var(--ft-navy);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
  }
  .departments-page .table-responsive tr[data-day-start="true"]:first-of-type {
    margin-top: 35px;
  }

  /* Die ursprüngliche Wochentag-Spalte wird in den Karten nicht gezeigt. */
  .departments-page .table-responsive td:first-child {
    display: none !important;
  }

  /* Abteilungs- bzw. Veranstaltungsname als Kartenüberschrift. */
  .departments-page .table-responsive td.card-title-cell,
  .events-page .table-responsive td.card-title-cell {
    display: block !important;
    padding: 13px 14px 9px;
    border-bottom: 0;
    color: var(--ft-navy);
    font-size: 1.03rem;
    font-weight: 700;
    line-height: 1.35;
  }
  .departments-page .table-responsive td.card-title-cell::before,
  .events-page .table-responsive td.card-title-cell::before {
    display: none !important;
    content: none !important;
  }

  /* Nur kurze, hilfreiche Labels für Zeit, Leitung und Ort. */
  .departments-page .table-responsive td:not(:first-child):not(.card-title-cell),
  .events-page .table-responsive td:not(.card-title-cell):not(.event-date-cell) {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 14px;
    font-size: .94rem;
  }
  .departments-page .table-responsive td:not(:first-child):not(.card-title-cell)::before,
  .events-page .table-responsive td:not(.card-title-cell):not(.event-date-cell)::before {
    content: attr(data-short-label) !important;
    color: var(--ft-muted);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .025em;
    text-transform: uppercase;
  }

  /* Datum direkt unter dem Veranstaltungsnamen, ohne „Datum“-Label. */
  .events-page .table-responsive td.event-date-cell {
    display: block !important;
    padding: 0 14px 10px;
    border-bottom: 1px solid var(--ft-line);
    color: #4b5563;
    font-size: .93rem;
    font-weight: 500;
  }
  .events-page .table-responsive td.event-date-cell::before {
    display: none !important;
    content: none !important;
  }

  .events-page .poster-link {
    min-height: 32px;
    padding: 5px 9px;
    font-size: .88rem;
  }
}

/* Ruhigere, echte Kartenansicht nur auf Smartphones – Desktop bleibt unverändert. */
@media (max-width: 680px) {
  .departments-page .table-responsive,
  .events-page .table-responsive {
    overflow: visible;
    box-shadow: none;
    border: 0;
    background: transparent;
  }

  .departments-page .table-responsive table,
  .events-page .table-responsive table,
  .departments-page .table-responsive tbody,
  .events-page .table-responsive tbody {
    overflow: visible;
  }

  .departments-page .table-responsive tr,
  .events-page .table-responsive tr {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    margin: 0 0 14px;
    border: 1px solid #e2e6eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .055);
  }

  /* Abteilungen: Wochentag klein im Kartenkopf, danach klare Inhaltsstruktur. */
  .departments-page .table-responsive tr[data-day-start="true"] {
    margin-top: 14px;
  }

  .departments-page .table-responsive tr[data-day-start="true"]::before {
    content: attr(data-day);
    position: static;
    grid-column: 1 / -1;
    padding: 9px 14px 0;
    color: #737b86;
    font-size: .71rem;
    font-weight: 700;
    letter-spacing: .055em;
    line-height: 1.2;
    text-transform: uppercase;
    background: #fff;
  }

  .departments-page .table-responsive td.card-title-cell {
    grid-column: 1 / -1;
    padding: 13px 14px 8px;
    color: #24282d;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.35;
  }

  .departments-page .table-responsive tr[data-day-start="true"] td.card-title-cell {
    padding-top: 5px;
  }

  .departments-page .table-responsive td:not(:first-child):not(.card-title-cell) {
    display: block !important;
    min-width: 0;
    padding: 8px 14px 13px;
    border: 0;
    color: #4e5661;
    font-size: .93rem;
    line-height: 1.4;
  }

  .departments-page .table-responsive td:nth-child(3) {
    grid-column: 1;
    padding-right: 8px;
    color: #24282d;
    font-weight: 600;
    white-space: nowrap;
  }

  .departments-page .table-responsive td:nth-child(4) {
    grid-column: 2;
    position: relative;
    padding-left: 16px;
  }

  .departments-page .table-responsive td:nth-child(4)::after {
    content: "·";
    position: absolute;
    left: 4px;
    color: #a2a8b0;
  }

  .departments-page .table-responsive td::before,
  .departments-page .table-responsive td::after {
    text-transform: none;
  }

  .departments-page .table-responsive td:not(:first-child)::before {
    display: none !important;
    content: none !important;
  }

  /* Veranstaltungen: Titel und Datum oben, Zeit und Ort als kompakte Fußzeile. */
  .events-page .table-responsive td.card-title-cell {
    grid-column: 1 / -1;
    padding: 14px 14px 4px;
    color: #24282d;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.35;
  }

  .events-page .table-responsive td.event-date-cell {
    grid-column: 1 / -1;
    padding: 0 14px 12px;
    border: 0;
    color: #626b76;
    font-size: .91rem;
    font-weight: 400;
    line-height: 1.4;
  }

  .events-page .table-responsive td:nth-child(3),
  .events-page .table-responsive td:nth-child(4) {
    display: block !important;
    min-width: 0;
    padding: 10px 14px 12px;
    border-top: 1px solid #edf0f3;
    border-bottom: 0;
    font-size: .93rem;
    line-height: 1.4;
  }

  .events-page .table-responsive td:nth-child(3) {
    grid-column: 1;
    padding-right: 8px;
    color: #24282d;
    font-weight: 600;
    white-space: nowrap;
  }

  .events-page .table-responsive td:nth-child(4) {
    grid-column: 2;
    position: relative;
    padding-left: 16px;
    color: #4e5661;
  }

  .events-page .table-responsive td:nth-child(4)::after {
    content: "·";
    position: absolute;
    left: 4px;
    color: #a2a8b0;
  }

  .events-page .table-responsive td:not(.card-title-cell):not(.event-date-cell)::before {
    display: none !important;
    content: none !important;
  }

  /* Leere Angaben nehmen keinen unnötigen Platz ein. */
  .departments-page .table-responsive td:empty,
  .events-page .table-responsive td:empty {
    display: none !important;
  }

  .events-page .poster-link {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #9d0019;
    font-size: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
  }
}

/* Wochentage in der mobilen Abteilungsübersicht klar als Abschnittstrenner darstellen. */
@media (max-width: 680px) {
  .departments-page .table-responsive tr[data-day-start="true"] {
    position: relative;
    margin-top: 52px;
  }

  .departments-page .table-responsive tr[data-day-start="true"]:first-of-type {
    margin-top: 42px;
  }

  .departments-page .table-responsive tr[data-day-start="true"]::before {
    content: attr(data-day);
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 9px);
    display: block;
    padding: 0 2px 7px;
    border-bottom: 2px solid #d20a2e;
    background: transparent;
    color: #343434;
    font-size: 1.08rem;
    font-weight: 650;
    letter-spacing: .01em;
    line-height: 1.2;
    text-transform: none;
  }

  .departments-page .table-responsive tr[data-day-start="true"] td.card-title-cell {
    padding-top: 13px;
  }
}

/* Korrektur: Die außerhalb der Karte positionierten Wochentage dürfen nicht abgeschnitten werden. */
@media (max-width: 680px) {
  .departments-page .table-responsive tr[data-day-start="true"] {
    overflow: visible;
  }

  .departments-page .table-responsive tr[data-day-start="true"]::before {
    z-index: 2;
    pointer-events: none;
  }
}

/* Modernisierte Desktop-Tabellen für Abteilungen und Veranstaltungen.
   Die mobile Kartenansicht unter 680 px bleibt davon unberührt. */
@media (min-width: 681px) {
  .departments-page .text-container,
  .events-page .text-container {
    width: min(1040px, calc(100% - 56px));
    max-width: 1040px;
  }

  .departments-page .table-responsive,
  .events-page .table-responsive {
    margin-top: 26px;
    border: 1px solid #dfe3e8;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .055);
  }

  .departments-page .table-responsive table,
  .events-page .table-responsive table {
    table-layout: fixed;
  }

  .departments-page .table-responsive th,
  .events-page .table-responsive th {
    padding: 13px 16px;
    background: #3a3a3a;
    color: #fff;
    font-size: .76rem;
    font-weight: 650;
    letter-spacing: .065em;
  }

  .departments-page .table-responsive td,
  .events-page .table-responsive td {
    padding: 14px 16px;
    border-bottom-color: #e7eaee;
    background: #fff;
    font-size: .94rem;
    line-height: 1.45;
    vertical-align: middle;
  }

  .departments-page .table-responsive tbody tr:nth-child(even) td,
  .events-page .table-responsive tbody tr:nth-child(even) td {
    background: #fafbfc;
  }

  .departments-page .table-responsive tbody tr:hover td,
  .events-page .table-responsive tbody tr:hover td {
    background: #f4f6f8;
  }

  /* Abteilungen: Wochentage als ruhige Gruppenmarker und Inhalte klar gewichten. */
  .departments-page .table-responsive th:nth-child(1) { width: 13%; }
  .departments-page .table-responsive th:nth-child(2) { width: 31%; }
  .departments-page .table-responsive th:nth-child(3) { width: 27%; }
  .departments-page .table-responsive th:nth-child(4) { width: 29%; }

  .departments-page .table-responsive td:nth-child(1) {
    color: #6a717a;
    font-size: .84rem;
    font-weight: 650;
  }

  .departments-page .table-responsive td:nth-child(2) {
    color: #22262b;
    font-weight: 650;
  }

  .departments-page .table-responsive td:nth-child(3) {
    color: #343a40;
    white-space: nowrap;
  }

  .departments-page .table-responsive td:nth-child(4) {
    color: #555d66;
  }

  .departments-page .table-responsive tbody tr:has(td:first-child:not(:empty)):not(:first-child) td {
    border-top: 7px solid #f3f5f7;
  }

  .departments-page .table-responsive tbody tr:has(td:first-child:not(:empty)) td:first-child {
    color: #a71927;
    font-size: .86rem;
    font-weight: 750;
  }

  .departments-page .table-responsive tbody tr:has(td:first-child:not(:empty)) td:nth-child(2) {
    color: #17191c;
  }

  /* Veranstaltungen: Veranstaltungstitel hervorheben, Datum und Metadaten ruhiger darstellen. */
  .events-page .table-responsive th:nth-child(1) { width: 25%; }
  .events-page .table-responsive th:nth-child(2) { width: 24%; }
  .events-page .table-responsive th:nth-child(3) { width: 18%; }
  .events-page .table-responsive th:nth-child(4) { width: 33%; }

  .events-page .table-responsive td:nth-child(1) {
    color: #22262b;
    font-weight: 700;
  }

  .events-page .table-responsive td:nth-child(2) {
    color: #4d5560;
    font-weight: 500;
  }

  .events-page .table-responsive td:nth-child(3) {
    color: #292e34;
    font-weight: 600;
  }

  .events-page .table-responsive td:nth-child(4) {
    color: #555d66;
  }

  .events-page .poster-link {
    min-height: 0;
    padding: 5px 9px;
    border: 1px solid #f0cdd3;
    border-radius: 7px;
    background: #fff7f8;
    color: #a71927;
    font-size: .9rem;
    font-weight: 650;
  }

  .events-page .poster-link:hover,
  .events-page .poster-link:focus-visible {
    background: #fdecef;
    border-color: #e6aeb8;
  }
}

/* Smartphone-Fix: Karten bleiben auch bei großer Android-Schrift gut lesbar.
   Die Klassen und Tagesattribute stehen zusätzlich direkt im HTML, sodass die
   Darstellung nicht von einer eventuell zwischengespeicherten JS-Datei abhängt. */
@media (max-width: 520px) {
  .departments-page .table-responsive tr,
  .events-page .table-responsive tr {
    grid-template-columns: minmax(0, 1fr);
  }

  .departments-page .table-responsive td.card-title-cell,
  .events-page .table-responsive td.card-title-cell,
  .events-page .table-responsive td.event-date-cell,
  .departments-page .table-responsive td:nth-child(3),
  .departments-page .table-responsive td:nth-child(4),
  .events-page .table-responsive td:nth-child(3),
  .events-page .table-responsive td:nth-child(4) {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .departments-page .table-responsive td:nth-child(3),
  .departments-page .table-responsive td:nth-child(4),
  .events-page .table-responsive td:nth-child(3),
  .events-page .table-responsive td:nth-child(4) {
    padding: 7px 14px;
  }

  .departments-page .table-responsive td:nth-child(3),
  .events-page .table-responsive td:nth-child(3) {
    padding-top: 4px;
    padding-bottom: 5px;
  }

  .departments-page .table-responsive td:nth-child(4),
  .events-page .table-responsive td:nth-child(4) {
    padding-top: 0;
    padding-bottom: 13px;
  }

  .departments-page .table-responsive td:nth-child(4)::after,
  .events-page .table-responsive td:nth-child(4)::after {
    display: none;
    content: none;
  }

  .departments-page .table-responsive td:nth-child(4)::before {
    display: inline !important;
    content: "Leitung: " !important;
    color: #737b86;
    font-size: .82em;
    font-weight: 600;
    text-transform: none;
  }

  .events-page .table-responsive td:nth-child(4)::before {
    display: inline !important;
    content: "Ort: " !important;
    color: #737b86;
    font-size: .82em;
    font-weight: 600;
    text-transform: none;
  }

  .departments-page .table-responsive tr[data-day-start="true"] {
    margin-top: 58px;
  }

  .departments-page .table-responsive tr[data-day-start="true"]:first-of-type {
    margin-top: 50px;
  }

  .departments-page .table-responsive tr[data-day-start="true"]::before {
    bottom: calc(100% + 10px);
    padding: 0 2px 8px;
    font-size: 1.15rem;
  }
}

/* Smartphone-Feinschliff: saubere Leitung-Zeile und vertikal mittiges Wappen. */
@media (max-width: 900px) {
  .public-site header .logo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: stretch;
    margin: 0 !important;
    padding: 0 !important;
  }

  .public-site header .logo a {
    display: flex;
    align-items: center;
    height: 100%;
  }

  .public-site header .responsive-logo {
    margin: 0 !important;
    align-self: center;
  }
}

@media (max-width: 520px) {
  .departments-page .table-responsive td:nth-child(4)::before {
    display: block !important;
    content: "Leitung" !important;
    margin: 0 0 3px;
    color: #737b86;
    font-family: inherit;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: none;
  }

  .events-page .table-responsive td:nth-child(4)::before {
    display: block !important;
    content: "Ort" !important;
    margin: 0 0 3px;
    color: #737b86;
    font-family: inherit;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: none;
  }
}

/* Social Media – Footer */
.public-site .site-footer {
  padding: 0;
  background: var(--ft-navy);
  color: #dbe3ef;
  text-align: center;
}
.public-site .footer-social {
  padding: 32px 20px 28px;
}
.public-site .footer-social h2 {
  margin: 0 0 7px;
  color: #fff;
  font-size: 1.2rem;
}
.public-site .footer-social > p {
  margin: 0 0 18px;
  color: #c8d2df;
}
.public-site .social-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.public-site .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 142px;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 8px;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}
.public-site .social-link svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
  flex: 0 0 auto;
}
.public-site .social-link:hover,
.public-site .social-link:focus-visible {
  background: var(--ft-red-dark);
  border-color: var(--ft-red-dark);
  transform: translateY(-2px);
}
.public-site .footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 18px 20px;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: .9rem;
}
.public-site .footer-bottom p { margin: 0; }
.public-site .footer-nav {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}
.public-site .footer-nav a { color: #fff !important; }
.public-site .footer-nav span { color: rgba(255,255,255,.4); }

@media (max-width: 600px) {
  .public-site .footer-social { padding: 28px 16px 24px; }
  .public-site .social-links { flex-direction: column; align-items: stretch; }
  .public-site .social-link { width: 100%; }
  .public-site .footer-bottom { flex-direction: column; gap: 10px; }
}

/* Kontaktformular */
.contact-page .contact-form-section {
  padding: 8px 20px 54px;
}
.contact-page .contact-form-card {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 42px);
  background: #fff;
  border: 1px solid var(--ft-border, #dde3eb);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(25, 36, 52, .08);
}
.contact-page .contact-form-intro {
  max-width: 720px;
  margin-bottom: 28px;
}
.contact-page .section-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--ft-red-dark, #b7192a);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.contact-page .contact-form-intro h2 {
  margin: 0 0 9px;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
}
.contact-page .contact-form-intro p {
  margin: 0;
  color: #5f6875;
  line-height: 1.65;
}
.contact-page .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}
.contact-page .form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}
.contact-page .form-field label {
  color: #252b34;
  font-weight: 750;
}
.contact-page .form-field .optional {
  color: #7b838e;
  font-size: .85em;
  font-weight: 500;
}
.contact-page .form-field input,
.contact-page .form-field select,
.contact-page .form-field textarea {
  width: 100%;
  border: 1px solid #cfd6df;
  border-radius: 8px;
  background: #fff;
  color: #20252c;
  font: inherit;
  padding: 12px 13px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.contact-page .form-field textarea {
  resize: vertical;
  min-height: 150px;
}
.contact-page .form-field input:focus,
.contact-page .form-field select:focus,
.contact-page .form-field textarea:focus {
  outline: none;
  border-color: var(--ft-red-dark, #b7192a);
  box-shadow: 0 0 0 3px rgba(183, 25, 42, .13);
}
.contact-page .form-field small,
.contact-page .required-note {
  color: #747d88;
  font-size: .86rem;
}
.contact-page .privacy-check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 2px 0 24px;
  color: #424a55;
  line-height: 1.5;
}
.contact-page .privacy-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
  accent-color: var(--ft-red-dark, #b7192a);
}
.contact-page .contact-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 18px;
}
.contact-page .contact-submit {
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 8px;
  background: var(--ft-navy, #303030);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease;
}
.contact-page .contact-submit:hover,
.contact-page .contact-submit:focus-visible {
  background: var(--ft-red-dark, #b7192a);
  transform: translateY(-1px);
}
.contact-page .contact-submit:disabled {
  opacity: .65;
  cursor: wait;
  transform: none;
}
.contact-page .form-status {
  margin: 0 0 22px;
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 650;
  line-height: 1.5;
}
.contact-page .form-status.is-success {
  color: #155d36;
  background: #e9f7ef;
  border: 1px solid #b9e0c8;
}
.contact-page .form-status.is-error {
  color: #8b1d2a;
  background: #fff0f2;
  border: 1px solid #efbdc4;
}
.contact-page .hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
@media (max-width: 720px) {
  .contact-page .contact-form-section { padding: 4px 14px 38px; }
  .contact-page .contact-form-card { padding: 22px 18px; border-radius: 12px; }
  .contact-page .form-grid { grid-template-columns: 1fr; gap: 0; }
  .contact-page .contact-submit { width: 100%; }
  .contact-page .required-note { width: 100%; text-align: center; }
}


/* Kontaktseite: kompakte, einheitliche Abstände */
.contact-page main {
  padding-bottom: 0;
}
.contact-page .contact-form-section {
  padding: 8px 20px 34px;
}
.contact-page #contact-info {
  padding: 0 20px 56px;
}
.contact-page #contact-info .text-container {
  width: min(920px, 100%);
  max-width: 920px;
  margin: 0 auto;
  padding: 0;
}
.contact-page #contact-info h2 {
  margin: 0 0 16px;
}
.contact-page #contact-info .flex-container {
  gap: 18px 20px;
}
.contact-page #contact-info .flex-item {
  flex: 1 1 calc(50% - 10px);
  margin: 0;
}
.contact-page #contact-info .contact-card {
  height: 100%;
  margin: 0;
}
@media (max-width: 720px) {
  .contact-page .contact-form-section { padding: 4px 14px 28px; }
  .contact-page #contact-info { padding: 0 14px 38px; }
  .contact-page #contact-info h2 { margin-bottom: 14px; }
  .contact-page #contact-info .flex-container { gap: 12px; }
  .contact-page #contact-info .flex-item { flex-basis: 100%; }
}
