/* =========================================================
   dufux.swiss — Stylesheet
   Farben/Typo als CSS-Variablen -> im Admin-Backend später
   ohne Code-Änderung anpassbar (siehe --accent, --navy usw.)
   ========================================================= */

:root {
  --navy: #0a2240;        /* exakte Original-Navy (aus echten Assets/Screenshots gesampelt) */
  --navy-2: #0d2b52;
  --navy-deep: #021826;   /* dunkelster Punkt im Footer-Verlauf */
  --accent: #ffab1a;      /* Original-Akzent/Aktiv-Farbe im Menü (Orange) */
  --accent-light: #ffc464;
  --nav-inactive: #c9c8bd; /* Original-Farbe der inaktiven Menüpunkte */
  --footer-text: #c7c2b4;  /* Original-Schriftfarbe im Footer (warmes Beige) */
  --paper: #f5f3ee;       /* Papier-Textur-Ersatz hell */
  --stone: #b9b6ab;       /* Stein/Beige-Fläche ("Personalisiertes Angebot") */
  --white: #ffffff;
  --ink: #12141a;
  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1200px;

  --font-display: 'Fira Sans Condensed', system-ui, sans-serif;  /* Hauptschrift */
  --font-body: 'Fira Sans Condensed', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;          /* Fliesstext: Fira Sans Condensed 400 Regular */
  color: var(--ink);
  background: var(--navy);   /* durchgehendes Navy hinter dem transparenten Footer */
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;          /* Primär/Überschriften: 500 Medium */
  margin: 0 0 .5em;
  color: var(--navy);
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--navy);
  position: relative;   /* eigener Stacking-Kontext ... */
  z-index: 100;         /* ... damit das Dropdown IMMER über allen folgenden
                           Schichten (Fenster, Container-Maske, Container)
                           liegt — sonst verschwindet es auf den Unterseiten
                           hinter dem Papier-/Masken-Layer. */
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 18px;
  padding-bottom: 18px;
}

.main-nav > ul {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}
.main-nav li { position: relative; }
.main-nav a {
  color: var(--nav-inactive);
  font-weight: 600;
  font-size: 1rem;
  padding: 8px 2px;
  display: inline-block;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--accent); }

/* Dropdown per JavaScript (mouseenter/mouseleave), bewusst NICHT per
   reinem CSS :hover: CSS :hover reagiert auf die blosse Cursor-POSITION,
   auch direkt nach einem Seiten-Reload, falls die Maus zufällig schon
   über dem Menü steht -> wirkt dann wie "hängt offen". JS-Mausereignisse
   brauchen eine ECHTE Bewegung in das Element hinein und lösen daher nie
   ungewollt beim blossen Laden der Seite aus. */
.has-sub.open .sub-menu { display: block; }
.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--stone);
  min-width: 200px;
  border-radius: 0 0 10px 10px;
  padding: 6px 0;
  box-shadow: 0 12px 24px rgba(0,0,0,.3);
}
.sub-menu a { display: block; padding: 10px 16px; color: var(--navy); }
.sub-menu a:hover { color: var(--accent); }
.has-sub-trigger .caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  transition: transform .2s ease;
}
.has-sub.open .caret { transform: rotate(180deg); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  /* Burger-Icon nach oben links */
  .site-header .container { justify-content: flex-start; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 10px 24px 20px;
  }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; gap: 4px; }
  .sub-menu {
    display: block;
    flex-direction: column;
    position: static;
    box-shadow: none;
    background: none;
    padding: 0 0 0 16px;
  }
  .sub-menu a { color: var(--nav-inactive); padding: 6px 0; }
  .has-sub-trigger .caret { display: none; }
}

/* ---------- Divider-Grafiken (echte Original-Assets) ----------
   menue_neu.png:      Zickzack-Übergang direkt unter dem Header
   container_maske.png: Zickzack-Übergang zurück auf Navy
   Beide sind reine 2-Farb-Flächen -> skalieren sauber via width:100%.
------------------------------------------------------------------ */
.divider {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 3;            /* über dem fixierten Hintergrund (z:-1), damit die
                            navy Flächen der Zacken den Hintergrund abdecken
                            und nur die transparenten Zacken ihn freigeben. */
  margin: 0;
}
.divider-top { margin-top: -2.6vw; margin-bottom: -1px; } /* Menü-Grafik höher, tuckt unter den Header (responsiv) */
.divider-bottom { margin-bottom: -1px; }  /* nahtlos an den navy Container */

