/* =========================================================
   Realschule Krumbach – Child-Template „rskbunt“ (Cassiopeia)
   Farben je Bereich:
   Aktuelles = gelb · Unsere Schule = blau · Profil = orange
   Schulleben = grün · Eltern & Service = beere
   ========================================================= */

/* ---------- Schriften (lokal, kein Google-Server) ---------- */
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../fonts/opensans.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Farben ---------- */
:root {
  --rs-navy: #112855;
  --rs-navy-hell: #DCE3F0;
  --rs-gelb: #F6B800;
  --rs-blau: #1D5FB8;
  --rs-orange: #F39200;
  --rs-gruen: #237A46;
  --rs-beere: #A8285F;
  --rs-sand: #F4F1EA;
  --rs-text: #1B2433;
  --rs-grau: #4A5568;
  --rs-linie: #E6E2D8;
  --rs-schatten: 0 4px 14px rgba(17, 40, 85, .08);
  --rs-radius: 20px;
  --rs-band: linear-gradient(90deg,
      var(--rs-gelb) 0 20%, var(--rs-blau) 20% 40%, var(--rs-orange) 40% 60%,
      var(--rs-gruen) 60% 80%, var(--rs-beere) 80% 100%);

  --cassiopeia-color-primary: var(--rs-navy);
  --cassiopeia-color-link: var(--rs-blau);
  --cassiopeia-color-hover: var(--rs-beere);
}

/* ---------- Grundlayout ---------- */
html body.site {
  background: var(--rs-sand);
  color: var(--rs-text);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: clip;
}
body.site h1, body.site h2, body.site h3, body.site h4, body.site h5, body.site h6,
body.site .page-header h1, body.site .card-header {
  font-family: "Nunito", "Open Sans", Arial, sans-serif;
  color: var(--rs-navy);
  font-weight: 900;
  line-height: 1.2;
}
body.site h1 { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem); }
body.site h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
body.site a { color: var(--rs-blau); text-underline-offset: .18em; }
/* Links ohne Unterstreichung; im Text beim Darüberfahren unterstrichen */
html body.site a,
html body.site a:not([class]) { text-decoration: none; }
html body.site main a:not([class]):hover,
html body.site main a:not([class]):focus { text-decoration: underline; }
html body.site main p a:not([class]) { font-weight: 600; }
body.site a:hover, body.site a:focus { color: var(--rs-beere); }
body.site :focus-visible { outline: 3px solid var(--rs-orange); outline-offset: 2px; }

/* ---------- Kopfbereich ---------- */
body.site .container-header {
  background: var(--rs-navy);
  background-image: none;
  box-shadow: 0 2px 12px rgba(17, 40, 85, .15);
}
.container-header .navbar-brand { padding: .9rem 0; }
/* Logo: Schirm-Skulpturen als Bild, Schriftzug als Text in Nunito */
.container-header .brand-logo {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  color: #fff;
  text-decoration: none;
}
.container-header .brand-logo img {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 138px;
  height: 62px;
  max-height: none;
  object-fit: cover;
  object-position: left center;
}
.container-header .brand-logo::before {
  content: "REALSCHULE KRUMBACH" / "";
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  font-family: "Nunito", "Open Sans", sans-serif;
  font-weight: 900;
  font-size: 1.55rem;
  letter-spacing: .06em;
  line-height: 1.05;
  color: #fff;
}
.container-header .brand-logo::after {
  content: "Staatliche Realschule" / "";
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  font-size: .9rem;
  color: #C9D3E6;
}

/* Menüzeile: weiß, über die ganze Breite, mit Farbband oben */
.container-header .container-nav {
  position: relative;
  isolation: isolate;
  background: transparent;
  padding-top: 6px;
  padding-bottom: 0;
  margin-top: 0;
}
.container-header .container-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 6px;
  transform: translateX(-50%);
  background: var(--rs-band);
}
/* weiße Fläche hinter der Menüzeile über die ganze Breite (schneidet Untermenüs nicht ab) */
.container-header .container-nav::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: #fff;
  z-index: -1;
}
.container-header .navbar { padding: 0; }

/* Hauptmenü */
.container-header .mod-menu.metismenu > li { --rs-c: var(--rs-navy); }
.container-header .mod-menu.metismenu > li.item-101 { --rs-c: var(--rs-gelb); }
.container-header .mod-menu.metismenu > li.item-102 { --rs-c: var(--rs-blau); }
.container-header .mod-menu.metismenu > li.item-372 { --rs-c: var(--rs-orange); }
.container-header .mod-menu.metismenu > li.item-105 { --rs-c: var(--rs-gruen); }
.container-header .mod-menu.metismenu > li.item-104 { --rs-c: var(--rs-beere); }

