/* ========================================================================== 
   Globale Einstellungen & Variablen 
   ========================================================================== */

   :root {
    --primary-color: #007bff;
    --primary-hover-color: #0056b3;
    --text-color: #000000;
    --text-light-color: #333;
    --text-muted-color: #495057;
    --icon-color: #6c757d;
    --background-light: #fff;
    --background-gradient-start: #e2e2e2;
    --background-gradient-end: #c9d6ff;
    --border-color: #ced4da;
    --border-light-color: #dee2e6;
    --valid-color: #28a745;
    --invalid-color: #dc3545;
    --btn-light-bg: #f8f9fa;
    --btn-light-hover-bg: #e2e6ea;
}

body {
    background: linear-gradient(90deg, var(--background-gradient-start), var(--background-gradient-end));
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-lg);
    min-height: 100vh; /* Der Body nimmt immer mindestens die Höhe des Viewports ein */
    font-family: sans-serif;
    color: var(--text-color);
    padding-top: 85px; /* Platz für den Header schaffen */
    margin: 0; /* Entfernt Standardabstände */
}

/* Sicherstellen, dass die Modals immer über den anderen Inhalten liegen */
.modal-backdrop {
    z-index: 1040 !important; /* Standard z-index für das Hintergrund-Overlay */
}

.modal-dialog {
    z-index: 1050 !important; /* Stellt sicher, dass der Modal-Dialog über dem Rest liegt */
}

.modal-content {
    z-index: 1060 !important; /* Ein höherer z-index für den eigentlichen Inhalt des Modals */
}

/* Header-Z-Index anpassen */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 85px;
    background: #ffffff12;
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(255,255,255,0.05); /* sanfter Übergang */
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
    z-index: 1050 !important; /* Header bekommt einen niedrigeren z-index als das Modal */
}

/* Sidebar */
.menu {
    position: fixed;
    top: 70px; /* Sidebar beginnt unter dem Header */
    left: 0;
    width: 74px; /* Sidebar ist im geschlossenen Zustand schmal */
    height: calc(100% - 70px); /* Sidebarhöhe anpassen */
    background: #ffffff12;
    backdrop-filter: blur(5px);
    box-shadow: 8px 0px 9px 0px #00000014;
    padding: 20px 20px 20px 0;
    overflow: hidden scroll;
    transition: width 0.3s ease;
    z-index: 1020 !important; /* Sidebar bleibt unter dem Header */
}

/* Sidebar beim Hover ausklappen */
.menu:hover {
    width: 260px; /* Sidebar wird bei Hover breiter */
}

.menu-content {
    list-style: none;
    padding-left: 0;
}

.menu-content li {
    list-style: none;
    border-radius: 0px 50px 50px 0;
    transition: .3s;
    margin-bottom: 20px;
    padding-left: 20px;
    font-family: 'sans-serif'; /* Gleiche Schriftart wie der Hauptinhalt */
    font-size: 16px; /* Optionale Schriftgröße anpassen */
}

.menu-content li:hover {
    background: #bdbbbb; /* Hintergrundfarbe beim Hover */
}

.menu a {
    text-decoration: none;
    color: rgb(0, 0, 0);
    display: flex;
    align-items: center;
    font-family: 'sans-serif'; /* Gleiche Schriftart wie der Hauptinhalt */
}

.material-symbols-outlined {
    padding: 10px;
    font-size: 25px;
    margin-right: 10px;
    border-radius: 50%;
    background: #ffffff;
}

/* Requirement List */
.requirement-list {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    color: #28a745;
    font-size: 14px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.6s ease, max-height 1.0s ease;
  }
  
  .requirement-list.visible {
    opacity: 1;
    max-height: 500px; /* groß genug, damit alles reinpasst */
    }
  
.requirement-list li {
    color: black; /* Setzt den Standardtext auf schwarz */
    margin-bottom: var(--spacing-xs);
}

