/* =====================================================================
   BS I Bayreuth – modernes, schlankes Layout (Übergangsversion)
   Ersetzt Theme + UIkit (ca. 330 KB) durch eine einzige Datei.
   ===================================================================== */
@font-face { font-family: "Gill Sans BS1"; src: url("../fonts/gillsans.woff2") format("woff2"), url("../fonts/gillsans.woff") format("woff"); font-display: swap; }

:root {
  --accent: #00377B;
  --accent-dark: #00264f;
  --accent-soft: #e8eef7;
  --accent-2: #90181B;
  --text: #1d2430;
  --muted: #5b6575;
  --line: #e2e7ee;
  --bg: #f5f7fa;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --brand: "Gill Sans BS1", "Gill Sans", "Gill Sans MT", Calibri, var(--font);
  --wrap: 1200px;
}
.m-technikerschule { --accent: #90181B; --accent-dark: #6b1013; --accent-soft: #f8e9e9; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 17px/1.65 var(--font); color: var(--text); background: var(--bg); }
img, video { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4, h5, h6, .uk-h1, .uk-h2, .uk-h3, .uk-h4 { font-family: var(--brand); font-weight: 600; line-height: 1.25; color: var(--text); margin: 1.4em 0 .5em; }
h1, .uk-h1 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.3rem); margin-top: 0; }
h2, .uk-h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.75rem); }
h3, .uk-h3 { font-size: 1.3rem; }
h4, .uk-h4 { font-size: 1.12rem; }
p, ul, ol, table, figure { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
table { border-collapse: collapse; max-width: 100%; }
td, th { vertical-align: top; padding: 6px 10px; }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }

.m-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.m-sr, .m-skip:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.m-skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 6px; }

/* ---------- Topbar ---------- */
.m-topbar { background: var(--accent); color: #fff; font-size: 14px; }
.m-topbar .m-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; padding-top: 6px; padding-bottom: 6px; }
.m-topbar a { color: #fff; text-decoration: none; opacity: .92; }
.m-topbar a:hover { opacity: 1; text-decoration: underline; }
.m-topbar-contact { display: flex; gap: 18px; }

/* ---------- Header / Navigation ---------- */
.m-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.m-header-inner { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.m-logo img { display: block; width: 210px; height: auto; }
.m-nav { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.m-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.m-menu > li { position: relative; }
.m-menu > li > a { display: block; padding: 10px 10px; white-space: nowrap; font-family: var(--brand); font-size: 16px; letter-spacing: .02em; text-transform: uppercase; text-decoration: none; color: var(--text); border-radius: 8px; }
.m-menu > li > a:hover, .m-menu > li:focus-within > a { background: var(--accent-soft); color: var(--accent); }
.m-menu > li.is-active > a { color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); border-radius: 8px 8px 0 0; }
.m-sub { list-style: none; margin: 0; padding: 8px; position: absolute; left: 0; top: 100%; min-width: 270px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s; z-index: 60; }
.m-menu > li:hover > .m-sub, .m-menu > li:focus-within > .m-sub { opacity: 1; visibility: visible; transform: none; }
.m-sub a { display: block; padding: 7px 12px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 15.5px; line-height: 1.35; }
.m-sub a:hover, .m-sub .is-active a { background: var(--accent-soft); color: var(--accent); }
.m-subtoggle { display: none; }
.m-search { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 14px; }
.m-search input { border: 0; background: transparent; font: inherit; font-size: 15px; width: 110px; padding: 6px 0; outline: none; }
.m-search button { border: 0; background: none; color: var(--accent); padding: 6px 8px; cursor: pointer; display: flex; }
.m-burger { -webkit-tap-highlight-color: transparent; display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; position: relative; }
.m-burger span:first-child, .m-burger span:first-child::before, .m-burger span:first-child::after { position: absolute; left: 11px; width: 20px; height: 2px; background: var(--text); content: ""; transition: .2s; }
.m-burger span:first-child { top: 21px; }
.m-burger span:first-child::before { left: 0; top: -6px; }
.m-burger span:first-child::after { left: 0; top: 6px; }
.m-burger[aria-expanded="true"] span:first-child { background: transparent; }
.m-burger[aria-expanded="true"] span:first-child::before { top: 0; transform: rotate(45deg); }
.m-burger[aria-expanded="true"] span:first-child::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1120px) {
  .m-burger { display: block; }
  .m-header-inner { flex-wrap: wrap; min-height: 72px; }
  .m-logo img { width: 170px; }
  .m-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 8px 0 16px; }
  .m-nav.is-open { display: flex; }
  .m-menu { flex-direction: column; }
  .m-menu > li { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--line); }
  .m-menu > li > a { flex: 1; }
  .m-menu > li.is-active > a { box-shadow: none; }
  .m-subtoggle { display: block; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
  .m-subtoggle::after { content: ""; position: absolute; left: 17px; top: 15px; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: .2s; }
  .m-menu > li.is-expanded > .m-subtoggle::after { transform: rotate(-135deg); top: 19px; }
  .m-sub { position: static; width: 100%; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; display: none; padding: 0 0 8px 12px; }
  .m-menu > li.is-expanded > .m-sub { display: block; }
  .m-menu > li:hover > .m-sub { display: none; }
  .m-menu > li.is-expanded:hover > .m-sub { display: block; }
  .m-search { margin-top: 12px; }
  .m-search input { width: 100%; }
}

