<style>
/* ============================================================
   OS82DD – ZENTRALES CSS (sicher für Sachsen-Schul-CMS/Bootstrap)
   Ziel:
   - Theme nicht zerstören
   - nur gezielte Überschreibungen
   - eigene Komponenten klar kapseln
   ============================================================ */


/* ============================================================
   1) GLOBAL: Grundlook
   ============================================================ */

html, body{
  background: #f8fafc !important;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
}

/* Optional: Standard-Textfarbe (Theme lässt i.d.R. ok) */
/* body{ color:#111; } */


/* ============================================================
   2) THEME-BEREINIGUNG (gezielt, ohne Layout zu zerstören)
   ============================================================ */

.page-heading .breadcrumbs,
.breadcrumb,
#breadcrumb,
.breadcrumbs{
  display: none !important;
}

.page-heading .heading-title{
  display: none !important;
}

ul.menu-top,
.menu-top{
  display: none !important;
}

footer,
#footer,
.site-footer,
.page-footer{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

footer, #footer{
  padding: 8px 0 !important;
  margin: 0 !important;
}


/* ============================================================
   2a) HEADER-TITEL (OS82DD) – NEU
   Voraussetzung:
   - HTML-Element (Extended-Bereich!):
     <div class="os-header">
       <h1 class="os-header__title">...</h1>
       <p class="os-header__subtitle">...</p>
     </div>

   Ziel:
   - Titel + Untertitel im Header-Verlauf
   - Desktop: neben dem Logo
   - Mobile: unter dem Logo (zentriert), ohne andere Layouts zu beeinflussen
   ============================================================ */

/* Stellschrauben (Desktop) */
:root{
  --os-header-top: 100px;     /* vertikale Position im Verlauf */
  --os-header-left: 600px;   /* Abstand links → neben Logo */
}

/* Sicherstellen: Header ist Bezug für absolute Positionierung */
header#pageTop,
#pageTop.header.main-header{
  position: relative; /* wichtig, sonst richtet sich .os-header am falschen Parent aus */
}

/* Header-Inhalt (nur diese Klasse! keine globalen Resets) */
.os-header{
  position: absolute;
  top: var(--os-header-top);
  left: var(--os-header-left);
  right: 24px;
  z-index: 1000;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;

  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;

  /* verhindert, dass Text über alles drüber läuft */
  max-width: 900px;
}

/* Titel */
.os-header__title{
  margin: 0;
  color: #fff !important;
  font-size: 2.1rem;
  font-weight: 600;      /* vorher 800 → jetzt semi-bold */
  line-height: 1.15;
  letter-spacing: .2px;
}

/* Untertitel */
.os-header__subtitle{
  margin: .45rem 0 0 0;
  color: rgba(255,255,255,.92) !important;
  font-size: 1.2rem;    /* vorher 1.05rem → jetzt größer */
  font-weight: 400;
  line-height: 1.35;
}

/* Mobile: NICHT "position: static" (das kann in Inhalte reinlaufen),
   sondern Overlay bleibt, wird aber nach unten geschoben + zentriert. */
@media (max-width: 720px){

  /* mehr Platz im Header, damit nichts über Logo/Nav liegt */
  header#pageTop,
  #pageTop.header.main-header{
    min-height: 320px; /* bei Bedarf 300–360 anpassen */
  }

  :root{
    --os-header-top: 190px;  /* tiefer, damit Logo frei bleibt */
    --os-header-left: 16px;  /* links bündig, wir zentrieren per align-items */
  }

  .os-header{
    right: 16px;
    align-items: center;
    text-align: center;
    max-width: 560px;
    margin: 0 auto !important; /* falls Browser das als Hint nutzt */
  }

  .os-header__title{
    font-size: 1.55rem;
    font-weight: 600;
  }

  .os-header__subtitle{
    font-size: 1.05rem;
  }
}


/* ============================================================
   3) OS82DD BUTTONS (eigene Klasse, KEIN .btn überschreiben!)
   Verwendung:
   <a class="os-btn" ...>Text</a>
   Varianten: os-btn--sm, os-btn--lg, os-btn--block, os-btn--hero
   ============================================================ */

.os-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 35px;
  min-width: 90px;
  padding: 0 14px;

  background: rgb(87,168,154);
  color: #fff !important;

  border: none;
  border-radius: 6px;

  font-size: 16px;
  font-weight: 600;
  line-height: 1;

  cursor: pointer;
  text-decoration: none !important;

  transition: background .2s ease, transform .08s ease;
}

.os-btn:hover,
.os-btn:focus{
  background: rgb(70,145,133);
}

.os-btn:active{
  transform: translateY(1px);
}

.os-btn--sm{
  height: 30px;
  min-width: 80px;
  padding: 0 12px;
  font-size: 14px;
}

