/* Styles für die Seite «Schulen» (schule/index.html), geladen nach /blog/blog.css.
   blog.css liefert Schrift, Navigation, Knöpfe, Kontakt-Abschluss und Footer.
   Hier kommen der beige Hintergrund und die Kurs-Zeilen wie im Abschnitt «Kurse» von index.html dazu. */

:root {
  --bg: #ece4d3;
  --text: #4b4732;
  --soft: #66614c;
  --line: rgba(75, 71, 50, 0.2);
  --accent: #7a5c17;
}

.nav {
  background: rgba(236, 228, 211, 0.88);
}

/* ---------- Abschnitte (wie index.html) ---------- */

.section {
  padding: 86px 0;
  border-bottom: 1px solid var(--line);
}

.split {
  display: grid;
  grid-template-columns: minmax(260px, 0.74fr) minmax(0, 1.26fr);
  gap: 60px;
  align-items: start;
}

/* Ab 1540px Fensterbreite wachsen die Spalten nicht mehr, die Schrift (vw) aber schon. Darum richten sich
   die grossen Titel zusätzlich nach der Breite ihrer Spalte (cqi), sonst ragen lange Wörter in den Text daneben. */
.split > :first-child {
  container-type: inline-size;
}

.section-title {
  max-width: 10ch;
  margin-top: 0.3em; /* wächst mit der Schrift, damit Ü-Punkte in der ersten Zeile nicht an die Zeile darüber stossen */
  font-size: min(clamp(3.1rem, 7.2vw, 8.6rem), 20cqi);
  /* Eng wie auf der Startseite. Ä, Ö, Ü ab der zweiten Zeile stossen darum an die Zeile darüber:
     Titel so wählen, dass Umlaute in der ersten Zeile stehen (z. B. «Für Schulen.»). */
  line-height: 0.84;
  letter-spacing: -0.065em;
  text-transform: uppercase;
  font-weight: 900;
}

/* Für Titel mit langen Wörtern («Begleitung»). */
.section-title.is-compact {
  font-size: min(clamp(2.6rem, 5vw, 6rem), 16cqi);
}