/* ---------- Hero (Slideshow Startseite) ---------- */
.m-hero { padding: 28px 0 8px; }
.m-hero .uk-panel { padding: 0; }
.m-hero .tm-slideshow-panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px 20px; border-left: 6px solid var(--accent); }
.m-hero .tm-slideshow-panel h2 { margin: 0 0 .4em; font-size: clamp(1.35rem, 1rem + 1.2vw, 1.9rem); }
.m-hero .tm-slideshow-panel img { border-radius: 8px; }

/* ---------- Hauptbereich ---------- */
.m-main { padding: 24px 0 56px; }
.m-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 18px; padding: 0; font-size: 14.5px; color: var(--muted); }
.m-crumbs li + li::before { content: "›"; margin: 0 6px 0 2px; color: #9aa4b2; }
.m-crumbs a { color: var(--muted); text-decoration: none; }
.m-crumbs a:hover { color: var(--accent); text-decoration: underline; }
.m-cols { display: grid; gap: 28px; align-items: start; }
.m-layout-side { grid-template-columns: 270px minmax(0, 1fr); }
.m-layout-home { grid-template-columns: minmax(0, 1fr) 330px; }
.m-layout-single { grid-template-columns: minmax(0, 1fr); }
.m-content { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 3vw, 40px); min-width: 0; overflow-wrap: break-word; }
.m-layout-home .m-content { background: transparent; box-shadow: none; padding: 0; }
@media (max-width: 900px) {
  .m-layout-side, .m-layout-home { grid-template-columns: minmax(0, 1fr); }
  .m-layout-side .m-side { order: 2; }
}