.requirement-list li i {
    margin-right: var(--spacing-xs);
    color: var(--invalid-color);
    width: 1em;
    text-align: center;
}

.requirement-list li.valid {
  color: #198754;        /* Bootstrap success-green */
}
.requirement-list li.valid i {
  color: #198754;
}
.requirement-list li.invalid {
  color: #dc3545;        /* Bootstrap danger-red */
}
.requirement-list li.invalid i {
  color: #dc3545;
}
/* -------------------- Impressum & Datenschutz -------------------- */

/* Impressum */
.impressum-content {
    text-align: justify;
    max-width: 800px;
}

/* Datenschutz */
.datenschutz-content {
    max-width: 900px;
}

.datenschutz-section {
    margin-bottom: 2em;
    border-bottom: 2px solid var(--border-light-color);
    padding-bottom: 2em;
    padding-bottom: 80px; /* Platz schaffen für den fixierten Footer */
    
}

/* Sicherstellen, dass der Main-Content nicht unter die Sidebar rutscht */
.site-main {
    margin-left: 85px;
    padding-top: 1rem; /* Platz für Header */
    transition: margin-left 0.3s;
}

.menu:hover ~ .site-main {
    margin-left: 260px; /* Platz für Sidebar, wenn diese bei Hover ausgeklappt ist */
}

/* -------------------- Sliding Sidebar Menü -------------------- */
.menu::-webkit-scrollbar {
    display: none;
}

.site-main {
    margin-left: 85px;
    padding-top: 1rem; /* Platz für Header */
    transition: margin-left 0.3s;
    flex-grow: 1; /* Sorgt dafür, dass der Hauptinhalt den verbleibenden Platz ausfüllt */
}

.menu:hover ~ .site-main {
    margin-left: 260px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 999;
}

/* Footer */
footer {
    position: static; /* Fixiert den Footer am unteren Rand des Viewports */
    bottom: 0; /* Stellt sicher, dass der Footer immer am unteren Rand bleibt */
    left: 0; /* Setzt den Footer ganz nach links */
    width: 100%; /* Der Footer nimmt die gesamte Breite des Bildschirms ein */
    text-align: center;
    padding: 20px;
    background: #ffffff12; /* Hintergrundfarbe mit transparenter Deckkraft */
    backdrop-filter: blur(5px); /* Fügt den gleichen Blur-Effekt hinzu wie bei der Sidebar und dem Header */
    box-shadow: 0 1px 5px rgba(0,0,0,0.1); /* Optionaler Schatten für einen weicheren Übergang */
    z-index: 1000; /* Stellt sicher, dass der Footer immer oben bleibt */
  }

.site-header {
    display: flex;
    justify-content: flex-start; /* Stellt sicher, dass der Header links ausgerichtet ist */
    align-items: center; /* Zentriert das Logo vertikal */
    padding: 10px 0;
    background: transparent; /* Optional, wenn der Header keinen Hintergrund haben soll */
}

.header-logo img {
    max-width: 200px; /* Passt die maximale Breite des Logos an */
    height: auto;
}

/* Der Footer bleibt jetzt immer am unteren Rand der Seite */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Stellt sicher, dass der Body den gesamten Viewport ausfüllt */
    padding-bottom: 0; /* Fügt Platz für den Footer hinzu */
  }


/*test*/
  .offcanvas .menu-content li {
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
  }
  .offcanvas .menu-content a {
    display: flex;
    align-items: center;
    color: #000;
    text-decoration: none;
  }
  /* Offcanvas-Menü über den Header legen */
.offcanvas {
    z-index: 1060 !important;
  }