/* =========================================================
   SCHICHTEN-LAYOUT (Home + Unterseiten identisch)
   ---------------------------------------------------------
   1) .page-bg  — FIXIERTER Hintergrund (z:-1):
        Home     -> Intro-Video (Desktop quer / Mobile hoch)
        Unterseite -> Papierbild + pulsierender, fixierter Titel
   2) .site-header (navy Menü) + .divider-top (menue_neu.png)
   3) .window   — transparentes "Sichtfenster" auf den fix. Hintergrund
   4) .divider-bottom (container_maske.png)
   5) .content-container — navy #0A2240, trägt die Flipboxen/Inhalte
   6) .site-footer — footer_background über volle Breite, Schatten
   ========================================================= */

/* 1) Fixierter Hintergrund */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
/* Home: Video, mittig, volle Breite (Letterbox in Video-Eigenfarbe) */
.page-bg--video { background: #e3e3e3; display: flex; align-items: center; justify-content: center; }
.page-bg--video video { width: 100%; height: auto; display: block; }
.page-bg--video .hero-mobile { display: none; }
@media (max-width: 700px) {
  .page-bg--video { align-items: stretch; }
  .page-bg--video .hero-desktop { display: none; }
  .page-bg--video .hero-mobile { display: block; width: 100%; height: 100%; object-fit: cover; }
}
/* Unterseite: Hintergrund unter den Übertiteln = einfarbig #E3E3E3
   (Papier-Textur ersetzt, Desktop + Mobile). */
.page-bg--paper { background: #E3E3E3; }
/* pulsierender, fixierter Titel im Sichtfenster */
.floating-title {
  position: absolute;
  top: 40%;
  left: 0; right: 0;
  transform: translateY(-50%);
  text-align: center;
  padding: 0 16px;
}
.floating-title h1 {
  color: var(--navy);
  /* Desktop deutlich grösser, Mobile nur wenig grösser (kleiner min-Wert). */
  font-size: clamp(3.4rem, 13vw, 10rem);
  line-height: 1.02;
  margin: 0;
  animation: titlePulse 3.2s ease-in-out infinite;
}
/* Scroll-Wegweiser: drei Pfeile, die nacheinander auftauchen und wieder
   verschwinden (Wellen-Effekt nach unten) — symbolisiert "hier runterscrollen". */
.floating-title .chevron {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: .62;
}
.floating-title .chevron span {
  color: var(--navy);
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  opacity: 0;
  animation: scrollCue 1.6s ease-in-out infinite;
}
.floating-title .chevron span:nth-child(1) { animation-delay: 0s; }
.floating-title .chevron span:nth-child(2) { animation-delay: .2s; }
.floating-title .chevron span:nth-child(3) { animation-delay: .4s; }
@keyframes scrollCue {
  0%   { opacity: 0; transform: translateY(-5px); }
  40%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(6px); }
}
@keyframes titlePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .floating-title h1 { animation: none; }
  .floating-title .chevron span { animation: none; opacity: .95; }
}
/* Mobile: Übertitel fett + gross + pulsierend (analog Desktop), aber mit Rand
   links/rechts, damit nichts abgeschnitten wird. */
@media (max-width: 700px) {
  .floating-title { padding: 0 20pt; }   /* Randabstand links/rechts 20pt */
  .floating-title h1 {
    font-size: clamp(2.8rem, 16vw, 4.1rem);   /* viel grösser (passt bis "Datenschutz") */
    font-weight: 700;                 /* fett */
    animation: titlePulse 3.2s ease-in-out infinite;   /* Pulsieren wie Desktop */
    will-change: transform;
  }
  .floating-title .chevron span { font-size: clamp(1.7rem, 6vw, 2.8rem); }
  /* Langer Titel "Veranstaltungen": etwas kleiner, damit das Wort mit 20pt-Rand
     komplett auf den Bildschirm passt (kein Abschneiden). */
  .floating-title--long h1 { font-size: clamp(2.2rem, 12vw, 3rem); }
}

/* 3) Sichtfenster: transparent, gibt den fixierten Hintergrund frei.
   Höhe so bemessen, dass die untere Container-Maske am Ende des ersten
   Bildschirms sitzt (Header + oberer Divider abgezogen). */
.window {
  position: relative;
  z-index: 2;
  /* Kleiner gehalten, damit die untere Container-Maske (Abschrägung) schon
     beim Laden ein Stück sichtbar ist und der blaue Container "anschneidet". */
  height: calc(100vh - 262px);   /* +38px (~1cm): unterer Container inkl. Abschrägung ca. 1cm tiefer */
  min-height: 218px;
}
/* Mobile: gesamten unteren Container (Abschrägung + Inhalt) zusätzlich 1,5cm
   tiefer setzen -> Fensterhöhe um ~57px erhöhen. */
@media (max-width: 700px) {
  .window { height: calc(100vh - 205px); min-height: 275px; }
}

/* Hilfsklasse: Element 1,5cm (~57px) vertikal nach unten verschieben */
.shift-down-15 { margin-top: 57px; }
/* Desktop: Über-uns-Textfeld 1cm (~38px) höher als der Standard-Versatz
   (war 76px -> jetzt 76-38 = 38px). */
