@charset "UTF-8";

/* ==================================================
   1. DESIGN-VARIABLEN (Farben & Grundlayout)
   ================================================== */

:root {
  /* Cassiopeia / Joomla */
  --cassiopeia-color-primary: #a6cb51;
  --cassiopeia-color-link: #004a99;
  --cassiopeia-color-hover: #003366;

  /* Bootstrap 5 */
  --bs-body-bg: var(--school-grey);
  --bs-body-color: var(--school-white);

  /* Cassiopeia Fallbacks */
  --body-bg: var(--school-grey);
  --body-color: var(--school-white);

  /* Schulfarben */
  --school-blue: #0199ff;
  --school-green: #a6cb51;
  --school-red: #e95428;
  --school-grey: #3d3d3d;
  --school-white: #e6e6e6;

  /* Überschriften – Variante A (ruhig) */
  --school-green-heading: #6f8f2e;

  /* Alternative (freundlich):
     --school-green-heading: #7fa33a;
  */
}

/* ==================================================
   2. GRUNDLAYOUT & TYPOGRAFIE
   ================================================== */

body {
  font-size: 17px;
  line-height: 1.65;
}

/* ==================================================
   3. HEADER & BRANDING
   ================================================== */

header {
  background-image: none !important;
  background-color: #ffffff;
}

header .site-branding img,
header .navbar-brand img,
header img.brand-logo {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

/* ==================================================
   4. ÜBERSCHRIFTEN (global & beitragsbezogen)
   ================================================== */

h1 { font-weight: 700; }
h2, h3 { font-weight: 600; }

.site-main {
  --bs-heading-color: var(--school-green-heading);
}

.site-main h1,
.site-main h2,
.site-main h3,
.site-main h4,
.site-main h5,
.site-main h6,
.site-main .page-header h1,
.site-main .item-title,
.site-main .card-title,
.item-content h1,
.item-content h2,
.item-content h3,
.item-content h4,
.item-content h5,
.item-content h6 {
  color: var(--school-green-heading) !important;
}

.site-main h1 a,
.site-main h2 a,
.site-main h3 a,
.site-main h4 a,
.site-main h5 a,
.site-main h6 a {
  color: var(--school-green-heading);
  text-decoration: none;
}

.site-main h1 a:hover,
.site-main h2 a:hover,
.site-main h3 a:hover {
  text-decoration: underline;
}

/* ==================================================
   ÜBERSCHRIFTEN – GLOBALER FALLBACK (Joomla / Bootstrap)
   ================================================== */

/* Bootstrap-Überschriften überall absichern */
h1, h2, h3, h4, h5, h6 {
  color: var(--school-green-heading);
}

/* Modul- & Kartenüberschriften */
.card-title,
.card-header,
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
.moduletable h1,
.moduletable h2,
.moduletable h3,
.moduletable h4,
.moduletable h5,
.moduletable h6 {
  color: var(--school-green-heading);
}


/* ==================================================
   5. LINKS
   ================================================== */

/* Fließtext (Beiträge, Seiteninhalte) */
.item-content a {
  color: var(--school-blue);
  text-decoration: none;
}

.item-content a:hover,
.item-content a:focus {
  color: color-mix(in srgb, var(--school-blue) 75%, black);
}

/* Allgemeine Links (ohne Buttons & Navigation) */
.site a:not(.btn):not(.nav-link):not(.dropdown-item) {
  color: var(--school-blue);
  text-decoration: none;
}

.site a:not(.btn):not(.nav-link):not(.dropdown-item):hover,
.site a:not(.btn):not(.nav-link):not(.dropdown-item):focus {
  color: color-mix(in srgb, var(--school-blue) 75%, black);
}

/* ==================================================
   ARTIKEL-INFOS (Meta-Daten)
   ================================================== */

/* Begriff (z. B. "Details") */
.article-info-term {
  color: color-mix(in srgb, var(--school-grey) 55%, var(--school-white));
  font-weight: 500;
}

/* Werte (z. B. Datum, Autor) */
.article-info dd,
.article-info .modified,
.article-info time {
  color: color-mix(in srgb, var(--school-grey) 60%, var(--school-white));
}

/* Icons in Artikel-Infos */
.article-info .icon-calendar,
.article-info [class^="icon-"],
.article-info [class*=" icon-"] {
  color: color-mix(in srgb, var(--school-grey) 60%, var(--school-white));
}


/* ==================================================
   6. HAUPTMENÜ – ORANGE KACHELN (FINAL)
   ================================================== */

ul.mod-menu.nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0;
}

