/* CsBe Intranet UI-System, Schritt 361 */

@font-face {
  font-family: "Graviola";
  src: url("/assets/fonts/Graviola-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

@font-face {
  font-family: "Graviola";
  src: url("/assets/fonts/Graviola-Bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
}

@font-face {
  font-family: "Graviola";
  src: url("/assets/fonts/Graviola-HeavyItalic.otf") format("opentype");
  font-style: italic;
  font-weight: 800 900;
  font-display: swap;
}

:root {
  --csbe-font-family: "Graviola", "Segoe UI", Aptos, Arial, sans-serif;
  --csbe-ink: #111827;
  --csbe-copy: #40506a;
  --csbe-subtle: #64748b;
  --csbe-line: #d8e1ec;
  --csbe-line-strong: #c8d4e3;
  --csbe-surface: #ffffff;
  --csbe-surface-soft: #f3f6fa;
  --csbe-blue: #215b91;
  --csbe-blue-soft: #e9f2fb;
  --csbe-yellow: #d4ac0d;
  --csbe-red: #dc2626;
  --csbe-radius: 20px;
  --csbe-shadow: 0 20px 54px rgba(15, 23, 42, 0.08);
  --csbe-content-width: 1240px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html {
  min-height: 100%;
  font-family: var(--csbe-font-family) !important;
  color: var(--csbe-ink);
  background: #f4f7fb;
  -webkit-text-size-adjust: 100%;
}

body,
button,
input,
select,
textarea {
  font-family: var(--csbe-font-family) !important;
}

body {
  color: var(--csbe-ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
strong,
button,
.button,
[class*="button"] {
  font-family: var(--csbe-font-family) !important;
}

a,
button,
input,
select,
textarea,
[tabindex]:not([tabindex="-1"]) {
  outline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 3px solid rgba(33, 91, 145, 0.34) !important;
}

/* Einheitliche Hauptnavigation */
body {
  padding-top: 72px !important;
}

#csbe-fixed-header {
  height: 72px !important;
  min-height: 72px !important;
  max-height: 72px !important;
  background: rgba(255, 255, 255, 0.97) !important;
  border-bottom-color: var(--csbe-line) !important;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.045) !important;
}

#csbe-fixed-header .cfh-inner {
  width: min(100%, 1600px) !important;
  height: 72px !important;
  min-height: 72px !important;
  max-height: 72px !important;
  margin: 0 auto !important;
  padding: 0 24px !important;
  gap: 24px !important;
}

#csbe-fixed-header .cfh-brand {
  min-width: max-content !important;
  height: 44px !important;
  gap: 9px !important;
}

#csbe-fixed-header .cfh-logo {
  height: 37px !important;
  max-height: 37px !important;
  max-width: 104px !important;
}

#csbe-fixed-header .cfh-label {
  font-family: var(--csbe-font-family) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

#csbe-fixed-header .cfh-nav {
  gap: 8px !important;
}

#csbe-fixed-header .cfh-nav a {
  min-height: 38px !important;
  height: 38px !important;
  padding: 9px 15px !important;
  border-radius: 12px !important;
  font-family: var(--csbe-font-family) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

#csbe-fixed-header .cfh-nav a.is-active,
#csbe-fixed-header .cfh-nav a[aria-current="page"] {
  background: var(--csbe-ink) !important;
  color: #ffffff !important;
}

/* Bestehende CsBe-Seiten werden ruhiger und besser lesbar. */
.csbe-page .csbe-main {
  width: min(var(--csbe-content-width), calc(100% - 48px));
  margin-top: 54px;
}

.csbe-page .csbe-hero {
  border-radius: var(--csbe-radius);
  box-shadow: var(--csbe-shadow);
}

.csbe-page .csbe-hero h1 {
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.csbe-page .csbe-hero p {
  font-size: 1rem;
  line-height: 1.55;
}

/* Studentenzentrierte Portalseiten */
.student-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 255, 255, 0.95), transparent 31rem),
    linear-gradient(180deg, #f8fafc 0%, #f2f6fa 100%);
}

