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

html, body {
  overflow-x: hidden;
}

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;
}

.mitte {
  text-align: center;
}

.dark {
  color:#1a1a2e !important;
}

#reisen .dark {
  color:#1a1a2e !important;
}

.inset-left-3{
  margin-left: 3rem;
}

.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:crimson;
  font-size: 1.5em;
  font-weight: 600;
}

a.achtung:hover {
  font-weight: 700;
}

a.achtung:active,
a.achtung:visited{
  color:crimson;
  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);
}

#impressum, #datenschutz {
  color: indigo;
}

/* PDF Lightbox Styles */
.pdf-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 2rem;
}

.pdf-lightbox.active {
  display: flex;
}

.pdf-lightbox-content {
  background: white;
  border-radius: 15px;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  max-height: 900px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.pdf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #D946EF 0%, #F59E0B 100%);
  color: white;
}

.pdf-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
}

.close-pdf-btn {
  background: white;
  color: #1a1a2e;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.close-pdf-btn:hover {
  background: #F59E0B;
  color: white;
  transform: scale(1.1);
}

.pdf-container {
  flex: 1;
  padding: 2rem;
  overflow: auto;
  background: #f8f9fa;
  position: relative;
}

#pdfViewer {
  width: 100%;
  height: 100%;
}

.pdf-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 2rem;
  background: #f1f3f4;
  border-top: 1px solid #e0e0e0;
}

.pdf-footer button {
  background: linear-gradient(135deg, #D946EF 0%, #F59E0B 100%);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(217, 70, 239, 0.3);
}

.pdf-footer button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 70, 239, 0.5);
}

#pageCounter {
  font-weight: bold;
  color: #1a1a2e;
  font-size: 1.1rem;
}

.pdf-error {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: #666;
  font-style: italic;
}

.pdf-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.pdf-loading::after {
  content: "PDF wird geladen...";
  font-size: 1.2rem;
  color: #666;
}

.invisible{
  display: none !important;
  visibility: hidden;
}

/* 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-section {
  position: relative;
}

.footer-submenu {
  list-style: none;
  padding: 0.5rem;
  margin: 0;
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 0 0 5px 5px;
  z-index: 10;
  min-width: 150px;
}

.footer-section a[href="#events"]:hover + .footer-submenu,
.footer-submenu:hover {
  display: block;
}

.footer-submenu li {
  margin: 0.3rem 0;
}

.footer-submenu a {
  display: block;
  color: #CBD5E1;
  text-decoration: none;
  transition: color 0.3s;
  padding: 0.2rem 0;
}

.footer-submenu a:hover {
  color: #06B6D4;
  padding-left: 5px;
}

/* Hide footer navigation on mobile */
@media (max-width: 767px) {
  .footer-section:first-child {
    display: none;
  }
}

.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 img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.titlepicture {
  margin: auto;
}

.youtubevideo{
  color:#F59E0B;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.4rem;
}
.youtubevideo:hover{
  font-size: 1.4rem;
  font-weight: 700;
}

.youtubevideo:active, 
.youtubevideo:visited{
  color:#F59E0B;
  font-weight: 700;
}

.right-side{
  color:darkblue;
  font-weight: 700;
}

.right-side:active,
.right-side:visited{
  color:darkblue;
  font-weight: 700;
}

.social-icon{
  width:1.75rem;
  height:1.75rem;
  display:inline-block;
  vertical-align:middle;
  fill:currentColor;
}

.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;
}

/* Ensure home section is visible by default */
#home.page-section {
  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;
}

/* Reisebilder - Vollbreite im Reisen-Bereich */
#reisen img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

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

/* Zweispaltiger Bereich (z. B. Flyer + Text) */
.zwei_spalten {
  display: grid;
  grid-template-columns: 1fr;   /* Standard: einspaltig */
  gap: 1.5rem;
  align-items: center;
  color: #1a1a2e;               /* lesbare Schriftfarbe auf weißem Content */
}

