:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #eef3fa;
  --ink: #16233a;
  --ink-soft: #4b5f80;
  --line: #d7e1f0;
  --brand: #1169c5;
  --brand-dark: #0c4a8a;
  --accent: #f4b942;
  --radius: 18px;
  --shadow: 0 18px 40px rgba(17, 41, 76, 0.12);
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 10%, rgba(17, 105, 197, 0.22), transparent 35%),
    radial-gradient(circle at 88% 12%, rgba(244, 185, 66, 0.22), transparent 32%),
    linear-gradient(180deg, #e8f0fb 0%, #f5f7fb 38%, #f8f9fc 100%);
}

.wrap {
  width: min(100% - 2.25rem, var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: linear-gradient(
    180deg,
    rgba(248, 251, 255, 0.72) 0%,
    rgba(248, 251, 255, 0.58) 100%
  );
  border-bottom: 1px solid rgba(215, 225, 240, 0.5);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 0.34rem 0.58rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(215, 225, 240, 0.65);
  backdrop-filter: blur(4px);
  transition: 0.2s ease;
}

.brand:hover,
.brand:focus-visible {
  background: rgba(255, 255, 255, 0.62);
}

.brand-logo {
  display: block;
  width: clamp(162px, 17vw, 228px);
  height: auto;
  opacity: 0.94;
  mix-blend-mode: multiply;
  filter: saturate(0.95) contrast(0.95);
}

.main-nav {
  margin-left: auto;
}

.main-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.main-nav li {
  position: relative;
}

.main-nav a {
  display: inline-block;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  transition: 0.22s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav .is-active {
  color: var(--brand-dark);
  background: #e5eefb;
}

.main-nav .submenu {
  list-style: none;
  margin: 0;
  padding: 0.55rem 0.5rem;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 320px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 34px rgba(17, 41, 76, 0.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 60;
}

.main-nav .submenu li {
  display: block;
}

.main-nav .submenu a {
  display: block;
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
}

.main-nav .has-submenu:hover .submenu,
.main-nav .has-submenu:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.hero {
  padding: 5rem 0 2.25rem;
  text-align: center;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  font-family: "Outfit", sans-serif;
  line-height: 1.13;
  margin: 0;
}

.hero h1 {
  margin: 0.9rem auto 1rem;
  max-width: 22ch;
  font-size: clamp(2rem, 6vw, 3.8rem);
}

.hero-copy {
  margin: 0 auto;
  max-width: min(108ch, 100%);
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
}

.hero-actions {
  margin-top: 1.7rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-image {
  margin: 2rem auto 0;
  max-width: 980px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-image img {
  width: 100%;
  height: clamp(260px, 45vw, 500px);
  object-fit: cover;
  display: block;
}

.btn {
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.78rem 1.28rem;
  border: 1px solid transparent;
  transition: 0.22s ease;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--brand-dark);
}

.btn-ghost {
  color: var(--brand-dark);
  border-color: #bfd2ef;
  background: #f8fbff;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: #ecf3fd;
}

.feature-grid {
  padding: 1.3rem 0 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card,
.news-card,
.info-band article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-card {
  padding: 1.25rem;
}

.feature-card h2 {
  font-size: 1.28rem;
  margin-bottom: 0.55rem;
}

.feature-card p {
  margin: 0;
  color: var(--ink-soft);
}

.split-section {
  padding: 2rem 0;
  max-width: 1000px;
  margin: 0 auto;
}

.split-head {
  padding: 0.6rem 1rem 1.1rem;
  max-width: 72ch;
  margin: 0 auto;
  text-align: center;
}

.split-head h2 {
  margin: 0.5rem 0 0.6rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.split-head p {
  margin: 0;
  color: var(--ink-soft);
}

.news-list {
  display: grid;
  gap: 0.8rem;
  align-items: stretch;
}

.split-section .news-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inner-main .news-list {
  max-width: 1100px;
  margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.news-card {
  padding: 1rem 1rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-image-link {
  text-decoration: none;
  display: block;
}

.news-image {
  width: 100%;
  aspect-ratio: 10 / 7;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  margin-bottom: 0.75rem;
}

.news-date {
  margin: 0;
  color: #6b7ea0;
  font-size: 0.92rem;
  font-weight: 700;
}

.news-card h3 {
  margin: 0.3rem 0 0.45rem;
  font-size: 1.15rem;
}

.news-card p {
  margin: 0;
  color: var(--ink-soft);
}

.news-read-more {
  display: inline-block;
  margin-top: auto;
  padding-top: 0.7rem;
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
}

.news-read-more:hover,
.news-read-more:focus-visible {
  text-decoration: underline;
}

.info-band {
  padding: 0.6rem 0 4rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-section {
  padding: 0.4rem 0 1.5rem;
}

.gallery-grid {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 8px;
  gap: 0.75rem;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.gallery-item {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #fff;
  min-height: 0;
}

.gallery-item a {
  display: block;
  width: 100%;
  cursor: zoom-in;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.gallery-item.is-portrait img {
  object-fit: contain;
  background: #f8fafc;
}

.theater-feature {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.theater-copy,
.theater-hero-image {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.theater-copy {
  padding: 1.1rem;
}

.theater-copy h2 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
}

.theater-copy p {
  margin: 0 0 0.7rem;
  color: var(--ink-soft);
}

.theater-copy p:last-child {
  margin-bottom: 0;
}

.theater-copy a {
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
}

.theater-copy a:hover,
.theater-copy a:focus-visible {
  text-decoration: underline;
}

.theater-hero-image a,
.theater-hero-image img {
  display: block;
  width: 100%;
  height: 100%;
}

.theater-hero-image {
  overflow: hidden;
}

.theater-hero-image img {
  min-height: 260px;
  object-fit: cover;
}

.theater-gallery-section {
  padding: 0.4rem 0 0.8rem;
}

.theater-gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.theater-gallery-grid a {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.theater-gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.info-band article {
  padding: 1.1rem;
}

.info-band h2 {
  font-size: 1.2rem;
  margin-bottom: 0.45rem;
}

.info-band p {
  margin: 0 0 0.8rem;
  color: var(--ink-soft);
}

.info-band a {
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
}

.info-band a:hover,
.info-band a:focus-visible {
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid rgba(215, 225, 240, 0.9);
  background: rgba(238, 243, 250, 0.8);
}

.footer-wrap {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: #4c6385;
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-wrap p {
  margin: 0;
}

@media (max-width: 980px) {
  .nav-wrap {
    min-height: auto;
    padding: 0.8rem 0;
    flex-wrap: wrap;
  }

  .brand {
    margin-right: auto;
  }

  .main-nav {
    width: 100%;
    margin-left: 0;
  }

  .main-nav .menu {
    justify-content: flex-start;
  }

  .feature-grid,
  .split-section,
  .info-band,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .split-section .news-list,
  .inner-main .news-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .theater-feature {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .theater-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero {
    padding-top: 3.2rem;
  }

  .footer-wrap {
    padding: 1rem 0;
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 620px) {
  .brand-logo {
    width: 180px;
  }

  .main-nav .menu {
    width: 100%;
    gap: 0.25rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    /* Masonry-Auto-Rows nur für mehrspaltige Layouts sinnvoll. In einer Spalte
       würden die Bilder bei 8px-Auto-Rows aufeinander stapeln, falls das JS-
       Spannen (homepage-render.js) noch nicht gelaufen ist. */
    grid-auto-rows: auto;
  }

  .gallery-item,
  .gallery-item.is-landscape,
  .gallery-item.is-portrait,
  .gallery-item.is-squareish {
    /* Inline-Style aus homepage-render.js (figure.style.gridRowEnd) ist auf
       Mobile in der Einspaltigkeit nicht nötig – überschreiben. */
    grid-row-end: auto !important;
  }

  .split-section .news-list,
  .inner-main .news-list {
    grid-template-columns: 1fr;
  }

  .gallery-item,
  .gallery-item.is-landscape,
  .gallery-item.is-portrait,
  .gallery-item.is-squareish {
    aspect-ratio: auto;
  }

  .theater-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-nav a {
    padding: 0.42rem 0.62rem;
  }

  .main-nav .submenu {
    min-width: 270px;
    left: 0;
    transform: translateX(0) translateY(8px);
  }

  .main-nav .has-submenu:hover .submenu,
  .main-nav .has-submenu:focus-within .submenu {
    transform: translateX(0) translateY(0);
  }
}

.inner-main {
  padding: 2.8rem 0 4rem;
}

.inner-hero {
  max-width: 72ch;
  margin-bottom: 1.25rem;
}

.inner-hero h1 {
  margin: 0.45rem 0 0.7rem;
  font-size: clamp(2rem, 5vw, 3rem);
}

.inner-hero p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.inner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.inner-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inner-grid article,
.table-card,
.timeline article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.inner-grid article {
  padding: 1.1rem;
}

.inner-grid h2 {
  margin-bottom: 0.45rem;
  font-size: 1.2rem;
}

.inner-grid p {
  margin: 0;
  color: var(--ink-soft);
}

.school-grid {
  gap: 1rem;
  align-items: stretch;
}

.school-grid article {
  height: 100%;
}

.school-grid .is-priority {
  background:
    linear-gradient(135deg, rgba(17, 105, 197, 0.08), transparent 42%),
    var(--surface);
}

.school-profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1rem;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  background:
    radial-gradient(circle at 88% 8%, rgba(244, 185, 66, 0.28), transparent 30%),
    linear-gradient(135deg, rgba(17, 105, 197, 0.12), rgba(255, 255, 255, 0.94) 52%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
}

.school-profile-hero h1 {
  margin: 0.45rem 0 0.75rem;
  font-size: clamp(2.2rem, 6vw, 4rem);
}

.school-profile-hero p:not(.eyebrow) {
  margin: 0;
  max-width: 72ch;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.school-profile-tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.school-profile-tags span {
  position: relative;
  display: grid;
  gap: 0.15rem;
  min-height: 5.4rem;
  padding: 0.85rem;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #bfd2ef;
  color: var(--brand-dark);
  box-shadow: 0 10px 22px rgba(17, 41, 76, 0.08);
}

.school-profile-tags span::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(17, 105, 197, 0.1);
}

.school-profile-tags strong {
  position: relative;
  z-index: 1;
  font-family: "Outfit", sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
}

.school-profile-tags small {
  position: relative;
  z-index: 1;
  color: var(--ink-soft);
  font-weight: 700;
}

.school-profile-tags span:nth-child(2) {
  background: #fff8e8;
  border-color: rgba(244, 185, 66, 0.62);
}

.school-profile-tags span:nth-child(2)::after {
  background: rgba(244, 185, 66, 0.28);
}

.school-highlight-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
  padding: clamp(1.15rem, 3vw, 1.65rem);
  color: #fff;
  background:
    radial-gradient(circle at 85% 12%, rgba(244, 185, 66, 0.34), transparent 28%),
    linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 62%, #2380d8 100%);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
}

.school-highlight-card::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 280px;
  height: 280px;
  border: 28px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.school-highlight-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-bottom: 0.9rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  color: #17315a;
  background: var(--accent);
  font-weight: 900;
}

.school-highlight-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 1.4rem;
  align-items: center;
}

.school-highlight-card .eyebrow,
.school-highlight-card h2,
.school-highlight-card p {
  color: #fff;
}

.school-highlight-card h2 {
  margin: 0.35rem 0 0.65rem;
  font-size: clamp(1.8rem, 5vw, 3.1rem);
}

.school-highlight-card p {
  max-width: 76ch;
  margin: 0;
  font-size: clamp(1.03rem, 2vw, 1.18rem);
}

.school-highlight-list {
  position: relative;
  z-index: 1;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 1.1rem 0 0;
  padding: 0;
}

.school-highlight-list li {
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  font-weight: 700;
}

.school-sport-visual {
  position: relative;
  min-height: 260px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.28), transparent 34%),
    rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.school-sport-core,
.school-sport-visual span {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 999px;
  text-align: center;
  font-family: "Outfit", sans-serif;
  font-weight: 900;
  box-shadow: 0 16px 36px rgba(4, 31, 63, 0.22);
}

.school-sport-core {
  inset: 50% auto auto 50%;
  width: 138px;
  height: 138px;
  transform: translate(-50%, -50%);
  color: var(--brand-dark);
  background: #fff;
  font-size: 1.28rem;
}

.school-sport-visual span {
  min-width: 94px;
  min-height: 44px;
  padding: 0.45rem 0.7rem;
  color: #17315a;
  background: var(--accent);
}

.school-sport-visual span:nth-child(2) {
  top: 20px;
  left: 24px;
}

.school-sport-visual span:nth-child(3) {
  top: 28px;
  right: 22px;
  background: #fff;
}

.school-sport-visual span:nth-child(4) {
  right: 28px;
  bottom: 24px;
}

.school-sport-visual span:nth-child(5) {
  left: 20px;
  bottom: 32px;
  background: #fff;
}

.school-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.school-card-grid article {
  position: relative;
  min-height: 100%;
  padding: 1.05rem;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.school-card-grid article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.school-card-grid article::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -38px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(17, 105, 197, 0.06);
}

.school-card-grid article:nth-child(2n)::after {
  background: rgba(244, 185, 66, 0.14);
}

.school-card-grid span {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  margin-bottom: 0.75rem;
  color: #fff;
  background: var(--brand);
  border-radius: 50%;
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  font-weight: 900;
}

.school-card-grid h2 {
  position: relative;
  z-index: 1;
  margin-bottom: 0.45rem;
  font-size: 1.18rem;
}

.school-card-grid p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink-soft);
}

.school-feature-area {
  display: grid;
  gap: 1rem;
}

.school-section-head {
  max-width: 760px;
  margin: 0.25rem auto 0.15rem;
  text-align: center;
}

.school-section-head h2 {
  margin: 0.35rem 0 0.55rem;
  font-size: clamp(1.65rem, 4vw, 2.25rem);
}

.school-section-head p:not(.eyebrow) {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.06rem;
}

.school-main-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.school-feature-card,
.school-secondary-features article {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.school-feature-card {
  min-height: 310px;
  padding: clamp(1.05rem, 2.6vw, 1.35rem);
}

.school-feature-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.school-feature-card::after {
  content: "";
  position: absolute;
  right: -54px;
  bottom: -64px;
  width: 155px;
  height: 155px;
  border-radius: 50%;
  background: rgba(17, 105, 197, 0.08);
}

.school-feature-card--polysport {
  color: #fff;
  background:
    radial-gradient(circle at 88% 16%, rgba(244, 185, 66, 0.42), transparent 30%),
    linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 68%, #2380d8 100%);
  border-color: rgba(255, 255, 255, 0.22);
}

.school-feature-card--polysport::before {
  background: var(--accent);
}

.school-feature-card--polysport::after {
  border: 24px solid rgba(255, 255, 255, 0.13);
  background: transparent;
}

.school-card-kicker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin: 0 0 0.85rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #eef6ff;
  font-weight: 900;
  font-size: 0.88rem;
}

.school-feature-card--polysport .school-card-kicker {
  color: #17315a;
  background: var(--accent);
}

.school-feature-card h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 0.65rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.school-feature-card p:not(.school-card-kicker) {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.03rem;
}

.school-feature-card--polysport h2,
.school-feature-card--polysport p:not(.school-card-kicker) {
  color: #fff;
}

.school-feature-pills {
  position: relative;
  z-index: 1;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0;
  padding: 0;
}

.school-feature-pills li {
  padding: 0.38rem 0.62rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}

.school-secondary-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.school-secondary-features article {
  padding: 0.95rem;
  background:
    linear-gradient(135deg, rgba(17, 105, 197, 0.05), transparent 46%),
    var(--surface);
}

.school-secondary-features h2 {
  margin: 0 0 0.4rem;
  color: var(--brand-dark);
  font-size: 1.05rem;
}

.school-secondary-features p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.admission-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.admission-copy,
.admission-note-card,
.admission-steps article,
.pdf-preview-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.admission-copy {
  padding: clamp(1.15rem, 3vw, 1.6rem);
  background:
    radial-gradient(circle at 92% 12%, rgba(244, 185, 66, 0.22), transparent 32%),
    linear-gradient(135deg, rgba(17, 105, 197, 0.1), rgba(255, 255, 255, 0.95) 48%),
    var(--surface);
}

.admission-copy h2,
.admission-note-card h2,
.admission-steps h2,
.pdf-preview-head h2 {
  margin: 0.3rem 0 0.55rem;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
}

.admission-copy p,
.admission-note-card p,
.admission-steps p {
  margin: 0;
  color: var(--ink-soft);
}

.admission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.1rem;
}

.admission-note-card {
  padding: 1.15rem;
  background:
    linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%),
    var(--surface);
}

.admission-note-card span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  background: #fff8e8;
  color: #8a5a00;
  font-weight: 800;
  font-size: 0.88rem;
}

.admission-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.admission-steps article {
  padding: 1rem;
}

.admission-steps span {
  display: inline-grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
}

.pdf-preview-card {
  padding: 1rem;
}

.pdf-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.pdf-preview {
  display: block;
  width: 100%;
  height: min(72vh, 760px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbff;
}

.class-year-section {
  margin: 0.2rem 0 0.65rem;
}

.class-year-title {
  margin: 0;
  font-size: clamp(1.35rem, 3.2vw, 1.8rem);
  color: var(--brand-dark);
}

.class-year-subtitle {
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
}

.class-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.class-card {
  padding: 1rem;
}

.class-card-title {
  margin: 0 0 0.45rem;
  font-size: 1.25rem;
  color: var(--brand-dark);
}

.class-photo-link {
  display: block;
  cursor: zoom-in;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.class-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.class-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-weight: 600;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f6ff 100%);
  border: 1px dashed #bfd2ef;
  border-radius: 12px;
}

.class-card-teacher {
  margin-top: 0.6rem;
  color: var(--ink-soft);
}

.class-archive-wrap {
  margin-top: 1.3rem;
}

.class-archive-wrap > h2 {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
  color: var(--brand-dark);
}

.class-archive {
  display: grid;
  gap: 1rem;
}

.class-archive-year {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.class-archive-year h3 {
  margin: 0;
  color: var(--brand-dark);
}

.class-card-grid--archive {
  margin-top: 0.75rem;
}

.class-contact article a {
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
}

.class-contact article a:hover,
.class-contact article a:focus-visible {
  text-decoration: underline;
}

.table-card {
  padding: 1rem;
}

.table-card table {
  width: 100%;
  border-collapse: collapse;
}

.table-card th,
.table-card td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0.45rem;
}

.table-card th {
  font-family: "Outfit", sans-serif;
}

.subject-hours-card {
  overflow-x: auto;
  padding: 0.35rem;
  background:
    linear-gradient(135deg, rgba(17, 105, 197, 0.08), transparent 36%),
    var(--surface);
}

.subject-hours-table {
  min-width: 940px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: calc(var(--radius) - 6px);
}

.subject-hours-table th {
  background: linear-gradient(180deg, #f8fbff 0%, #edf5ff 100%);
  color: var(--brand-dark);
  font-size: 1.02rem;
  border-bottom: 1px solid #bfd2ef;
  padding: 0.9rem 0.65rem;
}

.subject-hours-table th:not(:first-child),
.subject-hours-table td:not(:first-child) {
  text-align: center;
  width: 10%;
}

.subject-hours-table th:first-child,
.subject-hours-table td:first-child {
  width: 50%;
}

.subject-hours-table tbody tr:nth-child(odd) td {
  background: rgba(248, 251, 255, 0.82);
}

.subject-hours-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.94);
}

.subject-hours-table td {
  font-size: 1rem;
  padding: 0.78rem 0.65rem;
}

.subject-hours-table tbody td:first-child {
  color: var(--ink);
  font-weight: 700;
}

.subject-hours-table thead tr th:last-child,
.subject-hours-table tbody tr td:last-child {
  color: var(--brand-dark);
  font-weight: 800;
  background: rgba(236, 243, 253, 0.95);
  border-left: 1px solid #bfd2ef;
}

.subject-hours-table tbody tr:hover td {
  background: #eef6ff;
}

.small-note {
  margin: 0.8rem 0 0;
  color: #5b7194;
  font-size: 0.92rem;
}

.lesson-schedule-card {
  max-width: 860px;
}

.lesson-schedule-table th {
  color: var(--brand-dark);
  font-size: 1.02rem;
  background: #f8fbff;
}

.lesson-schedule-table th:first-child,
.lesson-schedule-table td:first-child {
  width: 58%;
}

.lesson-schedule-table td:nth-child(2) {
  background: #fff8e8;
  color: var(--ink);
  font-weight: 700;
}

.lesson-break-row td {
  background: #e8f3ff !important;
  color: var(--brand-dark);
  font-weight: 700;
}

.lesson-schedule-table tbody tr:last-child td {
  border-bottom: 0;
}

.lesson-info-card {
  max-width: 860px;
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lesson-info-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.lesson-info-card p + p {
  margin-top: .75rem;
}

.timeline {
  display: grid;
  gap: 0.75rem;
}

.timeline article {
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.timeline span {
  color: var(--brand-dark);
  font-weight: 700;
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.director-grid {
  max-width: 900px;
  margin: 0 auto;
  grid-template-columns: 1fr;
}

.staff-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.staff-image {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.staff-body {
  padding: 0.95rem 1rem 0.95rem 0.2rem;
}

.staff-body h2 {
  font-size: 1.14rem;
  margin-bottom: 0.5rem;
}

.staff-body p {
  margin: 0 0 0.45rem;
  color: var(--ink-soft);
}

.staff-body a {
  color: var(--brand-dark);
  text-decoration: none;
}

.staff-body a:hover,
.staff-body a:focus-visible {
  text-decoration: underline;
}

.news-detail-card {
  max-width: 880px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.75rem 1.5rem;
}

.news-detail-head {
  margin-bottom: 1.25rem;
}

.news-detail-head .eyebrow {
  margin: 0 0 0.4rem;
}

.news-detail-title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.2;
}

.news-detail-meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 600;
}

.news-detail-meta time {
  color: #6b7ea0;
}

/* Großes Titelbild oben */
.news-detail-hero {
  display: block;
  margin: 0 0 1.5rem;
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
  background: #f1f5f9;
}

.news-detail-hero img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

/* Fließtext – echte Absätze statt nl2br-Salat */
.news-detail-text {
  color: var(--ink);
  line-height: 1.7;
  font-size: 1.02rem;
  max-width: 68ch;
}

.news-detail-text p {
  margin: 0 0 1rem;
}

.news-detail-text p:last-child {
  margin-bottom: 0;
}

/* Weitere Fotos zum Beitrag */
.news-detail-gallery {
  margin: 1.75rem 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.news-detail-gallery a {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  cursor: zoom-in;
  transition: transform .15s ease, box-shadow .15s ease;
}

.news-detail-gallery a:hover,
.news-detail-gallery a:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(11, 20, 35, 0.08);
}

.news-detail-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* Zurück-Link – schlicht, nicht wie ein Admin-Button */
.news-detail-back-row {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.news-detail-back {
  display: inline-block;
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.98rem;
}

.news-detail-back:hover,
.news-detail-back:focus-visible {
  text-decoration: underline;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11, 20, 35, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  z-index: 3000;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(92vw, 1500px);
  max-height: min(86vh, 1500px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  font-size: 1.8rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.news-empty {
  color: var(--ink-soft);
  padding: 1rem;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.admin-link-row {
  margin-top: 0.9rem;
}

.admin-link {
  display: inline-block;
  font: inherit;
  text-decoration: none;
  font-weight: 700;
  color: var(--brand-dark);
  padding: 0.48rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #bfd2ef;
  background: #f8fbff;
  cursor: pointer;
}

.admin-link:hover,
.admin-link:focus-visible {
  background: #ecf3fd;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.admin-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-note {
  color: var(--ink-soft);
  margin: 0.5rem 0 0.85rem;
}

.admin-form {
  display: grid;
  gap: 0.75rem;
}

.admin-form label {
  display: grid;
  gap: 0.3rem;
  color: var(--ink);
  font-weight: 600;
}

.admin-form input,
.admin-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  font: inherit;
}

.admin-form textarea {
  resize: vertical;
}

.date-preview {
  margin: 0;
  color: #5f7598;
  font-size: 0.92rem;
  font-weight: 600;
}

.upload-group {
  display: grid;
  gap: 0.45rem;
}

.upload-label {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

.dropzone {
  border: 2px dashed #bfd2ef;
  border-radius: 12px;
  background: #f8fbff;
  color: var(--ink-soft);
  padding: 1rem 0.9rem;
  text-align: center;
  cursor: pointer;
  transition: 0.18s ease;
}

.dropzone p {
  margin: 0;
}

.dropzone-hint {
  margin-top: 0.35rem !important;
  font-size: 0.92rem;
  color: #5f7598;
}

.upload-count {
  margin: 0;
  color: #5f7598;
  font-size: 0.92rem;
}

.upload-clear {
  justify-self: start;
  padding: 0.4rem 0.65rem;
}

.dropzone.is-dragover,
.dropzone:hover,
.dropzone:focus-visible {
  background: #ebf3fe;
  border-color: var(--brand);
}

#images-input {
  display: none;
}

.image-preview {
  min-height: 20px;
}

.image-preview.has-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.55rem;
}

.preview-item {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.preview-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}

.admin-news-list {
  display: grid;
  gap: 0.75rem;
}

.admin-news-item {
  display: grid;
  grid-template-columns: 40px 140px 1fr;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem;
  background: #fbfdff;
  align-items: start;
}

.admin-news-sort {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
}

.admin-sort-btn {
  padding: 0.15rem 0.4rem;
  line-height: 1;
  font-size: 0.85rem;
  min-width: 32px;
}

.admin-sort-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.admin-news-thumb {
  width: 140px;
  height: 100px;
  object-fit: cover;
  border-radius: 9px;
  display: block;
}

.news-current-image {
  display: grid;
  gap: 0.4rem;
  justify-items: start;
  margin: 0.25rem 0 0.5rem;
}

.news-remove-image-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.news-remove-image-label input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.admin-news-content h3 {
  margin: 0.2rem 0 0.3rem;
  font-size: 1.05rem;
}

.admin-news-content p {
  margin: 0 0 0.3rem;
  color: var(--ink-soft);
}

.admin-delete {
  padding: 0.45rem 0.7rem;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.login-card {
  width: min(92vw, 520px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.login-brand {
  margin-bottom: 0.9rem;
}

.login-card h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 0.4rem;
}

.login-card p {
  margin-top: 0;
  color: var(--ink-soft);
}

.login-form {
  margin-top: 0.9rem;
}

.login-error {
  min-height: 1.2rem;
  color: #a8223a;
  margin: 0;
}

@media (max-width: 980px) {
  .inner-grid,
  .inner-grid.two,
  .staff-grid,
  .admin-grid,
  .admission-panel,
  .admission-steps,
  .school-profile-hero,
  .school-highlight-content,
  .school-card-grid,
  .school-main-features {
    grid-template-columns: 1fr;
  }

  .school-secondary-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-card {
    grid-template-columns: 1fr;
  }

  .admin-news-item {
    grid-template-columns: 1fr;
  }

  .admin-news-sort {
    flex-direction: row;
    justify-content: flex-start;
  }

  .staff-image {
    /* Auf Mobile bekommt das Foto die volle Kartenbreite. Mit einer fixen Höhe
       würde object-fit: cover die meisten Hochformat-Porträts halb abschneiden.
       Daher ein Hochformat-Seitenverhältnis (3:4) und keine fixe Höhe -> das
       gesamte Gesicht und der Oberkörper bleiben sichtbar. Die max-height
       verhindert auf sehr kleinen Geräten ein zu großes Bild. */
    width: 100%;
    height: auto;
    min-height: 0; /* Desktop-min-height (180px) bewusst zurücksetzen */
    aspect-ratio: 3 / 4;
    max-height: 520px;
    object-fit: cover;
    object-position: center top;
  }

  .staff-body {
    padding: 0.9rem 1rem 1rem;
  }

  .class-card-grid,
  .class-card-grid--archive {
    grid-template-columns: 1fr;
  }

  .pdf-preview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .school-profile-tags {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .school-highlight-list {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 620px) {
  .news-detail-card {
    padding: 1.1rem 1.1rem 1rem;
  }

  .news-detail-head {
    margin-bottom: 1rem;
  }

  .news-detail-hero {
    margin-bottom: 1.1rem;
  }

  .news-detail-gallery {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    margin: 1.25rem 0 1rem;
    padding-top: 1rem;
  }

  .pdf-preview {
    height: 520px;
  }

  .school-profile-tags {
    grid-template-columns: 1fr;
  }

  .school-secondary-features {
    grid-template-columns: 1fr;
  }

  .school-sport-visual {
    min-height: 230px;
  }

  .school-sport-core {
    width: 118px;
    height: 118px;
    font-size: 1.08rem;
  }

  .school-sport-visual span {
    min-width: 82px;
    min-height: 40px;
    font-size: 0.9rem;
  }
}

/* ── Notfall-Popup ───────────────────────────────────────────────────────── */

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 20, 40, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 9000;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.popup-overlay.is-visible {
  opacity: 1;
}

.popup-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  padding: 2rem;
  width: min(92vw, 540px);
  border-top: 5px solid #dc2626;
}

.popup-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  color: #b91c1c;
}

.popup-message {
  margin: 0 0 1.5rem;
  color: #334155;
  line-height: 1.65;
  font-size: 1.05rem;
}

.popup-close {
  width: 100%;
}
