/* 1. VARIABLEN & RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --padding: 1.5rem;
  --max-width: 70rem;
  
  /* Palette */
  --color-black: #000;
  --color-white: #fff;
  --color-grey: #777;
  --color-light: #efefef;
  --color-accent: #D90429; /* Signalrot aus den Hover-Effekten */

  /* mobb ned Farben */
  --mobb-blue: #9ebcc7;          /* Das Original-Blau */
  --mobb-blue-dark: #7a97a3;     /* Eine dunklere Nuance für Schatten/Hover */
  --mobb-blue-soft: #9ebcc722;   /* Sehr transparentes Blau für dezente Hintergründe */
  --bg-dark: #1a1a1a;            /* Dein aktuelles Anthrazit */
  
  /* Zentrale Steuerung */
  --color-text: var(--color-black);
  --color-text-grey: var(--color-grey);
  --color-background: var(--color-white);
  --color-border: var(--color-black);

  /* Code-Farben */
  --color-code-light-grey: #cacbd1;
  --color-code-comment:    #a9aaad;
  --color-code-white:      #c5c9c6;
  --color-code-red:        #d16464;
  --color-code-orange:     #de935f;
  --color-code-yellow:     #f0c674;
  --color-code-green:      #a7bd68;
  --color-code-aqua:       #8abeb7;
  --color-code-blue:       #7e9abf;
  --color-code-purple:     #b294bb;

  /* Verhindert automatische Farbanpassungen durch den Browser */
  color-scheme: light dark;
  
  --font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-family-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

/* 2. DARK MODE */
[data-theme="dark"] {
  --color-text: #eeeeee;
  --color-text-grey: #aaaaaa;
  --color-background: #1a1a1a;
  --color-black: #eeeeee;
  --color-white: #1a1a1a;
  --color-light: #2d2d2d;
  --color-border: #eeeeee;
}

/* 3. BASIS-STILE */
html {
  font-family: var(--font-family-sans);
  color: var(--color-text);
  background: var(--color-background);
  transition: background 0.3s ease, color 0.3s ease;
}

body {
  padding: var(--padding);
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh; /* Sorgt dafür, dass der Footer bei wenig Inhalt unten bleibt */
  display: flex;
  flex-direction: column;
}

img {
  width: 100%;
  height: auto;
  transition: opacity 0.3s ease;
}

[data-theme="dark"] img { opacity: 0.85; }
[data-theme="dark"] img:hover { opacity: 1; }

li { list-style: none; }
a { color: currentColor; text-decoration: none; }
strong, b { font-weight: 600; }
small { font-size: inherit; color: var(--color-text-grey); }

button {
  font: inherit;
  background: none;
  border: 0;
  color: currentColor;
  cursor: pointer;
}

/* 4. HEADER & NAVIGATION (Optimiert für Mobile & mit Hover-Effekt) */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  margin-bottom: 2rem;
  flex-wrap: wrap; /* Erlaubt Umbruch auf kleinen Screens */
  gap: 1rem;
  forced-color-adjust: none;
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 600;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.logo:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.logo img { display: block; width: auto; }
[data-theme="dark"] .logo img { filter: invert(1) brightness(2); }

.menu { 
  display: flex; 
  align-items: center; 
  flex-wrap: wrap; /* Wichtig für Mobile, damit Menüpunkte umbrechen */
}

.menu a {
  padding: 0.8rem 0.8rem; /* Padding links/rechts reduziert */
  display: block;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap; /* Verhindert Zeilenumbruch innerhalb eines Wortes */
}

.menu a[aria-current] { text-decoration: underline; }
.menu a:hover { color: var(--color-accent); }

/* Dein Hover-Linien-Effekt */
.menu a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 5px;
  left: 1rem;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

.menu a:hover::after { 
  width: calc(100% - 2rem); 
}