.section-text {
  display: grid;
  gap: 34px;
  font-size: clamp(1.18rem, 2vw, 2.05rem);
  line-height: 1.18;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.section-text .muted {
  color: var(--soft);
}

/* ---------- Laufband mit Begriffen (wie index.html) ---------- */

.ticker {
  margin-top: 44px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 24px;
  padding: 18px 0;
  font-size: clamp(1.25rem, 2.4vw, 2.7rem);
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  white-space: nowrap;
  /* Weniger Begriffe als auf der Startseite (48s): kürzere Runde, damit das Tempo gleich bleibt. */
  animation: ticker 32s linear infinite;
}

.ticker-track b {
  color: var(--accent);
  font-weight: 900;
}

/* ---------- Absatz zu den Formaten (unter dem Laufband) ---------- */

.formats-intro {
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}

/* ---------- Kopf der Kursliste «Abrufkurse» und Kasten «Individuelles Kursprogramm» ---------- */

/* «Abrufkurse» links, die Formate rechts; auf schmalen Bildschirmen untereinander. */
.list-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.list-head h2 {
  color: var(--accent);
  font-size: clamp(1rem, 1.3vw, 1.25rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.list-formats {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Kursangebote als Kacheln ---------- */

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

/* Vorderseite (Nummer, Titel) und Inhalt liegen im selben Rasterfeld übereinander: Die Kachel ist so hoch
   wie der längere der beiden, darum springt beim Darüberfahren nichts. */
.course-tile {
  position: relative;
  display: grid;
  min-height: clamp(260px, 22vw, 340px);
  border: 1px solid var(--line);
  background: rgba(75, 71, 50, 0.05);
  color: var(--text);
  transition: border-color .2s ease;
}

.course-tile > * {
  grid-area: 1 / 1;
}

.course-tile:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

.course-tile-front {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(20px, 2vw, 30px);
}

.course-tile-num {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.course-tile h3 {
  font-size: clamp(1.35rem, 2vw, 2.2rem);
  line-height: 1.08; /* Platz für Umlaut-Punkte (VERHÄRTEN) */
  letter-spacing: -0.045em;
  text-transform: uppercase;
  font-weight: 900;
  overflow-wrap: break-word;
}

/* Inhalt: dunkle Fläche, die von unten über die Kachel aufklappt. Zu sehen nur bei Maus darüber,
   nach Antippen/Klicken (Klasse is-open, siehe Skript in schule/index.html) oder per Tastatur. */
.course-tile:not(.is-offer) {
  cursor: pointer;
}

.course-tile-text {
  padding: clamp(20px, 2vw, 30px);
  background: var(--text);
  color: var(--bg);
  font-size: 0.98rem;
  line-height: 1.5;
  clip-path: inset(100% 0 0 0);
  transition: clip-path .35s var(--ease);
}

/* Kurstitel klein über dem Inhalt, aus data-title; «/ ""» verhindert, dass Screenreader ihn doppelt lesen. */
.course-tile-text::before {
  content: attr(data-title);
  content: attr(data-title) / "";
  display: block;
  margin-bottom: 12px;
  color: #d6bd76;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.course-tile.is-open .course-tile-text,
.course-tile:focus-visible .course-tile-text {
  clip-path: inset(0);
}

/* Darüberfahren nur, wo es eine Maus oder ein Touchpad gibt (any-hover), auch auf Laptops mit Touchscreen. */
@media (any-hover: hover) {
  .course-tile:hover .course-tile-text {
    clip-path: inset(0);
  }
}

/* «+» oben rechts zeigt, dass es mehr zu sehen gibt; wird beim Öffnen zum «×». */
.course-tile:not(.is-offer)::after {
  content: "+";
  position: absolute;
  top: 12px;
  right: 18px;
  color: var(--accent);
  font-size: 1.7rem;
  line-height: 1;
  transition: transform .2s ease, color .2s ease;
}

.course-tile.is-open::after,
.course-tile:focus-visible::after {
  color: #d6bd76;
  transform: rotate(45deg);
}

@media (any-hover: hover) {
  .course-tile:not(.is-offer):hover::after {
    color: #d6bd76;
    transform: rotate(45deg);
  }
}

/* Sechste Kachel: Individuelles Kursprogramm, immer dunkel, ganze Kachel ist der Link zur Anfrage. */
.course-tile.is-offer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 2vw, 30px);
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.course-tile.is-offer .kicker {
  color: #d6bd76;
}

.course-tile.is-offer p {
  font-size: 0.98rem;
  line-height: 1.5;
}

.course-tile-cta {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.course-tile-cta span {
  display: inline-block;
  transition: transform .18s ease;
}

.course-tile.is-offer:hover .course-tile-cta span,
.course-tile.is-offer:focus-visible .course-tile-cta span {
  transform: translateX(6px);
}

@media (prefers-reduced-motion: reduce) {
  .course-tile-text {
    transition: none;
  }
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
  }
}

/* ---------- Kurs-Zeilen (wie index.html) ---------- */

.rows {
  margin-top: 44px;
  border-top: 1px solid var(--line);
}

.row {
  display: grid;
  grid-template-columns: 120px minmax(240px, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.row:last-child {
  border-bottom: 0;
}

.row-num {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.row h2,
.row h3 {
  font-size: clamp(1.7rem, 3.2vw, 4rem);
  line-height: 1.08; /* nicht enger: Umlaut-Punkte reichen ~1.02em hoch und stossen sonst an die Zeile darüber («VERHÄRTEN») */
  letter-spacing: -0.055em;
  text-transform: uppercase;
  font-weight: 900;
  /* Lange Wörter wie «Unterrichtscoaching» sind zwischen etwa 1040 und 1360px breiter als die Spalte:
     im HTML eine Trennstelle mit &shy; setzen. Das hier verhindert nur, dass sie in den Text ragen. */
  overflow-wrap: break-word;
}

/* Breites Layout mit drei Spalten: Titelgrösse auch an die Zeilenbreite koppeln (siehe .section-title),
   damit «Herausfordernden» auf breiten Bildschirmen nicht umbricht. */
@media (min-width: 1041px) {
  .row {
    container-type: inline-size;
  }

  .row h2,
  .row h3 {
    font-size: min(clamp(1.7rem, 3.2vw, 4rem), 3.7cqi);
  }
}

.row p {
  color: var(--soft);
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  line-height: 1.55;
}

.row p a {
  color: var(--text);
  font-weight: 800;
  border-bottom: 1px solid currentColor;
  transition: color .18s ease;
}

.row p a:hover,
.row p a:focus-visible {
  color: var(--accent);
}

/* ---------- Über uns: Slogan neben dem zugehörigen Absatz ---------- */

/* «AUSGEWOGENE» ist ein langes Wort: Titel etwas kleiner an die Spaltenbreite gekoppelt. */
.section-title.about-title {
  font-size: min(clamp(2.6rem, 5vw, 6rem), 13cqi);
}

.claim-row {
  margin-top: 34px; /* gleicher Abstand wie zwischen den Absätzen in .section-text */
}

/* Steht in der linken Spalte (Container, siehe .split > :first-child): Grösse an deren Breite gekoppelt. */
.claim {
  font-size: min(clamp(2.2rem, 4.6vw, 5.2rem), 14cqi);
  line-height: 1.08; /* Platz für Umlaut-Punkte, falls der Slogan einmal geändert wird */
  letter-spacing: -0.06em;
  text-transform: uppercase;
  font-weight: 900;
}

/* ---------- Bildschau «Impressionen» (Pfeile wie bei den Kundenstimmen auf index.html) ---------- */

.gallery-head {
  display: flex;
  flex-wrap: wrap; /* auf dem Handy rutschen die Pfeile unter den Titel */
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.gallery-nav {
  display: flex;
  gap: 10px;
}

.gallery-nav button {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--text);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background .18s ease, color .18s ease, opacity .18s ease;
}

.gallery-nav button:hover,
.gallery-nav button:focus-visible {
  background: var(--text);
  color: var(--bg);
}

.gallery-nav button[disabled] {
  opacity: 0.3;
  cursor: default;
  background: transparent;
  color: var(--text);
}

.gallery-nav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery {
  display: flex;
  gap: 16px;
  margin-top: 44px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.gallery::-webkit-scrollbar {
  display: none;
}

.gallery:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

.gallery figure {
  flex: 0 0 auto;
  margin: 0;
  scroll-snap-align: start;
}

/* Alle Bilder im Hochformat 3:4 und schwarz-weiss wie die Teamporträts auf index.html
   (die Dateien selbst bleiben farbig). */
.gallery img {
  width: auto;
  max-width: none; /* blog.css setzt 100 %, das würde die Bilder in der Leiste stauchen */
  height: clamp(260px, 32vw, 460px);
  filter: grayscale(1) contrast(1.05);
}

/* Quadrat in der Bildschau, das zum Blogbeitrag über den Sina-Kongress führt: Titelfolie als
   Hintergrund, darüber Sekhmet-Grün (wie index.html), damit der Text lesbar bleibt. */
.gallery-link {
  position: relative;
  flex: 0 0 auto;
  display: block;
  height: clamp(260px, 32vw, 460px);
  aspect-ratio: 1;
  overflow: hidden;
  scroll-snap-align: start;
  background: #4b4732;
  color: #f6f3ec;
}

.gallery-link img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 50%; /* rechte Seite der Folie: Welle und Löwe */
}

/* Unten deckend (dort steht auf der Folie heller Text, der sonst durchschimmert), oben leicht über
   der Welle. Die Kante bei 63 % liegt genau dort, wo die Folie von Weiss zu Grün wechselt. */
.gallery-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #4b4732 0%, #4b4732 62.5%, rgba(75, 71, 50, 0.3) 63%, rgba(75, 71, 50, 0.3) 100%);
}

.gallery-link-text {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: clamp(18px, 2.4vw, 32px);
}

.gallery-link-kicker {
  color: #d6bd76;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gallery-link-title {
  font-size: clamp(1.15rem, 1.8vw, 1.9rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  font-weight: 900;
}

.gallery-link-arrow {
  display: inline-block;
  transition: transform .18s ease;
}

.gallery-link:hover .gallery-link-arrow,
.gallery-link:focus-visible .gallery-link-arrow {
  transform: translateX(6px);
}

.gallery-link:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .gallery {
    scroll-behavior: auto;
  }
}

/* ---------- Kundenstimmen (Gestaltung wie index.html, aber ohne Scroll-Leiste) ---------- */

.testimonials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  margin-top: 44px;
}

.testimonial {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.testimonial blockquote {
  position: relative;
  flex: 1;
  margin: 0 0 22px;
  padding-top: 48px;
  font-size: clamp(1.02rem, 1.15vw, 1.28rem);
  line-height: 1.5;
  letter-spacing: -0.015em;
  font-weight: 800;
}

.testimonial blockquote::before {
  content: "\201C";
  position: absolute;
  top: 4px;
  left: -2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.4rem;
  line-height: 1;
  color: var(--accent);
}

.testimonial figcaption {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  line-height: 1.5;
}

.testimonial figcaption strong {
  display: block;
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.testimonial figcaption span {
  color: var(--soft);
}

/* ---------- Responsive ---------- */

@media (max-width: 1120px) {
  .nav-links {
    box-shadow: 0 28px 40px rgba(75, 71, 50, 0.16);
  }
}

@media (max-width: 1040px) {
  .split {
    grid-template-columns: 1fr;
  }

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

  .row {
    grid-template-columns: 80px 1fr;
  }

  .row p {
    grid-column: 2;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 62px 0;
  }

  .section-title {
    max-width: none;
    font-size: clamp(3rem, 15vw, 5.4rem);
  }

  .section-text {
    gap: 24px;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 26px 0;
  }

  .testimonials,
  .course-grid {
    grid-template-columns: 1fr;
  }

  .claim-row {
    margin-top: 24px;
  }

  .row p {
    grid-column: auto;
  }
}
