/* GS-LOTTE-SPACING-CONTRACT - 2026-08-26
 * Two defects, one root cause each, both visible on every subpage.
 *
 * 1) Header height. The fixed header measures 142px: a 4px border-top plus a
 *    138px inner. The inner's min-height of 110px never wins, because its own
 *    content is 90px and padding-block adds 2x24px on top. The token assumed
 *    the min-height would govern and stopped at 118px, so #smooth-content
 *    reserved 24px too little and every page started underneath the header -
 *    on pid 472 that clips the h1. Corrected to the measured value here;
 *    header-height-sync.js keeps it true at other widths and after webfonts
 *    swap in. This is open item E7 from the 2026-08-24 port review.
 *
 * 2) Section rhythm. Sections that still carry the pre-port gs-* names have no
 *    vertical rhythm at all: the draft stylesheets that once styled them
 *    (site.css, mandant-gs-v2.css) are no longer included, and they declared
 *    --gs-section / --gs-container, which no loaded file defines. The ported
 *    gsl-* sections read --gsl-section-pad-y and are correct at 80/96px.
 *    Map the leftover names onto that same token rather than giving them
 *    numbers of their own, so one token keeps driving the whole page rhythm.
 *
 * Deliberately NOT covered: .gs-hero (full-bleed by design), .gs-header,
 * .gs-footer, .gs-nav and the card/toggle classes - none of them are page
 * sections. Wrappers such as .min-ce stay untouched as well, otherwise the
 * already correct gsl-* sections inside them would be padded twice.
 */

:root {
  --gsl-header-height: 142px;
}

main :is(
  .gs-section-canvas,
  .gs-section-blue,
  .gs-section-red,
  .gs-section-green,
  .gs-section-yellow,
  .gs-section-orange,
  .gs-home-rubrics,
  .gs-projects
):not([class*="gsl-section"]) {
  padding-block: var(--gsl-section-pad-y);
}

.gs-section-blue.min-gallery > .min-gallery__subheader {
  width: min(var(--gsl-container), calc(100% - 2 * var(--gsl-gutter)));
  margin-inline: auto;
}

/* Kalender-CTA: Die alte Textlink-Regel setzte padding-bottom auf 2px.
   Den Schulbutton mit gleichmäßigen Innenabständen und gemeinsamem Pfeil führen. */
.gsl-termine__calendar-link .gsl-termine__calendar-cta {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  box-sizing: border-box;
  max-inline-size: 100%;
  padding-block: var(--gsl-space-3);
  border: 2px solid transparent;
  white-space: normal;
  line-height: 1.25;
}

.gsl-termine__calendar-cta .gsl-termine__calendar-text {
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

.gsl-termine__calendar-cta .gsl-termine__calendar-arrow {
  flex: 0 0 auto;
  align-self: center;
}

/* GS Lotte: Farbschema-Vorschau vorerst ausblenden.
   Zur späteren Freigabe nur diese Regel entfernen; Dialog und Logik bleiben erhalten. */
#gsl-sw-panel > .gsl-styleswitcher__section--colours {
  display: none;
}

/* GS Lotte: sichtbare, jedoch bewusst nicht verlinkte Rubriken. */
.gsl-nav__item--disabled > .gsl-nav__link--disabled {
  color: var(--gsl-rubric-dark, var(--gsl-blue));
  background: color-mix(in srgb, var(--gsl-rubric, var(--gsl-blue)) 12%, transparent);
  cursor: default;
  opacity: 0.72;
}

.gsl-nav__item--disabled > .gsl-nav__link--disabled .gsl-nav__label::after {
  background: var(--gsl-rubric, var(--gsl-blue));
  opacity: 0.58;
}

/* GS Lotte Startseite: sichtbare, noch nicht verlinkte Rubriken. */
.gs-home-rubrics .gsl-tile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gs-home-rubrics .gsl-tile--disabled {
  cursor: default;
}

.gs-home-rubrics .gsl-tile--disabled:hover,
.gs-home-rubrics .gsl-tile--disabled:focus {
  transform: none;
}