.student-main {
  width: min(var(--csbe-content-width), calc(100% - 48px));
  margin: 50px auto 76px;
}

.student-hero,
.student-section,
.student-panel {
  position: relative;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--csbe-line);
  border-radius: var(--csbe-radius);
  box-shadow: var(--csbe-shadow);
}

.student-hero {
  min-height: 210px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 42px;
  padding: 42px 46px;
  overflow: hidden;
}

.student-hero::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -62px;
  width: 300px;
  height: 190px;
  opacity: 0.055;
  transform: rotate(-7deg);
  background: url("/assets/Signet-CsBe.png") center / contain no-repeat;
  pointer-events: none;
}

.student-eyebrow {
  margin: 0 0 9px;
  color: #476b92;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.student-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.student-hero-copy {
  max-width: 760px;
  margin: 15px 0 0;
  color: var(--csbe-copy);
  font-size: 1.05rem;
  line-height: 1.55;
  font-weight: 600;
}

.student-hero-action {
  position: relative;
  z-index: 1;
  min-width: 186px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 20px;
  color: #ffffff;
  background: var(--csbe-ink);
  border-radius: 14px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.student-hero-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.22);
}

.student-section {
  margin-top: 24px;
  padding: 30px;
}

.student-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.student-section-head h2,
.student-panel h2 {
  margin: 0;
  color: var(--csbe-ink);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 900;
}

.student-section-head p {
  margin: 4px 0 0;
  color: var(--csbe-copy);
  font-size: 14px;
  font-weight: 600;
}

.student-primary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.student-card {
  --card-tone: #215b91;
  --card-tint: #eaf2fb;
  position: relative;
  min-height: 208px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
  color: var(--csbe-ink);
  background: #ffffff;
  border: 1px solid #dce5ef;
  border-radius: 17px;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.student-card[data-tone="yellow"] {
  --card-tone: #a77f00;
  --card-tint: #fff7d8;
}

.student-card[data-tone="green"] {
  --card-tone: #26804b;
  --card-tint: #e9f7ef;
}

.student-card[data-tone="violet"] {
  --card-tone: #7040be;
  --card-tint: #f2ebff;
}

.student-card[data-tone="orange"] {
  --card-tone: #c26714;
  --card-tint: #fff0df;
}

.student-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--card-tone);
}

.student-card:hover {
  transform: translateY(-3px);
  border-color: var(--csbe-line-strong);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.09);
}

.student-card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: var(--card-tone);
  background: var(--card-tint);
  border-radius: 13px;
}

.student-card-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.student-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 900;
}

.student-card p {
  margin: 0;
  color: var(--csbe-copy);
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 600;
}

.student-card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--card-tone);
  font-size: 12px;
  font-weight: 850;
}

.student-secondary-grid,
.student-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.student-link-row {
  min-height: 108px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 17px;
  padding: 20px;
  color: var(--csbe-ink);
  background: #ffffff;
  border: 1px solid #dce5ef;
  border-radius: 16px;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.student-link-row:hover {
  transform: translateY(-2px);
  border-color: var(--csbe-line-strong);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

.student-link-copy {
  min-width: 0;
}

.student-link-copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 900;
}

.student-link-copy span {
  display: block;
  color: var(--csbe-copy);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
}

.student-link-arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--csbe-copy);
  background: var(--csbe-surface-soft);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 900;
}

.student-panel {
  padding: 30px;
}

.student-panel > p {
  margin: 8px 0 0;
  color: var(--csbe-copy);
  font-weight: 600;
}

.student-list {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.student-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 15px 16px;
  color: var(--csbe-copy);
  background: #f7f9fc;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
}

.student-check {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #1e7d45;
  background: #e7f7ed;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
}