/*======================
    404 page
=======================*/
.page_404 {
    background: linear-gradient(90deg, var(--background-gradient-start), var(--background-gradient-end));
    height: calc(90vh - 70px); /* ganze Höhe – Header */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Inhalt vertikal mittig im Container */
    align-items: center;
    padding: 1rem 0;
  }
  
  .page_404 .container {
    padding: 0 !important;
    margin: 0 !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Inhalt vertikal mittig im Container */
    align-items: center;
  }
  
  .four_zero_four_bg img {
    max-width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    max-height: 50vh; /* verhindert, dass das Bild zu groß wird */
  }
  
  .contant_box_404 {
    text-align: center;
    margin-top: 1rem;
  }
  
  .contant_box_404 h3,
  .contant_box_404 p {
    margin: 0.5rem 0;
  }
  
  .contant_box_404 a {
    margin-top: 1rem;
  }

/*======================
    about.tpl Team
=======================*/
  
  .team-photo-wrapper {
    width: 100%;
    height: 600px;
    overflow: hidden;
  }
  
  .team-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

/*======================
    reCaptcha
=======================*/
/* Global für alle Viewports */
.grecaptcha-badge {
    position: fixed;
    z-index: 2000 !important;
    bottom: calc(60px + 20px);  /* Footer-Höhe + zusätzlicher Abstand */
    right: 20px;
    transform-origin: bottom right;
    transition: transform 0.2s ease;
  }
  
  /* Kleinbildschirme (xs <576px) */
  @media (max-width: 575.98px) {
    .grecaptcha-badge {
        bottom: 80px;
        right: 10px;    
      transform: scale(1); /* kleiner, passt auf schmale Screens */
    }
  }
  
  
  /* Mittlere Bildschirme (sm ≥576px) */
  @media (min-width: 576px) and (max-width: 767.98px) {
    .grecaptcha-badge {
      bottom: 100px;
      right: 15px;
      transform: scale(0.9);
    }
  }
  
  /* Große Bildschirme (md ≥768px) */
  @media (min-width: 768px) and (max-width: 991.98px) {
    .grecaptcha-badge {
      bottom: 120px;
      right: 20px;
      transform: scale(1);
    }
  }
  
  /* ======================
   Dark Mode Switch (Sidebar)
   ====================== */

.theme-switch-wrapper {
    display: flex;
    align-items: center;
    padding-left: 20px;
    gap: 8px;
    color: var(--text-color);
    font-family: 'sans-serif';
    font-size: 16px;
}

.theme-switch-wrapper .form-check-input {
    width: 2.5em;
    height: 1.3em;
    cursor: pointer;
}

.theme-switch-wrapper .material-symbols-outlined {
    font-size: 20px;
    background: transparent;
    margin: 0;
    padding: 0;
}


  

/* =====================
   DARK MODE OVERRIDES
   ===================== */
[data-bs-theme="dark"] {
  --primary-color: #0d6efd;
  --primary-hover-color: #0a58ca;
  --text-color: #ffffff;
  --text-light-color: #cccccc;
  --text-muted-color: #adb5bd;
  --icon-color: #f8f9fa;
  --background-light: #1e1e1e;
  --background-gradient-start: #2b2b2b;
  --background-gradient-end: #1c1c1c;
  --border-color: #3a3b3c;
  --border-light-color: #4a4b4d;
  --valid-color: #198754;
  --invalid-color: #dc3545;
  --btn-light-bg: #343a40;
  --btn-light-hover-bg: #495057;
}

[data-bs-theme="dark"] body {
  color: var(--text-color);
  background: linear-gradient(90deg, var(--background-gradient-start), var(--background-gradient-end));
}

[data-bs-theme="dark"] .menu-content li:hover {
  background: #444;
}

[data-bs-theme="dark"] .menu a {
  color: var(--text-color);
}

[data-bs-theme="dark"] .material-symbols-outlined {
  background: #2a2a2a;
  color: var(--text-color);
}