.gs-home-rubrics .gsl-tile__badge {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: var(--gsl-rubric-aktuelles-dark, #9f2114);
  color: #fff;
  font-size: var(--gsl-fs-xs, 0.75rem);
  font-weight: var(--gsl-fw-bold, 700);
  line-height: 1.2;
}

@media (max-width: 46rem) {
  .gs-home-rubrics .gsl-tile-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* The disabled Schulgemeinschaft tile must stay inside a 320px viewport. */
  .gs-home-rubrics .gsl-tile--disabled.gsl-rubric-schulgemeinschaft,
  .gs-home-rubrics .gsl-tile--disabled.gsl-rubric-schulgemeinschaft > div,
  .gs-home-rubrics .gsl-tile--disabled.gsl-rubric-schulgemeinschaft .gsl-tile__title {
    min-width: 0;
  }

  .gs-home-rubrics .gsl-tile--disabled.gsl-rubric-schulgemeinschaft .gsl-tile__title {
    hyphens: auto;
    overflow-wrap: anywhere;
  }
}

/*
 * GS Lotte audio-visual overlay — 2026-09-10
 * Style line: still-praezise.
 *
 * This file is deliberately an overlay: it relies only on existing GS rubric
 * tokens and the current rendered component classes. The runtime integration
 * appends it after the present project, homepage and calendar styles.
 */

/* Project cards: the article is informational; only its round arrow is a link. */
.gsl-tile.gsl-proj {
  border-radius: 0;
  background: var(--gsl-rubric-aktuelles-fill);
  color: var(--gsl-rubric-aktuelles-dark);
}

.gsl-proj__media,
.gsl-proj__body {
  background: var(--gsl-rubric-aktuelles-fill);
  color: var(--gsl-rubric-aktuelles-dark);
}

.gsl-proj__month,
.gsl-proj__month-fallback,
.gsl-proj__title {
  color: var(--gsl-rubric-aktuelles-dark);
}

.gsl-proj__arrow {
  background: var(--gsl-rubric-aktuelles-dark);
  color: var(--gsl-paper);
  text-decoration: none;
}

.gsl-tile.gsl-proj:hover .gsl-proj__title {
  text-decoration: none;
}

.gsl-proj__arrow:hover,
.gsl-proj__arrow:focus-visible {
  background: var(--gsl-rubric-aktuelles-strong);
  color: var(--gsl-paper);
  transform: translateX(4px);
}

.gsl-proj__arrow:focus-visible {
  outline: 3px solid var(--gsl-rubric-aktuelles-dark);
  outline-offset: 3px;
}

/* The blue section makes the requested heading hierarchy explicit. */
[data-ce-type="stats"].gsl-rubric-fill {
  background: var(--gsl-rubric-schulgemeinschaft-soft);
  color: var(--gsl-rubric-schulgemeinschaft-dark);
}

[data-ce-type="stats"] .gsl-caps {
  display: block;
  color: var(--gsl-rubric-schulgemeinschaft-dark);
  font-size: clamp(1.75rem, 3vw, 3.25rem);
  font-weight: var(--gsl-fw-black);
  letter-spacing: -0.035em;
  line-height: 1;
  text-transform: none;
}

[data-ce-type="stats"] .gsl-h2 {
  color: var(--gsl-rubric-schulgemeinschaft-dark);
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
  font-weight: var(--gsl-fw-bold);
  line-height: 1.3;
  margin-top: var(--gsl-space-3);
}

[data-ce-type="stats"] .gsl-stat__number,
[data-ce-type="stats"] .gsl-stat__label {
  color: var(--gsl-rubric-schulgemeinschaft-dark);
}

/* The existing, contrast-safe home accent is the requested crisp orange. */
.gsl-hero-a__headline strong,
.gsl-hero-a__welcome strong {
  color: var(--gsl-startseite-akzent, #A95000);
}

/* Calendar headings retain the original Aktuelles red, with the existing dark contrast mix. */
.gsl-termine__month {
  color: var(--gsl-rubric-aktuelles-strong);
}

@media (min-width: 960px) {
  .gsl-hero-text-below p {
    max-width: min(100%, 84ch);
  }
}

@media (min-width: 1200px) {
  .gsl-nav__link {
    font-size: 1.125rem;
  }
}

/* Eine deutlich erkennbare, ausreichend große Trefferfläche nur am Pfeil. */
.gsl-tile.gsl-proj { cursor: default; }
.gsl-tile.gsl-proj:hover { transform: none; }
.gsl-tile.gsl-proj:hover .gsl-proj__arrow { transform: none; }
.gsl-tile.gsl-proj .gsl-proj__arrow {
  width: 2.75rem;
  height: 2.75rem;
  cursor: pointer;
}
.gsl-tile.gsl-proj .gsl-proj__arrow:hover,
.gsl-tile.gsl-proj .gsl-proj__arrow:focus-visible { transform: translateX(3px); }
.gsl-proj__body { padding-bottom: calc(var(--gsl-space-4) + 3.5rem); }

/* Die allgemeine Seiten-Linkfarbe darf den weißen Pfeil nicht übermalen. */
body #main-content .gsl-proj .gsl-proj__arrow { color: var(--gsl-paper); }
.gsl-proj-galerie .gsl-proj-grid > .gsl-proj:first-child:nth-last-child(n+3) .gsl-proj__title {
  font-size: var(--gsl-fs-md, 1.375rem);
}

/* Satteres Orange und klares Rot nur für die beanstandeten Akzente. */
:root:not([data-theme="dark"]) .gsl-hero-a__headline strong,
:root:not([data-theme="dark"]) .gsl-hero-a__welcome strong { color: #bd4d00; }
:root:not([data-theme="dark"]) .gsl-termine__month { color: #b52118; }

/* Mittlere Desktopbreiten: ganze Menütitel statt Wortabbrüchen. */
@media (min-width: 1025px) and (max-width: 1399px) {
  .gsl-header__inner { gap: 0.75rem; }
  .gsl-nav { gap: 0.5rem; }
  .gsl-nav__link { font-size: 1rem; padding-inline: 0.5rem; letter-spacing: 0.02em; white-space: nowrap; }
  .gsl-nav__item { flex-shrink: 0; }
}
@media (min-width: 1400px) { .gsl-nav__link { white-space: nowrap; } }
/* Die rechte Kontaktleiste darf den nächsten Bildpfeil nicht verdecken. */
@media (min-width: 1025px) { .gsl-hero-a__nav--next { right: 6.5rem; } }
@media (prefers-reduced-motion: reduce) {
  .gsl-tile.gsl-proj .gsl-proj__arrow:hover,
  .gsl-tile.gsl-proj .gsl-proj__arrow:focus-visible { transform: none; }
}

@media (min-width: 1025px) and (max-width: 1199px) {
  .gsl-nav { gap: 0.25rem; }
  .gsl-nav__link { font-size: 0.9375rem; padding-inline: 0.25rem; }
  .gsl-header .gsl-logo__img { width: 4rem; height: 4rem; }
  .gsl-header .gsl-iserv-logo { width: 5.625rem; height: auto; }
}

/* Das Label erbt die responsive Schriftgröße; Logos bleiben im sichtbaren Kopf. */
.gsl-header #gsl-nav .gsl-nav__label { font-size: inherit; }
@media (min-width: 1025px) {
  .gsl-nav { gap: 0.5rem; }
}
@media (min-width: 1025px) and (max-width: 1199px) {
  .gsl-nav { gap: 0.25rem; }
  .gsl-header .gsl-iserv-logo { min-width: 5rem; width: 5rem; }
}

/* Die zentrale Grundschriftregel wird nur in der Schulnavigation präzisiert.
   Der vorhandene Vergrößerungsfaktor der Stiloptionen bleibt wirksam. */
.gsl-header #gsl-nav .gsl-nav__label { font-size: inherit !important; }
@media (min-width: 1400px) {
  .gsl-header #gsl-nav .gsl-nav__link { font-size: calc(1.125rem * var(--gsl-fs-scale, 1)) !important; }
}
@media (min-width: 1025px) and (max-width: 1199px) {
  .gsl-header #gsl-nav .gsl-nav__link { font-size: calc(0.9375rem * var(--gsl-fs-scale, 1)) !important; }
}

/* Auch der native Export-CTA benötigt seine helle Buttonschrift. */
body #main-content [data-ce-uid="1000656"] .ce-cta__button--primary {
  color: var(--gsl-paper);
  white-space: normal;
  text-align: center;
  line-height: 1.4;
}

/* Startseite: Rubriken-Übersicht — 3-2-Layout-Fix + Desktop-Typo-/Text-Anpassung (still-praezise). */

@media (min-width: 64rem) {
  #main-content .gs-home-rubrics .gsl-tile-grid,
  #main-content .gs-home-rubrics .gsl-tile-grid--offset {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: row;
  }

  #main-content .gs-home-rubrics .gsl-tile-grid--offset .gsl-tile:nth-child(even) {
    transform: none;
  }

  #main-content .gs-home-rubrics .gsl-tile {
    padding: var(--gsl-space-6);
  }

  #main-content .gs-home-rubrics .gsl-tile .gsl-tile__title {
    font-size: calc(1.75rem * var(--gsl-font-scale, var(--gsl-fs-scale, 1)));
    hyphens: auto;
    overflow-wrap: normal;
  }

  #main-content .gs-home-rubrics .gsl-tile .gsl-text--ink-soft {
    font-size: calc(1.125rem * var(--gsl-font-scale, var(--gsl-fs-scale, 1)));
    line-height: 1.6;
    white-space: pre-line;
  }
}