/* Seitennavigation (Module in der Seitenleiste) */
.m-side .uk-panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 14px; margin-bottom: 20px; }
.m-side { position: sticky; top: 100px; }
@media (max-width: 900px) { .m-side { position: static; } }
.m-side .uk-panel-title { font-family: var(--brand); font-size: 1.1rem; margin: 0 6px 10px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); color: var(--accent); }
.m-side ul { list-style: none; margin: 0; padding: 0; }
.m-side .uk-nav-side > li > a { display: block; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 15.5px; line-height: 1.35; }
.m-side .uk-nav-side > li > a:hover { background: var(--bg); color: var(--accent); }
.m-side .uk-nav-side > li.uk-active > a { background: var(--accent); color: #fff; }
.m-side .uk-nav-sub { padding: 4px 0 6px 12px; margin-left: 10px; border-left: 2px solid var(--accent-soft); }
.m-side .uk-nav-sub a { display: block; padding: 4px 10px; font-size: 14.5px; text-decoration: none; color: var(--muted); border-radius: 6px; }
.m-side .uk-nav-sub a:hover, .m-side .uk-nav-sub .uk-active > a { color: var(--accent); background: var(--accent-soft); }
.m-side .uk-list-line > li { border-top: 1px solid var(--line); padding: 9px 6px; margin: 0; line-height: 1.4; font-size: 15.5px; }
.m-side .uk-list-line > li:first-child { border-top: 0; }
.m-side .uk-list-line a { text-decoration: none; color: var(--text); }
.m-side .uk-list-line a:hover { color: var(--accent); }
.m-side-news .uk-panel { border-top: 5px solid var(--accent); }
.m-side-news .uk-panel-title::after { content: ""; }
.m-side-news .uk-list-line > li:first-child a { font-weight: 600; color: var(--accent); }

/* ---------- Footer ---------- */
.m-footer { background: var(--accent); color: #dfe7f3; font-size: 15.5px; }
.m-footer a { color: #fff; }
.m-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px 40px; padding-top: 40px; padding-bottom: 32px; }
.m-footer-grid p { margin: 0; }
.m-footer .footer_rechts { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; }
.m-footer .footer_rechts li { padding: 3px 0; }
.m-footer .footer_rechts a { text-decoration: none; text-transform: none; }
.m-footer .footer_rechts a:hover { text-decoration: underline; }
.m-footer-bottom { background: #fff; color: var(--muted); padding: 20px 0; font-size: 14px; }
.m-footer-bottom p { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 26px; margin: 0; }
.m-footer-bottom br { display: none; }
.m-footer-bottom a { color: var(--muted); }
.m-footer-bottom img { max-height: 46px; width: auto; }
.m-footer-bottom .dottetlink { text-decoration: none; border-bottom: 1px dotted currentColor; }
.m-footer-bottom .blauerbutton { color: #fff; }

/* =====================================================================
   Inhalts-Komponenten (UIkit-Klassen aus den Inhalten, neu gestaltet)
   ===================================================================== */
.uk-panel-blank, .uk-article { display: block; }
.uk-article + .uk-article { margin-top: 2.5em; padding-top: 2.5em; border-top: 1px solid var(--line); }
.uk-article-title { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem); margin: 0 0 .5em; }
.uk-article-title a { color: inherit; text-decoration: none; }
.uk-article-title a:hover { color: var(--accent); }
.uk-margin { margin-bottom: 1em; }
.uk-margin-top-remove { margin-top: 0 !important; }
.uk-clearfix::after { content: ""; display: table; clear: both; }
.uk-float-left { float: left; }
.uk-text-center { text-align: center; }
.uk-text-muted { color: var(--muted); }
.uk-align-left { float: left; margin: 0 20px 12px 0; }
.uk-border-rounded { border-radius: 10px; }
.uk-border-circle { border-radius: 50%; }
.uk-display-block { display: block; }
.uk-hidden, [hidden], .hide-text { display: none !important; }
.uk-flex-center { justify-content: center; }
.uk-flex-middle { align-items: center; }
[class*="uk-icon-"] { display: none; }

/* Grid */
.uk-grid { display: flex; flex-wrap: wrap; margin: 0 0 1em -24px; padding: 0; list-style: none; }
.uk-grid > * { padding-left: 24px; width: 100%; min-width: 0; }
.uk-grid[data-uk-grid-margin] { margin-top: -24px; }
.uk-grid[data-uk-grid-margin] > * { margin-top: 24px; }
.uk-grid-width-1-1 > * { width: 100%; }
.uk-grid-width-1-2 > * { width: 50%; }
.uk-grid-width-1-3 > * { width: 33.333%; }
@media (min-width: 480px) {
  .uk-grid-width-small-1-1 > * { width: 100%; } .uk-grid-width-small-1-2 > * { width: 50%; } .uk-grid-width-small-1-3 > * { width: 33.333%; }
}
@media (min-width: 768px) {
  .uk-grid-width-medium-1-2 > * { width: 50%; } .uk-grid-width-medium-1-3 > * { width: 33.333%; } .uk-grid-width-medium-1-4 > * { width: 25%; }
  .uk-width-medium-1-2 { width: 50% !important; } .uk-width-medium-1-3 { width: 33.333% !important; } .uk-width-medium-2-3 { width: 66.666% !important; }
  .uk-width-medium-1-4 { width: 25% !important; } .uk-width-medium-3-4 { width: 75% !important; } .uk-width-medium-1-5 { width: 20% !important; } .uk-width-medium-4-5 { width: 80% !important; } .uk-width-medium-1-1 { width: 100% !important; }
}
@media (min-width: 960px) {
  .uk-grid-width-large-1-2 > * { width: 50%; } .uk-grid-width-large-1-3 > * { width: 33.333%; } .uk-grid-width-large-1-4 > * { width: 25%; }
}
@media (min-width: 1220px) {
  .uk-grid-width-xlarge-1-2 > * { width: 50%; } .uk-grid-width-xlarge-1-3 > * { width: 33.333%; } .uk-grid-width-xlarge-1-4 > * { width: 25%; }
}
.uk-grid-match > * { display: flex; flex-direction: column; }
.uk-grid-match > * > * { flex: 1 1 auto; }

/* Panels / Kacheln */
.m-content .uk-panel-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.m-content .uk-panel-box-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.m-content .uk-panel-box-primary a:not(.uk-button), .m-content .uk-panel-box-primary h3, .m-content .uk-panel-box-primary .uk-h3, .m-content .uk-panel-box-primary .uk-panel-title { color: #fff; }
.m-content .uk-panel-box-secondary { background: #222a35; border-color: #222a35; color: #fff; }
.uk-panel-title { font-family: var(--brand); font-size: 1.2rem; margin: 0 0 .6em; }
.uk-panel-teaser:last-child { margin-bottom: -20px !important; }
.uk-panel-teaser { margin: -20px -20px 16px; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.uk-panel-teaser img { display: block; width: 100%; }
a.tm-panel-link { display: flex; flex-direction: column; text-decoration: none; color: inherit; height: 100%; transition: transform .15s, box-shadow .15s; }
a.tm-panel-link:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
a.tm-panel-link.uk-panel-box-primary { justify-content: center; min-height: 92px; }
a.tm-panel-link.uk-panel-box-primary .uk-h3, a.tm-panel-link.uk-panel-box-primary h3 { margin: 0; font-size: 1.12rem; }
a.tm-panel-link.uk-panel-box-primary:hover { background: var(--accent-dark); }
a.tm-panel-link img { display: block; margin: 0 auto; }
.is-home .m-content a.tm-panel-link img { width: 100%; height: auto; object-fit: contain; }

/* Hinweis-/Infokästen */
.uk-alert { background: var(--accent-soft); color: var(--text); border-left: 5px solid var(--accent); border-radius: 10px; padding: 14px 18px; margin: 0 0 1.2em; }
.uk-alert p:last-child { margin-bottom: 0; }
.uk-alert-warning, .tm-anmeldung-hinweis { background: #fff8e1; border-left-color: #e0a100; }
.tm-mv-hinweis .uk-panel-title { border-bottom: 1px solid rgba(255,255,255,.4); padding-bottom: 8px; }

/* Buttons */
.uk-button, .blauerbutton { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: 999px; border: 2px solid var(--accent); background: #fff; color: var(--accent); font: 600 15px/1.35 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.uk-button:hover { background: var(--accent-soft); color: var(--accent-dark); }
.uk-button-primary, .blauerbutton { background: var(--accent); color: #fff !important; }
.uk-button-primary:hover, .blauerbutton:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.uk-panel-box-primary .uk-button { border-color: #fff; background: #fff; color: var(--accent) !important; }
.uk-panel-box-primary .uk-button:hover { background: var(--accent-soft); }

/* Listen */
.uk-list { list-style: none; padding: 0; }
.uk-list-line > li { border-top: 1px solid var(--line); padding: 8px 0; }
.uk-list-line > li:first-child { border-top: 0; }
.uk-list-striped > li { padding: 8px 12px; border-radius: 6px; }
.uk-list-striped > li:nth-child(odd) { background: var(--bg); }

/* Akkordeon */
.uk-accordion { margin: 0 0 1.4em; }
.uk-accordion-title { position: relative; margin: 0 0 8px; padding: 12px 48px 12px 18px; font: 600 1.02rem/1.4 var(--font); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: background .15s; }
.uk-accordion-title:hover { background: var(--accent-soft); }
.uk-accordion-title::after { content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .2s; }
.uk-accordion-title.uk-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.uk-accordion-title.uk-active::after { border-color: #fff; transform: rotate(-135deg); margin-top: -2px; }
.uk-accordion-content { padding: 10px 18px 16px; margin-bottom: 8px; }
.uk-accordion-content > .uk-margin { margin: 0; }
.uk-accordion-content > .uk-margin > .uk-margin { margin: 0 0 8px; }
.uk-accordion-content .uk-button { white-space: normal; text-align: left; }

/* Switcher (z. B. Lehrkräfte mit Fotoleiste) */
.uk-thumbnav { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 1em; }
.uk-thumbnav a { display: block; border-radius: 10px; overflow: hidden; outline-offset: 2px; }
.uk-thumbnav img { display: block; opacity: .55; transition: opacity .15s; border-radius: 10px; }
.uk-thumbnav .uk-active img, .uk-thumbnav a:hover img { opacity: 1; }
.uk-thumbnav .uk-active a { box-shadow: 0 0 0 3px var(--accent); }
.tm-switcher-nav.uk-tab { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; border-bottom: 2px solid var(--line); }
.uk-tab a { display: block; padding: 8px 14px; text-decoration: none; border-radius: 8px 8px 0 0; }
.uk-tab .uk-active a { background: var(--accent); color: #fff; }
.uk-switcher { list-style: none; padding: 0; }
.uk-switcher > li { display: none; }
.uk-switcher > li.uk-active { display: block; }

/* Galerie */
.tm-gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: 10px; }
.tm-gallery img { display: block; width: 100%; transition: transform .3s; }
.tm-gallery a:hover img { transform: scale(1.04); }
.uk-overlay-panel { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px; background: linear-gradient(transparent, rgba(0,0,0,.65)); color: #fff; opacity: 0; transition: opacity .2s; }
.uk-overlay-panel h4 { color: #fff; margin: 0; font-size: 1rem; }
.uk-overlay-hover:hover .uk-overlay-panel { opacity: 1; }

/* Slideshows in Inhalten */
.tm-slides { position: relative; margin: 0 0 1.4em; }
.tm-slides-list { list-style: none; margin: 0; padding: 0; }
.tm-slides-list > li { display: none; }
.tm-slides-list > li.uk-active { display: block; animation: mFade .35s; }
.tm-slideshow .tm-slides-list > li { background: #eef1f5; border-radius: var(--radius); overflow: hidden; text-align: center; }
.tm-slideshow .tm-slides-list > li img { display: block; margin: 0 auto; max-height: 560px; width: auto; }
.tm-slide-caption { padding: 10px 16px; text-align: left; }
.uk-slidenav { position: absolute; top: 45%; width: 42px; height: 42px; margin-top: -21px; border-radius: 50%; background: rgba(255,255,255,.85); box-shadow: var(--shadow); text-decoration: none; }
.uk-slidenav::after { content: ""; position: absolute; top: 15px; width: 10px; height: 10px; border-top: 2px solid var(--text); border-right: 2px solid var(--text); }
.uk-slidenav-previous { left: 12px; } .uk-slidenav-previous::after { left: 17px; transform: rotate(-135deg); }
.uk-slidenav-next { right: 12px; } .uk-slidenav-next::after { left: 13px; transform: rotate(45deg); }
.uk-dotnav { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 0; padding: 0; }
.uk-dotnav a { display: block; width: 11px; height: 11px; border-radius: 50%; background: #c6cdd8; }
.uk-dotnav .uk-active a { background: var(--accent); width: 26px; border-radius: 6px; }
@keyframes mFade { from { opacity: 0; } to { opacity: 1; } }

/* Lightbox */
.tm-lightbox { display: none; position: fixed; inset: 0; background: rgba(10,14,20,.9); z-index: 2000; align-items: center; justify-content: center; }
.tm-lightbox.open { display: flex; }
.tm-lightbox figure { margin: 0; text-align: center; }
.tm-lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 8px; }
.tm-lightbox figcaption { color: #eee; padding: 8px; }
.tm-lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 46px; cursor: pointer; padding: 10px 18px; line-height: 1; }
.tm-lb-close { top: 10px; right: 10px; } .tm-lb-prev { left: 10px; top: 50%; transform: translateY(-50%); } .tm-lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* News (ZOO) */
.tm-zoo-item { display: flow-root; }
.tm-zoo-date { float: left; width: 62px; margin: 2px 18px 8px 0; text-align: center; background: var(--accent); color: #fff; border-radius: 10px; padding: 6px 0; line-height: 1.1; }
.tm-zoo-date span { display: block; }
.tm-zoo-date .day { font-size: 24px; font-weight: 700; }
.tm-zoo-date .month, .tm-zoo-date .year { font-size: 12.5px; }
.uk-pagination { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 2em 0 0; }
.uk-pagination a, .uk-pagination span { display: block; min-width: 38px; padding: 6px 10px; text-align: center; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; }
.uk-pagination .uk-active span { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Tabellen aus dem alten Editor */
.pure-table { border-collapse: collapse; width: 100%; border: 1px solid var(--line); }
.pure-table td, .pure-table th { padding: .5em 1em; border-bottom: 1px solid var(--line); }
.m-content table img { max-width: none; }
@media (max-width: 700px) { .m-content table { display: block; overflow-x: auto; } }

/* Kartenhinweis, Videos, Suche */
.tm-map ul { margin-bottom: 0; }
video { border-radius: 10px; background: #000; }
#tm-search-q { width: 100%; padding: 12px 16px; font: inherit; border: 1px solid var(--line); border-radius: 10px; }

/* Druck */
@media print {
  .m-topbar, .m-header, .m-side, .m-footer, .m-hero .uk-dotnav { display: none !important; }
  body { background: #fff; }
  .m-content { box-shadow: none; padding: 0; }
}

/* Dunkle Panels: helle Schrift */
.m-content .uk-panel-box-secondary, .m-content .uk-panel-box-secondary .uk-panel-title, .m-content .uk-panel-box-secondary h3, .m-content .uk-panel-box-secondary a:not(.uk-button) { color: #fff; }

/* Berufsfeld-Kacheln (verlinkte dunkle Kacheln) -> helle Bildkarten */
.m-content a.tm-panel-link.uk-panel-box-secondary { background: var(--card); border: 1px solid var(--line); color: var(--text); padding: 0; overflow: hidden; flex-direction: column; justify-content: flex-start; }
.m-content a.tm-panel-link.uk-panel-box-secondary, .m-content a.tm-panel-link.uk-panel-box-secondary * { color: var(--text); }
.m-content a.tm-panel-link.uk-panel-box-secondary > .uk-margin:has(img) { order: -1; }
.m-content a.tm-panel-link.uk-panel-box-secondary > .uk-margin:not(:has(img)) { padding: 0 18px 16px; }
.m-content a.tm-panel-link.uk-panel-box-secondary .uk-margin { margin: 0; }
.m-content a.tm-panel-link.uk-panel-box-secondary img { width: 100% !important; height: auto !important; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; display: block; transition: transform .3s; }
.m-content a.tm-panel-link.uk-panel-box-secondary .uk-panel-title { color: var(--accent); margin: 0; padding: 14px 18px; font-size: 1.12rem; border-top: 4px solid var(--accent); position: relative; z-index: 1; background: var(--card); }
.m-content a.tm-panel-link.uk-panel-box-secondary:hover { border-color: var(--accent); }
.m-content a.tm-panel-link.uk-panel-box-secondary:hover img { transform: scale(1.04); }
.m-content a.tm-panel-link.uk-panel-box-secondary:hover .uk-panel-title { background: var(--accent); color: #fff; }

/* letztes Untermenü rechtsbündig (kein horizontales Scrollen) */
@media (min-width: 1121px) { .m-menu > li:last-child > .m-sub, .m-menu > li:nth-last-child(2) > .m-sub { left: auto; right: 0; } }
.m-content a.tm-panel-link.uk-panel-box-secondary .uk-panel-teaser { margin: 0 !important; border-radius: 0; }
.m-content a.tm-panel-link.uk-panel-box-secondary .uk-panel-teaser img { aspect-ratio: auto; object-fit: contain; }

/* Kompakter Footer */
.m-footer { font-size: 15px; }
.m-footer-grid { padding-top: 22px; padding-bottom: 18px; gap: 12px 40px; align-items: start; }
.m-footer-grid p { line-height: 1.5; }
.m-footer .footer_rechts { columns: auto; display: flex; flex-wrap: wrap; gap: 4px 22px; justify-content: flex-end; }
.m-footer .footer_rechts li { padding: 0; }
@media (max-width: 700px) { .m-footer .footer_rechts { justify-content: flex-start; } }
.m-footer-bottom { padding: 14px 0; }

/* Footer – neues Layout (drei Spalten) */
.m-ft { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px 48px; padding-top: 32px; padding-bottom: 28px; }
.m-ft-col p { margin: 0 0 .7em; line-height: 1.55; }
.m-ft-col p:last-child { margin-bottom: 0; }
.m-ft-logo { display: block; background: #fff; border-radius: 8px; padding: 6px 8px; width: 190px; height: auto; margin-bottom: 14px; }
.m-ft-school strong { color: #fff; font-family: var(--brand); font-size: 1.08rem; }
.m-ft-title { font-family: var(--brand); font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; color: #fff; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.25); }
.m-ft-list, .m-ft-links { list-style: none; margin: 0; padding: 0; }
.m-ft-list li { display: grid; grid-template-columns: 80px 1fr; gap: 8px; padding: 3px 0; }
.m-ft-list span { color: rgba(255,255,255,.65); font-size: 14px; }
.m-ft-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; }
.m-ft a { color: #fff; text-decoration: none; }
.m-ft a:hover { text-decoration: underline; }
.m-ft-links a::before { content: "›"; margin-right: 6px; opacity: .6; }
@media (max-width: 900px) { .m-ft { grid-template-columns: 1fr 1fr; } .m-ft-school { grid-column: 1 / -1; } }
@media (max-width: 560px) { .m-ft { grid-template-columns: 1fr; } }