ul.mod-menu.nav > li {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 10;
}

/* Kachel */
.site ul.mod-menu.nav > li > a {
  display: block;
  padding: 12px 8px;
  background: #e95428;
  color: #ffffff !important;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none !important;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

/* Hover & aktiv */
.site ul.mod-menu.nav > li > a:hover,
.site ul.mod-menu.nav > li > a:focus,
.site ul.mod-menu.nav > li.active > a,
.site ul.mod-menu.nav > li.current > a {
  background: #ffffff;
  color: #e95428 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* 3D-Effekt */
}

/* Pfeil bei Untermenü */
.site ul.mod-menu.nav > li > a:has(+ ul)::after {
  content: " ▾";
  font-size: 0.85em;
  margin-left: 4px;
}

.container-header .mod-menu>li.active:after, .container-header .mod-menu>li:hover:after {
  background: transparent;
}

/* ==================================================
   7. DROPDOWNS
   ================================================== */

.site ul.mod-menu.nav > li > ul {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 180px;
  padding: 6px 0;
  background: #ffffff;
  border: 1px solid #dddddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 2000;
}

/* Dropdown öffnen */
.site ul.mod-menu.nav > li:hover > ul,
.site ul.mod-menu.nav > li > a:hover + ul,
.site ul.mod-menu.nav > li:focus-within > ul {
  display: block;
}

/* Kulanzbereich */
.site ul.mod-menu.nav > li::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
}

/* Dropdown-Links */
.site ul.mod-menu.nav > li > ul > li {
  list-style: none;
}

.site ul.mod-menu.nav > li > ul > li > a {
  display: block;
  padding: 8px 14px;
  color: #e95428 !important;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
}

.site ul.mod-menu.nav > li > ul > li > a:hover,
.site ul.mod-menu.nav > li > ul > li > a:focus {
  background: #e95428;
  color: #ffffff !important;
}

/* ==================================================
   8. FOOTER
   ================================================== */

footer.container-footer.footer.full-width {
  background: #f7f7f7 !important;
  color: #777777 !important;
}

footer.container-footer.footer.full-width::before,
footer.container-footer.footer.full-width::after {
  content: none !important;
}

footer.container-footer.footer.full-width .grid-child {
  background: #f7f7f7 !important;
}

footer.container-footer.footer.full-width .mod-custom,
footer.container-footer.footer.full-width table,
footer.container-footer.footer.full-width td {
  background: transparent !important;
  color: #777777 !important;
}

/* ==================================================
   FOOTER – Links wie normaler Text
   ================================================== */

footer.container-footer.footer.full-width a {
  color: #777777 !important;
  text-decoration: none;
}

/* Optional: dezentes Hover-Feedback */
footer.container-footer.footer.full-width a:hover,
footer.container-footer.footer.full-width a:focus {
  color: #555555 !important;
  text-decoration: none;
}

/* ==================================================
   PAGINATION – aktive Seite mit weißer Linie oben & unten
   ================================================== */

.page-item.active .page-link {
  color: var(--school-white) !important;
  background-color: color-mix(in srgb, var(--school-grey) 70%, black);

  /* entscheidend */
  border-top: 1px solid var(--school-white);
  border-bottom: 1px solid var(--school-white);
  border-left: 1px solid color-mix(in srgb, var(--school-grey) 70%, black);
  border-right: 1px solid color-mix(in srgb, var(--school-grey) 70%, black);
}

/* ==================================================
   BACK-TO-TOP-BUTTON (Schulblau)
   ================================================== */