/* still-praezise: GS-Puzzle-Raster auf dem vorhandenen Hausgalerie-Modul. */
body #main-content .min-gallery[data-ce-uid="1000700"] {
  width: 100%; max-width: none; padding-inline: var(--gsl-gutter);
  box-sizing: border-box; background: var(--gsl-paper-cool);
}
body #main-content .min-gallery[data-ce-uid="1000700"] > * {
  max-width: var(--gsl-container); margin-inline: auto;
}
body #main-content .min-gallery[data-ce-uid="1000700"] .gsl-home-gallery-heading .gsl-h2 { margin-top: .6rem; }
body #main-content .min-gallery[data-ce-uid="1000700"] > .min-gallery__subheader {
  font-size: calc(1.5rem * var(--gsl-fs-scale, 1)); line-height: 1.5;
  color: var(--gsl-ink); margin-top: 1rem; margin-bottom: 2rem;
}
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__grid {
  display: grid; grid-template-columns: repeat(12, minmax(0,1fr));
  grid-template-rows: repeat(5, minmax(0, 6.5rem)); gap: 1rem;
  grid-template-areas: "a a a a a a g g g b b b" "a a a a a a g g g b b b" "a a a a a a c c c c c c" "d d d d e e e e f f f f" "d d d d e e e e f f f f";
}
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__item { min-width: 0; min-height: 0; overflow: hidden; border-radius: var(--gsl-radius-md); }
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__item:nth-child(1) {grid-area:a;}
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__item:nth-child(2) {grid-area:b;}
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__item:nth-child(3) {grid-area:c;}
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__item:nth-child(4) {grid-area:d;}
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__item:nth-child(5) {grid-area:e;}
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__item:nth-child(6) {grid-area:f;}
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__item:nth-child(7) {grid-area:g;}
body #main-content .min-gallery[data-ce-uid="1000700"] :is(.min-gallery__link,.min-gallery__figure,.min-gallery__picture,.min-gallery__image) {display:block; width:100%; height:100%; margin:0; aspect-ratio:auto;}
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__image {object-fit:cover;}
@media(max-width: 46rem) {
  body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__grid {
    grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:14rem 10rem 10rem 12rem;
    grid-template-areas:"a a" "g b" "c d" "e f"; gap:.7rem;
  }
  body #main-content .min-gallery[data-ce-uid="1000700"] > .min-gallery__subheader {font-size:calc(1.25rem * var(--gsl-fs-scale,1));}
}
/* Kontaktband und Zahlenbereich gehören zur gleichen hellblauen Farbfamilie. */
html:not([data-theme="dark"]):not([data-high-contrast]) .gsl-footer-contact {
  background: #e3f1f4; color: #244756;
}
html:not([data-theme="dark"]):not([data-high-contrast]) .gsl-footer-contact :is(p,a,h2,h3,span,dt,dd) {color:#244756;}
/* Die Projekt-Einleitung erhält die gut lesbare Aktuelles-Farbe. */
body #main-content #c1000775 { background:var(--gsl-rubric-aktuelles-fill); color:var(--gsl-rubric-aktuelles-dark); padding:2rem; }
/* still-praezise: innerer Überschriftenblock übernimmt die Rubrikfläche. */
body #main-content #c1000775 .min-header {background:transparent;}
body #main-content #c1000775 :is(h1,h2,h3,p) {color:inherit;}
body #main-content #c1000775 p {font-size:calc(1.25rem * var(--gsl-fs-scale,1));line-height:1.6;}

/* Kundenreferenz 10.09.: höhere, versetzte Bildkacheln; breite Überschrift bleibt. */
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__grid {
 grid-template-areas:none; grid-template-rows:none; grid-auto-flow:row;
 grid-template-columns:repeat(12,minmax(0,1fr)); grid-auto-rows:minmax(8rem,auto);
}
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__item:nth-child(n) {grid-area:auto;}
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__item:nth-child(1) {grid-column:span 6;grid-row:span 3;}
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__item:nth-child(2) {grid-column:span 3;grid-row:span 2;}
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__item:nth-child(3) {grid-column:span 3;grid-row:span 2;}
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__item:nth-child(4) {grid-column:span 4;grid-row:span 2;}
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__item:nth-child(5) {grid-column:span 5;grid-row:span 2;}
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__item:nth-child(6) {grid-column:span 3;grid-row:span 1;}
body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__item:nth-child(7) {grid-column:span 4;grid-row:span 1;}
@media(max-width:46rem) {
 body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__grid {grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:12rem;}
 body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__item:nth-child(n) {grid-column:span 1;grid-row:span 1;}
 body #main-content .min-gallery[data-ce-uid="1000700"] .min-gallery__item:first-child {grid-column:span 2;grid-row:span 2;}
}