/* MOBILE ANPASSUNG FÜR DEN HEADER */
@media screen and (max-width: 45rem) {
  .header {
    flex-direction: column; /* Logo oben, Menü darunter */
    margin-bottom: 3rem;
    text-align: center;
  }

  .menu {
    justify-content: center; /* Zentriert die Links auf dem Handy */
    width: 100%;
  }

  .menu a {
    padding: 0.75rem; /* Etwas kompakter auf Mobile */
  }
}
/* DROPDOWN LOGIK */
.has-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-background);
  border: 1px solid var(--color-light);
  min-width: 180px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  z-index: 100;
}

.dropdown a {
  padding: 0.75rem 1rem !important;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--color-light);
}

.dropdown a:last-child { border-bottom: none; }

/* Zeigen bei Hover (Desktop) */
@media screen and (min-width: 45rem) {
  .has-dropdown:hover .dropdown {
    display: block;
  }
}

/* 5. SOCIAL & ICONS */
.social { display: flex; padding: 0 .5rem; }
.social a { padding: 1rem .5rem; }

.social-icon svg {
  fill: currentColor;
  width: 1.2rem;
  height: 1.2rem;
  transition: fill 0.3s ease, transform 0.2s ease;
  vertical-align: middle;
}

.social-icon:hover { transform: translateY(-2px); }
.social-icon:hover svg { fill: var(--color-accent); transform: scale(1.1); }

/* 6. THEME TOGGLER */
.theme-toggler {
  --toggler-width: 44px;
  --toggler-height: 24px;
  width: var(--toggler-width);
  height: var(--toggler-height);
  background: var(--color-light);
  border: 1px solid var(--color-text-grey);
  border-radius: 20px;
  position: relative;
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.toggler-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--color-text);
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .theme-toggler {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

[data-theme="dark"] .toggler-slider {
  transform: translateX(20px);
  background: white;
}

.theme-toggler:hover {
  border-color: var(--color-accent);
  box-shadow: 0 0 8px rgba(217, 4, 41, 0.2);
}

.theme-toggler:hover .toggler-slider { filter: brightness(1.2); }

/* 7. GRID SYSTEM */
.grid {
  --columns: 12;
  --gutter: 3rem;
  display: grid;
  grid-gap: var(--gutter);
  grid-template-columns: 1fr;
}

.grid > .column { margin-bottom: var(--gutter); }

.autogrid {
  --gutter: 3rem;
  --min: 10rem;
  display: grid;
  grid-gap: var(--gutter);
  grid-template-columns: repeat(auto-fit, minmax(var(--min), 1fr));
  grid-auto-flow: dense;
}

@media screen and (min-width: 60rem) {
  body { --padding: 3rem; }
  .grid { grid-template-columns: repeat(12, 1fr); }
  .grid > .column { grid-column: span var(--columns); }
}

/* 8. TYPOGRAFIE & TEXT-ELEMENTE */
.text { line-height: 1.5em; }
.text a { text-decoration: underline; }
.text :first-child { margin-top: 0; }
.text :last-child { margin-bottom: 0; }
.text p, .text ul, .text ol { margin-bottom: 1.5rem; }
.text ul, .text ol { margin-left: 1rem; }
.text ul > li { list-style: disc; }
.text ol > li { list-style: decimal; }

.text h1, .h1, .intro {
  font-size: 1rem;
  margin-bottom: 3rem;
  line-height: 1.1;
  font-weight: inherit;
}

.text h2, .h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.text h3, .h3 { font-weight: 600; }

/* 9. CODE & BLOCKS */
.text code {
  font-family: var(--font-family-mono);
  background: var(--color-light);
  padding: 0 .5rem;
  display: inline-block;
  color: var(--color-text);
}

.text pre {
  margin: 3rem 0;
  background: #000;
  color: #fff;
  padding: 1.5rem;
  overflow-x: auto;
}

.text pre code { padding: 0; background: none; color: inherit; }

.text blockquote {
  font-size: 1.25rem;
  line-height: 1.325em;
  border-left: 2px solid var(--color-border);
  padding-left: 1rem;
  margin: 3rem 0;
  max-width: 60rem;
}

.text hr, hr {
  border: 0;
  background: currentColor;
  height: 2px;
  width: 1.5rem;
  margin: 3rem auto;
}

.text hr { margin: 6rem 0; }

/* 10. KOMPONENTEN */
.cta {
  background: var(--mobb-blue); /* Nutze deine Vereinsfarbe */
  color: var(--color-white);    /* Weißer Text für Kontrast */
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease;
  border: none; /* Entferne den klobigen Border */
}

.cta:hover { 
  transform: translateY(-2px);
  background: var(--mobb-blue-dark); /* Etwas dunkleres Blau beim Hover */
}

.cta-outline {
  background: transparent;
  border: 2px solid var(--mobb-blue);
  color: var(--mobb-blue);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: bold;
}
.cta-outline:hover {
  background: var(--mobb-blue);
  color: var(--color-white);
}

.box {
  background: var(--color-light);
  padding: 1.5rem;
  border: 4px solid var(--color-background);
  outline: 2px solid var(--color-light);
  border-radius: 6px;
}

.video, .img {
  position: relative;
  display: block;
  background: var(--color-light);
}

.pagination > * {
  padding: .5rem;
  width: 3rem;
  text-align: center;
  border: 2px solid currentColor;
  margin-right: 1.5rem;
}

.pagination > a:hover {
  background: var(--color-text);
  color: var(--color-background);
}

.note-excerpt-date { color: var(--color-text-grey); }

/* Die Karte als Flex-Container über die volle Höhe */
.offer-card {
  display: flex;
  flex-direction: column;
  height: 100%; /* Wichtig für gleiche Höhe im Grid */
  background: var(--color-dark-grey); /* Oder dein Karten-Hintergrund */
  border: 1px solid var(--color-light);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s;
}

.offer-card:hover {
  transform: translateY(-5px);
}

.offer-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* Bild-Container mit festem Verhältnis */
.offer-image {
  aspect-ratio: 16 / 9;
  width: 100%;
  margin: 0;
}

.offer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Schneidet das Bild passend zu */
}