.os-btn--lg{
  height: 42px;
  min-width: 120px;
  padding: 0 18px;
  font-size: 17px;
}

.os-btn--block{ width: 100%; }


/* ============================================================
   HERO-BUTTON (Call-to-Action)
   - wie alte Version: Hover hebt leicht an
   - focus-visible für Barrierefreiheit
   - optional über --btn/--btn-hover steuerbar
   ============================================================ */

.os-btn--hero{
  height: auto;
  min-width: 190px;
  padding: .95rem 1.15rem;
  border-radius: 10px;

  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .2px;

  background: var(--btn, rgb(87,168,154));
  backdrop-filter: blur(6px);

  transition: background .15s ease, transform .08s ease;
}

.os-btn--hero:hover{
  background: var(--btn-hover, rgb(70,145,133));
  transform: translateY(-1px);
}

.os-btn--hero:active{
  transform: translateY(1px);
}

.os-btn--hero,
.os-btn--hero:hover,
.os-btn--hero:visited,
.os-btn--hero:focus,
.os-btn--hero:active{
  color: #fff !important;
  text-decoration: none !important;
}

.os-btn--hero:focus-visible{
  outline: 3px solid rgba(0,0,0,.25);
  outline-offset: 3px;
}

@media (max-width: 600px){
  .os-btn--hero{
    min-width: 100%;
    padding: .9rem 1rem;
    font-size: 0.95rem;
  }
}


/* ============================================================
   3a) OS82DD INFOBOX (Hero-Infokarten)
   Verwendung:
   <div class="os-btn os-btn--infobox">...</div>
   optional breit:
   <div class="os-btn os-btn--infobox os-btn--infobox--wide">...</div>
   ============================================================ */

.os-btn--infobox{
  flex-direction: column;
  align-items: center;
  justify-content: center;

  height: auto;
  min-width: 190px;
  padding: 0.45rem 0.85rem;

  border-radius: 10px;

  background: rgba(87,168,154, 0.75);
  backdrop-filter: blur(6px);

  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;

  pointer-events: none;
  cursor: default;

  transform: none;
}

.os-btn--infobox:hover,
.os-btn--infobox:focus{
  background: rgba(87,168,154, 0.75);
}

.os-btn--infobox--wide{
  min-width: 300px;
}

