* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #F8FAFC;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  min-height: 100vh;
}

.container {
  display: grid;
  grid-template-areas:
    "header"
    "main"
    "footer";
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  max-width: 100vw;
  margin: 0 auto;
  /*background: white;*/
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
}

/* Header / Menu */
header {
  grid-area: header;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: white;
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(217, 70, 239, 0.3);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  background: linear-gradient(45deg, #D946EF 0%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.menu {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
}

.menu a {
  color: white;
  text-decoration: none;
  transition: all 0.3s;
  padding: 0.5rem 1rem;
  border-radius: 5px;
}

.menu a:hover {
  background: rgba(217, 70, 239, 0.2);
  transform: translateY(-2px);
  color: #06B6D4;
}

/* Main Content Area */
main {
  grid-area: main;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "content"
    "sidebar-left"
    "sidebar-right";
  gap: 1rem;
  padding: 1rem;
  min-width: 0;
}

.achtung {
  color: coral;
  font: 1.5em bold;
}

.green {
  color: chartreuse;
  font-weight: bolder;
  font-size: 1.3em;
  -webkit-text-stroke-width: 1px;
  -webkit-text-stroke-color: darkgreen;
}

/* Normales kleines Bild */
.image-container img {
  width: 100vw; /* Kleine Größe */
  max-width: 10vw;
  cursor: pointer;
  transition: transform 0.3s ease; /* Sanfter Übergang */
}

.image-container img:hover {
  transform: scale(1.05);
}
/* Overlay für die vergrößerte Ansicht */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: none; /* Standardmäßig versteckt */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Vergrößerte Ansicht */
.lightbox img {
  max-width: 100vh ; /* Größere Ansicht */
  max-height: 100vh;
  transform: scale(1.5); /* Beispiel für Zoom */
  transition: transform 0.3s ease;
  object-fit: contain;
}

.lightbox.active {
  display: flex; /* Zeigt Overlay an, wenn aktiv */
}

.lightbox button {
  position: absolute;
  top: 2rem;
  left: 2rem;
  background: white;
  color: #1a1a2e;
  border: none;
  padding: 1rem 2rem;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.lightbox button:hover {
  background: #D946EF;
  color: white;
  transform: scale(1.1);
}

/* Desktop Layout mit Seitenspalten */
@media (min-width: 768px) {
  main.has-sidebar {
    grid-template-columns: minmax(0, 20%) minmax(0, 60%) minmax(0, 20%);
    grid-template-areas: "sidebar-left content sidebar-right";
  }

  main.has-left-only {
    grid-template-columns: minmax(0, 20%) minmax(0, 80%);
    grid-template-areas: "sidebar-left content";
  }

  main.has-right-only {
    grid-template-columns: minmax(0, 80%) minmax(0, 20%);
    grid-template-areas: "content sidebar-right";
  }

  main.no-sidebar {
    grid-template-columns: 1fr;
    grid-template-areas: "content";
  }
}

.sidebar-left {
  grid-area: sidebar-left;
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
  background: linear-gradient(135deg, #D946EF 0%, #E879F9 100%);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(217, 70, 239, 0.3);
}

.content {
  grid-area: content;
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.sidebar-right {
  grid-area: sidebar-right;
  background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Event Cards */
.event-card {
  background: linear-gradient(135deg, #D946EF 0%, #F59E0B 100%);
  color: white;
  padding: 2rem;
  margin: 1rem 0;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(217, 70, 239, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
}

.event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(217, 70, 239, 0.6);
}

.event-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.event-date {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  margin-top: 1rem;
  font-weight: bold;
}

/* Sidebar Widgets */
.widget {
  position: relative;
  z-index:10;
  background: rgba(255, 255, 255, 0.5);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.widget h3 {
  margin-bottom: 0.5rem;
  color: #0F172A;
}

/* Footer */
footer {
  grid-area: footer;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 80vw;
  margin: 0 auto 1rem;
}

.footer-section h4 {
  color: #D946EF;
  margin-bottom: 1rem;
}

.footer-section a {
  color: #CBD5E1;
  text-decoration: none;
  display: block;
  margin: 0.5rem 0;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: #06B6D4;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  border-radius: 15px;
  margin-bottom: 2rem;
  box-shadow: 0 8px 30px rgba(217, 70, 239, 0.3);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, #D946EF 0%, #F59E0B 100%);
  color: white;
  padding: 1rem 2rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 1rem;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(217, 70, 239, 0.4);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(217, 70, 239, 0.6);
  background: linear-gradient(135deg, #E879F9 0%, #FBBF24 100%);
}

/* SPA Page Sections */
.page-section {
  display: none !important;
}

.page-section#home {
  display: block !important;
}

#kurse {
  color: #333;
}

/* Event Flyer Styling */
.event-flyer-link {
  display: block;
  text-decoration: none;
}

.event-flyer {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.event-flyer:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(217, 70, 239, 0.5);
}

/* Mobile Optimierungen */
@media (max-width: 767px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .menu {
    justify-content: center;
    width: 100vw;
  }

  nav {
    justify-content: center;
  }
  /* Bildgrößen anpassen */
.event-flyer {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  transition: transform 0.3s, box-shadow 0.3s;
}

/* Positionierung der Bilder korrigieren */
.image-container img {
  width: 100%;
  max-width: 100%;
  height: auto;
  cursor: pointer;
  transition: transform 0.3s ease;
}

/* Media Queries für Apple-Geräte */
@media only screen and (max-width: 768px) and (-webkit-min-device-pixel-ratio: 2) {
  /* Bildgrößen für Apple-Geräte anpassen */
  .event-flyer {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  .image-container img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  /* Lightbox für Apple-Geräte anpassen */
  .lightbox img {
    max-width: 100%;
    max-height: 80vh;
    transform: scale(1);
  }
}
}