[data-bs-theme="dark"] .site-header {
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .menu {
  background: rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] footer {
  background: rgba(0, 0, 0, 0.5);
  color: var(--text-light-color);
}

[data-bs-theme="dark"] .requirement-list li {
  color: var(--text-color);
}

/* Upload Carousel */
.upload-preview {
  max-height: 400px;
  object-fit: contain;
}

[data-bs-theme="dark"] .carousel-item .text-center {
  background: rgba(0, 0, 0, 0.6); /* dunkler Hintergrund im Dark Mode */
  color: #fff;
}

/* PDF-Slide: kompakte Box */
.carousel-item.pdf-slide {
  background: rgba(255, 255, 255, 0.9);  /* leicht transparentes Weiß */
  border-radius: 12px;
  width: 300px;
  margin: 2rem auto;
  padding: 2rem 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* PDF-Icon */
.carousel-item.pdf-slide .material-symbols-outlined {
  font-size: 4rem;
  color: #dc3545;
  margin-bottom: 1rem;
}

/* Beschreibung unterhalb */
.carousel-item.pdf-slide .carousel-caption {
  position: static;
  margin-top: 0.5rem;
  color: #000;
}

/* Dunkelmodus-Kompatibilität */
[data-bs-theme="dark"] .carousel-item.pdf-slide {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}
[data-bs-theme="dark"] .carousel-item.pdf-slide .material-symbols-outlined {
  color: #f28b82;
}

/* Schwarze Karussell-Pfeile */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: invert(1); /* macht sie schwarz */
}

/* Carousel zentriert und ein Slide pro Ansicht */
#myUploadsCarousel {
  max-width: 720px;
  margin: 0 auto;
}


/* Nur ein Item gleichzeitig */
.carousel-inner {
  width: 100%;
  overflow: hidden;
}


.carousel-item {
  text-align: center;
  padding: 2rem 0;
}


/* Slide-Inhalt */
.carousel-item.pdf-slide {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 2rem 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
  width: 100%;
  max-width: 480px;
  flex-direction: column;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* PDF-Icon */
.carousel-item.pdf-slide .material-symbols-outlined {
  font-size: 4rem;
  color: #dc3545;
  margin-bottom: 1rem;
}

/* Text unter dem Icon */
.carousel-item.pdf-slide .carousel-caption {
  position: static;
  margin-top: 0.5rem;
  color: #000;
}

/* Dark Mode Unterstützung */
[data-bs-theme="dark"] .carousel-item.pdf-slide {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}
[data-bs-theme="dark"] .carousel-item.pdf-slide .material-symbols-outlined {
  color: #f28b82;
}

/* Pfeile sichtbar (schwarz) */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: invert(1);
}

.pdf-slide {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 2rem 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-width: 480px;
  margin: 0 auto;
}

.pdf-slide .material-symbols-outlined {
  font-size: 4rem;
  color: #dc3545;
  margin-bottom: 1rem;
}

.pdf-slide h5,
.pdf-slide p {
  margin: 0.5rem 0;
  color: var(--text-color);
}

[data-bs-theme="dark"] .pdf-slide {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}
[data-bs-theme="dark"] .pdf-slide .material-symbols-outlined {
  color: #f28b82;
}

.pdf-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.pdf-link:hover .pdf-slide {
  transform: scale(1.02);
  transition: transform 0.2s ease;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.download-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted-color);
  text-decoration: none;
  border: 1px solid var(--border-light-color);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  background-color: transparent;
  transition: all 0.2s ease;
  min-width: 130px;
}

.download-link:hover {
  background-color: var(--btn-light-hover-bg);
  color: var(--text-color);
  border-color: var(--border-color);
}

.download-link .material-symbols-outlined {
  font-size: 24px;
  color: inherit;
}

.download-link small {
  font-size: 0.75rem;
  color: var(--text-muted-color);
}

[data-bs-theme="dark"] .download-link {
  color: #ccc;
  border-color: #555;
}

[data-bs-theme="dark"] .download-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: #999;
}

[data-bs-theme="dark"] .download-link small {
  color: #aaa;
}

/* Stundenplan (Timetable) */