.back-to-top-link {
  color: var(--school-blue) !important;
  background-color: #ffffff !important;
  border-color: var(--school-blue) !important;
}

/* Hover / Fokus */
.back-to-top-link:hover,
.back-to-top-link:focus {
  color: #ffffff !important;
  background-color: var(--school-blue) !important;
  border-color: var(--school-blue) !important;
}

/* ==================================================
   BUTTONS – Primary (Schulblau)
   ================================================== */

.btn-primary {
  background-color: var(--school-blue) !important;
  border-color: var(--school-blue) !important;
  color: #ffffff !important;
}

/* Hover / Fokus */
.btn-primary:hover,
.btn-primary:focus {
  background-color: color-mix(in srgb, var(--school-blue) 85%, black) !important;
  border-color: color-mix(in srgb, var(--school-blue) 85%, black) !important;
  color: #ffffff !important;
}

/* Aktiv (geklickt) */
.btn-primary:active,
.btn-primary.active {
  background-color: color-mix(in srgb, var(--school-blue) 75%, black) !important;
  border-color: color-mix(in srgb, var(--school-blue) 75%, black) !important;
}


/* ==================================================
   SIDEBAR RECHTS – Termine mit Abstand & Helligkeit
   ================================================== */

/* Modul */
.sidebar-right.card {
  background-color: color-mix(in srgb, var(--school-grey) 85%, white);
  border: none;
  border-radius: 8px;                 /* ← etwas runder */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Überschrift */
.sidebar-right.card .card-header {
  background-color: transparent;
  border: none;
  color: var(--school-white);
  font-weight: 600;
  padding-bottom: 0.25rem;
}

/* Inhalt */
.sidebar-right.card .card-body {
  background-color: transparent;
  padding-top: 0.4rem;
}

/* Liste */
.sidebar-right .list-group {
  background-color: transparent;
}

/* Einzelne Termine */
.sidebar-right .list-group-item {
  background-color: color-mix(in srgb, var(--school-grey) 80%, white);
  border: none;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;                 /* ← etwas runder */
}

/* Abstand zwischen ALLEN Einträgen (auch optisch sichtbar) */
.sidebar-right .list-group-item + .list-group-item {
  margin-top: 0.5rem;
}

/* ==================================================
   VOR / ZURÜCK – BEITRAGSNAVIGATION
   ================================================== */

/* Grundzustand */
a.btn.btn-secondary.previous,
a.btn.btn-secondary.next {
  color: var(--school-blue);
}

/* Icons ebenfalls blau */
a.btn.btn-secondary.previous .icon-chevron-left,
a.btn.btn-secondary.next .icon-chevron-right {
  color: var(--school-blue);
}

/* Hover / Fokus */
a.btn.btn-secondary.previous:hover,
a.btn.btn-secondary.previous:focus,
a.btn.btn-secondary.next:hover,
a.btn.btn-secondary.next:focus {
  color: color-mix(in srgb, var(--school-blue) 75%, black);
}

/* ==================================================
   jDownloads – Download-Buttons mit stärkerer 3D-Optik
   ================================================== */

a.jdbutton.jgreen {
  background-color: var(--school-blue) !important;
  background-image: none !important;
  border-color: var(--school-blue) !important;
  color: #ffffff !important;
  text-shadow: none !important;

  /* 3D-Effekt */
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.25),
    0 1px 0 rgba(255, 255, 255, 0.25) inset;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* Hover / Fokus */
a.jdbutton.jgreen:hover,
a.jdbutton.jgreen:focus {
  background-color: color-mix(in srgb, var(--school-blue) 85%, black) !important;
  background-image: none !important;
  border-color: color-mix(in srgb, var(--school-blue) 85%, black) !important;
  color: #ffffff !important;

  box-shadow:
    0 3px 6px rgba(0, 0, 0, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
  transform: translateY(-1px);
}

/* Aktiver Klick */
a.jdbutton.jgreen:active {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.35) inset;
  transform: translateY(0);
}