@media (min-width: 701px) {
  .about-bio.shift-down-15 { margin-top: 38px; }
}

/* 5) Navy Container mit den Flipboxen/Inhalten */
.content-container {
  position: relative;
  z-index: 4;                 /* deckt den fixierten Hintergrund beim Scrollen zu */
  background: var(--navy);    /* #0A2240 – identisch zur Container-Maske */
  padding-bottom: 130px;      /* leere blaue Fläche unten vor dem Footer */
}

/* ---------- Diamant-Panel (Shop-Seite): Stein-Fläche mit spitz
   zulaufenden Kanten oben/unten, wie die übrigen Schrägen im Design. ---------- */
.diamond-panel {
  background: var(--stone) url('../images/Background_titel.png') center/cover;
  clip-path: polygon(0% 12%, 38% 0%, 62% 0%, 100% 12%, 100% 88%, 62% 100%, 38% 100%, 0% 88%);
  padding: 90px 60px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 20px;
}
.diamond-panel h2 { font-size: 2rem; margin-bottom: .4em; }
.diamond-panel p { max-width: 46ch; margin: 0 auto 22px; font-size: 1.05rem; }

/* ---------- Home: Flip-Card-Raster (6 Kacheln, Original-Zeichnungen) ----------
   Jede Kachel zeigt vorne die Handzeichnung, beim Hover/Tap dreht sie
   sich (3D-Flip) und zeigt Papier-Textur + Titel/Link auf der Rückseite
   — identisch zum Flip-Box-Element der Live-Seite.
------------------------------------------------------------------------- */
.tile-section {
  background: var(--navy);
  /* Flipboxen ca. 5cm tiefer im Container (Abschrägung/Container bleiben) */
  padding: clamp(90px, 13vw, 180px) 0 48px;
}
.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;              /* sichtbarer Navy-Abstand zwischen den Kacheln, wie im Original */
  background: var(--navy);
  padding: 3px;
  max-width: 900px;       /* aus Bildschirmaufnahme exakt vermessen */
  margin: 0 auto;
}
.flip-card {
  background: var(--navy);
  aspect-ratio: 1 / 1;    /* Kachel quadratisch, wie das Vordergrundbild */
  perspective: 1200px;
}
/* Gestapelte Variante (Shop-Seite): eine Kachel pro Zeile, mittig */
.tile-grid.stack {
  grid-template-columns: 1fr;
  max-width: 440px;
  gap: 34px;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .6s cubic-bezier(.4,.2,.2,1);
  transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner,
.flip-card:focus-within .flip-card-inner,
.flip-card.is-flipped .flip-card-inner { transform: rotateY(180deg); }

.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.flip-front {
  background: #fff;
  padding: 0; /* Bild füllt die Kachel komplett, kein weisser Rand mehr */
}
.flip-front img { width: 100%; height: 100%; object-fit: cover; }
.flip-back {
  padding: 28px;
  background: var(--stone) url('../images/Background_titel.png') center/cover;
  color: var(--navy);
  transform: rotateY(180deg);
  gap: 12px;
}
.flip-back h3 { font-size: 1.4rem; margin: 0; }
.flip-back p { margin: 0; max-width: 30ch; font-size: .95rem; }
.flip-back .btn { margin-top: 6px; }

/* Breite Flipbox (quer) — spannt über beide Spalten, z.B. "Themen die
   unterrichtet werden" auf der Angebot-Seite. */
.flip-card.wide {
  grid-column: 1 / -1;
  aspect-ratio: 20 / 9;
}
/* Themen-Rückseite (Desktop): rundum gleicher Randabstand zum Text
   (oben/unten = links/rechts = 40px), Inhalt vertikal zentriert. */
.flip-card.wide .flip-back { padding: 40px; justify-content: center; }
.flip-card.wide .flip-back p { max-width: none; }
/* Themen-Flipbox: Desktop = Querbild, Mobile = Hochformat-Bild */
.themen-img { width: 100%; height: 100%; object-fit: cover; }
.themen-img--mobile { display: none; }
/* Themenliste auf der Rückseite: mehrspaltig, kompakt */
.flip-topics {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  columns: 2;
  column-gap: 42px;
  text-align: left;
  width: 100%;
  max-width: 820px;
}
.flip-topics li {
  break-inside: avoid;
  padding: 4px 0;
  font-size: .9rem;
  font-weight: 600;
  color: var(--navy);
}
.flip-topics li::before {        /* Strich-Aufzählungszeichen wie im Printscreen */
  content: "\2013\00a0\00a0";
  color: var(--navy);
  font-weight: 700;
}
/* Dozenten-Links auf der Flip-Rückseite: kompakte "Pill"-Buttons */
.flip-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 6px;
}
/* Normalzustand = gefüllt navy mit weisser Schrift; Hover = Umriss/orange
   (visuell umgekehrt gegenüber vorher) */