.student-note {
  margin-top: 20px;
  padding: 17px 18px;
  color: #34445d;
  background: #edf4fb;
  border: 1px solid #d5e4f3;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  font-weight: 650;
}

.student-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.student-step {
  position: relative;
  min-height: 148px;
  padding: 20px;
  color: var(--csbe-ink);
  background: #f8fafc;
  border: 1px solid #dce5ef;
  border-radius: 15px;
}

.student-step:not(:last-child)::after {
  content: "›";
  position: absolute;
  top: 50%;
  right: -10px;
  z-index: 2;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  color: #56708d;
  background: #ffffff;
  border: 1px solid #dce5ef;
  border-radius: 50%;
  font-weight: 900;
}

.student-step-number {
  display: block;
  margin-bottom: 12px;
  color: #5c7491;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.student-step strong {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
}

.student-step span:last-child {
  color: var(--csbe-copy);
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 600;
}

.module-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
}

.module-search {
  width: 100%;
  min-height: 46px;
  padding: 0 15px;
  color: var(--csbe-ink);
  background: #ffffff;
  border: 1px solid #cfdbe9;
  border-radius: 12px;
  font-size: 14px;
}

.module-count {
  flex: 0 0 auto;
  padding: 8px 11px;
  color: #43546b;
  background: #eef3f8;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.module-item {
  min-height: 86px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 15px;
  background: #f8fafc;
  border: 1px solid #e0e7f0;
  border-radius: 13px;
}

.module-code {
  min-width: 48px;
  padding: 5px 7px;
  color: #245a8c;
  background: #e8f1fa;
  border-radius: 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.module-title {
  color: var(--csbe-ink);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 750;
}

.module-empty {
  grid-column: 1 / -1;
  padding: 24px;
  color: var(--csbe-copy);
  text-align: center;
  background: #f8fafc;
  border: 1px dashed #cfdbe9;
  border-radius: 13px;
  font-weight: 650;
}

.student-footer {
  margin-top: 24px;
  padding: 0 4px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.student-footer a {
  color: #415671;
  text-decoration: none;
  font-weight: 800;
}

@media (max-width: 1060px) {
  .student-primary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .student-step::after {
    display: none;
  }

  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  body {
    padding-top: 116px !important;
  }

  #csbe-fixed-header {
    height: 116px !important;
    min-height: 116px !important;
    max-height: 116px !important;
  }

  #csbe-fixed-header .cfh-inner {
    height: 116px !important;
    min-height: 116px !important;
    max-height: 116px !important;
    display: grid !important;
    grid-template-rows: 54px 54px !important;
    padding: 4px 18px !important;
    gap: 0 !important;
  }

  #csbe-fixed-header .cfh-logo {
    height: 32px !important;
  }

  #csbe-fixed-header .cfh-nav {
    width: 100% !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 6px 0 10px !important;
    scrollbar-width: thin;
  }

  #csbe-fixed-header .cfh-nav a {
    min-height: 36px !important;
    height: 36px !important;
    padding: 8px 13px !important;
  }

  .student-main,
  .csbe-page .csbe-main {
    width: min(100% - 30px, var(--csbe-content-width));
    margin-top: 30px;
  }

  .student-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 34px;
  }

  .student-hero-action {
    width: max-content;
  }

  .student-two-column,
  .student-secondary-grid {
    grid-template-columns: 1fr;
  }

  .student-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .student-main,
  .csbe-page .csbe-main {
    width: calc(100% - 22px);
    margin-bottom: 44px;
  }

  .student-hero,
  .student-section,
  .student-panel {
    border-radius: 16px;
  }

  .student-hero {
    min-height: 0;
    padding: 28px 24px;
  }

  .student-hero h1 {
    font-size: 2.15rem;
  }

  .student-section,
  .student-panel {
    padding: 22px;
  }

  .student-primary-grid,
  .student-timeline,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .student-card {
    min-height: 180px;
  }

  .student-section-head,
  .student-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