/* Content-Bereich wächst und schiebt den Button nach unten */
.offer-content {
  padding: 1.5rem;
  flex-grow: 1; /* Dieser Teil füllt den restlichen Platz aus */
}

.offer-content h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

/* Button immer ganz unten fixieren */
.offer-footer {
  padding: 0 1.5rem 1.5rem;
}

.btn-fake {
  display: block;
  text-align: center;
  padding: 0.75rem;
  border: 1px solid white;
  border-radius: 4px;
  background: transparent;
}

/* Galerie Block Styling */
.block-type-gallery ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.block-type-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

/* Gezieltes Entfernen der Punkte nur für die Galerie */
.gallery ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.gallery li {
  list-style: none !important;
  margin: 0 !important;
}

/* 11. FOOTER */
.footer {
  padding: 9rem 0 6rem;
  line-height: 1.5em;
}

.footer:before {
  content: "";
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--color-text);
  margin-bottom: 1.5rem;
}

.footer ul, .footer p { color: var(--color-text-grey); }

/* Utility */
.bg-light { background-color: var(--color-light); }
.color-grey { color: var(--color-text-grey); }


@media screen and (max-width: 45rem) {
  .social-icon svg {
    width: 2rem;  /* Größer für Touch */
    height: 2rem;
  }
  .social a {
    padding: 1.5rem 1rem; /* Größere Klickfläche */
  }
}

/* Optional: Padding auf kleinen Handys etwas reduzieren */
@media screen and (max-width: 30rem) {
  :root {
    --padding: 1rem; /* Mehr Platz für Text auf schmalen Geräten */
  }
}

header {
  position: relative;
  border-bottom: none; /* Alten Balken entfernen */
  padding-bottom: 1.25rem;
}