.timetable-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.timetable-table th,
.timetable-table td {
    padding: 12px 10px;
    text-align: center;
    vertical-align: top;
    border: 1px solid rgba(255, 255, 255, 0.15);
    white-space: normal;
    word-break: break-word;
    transition: background 0.3s ease;
}

.timetable-table th {
    background: rgba(240, 240, 240, 0.8);
    font-weight: 600;
    color: var(--text-color);
}

.timetable-table td:first-child,
.timetable-table th:first-child {
    background: rgba(240, 240, 240, 0.8);
    font-weight: bold;
    color: var(--text-color);
    border-right: 2px solid rgba(255, 255, 255, 0.25);
}

.timetable-table td:hover {
    background: rgba(255, 255, 255, 0.08);
}

.timetable-table tr td:last-child,
.timetable-table tr th:last-child {
    border-right: none;
}

.timetable-table tbody tr:last-child td {
    border-bottom: none;
}

/* Darkmode Farben für Tabellen */
[data-bs-theme="dark"] .timetable-table {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .timetable-table th {
    background: rgba(40, 40, 40, 0.8);
    color: var(--text-color);
}

[data-bs-theme="dark"] .timetable-table td:first-child,
[data-bs-theme="dark"] .timetable-table th:first-child {
    background: rgba(40, 40, 40, 0.8);
}

[data-bs-theme="dark"] .timetable-table td:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Eingabefelder */
.timetable-input {
    width: 100%;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.timetable-input--small {
    font-size: 14px;
    padding: 6px 8px;
    margin-bottom: 4px;
}

/* Platzhalterfarbe für hellen Modus */
input.timetable-input::placeholder,
input.timetable-input::-webkit-input-placeholder,
input.timetable-input::-moz-placeholder,
input.timetable-input:-ms-input-placeholder {
  color: #1a1a1a !important;
  font-style: italic;
}

/* Dark Mode Anpassungen */
@media (prefers-color-scheme: dark) {
  input.timetable-input {
    background-color: rgba(0, 0, 0, 0.3) !important;
    color: #fff !important;
  }
  input.timetable-input::placeholder,
  input.timetable-input::-webkit-input-placeholder,
  input.timetable-input::-moz-placeholder,
  input.timetable-input:-ms-input-placeholder {
    color: #fff !important;
  }
}

.timetable-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

/* Speichern-Button */
.submit-button {
    margin-top: 20px;
    display: block;
    width: 200px;
    padding: 10px;
    font-size: 16px;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    margin-left: auto;
    margin-right: auto;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.submit-button:hover {
    background: var(--primary-hover-color);
    box-shadow: 0 6px 14px rgba(0, 86, 179, 0.4);
}

/* Erfolgsnachricht */
.timetable-success-message {
    text-align: center;
    color: var(--valid-color);
    font-weight: bold;
}

/* Überschrift */
.timetable-heading {
    text-align: center;
    margin-bottom: 20px;
}

/* Calendar styles */
.calendar-container {
  overflow-x: auto;
  background-color: #fff;
}

.calendar-cell {
  min-height: 5rem;
  border: 1px solid var(--border-light-color);
  padding: 0.25rem;
  font-size: 0.875rem;
  position: relative;
  background-color: #fff;
}

.calendar-cell:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.calendar-date {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted-color);
  margin-bottom: 0.25rem;
}

.calendar-today {
  background-color: #e7f1ff;
  border-color: #0d6efd;
}

.calendar-task {
  margin-bottom: 0.25rem;
  padding: 0.15rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
}
.calendar-group-event {
  background-color: #cfe2ff;
  color: #084298;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.calendar-group-event img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
}

@media (max-width: 576px) {
  .calendar-cell {
    min-height: 4rem;
    font-size: 0.75rem;
  }
  .calendar-date {
    font-size: 0.65rem;
  }
  .calendar-task {
    font-size: 0.65rem;
  }}