.content-container .flip-links a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  color: #fff;
  background: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 999px;
  padding: 5px 12px;
  transition: background .18s, color .18s;
}
.content-container .flip-links a:hover {
  background: transparent;
  color: #0A2240;            /* dufuxblau als Hover-Schriftfarbe */
  border-color: var(--navy);
}
/* Veranstaltungen/Dozenten-Flipbox (Desktop): Text möglichst gross, aber mit
   sauberem Randabstand zur Flipbox (Inhalt vertikal zentriert). */
.flip-back--dozent { padding: 30px 34px; justify-content: center; gap: 6px; }
.flip-back--dozent .dozent-group { margin-bottom: 18px; }
.flip-back--dozent .flip-back h4,
.content-container .flip-back--dozent h4 { font-size: 1.32rem; margin: 0 0 8px; }
.flip-back--dozent .dozent-link { font-size: 1.12rem; }
.content-container .flip-back--dozent .flip-links a { font-size: 1rem; padding: 7px 15px; }
.flip-back--dozent .flip-links { gap: 10px; margin-top: 8px; }

/* Gruppen auf der Dozenten-Rückseite (Veranstaltungen / Lehrmittel / Dozenten) */
.dozent-group { margin-bottom: 14px; }
.dozent-group:last-child { margin-bottom: 0; }
.content-container .flip-back h4 { color: var(--navy); font-size: 1rem; margin: 0 0 6px; }
.dozent-link {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  color: var(--navy) !important;
  text-decoration: underline;
}
@media (max-width: 900px) {
  .tile-grid { grid-template-columns: 1fr 1fr; }
  .flip-card.wide { aspect-ratio: auto; min-height: 380px; }
  .flip-topics { columns: 2; }
}
@media (max-width: 560px) {
  /* Flipboxen ca. 2cm nach unten + gleicher Abstand links/rechts wie vertikal (28px) */
  .tile-section { padding: 76px 0 40px; }
  .tile-grid {
    grid-template-columns: 1fr;
    padding-left: 28px;
    padding-right: 28px;
  }
  .flip-topics { columns: 1; }
  /* Themen-Flipbox im Hochformat (400x700) mit eigenen Bildern.
     WICHTIG: definierte Breite statt "margin:0 auto", sonst kollabiert die
     Box mit aspect-ratio + absolut positionierten Flächen auf Breite 0
     (dann fehlt die Flipbox auf dem Handy komplett). */
  .flip-card.wide {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(340px, 100%);
    aspect-ratio: 4 / 7;
    min-height: 0;
  }
  .themen-img--desktop { display: none; }
  .themen-img--mobile { display: block; }
  /* Rückseite Hochformat: leeres Papierbild als Hintergrund, kompakte Themenliste.
     Inhalt vertikal ZENTRIERT -> rundum gleicher Rand (oben = unten). */
  .flip-back--themen {
    background: #efece4 url('../images/angebot_hoch_back.png') center/cover no-repeat;
    padding: 16px 16px;
    justify-content: center;   /* gleicher Rand oben/unten */
  }
  .flip-back--themen h3 { font-size: .8rem; line-height: 1.15; margin: 0 0 7px; }
  .flip-back--themen .flip-topics { columns: 1; margin-top: 0; max-width: none; }
  .flip-back--themen .flip-topics li { font-size: .6rem; padding: 1.2px 0; font-weight: 600; }

  /* Dozenten-Flipbox-Rückseite: Schrift + Link-Buttons kleiner, damit alles
     sauber auf die quadratische Rückseite passt. Selektoren spezifisch auf
     .flip-back--dozent, damit sie die grösseren Desktop-Regeln überschreiben. */
  .flip-back--dozent { padding: 16px; gap: 8px; }
  .flip-back--dozent .dozent-group { margin-bottom: 8px; }
  .content-container .flip-back--dozent h4 { font-size: .78rem; margin: 0 0 4px; }
  .flip-back--dozent .dozent-link { font-size: .72rem; }
  .flip-back--dozent .flip-links { gap: 5px; margin-top: 3px; }
  .content-container .flip-back--dozent .flip-links a { font-size: .62rem; padding: 3px 8px; border-width: 1.5px; }
}

/* ---------- Über uns: Profil-Karte (freigestelltes Portrait) ----------
   Das Portrait ist ein PNG mit transparentem Hintergrund und wird direkt
   auf dem Navy platziert (kein Rahmen/Kasten), mit weichem Schlagschatten
   und einer Overlay-Beschriftung "Founder & CEO / Pascal Wapf". */