header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  opacity: 0.8;
  filter: saturate(0.8);
  width: 100%;
  height: 4px; /* Deine Balken-Dicke */
  background: linear-gradient(to right, 
    #e74c3c 10%,            /* Rot */
    #e67e22 10% 20%,       /* Orange */
    #f39c12 20% 30%,       /* Gold/Gelb-Orange */
    #f1c40f 30% 40%,       /* Gelb */
    #2ecc71 40% 50%,       /* Hellgrün */
    #27ae60 50% 60%,       /* Dunkelgrün */
    #3498db 60% 70%,       /* Hellblau */
    #2980b9 70% 80%,       /* Dunkelblau */
    #9b59b6 80% 90%,       /* Lila */
    #8e44ad 90%            /* Dunkellila */
  );
}

.logo-text {
  color: var(--mobb-blue); /* Das Vereins-Logo in der Originalfarbe */
  font-weight: bold;
}

.box, .offer-card {
  background: rgba(255, 255, 255, 0.03); /* Fast schwarz */
  border: 1px solid rgba(158, 188, 199, 0.2); /* Ganz feiner blauer Rahmen */
  transition: all 0.3s ease;
}

.box:hover, .offer-card:hover {
  border-color: var(--mobb-blue); /* Beim Drüberfahren leuchtet das Original-Blau auf */
  box-shadow: 0 0 20px var(--mobb-blue-soft); /* Ein sanfter blauer Glow */
}

blockquote {
  border-left: 4px solid var(--mobb-blue);
  padding-left: 1.5rem;
  font-style: italic;
}

/* Styling für die dynamischen Blöcke in den Boxen */
.mission-statement .box h2, 
.mission-statement .box h3 {
  color: var(--mobb-blue);
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
  text-transform: uppercase; /* Optional: Wirkt strukturierter */
  letter-spacing: 0.05em;
}

.mission-statement .box p {
  font-size: 1rem;
  line-height: 1.6; /* Bessere Lesbarkeit */
  color: var(--color-text);
  margin: 0;
}

.mission-statement .autogrid {
  align-items: stretch; /* Zwingt alle Boxen auf die gleiche Höhe */
}

.mission-statement .box {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2rem; /* Etwas mehr Luft zum Atmen */
  text-align: center;
}

/* Falls du Bilder in die Boxen packst */
.mission-statement .box figure {
  margin-bottom: 1rem;
}

/* Styling für die große Einleitung */
.intro-description {
  max-width: 50rem; /* Begrenzt die Breite für bessere Lesbarkeit */
  margin: 0 0 3rem; /* WICHTIG: Entfernt das 'auto', damit der Block links bleibt */
  text-align: left; /* 'flex' ist kein gültiger Wert für text-align; 'left' ist korrekt */
  font-size: 1.15rem; /* Etwas dezenter als 1.25, wirkt meist edler */
  line-height: 1.6;
  color: var(--color-text);
}

/* Container für die Kirby-Blöcke */
.intro-blocks {
  margin-bottom: 5rem;
  text-align: left; /* Stellt sicher, dass auch Blöcke links starten */
}

/* Spezielles Styling für Blöcke innerhalb der Einleitung */
.intro-blocks .block {
  margin-bottom: 2rem;
}

/* Falls du ein Bild als Block einfügst */
.intro-blocks .block-type-image {
  max-width: 100%;
  border-radius: 8px;
  overflow: hidden;
  margin-left: 0; /* Stellt sicher, dass Bilder nicht zentriert werden */
}

/* Sorgt dafür, dass Kirbytext-Absätze nicht zentriert werden */
.intro-description p {
  text-align: left;
  margin-bottom: 1.5rem;
}

.main-headline {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0;           /* Entfernt den Standard-Abstand der h1 */
  margin-bottom: 2rem;
  line-height: 1.1;
  border: none !important; /* Sicherheitshalber alle Balken hier entfernen */
}