.os-btn--infobox .btn-role{
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.os-btn--infobox .btn-name{
  font-size: .95rem;
  font-weight: 400;
  margin-top: 0.15rem;
  line-height: 1.25;
}

.os-btn--infobox .btn-mail{
  font-size: .8rem;
  margin-top: 0.35rem;
  opacity: 0.95;
  line-height: 1.2;
  word-break: break-word;
}

@media (max-width: 600px){
  .os-btn--infobox{
    min-width: 100%;
  }
}

/* ============================================================
   BUTTON-VARIANTE: ZURÜCK
   - Optik wie alter back-button
   - Radius an neuen Style angepasst
   - etwas mehr vertikaler Abstand
   ============================================================ */

.os-btn--back{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* Größe wie früher */
  height: 35px;
  min-width: 90px;
  padding: 0 14px;

  /* Farbe exakt wie alter Stil */
  background: rgb(87,168,154);
  color: #fff !important;

  /* neue Abrundung */
  border-radius: 6px;

  /* Typo wie früher */
  font-size: 16px;
  font-weight: 400;
  line-height: 1;

  border: none;
  cursor: pointer;
  text-decoration: none !important;

  /* etwas mehr Luft nach oben/unten */
  margin-block: 18px;

  transition: background .25s ease;
}

/* Hover exakt wie früher */
.os-btn--back:hover,
.os-btn--back:focus{
  background: rgb(67,148,134);
}

/* kein Bewegungseffekt */
.os-btn--back:active{
  transform: none;
}

/* ============================================================
   4) KOMPONENTE: TEXT (OS82DD)
   Zweck:
   - neutrale Textbasis für Layouts, Boxen, Teaser
   - steuert AUSSCHLIESSLICH Typografie
   - keine Farben, keine Margins, kein Layout
   ============================================================ */

.os-text{
  font-size: 1rem;
  line-height: 1.5;
  color: inherit;
}

/* ============================================================
   TEXT-GRÖSSEN (explizit & kontrolliert)
   ============================================================ */

.os-text--sm{
  font-size: 0.9rem;
  line-height: 1.45;
}

.os-text--md{
  font-size: 1rem;
  line-height: 1.5;
}

.os-text--lg{
  font-size: 1.1rem;
  line-height: 1.55;
}

.os-text--xl{
  font-size: 1.25rem;
  line-height: 1.6;
}

/* ============================================================
   OPTIONALE TEXT-MODIFIER
   (ruhig, CMS-sicher)
   ============================================================ */

.os-text--muted{
  color: rgba(0,0,0,.7);
}

.os-text--strong{
  font-weight: 600;
}

.os-text--compact{
  line-height: 1.35;
}




/* ============================================================
   5) KOMPONENTE: DOWNLOADS (gekapselt)
   ============================================================ */

.os-downloads{
  --border: rgba(0,0,0,.12);
  --border-hover: rgba(0,0,0,.22);

  max-width: 900px;
  margin: 0 auto;
  color: #111;
}

.os-downloads__list{
  list-style: none;
  padding: 0 !important;
  margin: 0 !important;
  display: grid;
  gap: 10px;
}

.os-downloads__item{
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: background .2s ease, border-color .2s ease;
}

.os-downloads__item:hover{
  background: #f7f7f7;
  border-color: var(--border-hover);
}

.os-downloads__link{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: .8rem .9rem;
  color: inherit !important;
  text-decoration: none !important;
}

.os-downloads__title{
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.35;
}

.os-downloads__icon{
  width: 2.5em;
  height: 2.5em;
  flex-shrink: 0;
}


/* ============================================================
   6) KOMPONENTE: TERMINE (Terminseite: Kartenoptik)
   ============================================================ */

.os-termine{
  --accent: rgb(87,168,154);
  --border: rgba(0,0,0,.12);
  --muted: rgba(0,0,0,.70);

  max-width: 720px;
  margin: 0 auto;
  color: #111;
}

.os-termine__list{
  list-style: none;
  padding: 0 !important;
  margin: 0 !important;
  display: grid;
  gap: 10px;
}

.os-termine__item{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .8rem .9rem;
  background: #fff;
  display: grid;
  gap: 4px;
}

.os-termine__date{
  font-weight: 400;
  font-size: .95rem;
}

.os-termine__text{
  color: var(--muted);
  line-height: 1.4;
  font-size: 1rem;
}

.os-termine__text a{
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.os-termine__text a:hover{
  text-decoration: underline;
}


/* ============================================================
   7) KOMPONENTE: INFOBOX (Basis)
   ============================================================ */

.infobox{
  --accent: rgb(87,168,154);
  --border: rgba(0,0,0,.12);
  --muted: rgba(0,0,0,.70);

  border: 2px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px 12px;
  color: #111;
}

.infobox *{
  box-sizing: border-box;
}

/* ---------- optional: “als Link” (ganze Box klickbar) ---------- */
.infobox.is-link{
  display: block;
  text-decoration: none;
  color: inherit;
}

/* kein Hover auf normalen Infoboxen */
.infobox.is-link:hover{
  /* bewusst leer */
}

/* Fokus sichtbar (Barrierefreiheit) */
.infobox.is-link:focus-visible{
  outline: 3px solid rgba(87,168,154,.35);
  outline-offset: 3px;
}

/* ============================================================
   VARIANTE: INFOBOX -- ALLGEMEIN
   ============================================================ */

.infobox--allgemein{
  max-width: 100%;
}

.infobox--allgemein .infobox__title{
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 6px 0;
}

.infobox--allgemein .infobox__divider{
  border: 0;
  border-top: 1px solid var(--border);
  margin: 8px 0 12px;
  height: 0;
}

.infobox--allgemein .infobox__content{
  font-size: 0.98rem;
  line-height: 1.5;
}

.infobox--allgemein .infobox__content a{
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.infobox--allgemein .infobox__content a:hover{
  text-decoration: underline;
}

/* ============================================================
   LAYOUT: INFOBOX-GRID
   ============================================================ */

.infobox-grid{
  --tile: 260px;
  display: grid;
  gap: 1rem;

  justify-content: center;
  justify-items: center;
  align-items: stretch;

  grid-template-columns: repeat(
    auto-fit,
    minmax(min(100%, var(--tile)), var(--tile))
  );
}

@media (min-width: 1200px){
  .infobox-grid{ --tile: 280px; }
}

.infobox--full{
  grid-column: 1 / -1;
  justify-self: stretch;
}

/* ============================================================
   VARIANTE: INFOBOX -- PINNWAND
   - Bild 8:5
   - Hover NUR Lift + Shadow
   ============================================================ */

.infobox--pinnwand{
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 12px;
}

/* Bildcontainer */
.infobox--pinnwand .infobox__media{
  width: 100%;
  aspect-ratio: 8 / 5;
  overflow: hidden;

  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

/* Bild */
.infobox--pinnwand .infobox__image{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Text */
.infobox--pinnwand .infobox__title{
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
}

.infobox--pinnwand .infobox__meta{
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- HOVER: NUR BEWEGUNG + TIEFE ---------- */
.infobox--pinnwand.is-link{
  transition: transform .12s ease, box-shadow .12s ease;
}

.infobox--pinnwand.is-link:hover{
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,.08);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce){
  .infobox--pinnwand.is-link{
    transition: none;
  }
  .infobox--pinnwand.is-link:hover{
    transform: none;
  }
}


/* ============================================================
   8) KOMPONENTE: LEFT–RIGHT LAYOUT (robust, TYPO3-sicher)
   ============================================================ */

.lr-layout{
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}

.lr-layout__left{
  font-size: 1rem;
  line-height: 1.5;
}

.lr-layout__right{
  width: 100%;
}

.lr-layout__right--narrow{
  max-width: 320px;
}


/* ============================================================
   9) KOMPONENTE: KONTAKT-BOX
   ============================================================ */

.kontakt-box{
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  background: #fff;
  padding: 1rem 1.1rem;
  font-size: .95rem;
}

.kontakt-box__title{
  margin: 0 0 .5rem 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.kontakt-box__divider{
  border: none;
  height: 1px;
  background: rgba(0,0,0,.12);
  margin: .6rem 0;
}

.kontakt-list{
  list-style: none;
  padding: 0;
  margin: 0;
}

.kontakt-list li{
  margin-bottom: .4rem;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px){
  .lr-layout{
    grid-template-columns: 1fr;
  }

  .lr-layout__right--narrow{
    max-width: none;
  }
}

/* ============================================================
     10) KOMPONENTE: BILDGALERIE
   ============================================================ */
.os-gallery-wrap {
  --gap: 14px;
  --thumb-radius: 8px;
  --thumb-shadow: 0 6px 18px rgba(0,0,0,.15);
}

.os-gallery {
  column-gap: var(--gap);
  columns: 1;
}
@media (min-width: 560px){ .os-gallery{ columns: 2; } }
@media (min-width: 900px){ .os-gallery{ columns: 3; } }
@media (min-width: 1200px){ .os-gallery{ columns: 4; } }

.os-gallery .item {
  break-inside: avoid;
  margin-bottom: var(--gap);
  position: relative;
  border-radius: var(--thumb-radius);
  overflow: hidden;
  box-shadow: var(--thumb-shadow);
}

.os-gallery .item a {
  display: block;
  line-height: 0;
}

.os-gallery .item img {
  display: block;
  width: 100%;
  height: auto;
  background: #e9eef3;
  transition: transform .25s ease, filter .25s ease;
}

.os-gallery .item:hover img {
  transform: scale(1.02);
  filter: saturate(1.05);
}

.os-gallery .caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  color: #fff;
  font-size: 14px;
  opacity: 0;
  transition: opacity .2s ease;
}

.os-gallery .item:hover .caption {
  opacity: 1;
}


/* ============================================================
   ERWEITERUNG: STARTSEITE – TERMINBOX
   Zweck:
   - kompakte Box für Startseite
   - nutzt die gleichen Klassen wie Terminseite (os-termine__*)
   - Darstellung IN der Box: Linien statt Karten
   ============================================================ */

.termine-box{
  --accent: rgb(87,168,154);
  --border: rgba(0,0,0,.12);
  --muted: rgba(0,0,0,.70);

  max-width: 500px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px 12px;
  color: #111;
}

.termine-box__title{
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.termine-box__divider{
  border: none;
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}

.termine-box__state{
  margin: 0 0 8px 0;
  font-size: .95rem;
  color: var(--muted);
}

/* Liste innerhalb der Box */
.termine-box .os-termine__list{
  list-style: none;
  padding: 0 !important;
  margin: 0 !important;
  display: grid;
  gap: 0;
}

/* Override: Linien statt Karten NUR in der Box */
.termine-box .os-termine__item{
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  padding: 10px 2px;
  display: grid;
  gap: 3px;
}

.termine-box .os-termine__item:first-child{
  border-top: none;
  padding-top: 2px;
}

.termine-box .os-termine__date{
  font-weight: 400;
  font-size: .95rem;
}

.termine-box .os-termine__text{
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.35;
}

.termine-box .os-termine__text a{
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.termine-box .os-termine__text a:hover{
  text-decoration: underline;
}

.termine-box__divider--before-btn{
  margin: 12px 0 10px 0;
}

.termine-box__footer{
  display: flex;
  justify-content: center;
}

@media (max-width: 520px){
  .termine-box{
    border-radius: 0;
  }

  .termine-box__footer .os-btn{
    width: 100%;
  }
}


/* ============================================================
   OPTIONAL: Header-Verlauf
   ============================================================ */

header#pageTop,
#pageTop.header.main-header{
  background: linear-gradient(
    to bottom,
    #2C544D 0%,
    #2C544D 22%,
    #315F57 40%,
    #3C7369 58%,
    #4C8E82 78%,
    #57A89A 100%
  ) !important;
}

/* ============================================================
   GLOBAL: Hintergrundfarbe (vereinbart)
   ============================================================ */
html, body{
  background: #f8fafc !important;
}

</style>