.container-header .mod-menu.metismenu > li > a,
.container-header .mod-menu.metismenu > li > button,
.container-header .mod-menu.metismenu > li > span {
  font-family: "Nunito", "Open Sans", sans-serif;
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--rs-navy);
  background: transparent;
  padding: .85rem 1rem .65rem;
  border-bottom: 4px solid var(--rs-c);
  text-decoration: none;
}
.container-header .mod-menu.metismenu > li > a:hover,
.container-header .mod-menu.metismenu > li > button:hover,
.container-header .mod-menu.metismenu > li.active > a,
.container-header .mod-menu.metismenu > li.active > button {
  color: var(--rs-navy);
  background: color-mix(in srgb, var(--rs-c) 14%, #fff);
}
.container-header .mod-menu.metismenu .mm-toggler::after { border-color: var(--rs-navy) transparent transparent; }

/* Untermenüs */
.container-header .mod-menu.metismenu > li > ul {
  background: #fff;
  border: 0;
  border-top: 4px solid var(--rs-c);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 12px 28px rgba(17, 40, 85, .16);
  padding: .4rem 0;
  min-width: 15rem;
}
.container-header .mod-menu.metismenu ul li > a,
.container-header .mod-menu.metismenu ul li > button {
  color: var(--rs-navy);
  font-weight: 600;
  padding: .55rem 1.1rem;
}
.container-header .mod-menu.metismenu ul li > a:hover,
.container-header .mod-menu.metismenu ul li > button:hover {
  background: color-mix(in srgb, var(--rs-c) 12%, #fff);
  color: var(--rs-navy);
}
.container-header .mod-menu.metismenu ul ul {
  border-left: 3px solid color-mix(in srgb, var(--rs-c) 50%, #fff);
  margin-left: 1rem;
}

/* Handy-Menü */
.container-header .navbar-toggler {
  color: var(--rs-navy);
  border: 2px solid var(--rs-navy);
  border-radius: 12px;
  margin: .6rem 0;
  padding: .45rem .7rem;
}
@media (max-width: 991.98px) {
  .container-header .mod-menu.metismenu > li > a,
  .container-header .mod-menu.metismenu > li > button {
    width: 100%;
    text-align: left;
    border-bottom: 0;
    border-left: 6px solid var(--rs-c);
    margin-bottom: 4px;
  }
  .container-header .mod-menu.metismenu > li > ul {
    box-shadow: none;
    border-top: 0;
    border-radius: 0;
  }
}

/* ---------- Brotkrumen ---------- */
body.site .mod-breadcrumbs {
  background: transparent;
  font-size: .9rem;
  padding-left: 0 !important;
  margin-bottom: .5rem;
}
body.site .mod-breadcrumbs__here { color: var(--rs-grau); }

/* ---------- Inhalt ---------- */
body.site .site-grid { padding-top: 1.75rem; }
body.site .container-banner, body.site .container-top-a, body.site .container-top-b { margin-bottom: 1.75rem; }
body.site .container-bottom-a, body.site .container-bottom-b { margin-top: 1.75rem; }
body.site .container-component > main,
body.site .com-content-article,
body.site .blog,
body.site .com-content-category-blog {
  background: transparent;
}
body.site .item-page,
body.site .com-content-category-blog .blog-item,
body.site .com-contact,
body.site .com-convertforms {
  background: #fff;
  border-radius: var(--rs-radius);
  box-shadow: var(--rs-schatten);
  padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
}
body.site .com-content-category-blog .blog-item { margin-bottom: 1.5rem; }
body.site .item-page img,
body.site .blog-item img { max-width: 100%; height: auto; border-radius: 12px; }
body.site .page-header { border: 0; margin-bottom: 1rem; }
body.site .page-header h1, body.site .page-header h2 { margin: 0; }

/* Knöpfe */
body.site .btn-primary,
body.site .readmore .btn,
body.site .rs-knopf {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--rs-navy);
  border: 2px solid var(--rs-navy);
  color: #fff;
  font-weight: 700;
  border-radius: 14px;
  padding: .7rem 1.2rem;
  text-decoration: none;
}
body.site .btn-primary:hover,
body.site .readmore .btn:hover { background: var(--rs-blau); border-color: var(--rs-blau); color: #fff; }

/* Seitenwechsel unter Beiträgen */
body.site .pagenavigation .btn {
  border-radius: 999px;
  border: 2px solid var(--rs-navy);
  color: var(--rs-navy);
  background: #fff;
}

/* ---------- Seitenleiste (Termine, Profile, Partner) ---------- */
body.site .container-sidebar-right .card,
body.site .container-sidebar-left .card {
  border: 0;
  border-radius: var(--rs-radius);
  overflow: hidden;
  box-shadow: var(--rs-schatten);
  margin-bottom: 1.5rem;
}
body.site .container-sidebar-right .card-header {
  border: 0;
  font-size: 1.2rem;
  padding: .9rem 1.3rem;
  background: var(--rs-navy);
  color: #fff;
}
body.site .card:has(#mod-custom111) .card-header { background: var(--rs-gelb); color: var(--rs-navy); }
body.site .card:has(#mod-custom118) .card-header { background: var(--rs-blau); }
body.site .card:has(#mod-custom110) .card-header { background: var(--rs-gruen); }
body.site .container-sidebar-right .card-body { padding: 1rem 1.3rem 1.2rem; }

/* Termine: jede Zeile mit farbigem Punkt */
#mod-custom111 p { margin: 0; padding: .6rem 0 .6rem 1.4rem; border-bottom: 1px solid var(--rs-linie); position: relative; }
#mod-custom111 p:last-child, #mod-custom111 p:has(> br:only-child) { border-bottom: 0; }
#mod-custom111 p:empty, #mod-custom111 p:not(:has(*)):is(:empty) { display: none; }
#mod-custom111 p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: .6rem;
  height: .6rem;
  border-radius: 50%;
  background: var(--rs-blau);
}
#mod-custom111 p:nth-child(4n+2)::before { background: var(--rs-gruen); }
#mod-custom111 p:nth-child(4n+3)::before { background: var(--rs-beere); }
#mod-custom111 p:nth-child(4n+4)::before { background: var(--rs-orange); }

/* Logos in Profile/Partner */
/* Termine aus dem Elternkalender (Schulmanager) */
body.site .card:has(.rs-termine) .card-header { background: var(--rs-gelb); color: var(--rs-navy); }
.rs-termine { list-style: none; margin: 0; padding: 0; }
.rs-termine__eintrag {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: .75rem 0;
  border-bottom: 1px solid var(--rs-linie);
}
.rs-termine__eintrag:last-child { border-bottom: 0; }
.rs-termine__datum {
  flex: none;
  width: 3.3rem;
  height: 3.3rem;
  border-radius: 12px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "Nunito", "Open Sans", sans-serif;
  font-weight: 900;
  line-height: 1;
  background: var(--rs-navy);
}
.rs-termine__datum--blau { background: var(--rs-blau); }
.rs-termine__datum--gruen { background: var(--rs-gruen); }
.rs-termine__datum--beere { background: var(--rs-beere); }
.rs-termine__datum--orange { background: var(--rs-orange); color: var(--rs-navy); }
.rs-termine__tag { font-size: 1.3rem; }
.rs-termine__monat { font-size: .7rem; letter-spacing: .04em; margin-top: 2px; }
.rs-termine__text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.rs-termine__titel { font-weight: 700; color: var(--rs-navy); line-height: 1.3; }
.rs-termine__info { font-size: .88rem; color: var(--rs-grau); }

/* Logos in Profile/Partner als Raster */
#mod-custom118, #mod-custom110 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
}
#mod-custom118 p, #mod-custom110 p {
  margin: 0;
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .5rem;
  background: #fff;
  border: 1px solid var(--rs-linie);
  border-radius: 12px;
}
#mod-custom118 p:not(:has(img)), #mod-custom110 p:not(:has(img)) { display: none; }
#mod-custom118 p a, #mod-custom110 p a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
#mod-custom118 img, #mod-custom110 img {
  max-width: 100%;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0;
}
#mod-custom118 p:hover, #mod-custom110 p:hover { border-color: var(--rs-blau); }

/* ---------- Startseite ---------- */
body.startseite.view-article .container-component > main { display: none; }
body.startseite .site-grid { padding-top: 2rem; }

/* Titelbild */
.rs-hero {
  display: flex;
  flex-wrap: wrap;
  background: var(--rs-navy);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(17, 40, 85, .18);
}
.rs-hero__bild {
  flex: 999 1 520px;
  min-height: 320px;
  display: block;
  position: relative;
}
.rs-hero__bild img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rs-hero__text {
  flex: 1 1 340px;
  padding: clamp(1.75rem, 1rem + 2vw, 2.75rem);
  color: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}
.rs-hero__text::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 14px;
  background: var(--rs-orange);
  border-bottom-left-radius: 14px;
}
body.site .rs-hero__text h1 { color: #fff; margin: 0; }
.rs-hero__text p { margin: 0; color: var(--rs-navy-hell); font-size: 1.1rem; }
.rs-hero__knoepfe { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .4rem !important; }
body.site .rs-knopf--orange { background: var(--rs-orange); border-color: var(--rs-orange); color: var(--rs-navy); }
body.site .rs-knopf--orange:hover { background: var(--rs-gelb); border-color: var(--rs-gelb); color: var(--rs-navy); }
body.site .rs-knopf--rahmen { background: transparent; border-color: rgba(255, 255, 255, .6); color: #fff; }
body.site .rs-knopf--rahmen:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* Kacheln */
.rs-kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.rs-kachel {
  border-radius: var(--rs-radius);
  padding: 1.4rem 1.5rem 1.1rem;
  color: #fff;
  --rs-k-linie: rgba(255, 255, 255, .28);
}
.rs-kachel--blau { background: var(--rs-blau); }
.rs-kachel--orange { background: var(--rs-orange); color: var(--rs-navy); --rs-k-linie: rgba(17, 40, 85, .25); }
.rs-kachel--gruen { background: var(--rs-gruen); }
.rs-kachel--beere { background: var(--rs-beere); }
body.site .rs-kachel__titel {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: inherit;
  font-size: 1.4rem;
  margin: 0 0 .75rem;
}
.rs-kachel__icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.rs-kachel--orange .rs-kachel__icon { background: rgba(255, 255, 255, .35); }
.rs-kachel__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rs-kachel ul { list-style: none; margin: 0; padding: 0; }
.rs-kachel li { border-top: 1px solid var(--rs-k-linie); }
body.site .rs-kachel a {
  display: block;
  padding: .55rem 0;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}
body.site .rs-kachel a::after { content: " ›"; opacity: .7; }
body.site .rs-kachel a:hover { color: inherit; text-decoration: underline; }

/* Abschnittsüberschrift (z. B. „Aktuelles“) */
body.site h2.rs-abschnitt { font-size: 2rem; margin: 0 0 1rem; }

/* News-Karten – Bild wird zugeschnitten, nie gequetscht */
.rs-news {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
body.site .rs-news__karte {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--rs-schatten);
  color: var(--rs-text);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
  --rs-k: var(--rs-blau);
}
.rs-news__karte--gruen { --rs-k: var(--rs-gruen); }
.rs-news__karte--blau { --rs-k: var(--rs-blau); }
.rs-news__karte--beere { --rs-k: var(--rs-beere); }
.rs-news__karte--orange { --rs-k: var(--rs-orange); }
body.site .rs-news__karte:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(17, 40, 85, .14); color: var(--rs-text); }
.rs-news__bild {
  display: block;
  aspect-ratio: 16 / 10;
  background: color-mix(in srgb, var(--rs-k) 25%, #fff);
  border-bottom: 5px solid var(--rs-k);
  overflow: hidden;
}
.rs-news__bild img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rs-news__text { display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.1rem 1.2rem; flex: 1; }
body.site .rs-news__titel { font-size: 1.12rem; font-weight: 800; margin: 0; color: var(--rs-navy); }
.rs-news__mehr { margin-top: auto; font-weight: 700; font-size: .95rem; color: var(--rs-blau); }
.rs-news__mehr::after { content: " ›"; }

/* ---------- Fußbereich ---------- */
body.site .container-footer {
  background: var(--rs-navy);
  background-image: none;
  color: var(--rs-navy-hell);
  position: relative;
  margin-top: 3rem;
  padding-top: 6px;
}
body.site .container-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--rs-band);
}
body.site .container-footer .grid-child {
  padding-right: 4.5rem !important;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
  padding: 2rem clamp(1rem, 3vw, 2rem);
}
body.site .container-footer .banner-overlay,
body.site .container-footer .overlay { background: transparent; padding: 0; min-height: 0; position: static; }
body.site .container-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin: 0; padding: 0; }
body.site .container-footer p { margin: 0; }
body.site .container-footer a { color: var(--rs-navy-hell); font-weight: 600; }
body.site .container-footer a:hover { color: #fff; }

/* Handy: kompakter Kopf, flacheres Titelbild */
@media (max-width: 991.98px) {
  .container-header .navbar-brand { padding: .5rem 0; }
  .container-header .brand-logo { column-gap: 10px; }
  .container-header .brand-logo img { width: 98px; height: 44px; }
  .container-header .brand-logo::before { font-size: 1.1rem; }
  .container-header .brand-logo::after { font-size: .75rem; }
  .container-header .navbar-toggler { margin: .4rem 0; }
}
@media (max-width: 575.98px) {
  .rs-hero__bild { min-height: 210px; }
  body.site .site-grid { padding-top: 1.1rem; }
}

/* Nach-oben-Knopf */
body.site .back-to-top-link { background: var(--rs-orange); color: var(--rs-navy); border-radius: 12px; }