/* Termin Info Box (Floating Widget) */
.floating-event {
  position: fixed;
  right: 20px;
  top: 30%; /* Deine gewünschte Höhe */
  transform: translateY(-50%);
  width: 320px;
  z-index: 1000;
  background: var(--color-background);
  border: 2px solid var(--mobb-blue);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 1.25rem;
  
  /* Transition für den Hover-Effekt */
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

/* Der Hover-Effekt */
.floating-event:hover {
  /* Hebt sich leicht an (50% -> 53%) und wird minimal größer */
  transform: translateY(-53%) scale(1.05); 
  /* Kräftigerer Schatten in Vereinsfarbe für Tiefe */
  box-shadow: 0 15px 40px rgba(0, 81, 158, 0.2);
  border-color: var(--mobb-blue);
}

.close-event {
  position: absolute;
  top: 5px;
  right: 8px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-text-grey);
  cursor: pointer;
  padding: 5px;
  transition: color 0.2s, transform 0.2s ease;
  z-index: 1010; /* Über dem Content-Link */
}

.close-event:hover {
  color: var(--color-accent); /* Signalrot */
  transform: scale(1.2);
}

.close-event:focus {
  outline: 2px solid var(--mobb-blue);
  border-radius: 4px;
}

/* Content Styling */
.floating-event-content {
  padding-top: 5px;
  pointer-events: none; /* Klicks gehen durch zum Container-Link, falls vorhanden */
}

.floating-tag {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--mobb-blue);
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}

.floating-date {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--color-text);
}

.floating-title {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--mobb-blue);
}

.floating-loc {
  font-size: 0.8rem;
  color: var(--color-text-grey);
}

/* Responsive Anpassung */
@media screen and ((max-width: 85rem) or (min-width: 170rem)) {
  .floating-event {
    position: relative;
    top: 0;
    right: 0;
    transform: none;
    width: 100%;
    margin: 0 auto 2rem auto;
    max-width: 50rem; /* Passt sich der Breite der Intro-Description an */
  }

  .floating-event:hover {
    transform: scale(1.01); /* Minimales Feedback auf Mobile */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }
}

/* Für Termine Seite*/
.event-page-date {
  display: block;
  color: var(--mobb-blue);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.event-page-loc {
  font-style: italic;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--color-text-grey);
}

.event-page-text {
  border-top: 1px solid var(--color-code-light-grey);
  padding-top: 1rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}

/* Vergangene Termine leicht ausgrauen */
.event-past {
  opacity: 0.6;
  filter: grayscale(1);
}

/* Für Posts von Aktuelles */
.post-sidebar-image {
  position: sticky;
  top: 2rem; /* Bild bleibt beim Scrollen im Sichtfeld */
  margin-bottom: 2rem;
}

.post-sidebar-image img {
  transition: transform 0.2s ease;
}

.post-sidebar-image img:hover {
  transform: scale(1.02);
}

.post-image-nav a:hover figure {
  opacity: 1 !important;
  transform: scale(1.05);
}

.offer-detail-grid {
  display: grid;
  grid-template-columns: 1fr; /* Standard: 1 Spalte (Mobile) */
  gap: 2rem;
}

@media screen and (min-width: 45rem) {
  .offer-detail-grid {
    grid-template-columns: 2fr 1fr; /* Desktop: 2 Spalten */
  }
}

article, main, .content, .text, .video-container {
  max-width: 100%;
  overflow-x: hidden; /* Versteckt alles, was über den Rand hinaus will */
}

/* Erzwingt, dass Bilder und Videos niemals breiter als der Container sind */
img, video, iframe {
  max-width: 100% !important;
  height: auto;
}

/* --- NEUE ZENTRALE KLASSEN --- */

/* Für Detailseiten (ersetzt das Grid in angebot.php) */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media screen and (min-width: 45rem) {
  .detail-grid { grid-template-columns: 2fr 1fr; }
}

/* Für die Galerie und Medien-Sektionen */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

/* Sicherstellung, dass alles mobil bleibt */
.responsive-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* Vertikale Zentrierung in der Partner-Liste */
.partner-section {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  align-items: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-light);
}
@media screen and (max-width: 30rem) {
  .partner-section { grid-template-columns: 1fr; text-align: center; }
}

.breadcrumb {
  margin-bottom: 2rem; /* Erhöht den Abstand zum Inhalt */
  padding-top: 1rem;
}

.team-photo {
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-light);
}
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}