/* Über-uns Kopf: Portrait links, Biografie-Box rechts */
.about-top {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 42px;
  align-items: start;
  margin-bottom: 8px;
}
.about-top .about-bio { align-self: stretch; }
@media (max-width: 820px) {
  .about-top { grid-template-columns: 1fr; gap: 26px; }
}
.profile-hero {
  margin: 0;
  text-align: left;
}
.profile-photo {
  position: relative;
  display: block;   /* KEIN Schatten, KEINE Drehung – gerade auf dem Navy */
}
.profile-photo img {
  width: 100%;
  height: auto;
  display: block;
}
.profile-photo .photo-caption {
  position: absolute;
  left: 0;           /* GANZ bündig an die linke Bildkante, kein Abstand */
  right: auto;
  bottom: 0;         /* GANZ bündig an die untere Bildkante, kein Abstand */
  text-align: left;
  text-shadow: 0 2px 12px rgba(0,0,0,.65);
}
.profile-photo .photo-caption .role {
  display: block;
  color: #e7e3d6;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 4.2vw, 3.4rem);   /* deutlich grösser */
  line-height: .95;
  margin: 0;
}
/* "Pascal Wapf" – direkt unter dem Bild, bereits über dem blauen Container */
.profile-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2.3rem;
  line-height: 1.05;
  color: #e7e3d6;
  margin: 6px 0 0;
}
@media (max-width: 480px) {
  .profile-photo .photo-caption .role { font-size: 2.2rem; }   /* auf Mobile ebenfalls grösser */
  .profile-name { font-size: 1.9rem; }
}
.profile-hero .profile-contact {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.profile-hero .profile-contact li { color: #eef1f6; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.profile-hero .profile-contact img { width: 16px; height: 16px; }
.profile-hero .profile-contact a { color: #eef1f6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 14px 30px;
  border-radius: 999px;
  border: 2px solid #fff;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn.btn-outline {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn.btn-outline:hover { background: var(--navy); color: #fff; }

/* ---------- Sections generic ---------- */
.section { padding: 64px 0; }
.section.tight { padding: 40px 0; }
.section-alt { background: var(--paper); }

/* ---------- Inhalte auf dem navy Container lesbar machen ----------
   Der Container ist jetzt durchgehend navy (#0A2240). Fliesstext,
   Überschriften und Listen werden daher hell gesetzt; grössere
   Textblöcke sitzen in einer hellen "Papier/Stein"-Box (wie im
   Original auf der Über-uns-Seite). ---------------------------------- */
.content-container { color: #eef1f6; }
.content-container h1,
.content-container h2,
.content-container h3,
.content-container h4 { color: #fff; }
.content-container .section { padding: 56px 0; }
.content-container .two-col-list li { color: #eef1f6; border-bottom-color: rgba(255,255,255,.18); }
.content-container a { color: var(--accent-light); }

/* Helle Stein-Box für Textblöcke (Über uns, Kontaktadresse …) */
.text-panel {
  background: #c3beb2;
  color: var(--navy);
  border-radius: 0;          /* keine abgerundeten Ecken */
  padding: 28px 32px;
}
.text-panel h2, .text-panel h3, .text-panel h4 { color: var(--navy); }
.text-panel a { color: var(--navy); font-weight: 700; }
.text-panel .two-col-list li { color: var(--navy); border-bottom-color: rgba(10,34,64,.18); }
.text-panel p { color: var(--navy); }
.content-container .section-title { text-align: center; margin-bottom: 28px; font-size: clamp(2rem, 4vw, 3rem); }
/* Überschriften in den hellen Boxen bleiben navy (nicht die weisse
   Container-Schrift erben) */
.content-container .info-box h2,
.content-container .cta-box h3,
.content-container .diamond-panel h2 { color: var(--navy); }
/* Flip-Rückseiten (Stein-Textur): Überschriften navy statt weiss */
.content-container .flip-back h3 { color: var(--navy); }
.content-container .flip-back p { color: #2b2b2b; }
.content-container .flip-back .btn { color: #fff; }

.two-col-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 40px;
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
}
.two-col-list li {
  padding: 10px 0;
  border-bottom: 1px solid #e2e0d8;
  font-weight: 600;
}
@media (max-width: 640px) { .two-col-list { grid-template-columns: 1fr; } }

.logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}
.logo-row a {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 10px;
  padding: 10px 18px;
}
.logo-row a:hover { background: var(--navy); color: #fff; }

.teaser-card {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.teaser-card h3 { color: #fff; margin: 0; }

/* ---------- Info-Box (Angebot-Seite: Veranstaltungen / Shop / Dozententätigkeiten) ---------- */
.info-box {
  background: var(--stone) url('../images/Background_titel.png') center/cover;
  border: 3px solid #fff;
  border-radius: 0;
  outline: 1px solid rgba(14,30,59,.25);
  outline-offset: -3px;
  padding: 40px 32px;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}
.info-box h2 { font-size: 1.5rem; margin-bottom: .3em; }
.info-box .info-link { display: inline-block; margin-bottom: 28px; font-weight: 700; text-decoration: underline; color: var(--navy); }
.info-box .info-link:last-child { margin-bottom: 0; }
.info-box .logo-row { padding: 8px 0 0; }
.info-box .logo-row a { border-color: var(--navy); font-size: .85rem; padding: 8px 14px; }

/* Statische Papier-Box (nicht interaktiv, z.B. "Personalisiertes Angebot" auf Unterseiten) */
.cta-box {
  background: var(--stone) url('../images/Background_titel.png') center/cover;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px;
  text-align: center;
}
.cta-box h3 { font-size: 1.6rem; }
.cta-box p { max-width: 32ch; color: #2b2b2b; margin: 0; }

/* ---------- Veranstaltungen: HTML-Tabelle ---------- */
.events-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
}
.events-toolbar input[type="search"],
.events-toolbar select {
  padding: 10px 14px;
  border: 2px solid var(--navy);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: .95rem;
}
.events-toolbar .pdf-link {
  margin-left: auto;
  font-weight: 700;
  color: var(--accent);
}

/* Kompakte Box auf dem navy Container – Grösse angelehnt an das
   graue Feld im Original (image3): mittige, begrenzte Fläche statt
   randlos breiter Tabelle. */
.events-panel {
  max-width: 1040px;           /* Feld etwas breiter */
  margin: 0 auto;
  background: #C3BEB2;          /* einfarbiger Hintergrund statt Papier-Textur */
  border: 3px solid #fff;
  border-radius: 0;
  padding: 12px 12px;          /* kleinere Ränder = mehr Platz für die Tabelle */
  overflow: hidden;            /* Rahmen umschliesst Toolbar + Liste; nur die Liste scrollt intern → im Querformat wird nichts vom Rahmen abgeschnitten */
}
.events-panel .events-toolbar { margin-bottom: 16px; }
.events-panel a { color: var(--navy); }
.events-panel .events-table td { color: var(--navy); }
.events-panel .events-table a.event-link { color: #1d4ed8; text-decoration: underline; }

table.events-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .65rem;           /* Desktop: kleinere Schrift für vollständige Sichtbarkeit ohne Scroll */
}
.events-table th, .events-table td {
  text-align: left;
  padding: 5px 6px;            /* kompaktere Zellen für mehr Platz */
  border-bottom: 1px solid #e2e0d8;
}
.events-table th {
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.events-table th[aria-sort="ascending"]::after { content: " \\25B2"; }
.events-table th[aria-sort="descending"]::after { content: " \\25BC"; }
.events-table tbody tr:hover { background: var(--paper); }
.events-table a.event-link { color: var(--accent); font-weight: 700; }
.events-empty { padding: 40px; text-align: center; color: #777; display: none; }

/* Scroll-Container um die Tabelle: NUR die Liste scrollt vertikal in sich.
   Hohes Fenster = wenig scrollen. Gilt für Desktop UND Mobile, damit der weisse
   Rahmen die Liste in jeder Ausrichtung sauber umschliesst (kein Abschneiden). */
.events-scroll {
  width: 100%;
  max-height: 66vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Mobile (≤760px): Jede Zeile bleibt EINE Zeile (kein Umbruch). Ränder und
   Schrift werden verkleinert, damit alle 6 Spalten ohne horizontales Scrollen
   auf die Bildschirmbreite passen. Nur die Liste selbst scrollt vertikal. */
@media (max-width: 760px) {
  .events-panel {
    padding: 0;                 /* keine Ränder mehr zwischen Liste und Rahmen */
    overflow: visible;
    max-height: none;           /* Panel wächst mit der Liste → im Querformat nichts abgeschnitten */
    width: calc(100% + 36px);   /* Feld etwas breiter (ragt in die Container-Ränder) */
    margin-left: -18px;
    margin-right: -18px;
  }
  .events-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 8px 0;         /* Suchfeld/Filter nicht direkt am Rand kleben */
  }
  .events-panel .events-toolbar { margin-bottom: 8px; }

  /* Liste bekommt ein hohes Fenster (weniger scrollen) und scrollt vertikal in
     sich. Keine eigenen Ränder mehr → geht direkt bis an den weissen Rahmen.
     Mobile: nochmal 1cm kleiner → insgesamt 2cm (≈76px) weniger als das Original. */
  .events-scroll {
    max-height: calc(80vh - 76px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    border: none;
    border-radius: 0;
  }
  .events-table {
    font-size: .50rem;          /* Mobile: noch kleinere Schrift für mehr Platz */
    table-layout: fixed;
    width: 100%;
  }
  .events-table td {
    padding: 5px 4px;
    vertical-align: top;
    white-space: normal;
    overflow: hidden;
  }
  /* Der innere Span begrenzt den Text auf maximal ZWEI Zeilen (kein einzelnes
     Wort wird mittendrin abgeschnitten). Die td bleibt eine echte Tabellenzelle,
     damit die festen Spaltenbreiten greifen. */
  .events-table td .cell-clip {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.15;
  }
  .events-table th {
    padding: 5px 4px;
    white-space: nowrap;
    vertical-align: middle;
  }
  /* Zeilen sind antippbar → Popup */
  .events-table tbody tr { cursor: pointer; }
  /* Kopfzeile bleibt beim Scrollen oben sichtbar */
  .events-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    white-space: nowrap;
  }
  /* Spaltenbreiten so verteilt, dass alles auf den Schirm passt */
  .events-table th:nth-child(1), .events-table td:nth-child(1) { width: 17%; }
  .events-table th:nth-child(2), .events-table td:nth-child(2) { width: 21%; }
  .events-table th:nth-child(3), .events-table td:nth-child(3) { width: 18%; }
  .events-table th:nth-child(4), .events-table td:nth-child(4) { width: 22%; }
  .events-table th:nth-child(5), .events-table td:nth-child(5) { width: 13%; }
  .events-table th:nth-child(6), .events-table td:nth-child(6) { width: 9%; }
  .events-table a.event-link, .events-panel .events-table a.event-link { white-space: nowrap; }
}
/* Sehr schmale Geräte (≤430px): Schrift nochmal etwas kleiner */
@media (max-width: 430px) {
  .events-panel { padding: 0; }
  .events-table { font-size: .45rem; }
  .events-table td, .events-table th { padding: 4px 3px; }
}

/* ---------- Detail-Popup einer Veranstaltung (Klick auf Listenzeile) ---------- */
.event-modal-open { overflow: hidden; }   /* Hintergrund nicht mitscrollen */
.event-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 34, 64, .55);
  opacity: 0;
  transition: opacity .18s ease;
}
.event-modal-overlay.is-visible { opacity: 1; }
.event-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(10, 34, 64, .35);
  padding: 26px 24px 24px;
  transform: translateY(10px) scale(.98);
  transition: transform .18s ease;
}
.event-modal-overlay.is-visible .event-modal { transform: translateY(0) scale(1); }
.event-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  color: var(--navy);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}
.event-modal-close:hover { background: var(--paper); }
.event-modal-title {
  margin: 0 34px 16px 0;
  color: var(--navy);
  font-size: 1.35rem;
  line-height: 1.25;
}
.event-modal-list {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  row-gap: 10px;
}
.event-modal-list dt {
  font-weight: 700;
  color: var(--navy);
  font-size: .92rem;
}
.event-modal-list dd {
  margin: 0;
  color: #333;
  font-size: .96rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.event-modal-link {
  display: inline-block;
  margin-top: 20px;
  padding: 11px 20px;
  background: var(--accent);
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
}
.event-modal-link:hover { filter: brightness(.95); }

/* ---------- Über uns ---------- */
.profile {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: start;
}
.profile img { border-radius: var(--radius-lg); box-shadow: 0 20px 40px rgba(14,30,59,.25); }
.profile-contact { list-style: none; padding: 0; margin: 16px 0; }
.profile-contact li { margin-bottom: 4px; font-weight: 600; }
@media (max-width: 760px) { .profile { grid-template-columns: 1fr; } }

/* ---------- Kontakt ----------
   Eine einzige, breite Stein-Box (wie im Printscreen): Kontaktadresse,
   Einleitungstext, danach die weissen, randlosen Eingabefelder über die
   volle Breite und ein durchgehender navy "Send"-Button ganz unten. */
.contact-panel { max-width: 1040px; margin: 0 auto; padding: 40px 44px; }
.contact-panel h2 { margin-bottom: .2em; }
.contact-address { font-weight: 700; color: var(--navy) !important; margin-top: 0; }

/* nur für Screenreader sichtbar (Labels bleiben zugänglich, Feld zeigt Platzhalter) */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

form.contact-form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
form.contact-form input,
form.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-radius: 0;          /* eckige Eingabefelder */
  background: #fff;
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
form.contact-form textarea { min-height: 200px; resize: vertical; border-radius: 0; }
/* Honeypot-Feld (Spamschutz): für Menschen unsichtbar, Bots füllen es aus */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
form.contact-form input::placeholder,
form.contact-form textarea::placeholder { color: #9a988f; }
.btn-send {
  width: 100%;
  border-radius: 999px;
  border: 0;
  background: var(--navy);
  margin-top: 4px;
}
.btn-send:hover { background: var(--accent); }
.form-status { font-weight: 700; text-align: center; }
.form-status[data-state="ok"] { color: #1a7a3c; }
.form-status[data-state="error"] { color: #b3261e; }
@media (max-width: 560px) { .contact-panel { padding: 28px 20px; } }

/* ---------- Footer ----------
   footer_background_FINISCH_good.png liegt über die VOLLE Seitenbreite
   (enthält das dufux-Logo). Der Footer überlappt den Container leicht nach
   oben und wirft per box-shadow einen Schatten auf dessen leere blaue
   Fläche. Der Footer-Text (Kontakt / Impressum / Copyright) sitzt mittig
   direkt unter dem Logo — wie im Printscreen. */
.site-footer {
  /* Durchgehendes Navy als Untergrund: Das Logo-PNG hat einen transparenten
     Hintergrund; dahinter liegt exakt dasselbe Navy wie im Content-Container
     darüber. Dadurch schwebt das Logo nahtlos auf einer durchgehenden Fläche —
     KEIN abgesetzter blauer Kasten, KEIN Schatten, keine harte Kante. */
  background: var(--navy);
  color: var(--footer-text);
  position: relative;
  z-index: 5;
  margin-top: -1px;    /* schliesst nahtlos an den Content-Container an */
  overflow: hidden;
}
/* Weicher, kräftiger Schlagschatten oben, der nach unten stark ausläuft.
   Liegt zwischen Navy-Untergrund und Logo-PNG (z-index 0): erscheint nur dort,
   wo das PNG transparent ist (oberer Rand) und lässt das Logo unberührt. */
.site-footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 50%;   /* obere Hälfte: von der Mitte des Footer-Bildes bis ganz oben */
  /* Verlauf nach oben: an der Mitte 100% schwarz -> am oberen Rand 100% transparent */
  background: linear-gradient(to top,
              rgba(0,0,0,1) 0%,
              rgba(0,0,0,0) 100%);
  z-index: 0;
  pointer-events: none;
}
.footer-bg {
  display: block;
  width: 100%;      /* volle Seitenbreite */
  height: auto;
  position: relative;
  z-index: 1;       /* Logo liegt über dem Schatten */
}
.site-footer .container {
  position: relative;
  z-index: 2;
  margin-top: -13vw;   /* zieht den Text hoch, direkt unter das Logo */
  transform: translate(85px, -169px);  /* Desktop: 0,5cm nach links und 0,5cm nach oben (war 104px,-150px) */
  text-align: center;
  padding-bottom: 26px;
}
@media (max-width: 700px) {
  /* Neues Hochformat-Footerbild (footer_background_mobileneufinal.png): möglichst
     gross über die volle Breite, Logo mittig, darunter Navy-Fläche für den Text. */
  .site-footer picture { display: block; text-align: center; }
  .footer-bg { width: 100%; max-width: none; margin: 0 auto; }
  /* Schatten analog Desktop wieder aktiv: von der Mitte des Footerbildes 100%
     schwarz nach oben auslaufend auf 100% transparent (liegt im transparenten
     oberen Bildbereich hinter dem Logo). */
  .site-footer::before { display: block; height: 50%; }
  /* Footer-Text auf die Navy-Fläche unter das Logo ziehen, 0,5cm (~19px) nach
     oben UND 0,5cm (~19px) nach rechts. */
  .site-footer .container { margin-top: -30vw; transform: translate(19px, -19px); }
}
.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-bottom: 12px;
}
.footer-contact { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.footer-contact li { display: flex; align-items: center; gap: 8px; }
.footer-contact img { width: 16px; height: 16px; }
.footer-contact a { color: var(--footer-text); }
.footer-legal {
  list-style: none; padding: 6px 0 0; margin: 6px 0 0;
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
  /* kein border-top: der Trennstrich ist bereits Teil des Logo-PNGs */
}
.footer-legal a { color: var(--footer-text); }
.footer-bottom {
  display: flex;
  justify-content: center;
  padding-top: 8px;
  font-size: .85rem;
  color: var(--footer-text);
  opacity: .85;
}

/* ---------- Cookie-Banner ---------- */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  max-width: 560px;
  margin: 0 auto;
  background: var(--navy);
  color: #fff;
  padding: 22px;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
  z-index: 999;
}
.cookie-banner p { margin: 0 0 14px; font-size: .92rem; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions button {
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid #fff;
}
.cookie-actions .accept { background: #fff; color: var(--navy); }
.cookie-actions .decline { background: transparent; color: #fff; }
.cookie-banner[hidden] { display: none; }

/* ---------- Legal pages ---------- */
.legal-content h2 { margin-top: 1.6em; }
.legal-content p, .legal-content li { line-height: 1.6; }
