/* ========================================
   LISTENANSICHT (Start)
   ======================================= */
.kursbild-container {
  width: 232px;
  height: 145px;
  min-width: 232px;
  min-height: 145px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  overflow: hidden;
  background: #f6f6f6;
}
.kursbild-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.col.min-width-0 {
  min-width: 0 !important;
}

.card .row .col {
  margin: 0 !important;
}

/* === Standard: Titel und Action-Menü in einer Zeile (Flex) === */
.kursinfo-col .info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  flex-direction: row;
}
.kursinfo-col .kurslink {
  flex: 1 1 0;
  min-width: 0;
  margin-bottom: 0;
  white-space: normal;
  font-weight: 600;
  text-decoration: none;
  display: block;
font-size: 1.5rem !important;
}
.kursinfo-col .actions-col {
  min-width: 40px;
  max-width: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  margin-left: 0.5rem;
  padding: 0;
}
.kursinfo-col p {
  font-size: 1rem; 
  line-height: 1.5;
  color: inherit; 
}

/* === Responsive: Stack Bild/Text auf Mobile + Grid für info-row ========== */
@media (max-width: 575px) {
  .row.align-items-start.gx-3 {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .col-auto, .actions-col {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: flex-end !important;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }
  .kursbild-container {
    margin-bottom: 0.5rem;
    margin-left: auto;
    margin-right: auto;
    width: 100% !important;
    height: 160px !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }
  .kursbild-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
  }

  /* --- Hier: Flex wird zu Grid für info-row! --- */
  .kursinfo-col .info-row {
    display: grid !important;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 0.5rem;
  }
.kursinfo-col .kurslink {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  min-width: 0;           
  width: 100%;           
  display: block;
  white-space: normal;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 0;
  word-break: break-word;
}
  .kursinfo-col .actions-col {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    min-width: 40px;
    max-width: 48px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    margin-left: 0.5rem;
    padding: 0;
  }
}

/* === DESKTOP/TABLET: Limit Text auf Bildhöhe ========== */
@media (min-width: 576px) {
  .kursinfo-col {
    max-height: 160px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  .kursinfo-col .kursbeschreibung {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
  }
  
  /* Abstand zwischen Kursbeschreibung und Tags reduzieren */
  .kursinfo-col .tags-list {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 0.15rem; /* war vorher 0.25rem */
  }
}
/* ========================================
   EINZELANSICHT (Start)
   ======================================= */
.kurskarte-einzeln {
  border-radius: 1rem !important;
  border: none;
  box-shadow: 0 2px 20px rgba(140,120,200,0.10);
  background: #fff;
  margin-bottom: 2rem;
  padding: 0;
}

/* Kursbild immer oben anzeigen */ 
.kurskarte-einzeln-header {
  width: 100%;
  min-height: 220px;
  max-height: 320px;
  border-radius: 1rem 1rem 0 0;
  overflow: hidden;
  position: relative;
  background: #9172c2;
  display: block;
}
.kurskarte-einzeln-header img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top; /* Bild oben ausrichten */
  z-index: 1;
  border-radius: 1rem 1rem 0 0;
  background: #eee;
}
.kurskarte-einzeln-header:empty,
.kurskarte-einzeln-header img[src=""],
.kurskarte-einzeln-header img:not([src]) {
  background: #9172c2;
}
.kurskarte-einzeln-header .fallback-svg {
  width: 120px;
  height: 120px;
  z-index: 2;
  position: relative;
}
.kurskarte-einzeln-header a {
  pointer-events: none;
  cursor: default;
}
/* Titelzeile */
.d-flex.justify-content-between.align-items-start.mb-3.flex-wrap {
  flex-wrap: nowrap !important;
  gap: 1rem;
}
.flex-grow-1 {
  min-width: 0;
}
.flex-grow-1 h3,
.flex-grow-1 {
  word-break: break-word;
  white-space: normal;
}

/* ========================================
   Sidebar & Buttons
   ======================================= */
.sidebar-section,
.added_field {
  background: #FAFBFC;
  border-radius: 0.85em;
  border: 2px solid #ece7fa;
  box-shadow: 0 2px 10px rgba(120,100,180,0.05);
  padding: 1.1em 1.2em 1.2em 1.2em;
  margin-bottom: 1.2em;
}

/* Einheitliche Button-Gestaltung */
.kurskarte-einzeln-sidebar .kurslink a,
.kurskarte-einzeln-sidebar .download a,
.kurskarte-einzeln-sidebar .restore a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  width: 100%;
  border-radius: 0.8rem;
  background: var(--primary, #49006a);
  color: transparent !important; /* Text wird durch ::after ersetzt */
  text-decoration: none;
  font-weight: 500;
  font-size: 1em;
  position: relative;
  cursor: pointer;
  margin-bottom: 1rem;
  padding: 0;
  box-sizing: border-box;
}

/* Button-Labels per :after – zentrale Stildefinition */
.kurskarte-einzeln-sidebar .kurslink a::after,
.kurskarte-einzeln-sidebar .download a::after,
.kurskarte-einzeln-sidebar .restore a::after {
  color: #fff;
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
}

/* Individuelle Texte pro Button */
.kurskarte-einzeln-sidebar .kurslink a::after {
  content: "Zum Kurs";
}
.kurskarte-einzeln-sidebar .download a::after {
  content: "Downloaden";
}
.kurskarte-einzeln-sidebar .restore a::after {
  content: "Importieren";
}

/* Kontaktbox: Textfluss korrekt */
.kurskarte-einzeln-sidebar .user-name,
.kurskarte-einzeln-sidebar .sidebar-section .row .col-8,
.kurskarte-einzeln-sidebar .sidebar-section .row .col-8 div {
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  font-size: 0.95em;
  line-height: 1.4;
}

img.icon[alt="Moodle-Sicherung"] {
  display: none !important;
}

/* Unter 1200px (Smartphone + Tablet): alles untereinander */
@media (max-width: 1199.98px) {
  .einzelansicht-wrapper,
  .einzelansicht-main,
  .einzelansicht-sidebar {
    display: block;
    width: 100%;
  }
}

/* Desktop ab 1200px: Hauptbereich links, Sidebar rechts */
@media (min-width: 1200px) {
  .einzelansicht-wrapper {
    display: flex;
    gap: 2rem;
  }
  .einzelansicht-main {
    flex: 2;
  }
  .einzelansicht-sidebar {
    flex: 1;
  }
}


/* ========================================
   EINZELANSICHT (Ende)
   ======================================= */

.kurskarte-einzeln .added_field p,
.kurskarte-einzeln .added_field textarea,
.kurskarte-einzeln .added_field input,
.kurskarte-einzeln .added_field .form-control {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    display: block;
}


/* ========================================
   EINTRAGSVORLAGE (Start)
   ======================================= */





/* ========================================
   EINTRAGSVORLAGE (Ende)
   ======================================= */

/* ========================================
   MODAL (Start)
   ======================================= */
.dbmodal-blockquote p {
  margin: 0;
}

.dbmodal-blockquote {
  font-size: 0.97em;
  margin-top: 1.1em;
  border-left: 4px solid #e09b31;
  background: #faf5ed;
  padding: 0.9em 1em 0.9em 1.3em;
  border-radius: 0.4em;
  margin-bottom: 1.2em;
}

.dbmodal-blockquote ul {
  padding-left: 0;
  margin-left: 0;
  list-style-position: inside;
}

/* ========================================
   MODAL (Ende)
   ======================================= */

