/* === START style.css (Kombiniert + Kompakteres Layout) === */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f8f9fc;
  color: #333;
}

header {
  background-color: #00003F;
  /* padding: 1rem; */
  text-align: center;
  /* font-size: 1.3rem; */
  color: white;
  /* background-image: url('bild.jpg'); */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  /* min-height: 80px; [GEÄNDERT] Höhe reduziert */
  /* display: flex; */
  align-items: center;
  justify-content: center;
  position: relative;
  height: 100px; /* [NEU] Feste Höhe für Header */
}
.header-text-right {
  color: #00003F !important;
  font-family: 'Sora', sans-serif !important;
  font-weight: var(--e-global-typography-accent-font-weight, 600) !important;
  line-height: var(--e-global-typography-accent-line-height, 1.4) !important;
  font-size: 13px !important;
  display: inline-block;
  text-align: left;
  letter-spacing: 0.01em;
}
header h1 {
    /* background-color: rgba(0, 43, 85, 0.6); */
    /* padding: 0.5em 1em; */
    /* border-radius: 8px; */
    /* display: inline-block;
    position: relative;
    z-index: 1; */
}

/* === STYLES FÜR PARTNERLOGOS (KOMPAKTER) === */
#partner-logos {
  background-color: #ffffff;
  /* padding: 1rem; [GEÄNDERT] Padding reduziert */
  border-bottom: 1px solid #e0e0e0;
  text-align: center;
  height: auto; /* [NEU] Höhe automatisch anpassen */
}

.partner-notice {
  font-style: italic;
  color: #555;
  margin-bottom: 1rem; /* [GEÄNDERT] Abstand reduziert */
  font-size: 0.9em; /* [NEU] Schrift etwas kleiner */
}

.logo-strip {
  /* display: flex; */
  /* flex-wrap: wrap; */
  justify-content: center;
  align-items: center;
  gap: 2rem; /* [GEÄNDERT] Abstand leicht reduziert */
  /* min-height: 60px; */
}

.uni-logo {
  height: 80px;
  max-height: 80px; /* [GEÄNDERT] Logos verkleinert */
  /* max-width: 130px; */
  object-fit: contain;
  transition: transform 0.2s ease-in-out;
}

.logo-strip a:hover .uni-logo {
  transform: scale(1.08);
}


/* === HAUPTBEREICH (LAYOUT VEREINFACHT) === */
main {
  /* padding: 1rem; */
  /* [ENTFERNT] Flexbox-Layout wurde entfernt, da die Legende jetzt oben ist */
}


/* === LEGENDE (JETZT OBEN UND KOMPAKT) === */
#legend {
  /* [ENTFERNT] Alte Layout-Stile (min-width, flex-shrink) */
  background-color: #f8f9fa; /* [NEU] Leichter Hintergrund zur Abgrenzung */
  padding: 0.75rem 1rem; /* [GEÄNDERT] Padding angepasst */
  border-radius: 8px;
  margin-bottom: 1.5rem; /* [NEU] Abstand nach unten */
  border: 1px solid #e9ecef; /* [NEU] Dezenter Rahmen */
}

#legend h2 {
  color: #333;
  margin: 0 0 0.5rem 0; /* [GEÄNDERT] Kompaktere Margins */
  font-size: 1.1em; /* [GEÄNDERT] Kleinere Überschrift */
  text-align: center;
}
#legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem; /* [GEÄNDERT] Weniger Abstand */
  padding-top: 0;
  justify-content: center; /* [NEU] Zentriert die Items */
}
.legend-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 0.8em; /* [GEÄNDERT] Kleinere Schrift */
  color: #333;
}
.legend-color {
  width: 15px; /* [GEÄNDERT] Kleinere Farb-Box */
  height: 15px; /* [GEÄNDERT] Kleinere Farb-Box */
  border-radius: 3px;
  display: inline-block;
  margin-right: 0.4rem;
}


/* === TABELLEN-CONTAINER & UPLOAD-BEREICH === */
#table-container {
  /* [ENTFERNT] flex-grow wurde entfernt */
  overflow-x: auto;
  background-color: white;
  padding: 1.5rem; /* [GEÄNDERT] Padding angepasst */
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  color: #333;
}