.zwei_spalten img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Ab 769px (> 768px) zweispaltig */
@media (min-width: 769px) {
  .zwei_spalten {
    grid-template-columns: 1fr 1fr;
  }
}

/* Eindrücke: Bilder zweispaltig, je 50% der Content-Breite */
#eindruecke {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

#eindruecke img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Manuelle Zeilenumbrüche im Grid ausblenden */
#eindruecke br {
  display: none;
}

/* Submenu Styling */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  margin-top: 0.5rem;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  padding: 0.5rem;
  border-radius: 5px;
  list-style: none;
  z-index: 1000;
  min-width: 220px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.menu > li {
  position: relative;
}

.submenu li {
  position: relative;
}

/* Submenu wird per Tippen (mobil) geöffnet */
.submenu.active {
  display: block;
}

/* Verschachteltes Untermenü fährt seitlich auf, damit alle Einträge sichtbar sind */
.submenu .submenu {
  top: 0;
  left: 100%;
  right: auto;
  margin-top: 0;
  margin-left: 0;
}

/* Auf Geräten mit Maus erst bei Hover anzeigen (nur jeweils direktes Untermenü) */
@media (hover: hover) and (pointer: fine) {
  .menu > li:hover > .submenu,
  .menu > li:focus-within > .submenu,
  .submenu li:hover > .submenu,
  .submenu li:focus-within > .submenu {
    display: block;
  }

  /* Unsichtbare Brücke über den Abstand zwischen Menüpunkt und Untermenü,
     damit der Hover beim Herüberfahren nicht abbricht */
  .menu > li > .submenu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -0.6rem;
    height: 0.6rem;
  }
}

/* Aufklapp-Pfeil für Untermenüs */
.submenu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  border-radius: 5px;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  z-index: 2;
}

.submenu-toggle::before {
  content: "▾";
  transition: transform 0.3s ease;
}

.submenu-toggle[aria-expanded="true"]::before {
  transform: rotate(180deg);
}

/* Mobiles Layout: Pfeil rechts im Menüpunkt anzeigen */
@media (max-width: 767px) {
  .menu li.has-submenu {
    padding-right: 2.25rem;
  }

  .submenu-toggle {
    display: inline-flex;
    position: absolute;
    top: 0.5rem;
    right: 0;
  }
}

/* Breite Touch-Geräte (kein Hover): Pfeil neben dem Menüpunkt anzeigen */
@media (hover: none) and (min-width: 768px) {
  .submenu-toggle {
    display: inline-flex;
    margin-left: 0.35rem;
    vertical-align: middle;
  }
}

.submenu li {
  padding: 0.5rem 1rem;
  border-radius: 3px;
  transition: background 0.3s;
}

.submenu li:hover {
  background: rgba(217, 70, 239, 0.2);
}

.submenu a {
  color: white;
  text-decoration: none;
  display: block;
}

/* Mobile Menu - Submenu always visible on mobile */
/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.mobile-menu-toggle .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: white;
  transition: all 0.3s ease;
}

.mobile-menu-active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-active .bar:nth-child(2) {
  opacity: 0;
}

.mobile-menu-active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu Styling */
@media (max-width: 767px) {
  .mobile-menu-toggle {
    display: block;
    position: absolute;
    right: 1rem;
    top: 1rem;
  }

  .menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    padding: 1rem;
    z-index: 1000;
    gap: 0;
  }

  .menu.active {
    display: flex;
  }

  .menu li {
    width: 100%;
    text-align: center;
    padding: 0.5rem 0;
  }

  .submenu {
    display: none;
    position: static;
    background: rgba(255, 255, 255, 0.1);
    padding-left: 1.5rem;
    margin-top: 0.5rem;
    border-radius: 5px;
  }

  .submenu.active {
    display: block;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  nav {
    position: relative;
    padding: 1rem 0;
  }
  /* 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);
  }
}

}