.upload-area { /* [NEU] Wrapper für Upload-Elemente */
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.upload-area p { /* [NEU] */
    margin: 0;
    font-weight: 500;
}
#table-container input[type="file"] { 
    margin-bottom: 0; /* [GEÄNDERT] Margin entfernt, wird vom Wrapper gesteuert */
}

#loading-message { /* Style if needed */ }


/* Farben (unverändert) */
.math { background-color: #e63946; }
.comp-arch { background-color: #b3b3b3; color: black; }
.transversal { background-color: #b9a9f0; color: black; }
.sw-eng { background-color: #a84db3; }
.parallel { background-color: #20c997; color: black; }
.elective { background-color: #555; }
.specialisation { background-color: #cce5ff; }
.thesis { background-color: #c0c7cf; color: #333; }
tr.math, tr.sw-eng, tr.elective { color: white; }
tr.comp-arch, tr.transversal, tr.parallel, tr.specialisation, tr.thesis { color: #333; }
tr.math td, tr.comp-arch td, tr.transversal td, tr.sw-eng td, tr.parallel td, tr.elective td, tr.specialisation td, tr.thesis td { color: inherit; }


/* Tabelle & Filter (größtenteils unverändert) */
#moduleTable { width: 100%; border-collapse: collapse; }
#moduleTable th, #moduleTable td { padding: 0.75rem; border: 1px solid #ddd; text-align: left; color: #333; vertical-align: top; }
#moduleTable thead { background-color: #003d80; color: white; }
#moduleTable thead th { color: white; position: sticky; top: 0; background-color: #003d80; z-index: 10; }
#moduleTable thead input[type="text"], #moduleTable thead th.checkbox-col select {
  width: 90%;
  margin-top: 0.25rem;
  padding: 0.25rem;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #333;
  background-color: white;
  box-sizing: border-box;
}
#moduleTable thead th.checkbox-col select { width: 100%; font-size: 0.8rem; }


/* ECTS Anzeige */
#ects-display-container-table { padding: 0.5rem 0; margin-bottom: 0.5rem; border-bottom: 1px solid #eee; }
#ects-display { font-size: 1rem; font-weight: bold; color: #003d80; }


/* Checkbox Spalte */
#moduleTable th.checkbox-col,
#moduleTable td.checkbox-col {
    width: 65px; min-width: 65px; text-align: center; vertical-align: middle; padding: 0.5rem;
}
#moduleTable th.checkbox-col { vertical-align: top; padding-bottom: 0.25rem; }
#moduleTable td.checkbox-col { background-color: #fff; }


/* FAU Blaue Spalte & Overrides */
td.fau-blue-col { background-color: #002b55 !important; color: black !important; }
tr.math td:not(.fau-blue-col):not(.checkbox-col),
tr.sw-eng td:not(.fau-blue-col):not(.checkbox-col),
tr.elective td:not(.fau-blue-col):not(.checkbox-col) { color: black; }
tr.comp-arch td:not(.fau-blue-col):not(.checkbox-col),
tr.transversal td:not(.fau-blue-col):not(.checkbox-col),
tr.parallel td:not(.fau-blue-col):not(.checkbox-col),
tr.specialisation td:not(.fau-blue-col):not(.checkbox-col),
tr.thesis td:not(.fau-blue-col):not(.checkbox-col) { color: #333; }


/* Link Styling */
.content-cell a { 
  color: #2563eb; /* text-blue-600 */
  font-weight: 500; /* font-medium */
  text-decoration: underline;
  transition: color 0.2s ease, text-decoration 0.2s;
}
.content-cell a:hover {
  text-decoration: none; /* hover:no-underline */
  color: #1d4ed8; /* hover:text-blue-700 */
  transition: color 0.2s ease, text-decoration 0.2s;
}
@media (prefers-color-scheme: dark) {
  .content-cell a {
    color: #3b82f6; /* dark:text-blue-500 */
    text-decoration: underline;
    transition: color 0.2s ease, text-decoration 0.2s;
  }
}


/* Responsive adjustments */
@media (max-width: 768px) {
    header { min-height: 100px; }
    .logo-strip { gap: 1.5rem; }
    /* .uni-logo { max-height: 45px; } [GEÄNDERT] Noch kleiner auf Mobilgeräten */
    #table-container { padding: 1rem; }
    .upload-area { flex-direction: column; gap: 0.5rem; text-align: center;}
}
/* === ENDE style.css === */