/* DOMA Lernplattform (/kurse) — ergänzt styles.css */

.hidden { display: none !important; }

.kurse-body { padding-top: 84px; } /* Platz für den fixen Header */

/* ---- Header solide (kein Hero-Hintergrund) ---- */
.site-header.is-solid {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--gray-200);
}
.site-header.is-solid .logo-text { fill: var(--navy-800); }
.site-header.is-solid .lang-btn { color: var(--muted); }
.site-header.is-solid .lang-btn.is-active { color: var(--navy-800); }
/* "Zur Website" ist von der Hauptseite weiß-auf-transparent (für den dunklen
   Hero) — auf dem hellen Kurs-Header wäre er unsichtbar. Hier dunkel machen. */
.site-header.is-solid .btn-outline {
  color: var(--navy-800);
  border-color: var(--silver-300);
  background: transparent;
}
.site-header.is-solid .btn-outline:hover {
  background: var(--gray-100);
  border-color: var(--navy-800);
}

.account-bar { display: flex; align-items: center; gap: 12px; }
.account-tier {
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--navy-800); background: var(--gray-100);
  padding: 4px 10px; border-radius: 999px;
}
.account-email { font-size: 13px; color: var(--text-soft); }
.btn-logout {
  border: 1px solid var(--silver-300); background: transparent; color: var(--navy-800);
  padding: 6px 14px; border-radius: 999px; font-size: 13px; cursor: pointer;
}
.btn-logout:hover { background: var(--gray-100); }

/* ---- Intro ---- */
.kurse-hero { padding: 48px 0 8px; }
.kurse-hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
.kurse-hero-sub { max-width: 640px; color: var(--text-soft); font-size: 1.05rem; }

/* ---- Hinweisbanner ---- */
.notice {
  margin-top: 20px; padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: .95rem; line-height: 1.5;
}
.notice strong { display: block; margin-bottom: 2px; }
.notice-pending { background: #FFF6E6; border: 1px solid #F1D79B; color: #6B4E0E; }
.notice-active  { background: #E9F7EF; border: 1px solid #A9DCBE; color: #1C5A38; }
.notice-success { background: #E9F7EF; border: 1px solid #A9DCBE; color: #1C5A38; }
.notice-expired { background: #FBECEC; border: 1px solid #E4B4B4; color: #8A2B2B; }

/* ---- Pakete ---- */
.pricing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 36px;
}
.pricing-card {
  position: relative; background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 32px 26px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.pricing-card.is-featured { border-color: var(--silver-400); box-shadow: var(--shadow-md); }
.pricing-card.is-gold {
  border-color: #D9B96A;
  background: linear-gradient(180deg, #FFFDF7 0%, var(--white) 60%);
}
.pricing-badge {
  position: absolute; top: -12px; right: 20px;
  background: var(--navy-800); color: var(--white);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
}
.pricing-card.is-gold .pricing-badge { background: #C79A3A; }
.pricing-card h3 { font-size: 1.5rem; margin-bottom: .2em; }
.pricing-desc { color: var(--text-soft); font-size: .95rem; margin-bottom: 16px; }
.pricing-price {
  text-align: center; padding: 18px 0; margin: 4px 0 18px;
  border-top: 1px solid var(--gray-100); border-bottom: 1px solid var(--gray-100);
}
.price-cur { display: block; color: var(--navy-600); font-weight: 700; letter-spacing: .1em; font-size: .82rem; }
.price-amount {
  display: block; font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.7rem; font-weight: 700; color: var(--navy-800); line-height: 1.05;
}
.price-note { display: block; text-transform: uppercase; letter-spacing: .09em; font-size: .7rem; color: var(--muted); margin-top: 6px; }
.pricing-feats { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.pricing-feats li {
  position: relative; padding: 6px 0 6px 24px; color: var(--text); font-size: .95rem;
  border-bottom: 1px solid var(--gray-100);
}
.pricing-feats li::before {
  content: "✓"; position: absolute; left: 0; color: var(--navy-600); font-weight: 700;
}
.pricing-actions { display: grid; gap: 10px; }

/* ---- Formularfelder auf hellem Grund (styles.css ist für dunkel gemacht) ---- */
.kurse-body .field label { color: var(--muted); }
.kurse-body .field input,
.kurse-body .field select,
.kurse-body .field textarea {
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--text);
}
.kurse-body .field input::placeholder { color: var(--silver-400); }
.kurse-body .field input:focus,
.kurse-body .field select:focus,
.kurse-body .field textarea:focus {
  border-color: var(--navy-800);
  background: var(--white);
}

/* ---- Konto-Bereich: Info + Formular nebeneinander ---- */
.konto-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start;
  max-width: 900px; margin: 32px auto 0;
}
.konto-info { padding-top: 8px; }
.konto-info h3 { font-size: 1.3rem; margin-bottom: 18px; }
.steps { list-style: none; margin: 0 0 20px; padding: 0; }
.steps li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--gray-100);
  color: var(--text); font-size: .98rem; line-height: 1.5;
}
.step-num {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--navy-800); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
}
.konto-note { color: var(--text-soft); font-size: .9rem; margin: 0; }
.auth-card--wide { margin: 0; }

/* ---- Auth-Karte ---- */
.auth-card {
  max-width: 440px; margin: 0 auto; background: var(--white);
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow-sm);
}
.auth-card--wide { max-width: 520px; }
.auth-card.flash { animation: cardflash 1.3s var(--ease); }
@keyframes cardflash {
  0%, 100% { box-shadow: var(--shadow-sm); }
  25% { box-shadow: 0 0 0 4px rgba(11, 26, 58, .28); }
  60% { box-shadow: 0 0 0 6px rgba(11, 26, 58, .12); }
}
.auth-card .brand {
  font-family: 'Playfair Display', Georgia, serif; font-size: 1.4rem; font-weight: 700;
  color: var(--navy-800); text-decoration: none; display: inline-block; margin-bottom: 8px;
}
.auth-tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--gray-100); border-radius: 999px; padding: 4px; }
.auth-tab {
  flex: 1; border: none; background: transparent; padding: 10px; border-radius: 999px;
  font: inherit; font-weight: 600; color: var(--text-soft); cursor: pointer;
}
.auth-tab.is-active { background: var(--white); color: var(--navy-800); box-shadow: var(--shadow-sm); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.auth-msg { margin: 12px 0 0; font-size: .9rem; min-height: 1.2em; }
.auth-msg.is-error { color: #B4232A; }
.auth-msg.is-ok { color: #1C5A38; }

/* ---- Katalog ---- */
.catalog { display: grid; gap: 20px; margin-top: 32px; }
.catalog-loading { color: var(--muted); text-align: center; padding: 24px; }
.course-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 26px 28px; box-shadow: var(--shadow-sm);
}
.course-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.course-head h3 { margin: 0; font-size: 1.35rem; }
.course-tier {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--navy-600); background: var(--gray-100); padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.course-desc { color: var(--text-soft); margin: 10px 0 18px; }
.lesson-list { list-style: none; padding: 0; margin: 0; }
.lesson-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--gray-100);
}
.lesson-item.is-locked { opacity: .72; }
.lesson-thumb {
  width: 104px; height: 62px; object-fit: cover; border-radius: 8px;
  flex: none; background: var(--gray-100); border: 1px solid var(--gray-200);
}
.lesson-info { min-width: 0; flex: 1 1 auto; }
.lesson-title { font-weight: 600; color: var(--navy-800); }
.lesson-desc { margin: 4px 0 0; color: var(--text-soft); font-size: .88rem; line-height: 1.45; }
.lesson-sub { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.lesson-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
}
.lesson-badge.is-preview  { background: #E7EEFB; color: #1E3A6E; }
.lesson-badge.is-unlocked { background: #E9F7EF; color: #1C5A38; }
.lesson-badge.is-locked   { background: var(--gray-100); color: var(--muted); }
.lesson-badge.is-live     { background: #FBECEC; color: #B4232A; }
.btn-live { border-color: #E4B4B4 !important; color: #B4232A !important; }
.btn-live:hover { background: #FBECEC !important; }
.lesson-dur { font-size: 12px; color: var(--muted); }
.lesson-empty { color: var(--muted); padding: 8px 0; }
.btn-sm { padding: 8px 16px; font-size: .85rem; white-space: nowrap; }

/* ---- Lernfortschritt ---- */
.course-progress { display: flex; align-items: center; gap: 12px; margin: 14px 0 18px; }
.course-progress-track { flex: 1; height: 8px; background: var(--gray-100); border-radius: 999px; overflow: hidden; }
.course-progress-track span { display: block; height: 100%; background: var(--navy-600); border-radius: 999px; transition: width .4s var(--ease); }
.course-progress-label { font-size: .82rem; color: var(--text-soft); white-space: nowrap; font-weight: 600; }
.lesson-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn-done {
  border: 1px solid var(--gray-200); background: var(--white); color: var(--text-soft);
  padding: 8px 12px; border-radius: 999px; font: inherit; font-size: .8rem; cursor: pointer; white-space: nowrap;
}
.btn-done:hover { border-color: var(--navy-600); }
.btn-done.is-done { background: #E9F7EF; border-color: #A9DCBE; color: #1C5A38; }
.lesson-item.is-completed .lesson-title { color: var(--muted); }
.lesson-badge.is-next { background: var(--navy-800); color: var(--white); }
.lesson-item.is-next-row { background: #F4F7FF; border-radius: 8px; }

/* ---- Player-Modal ---- */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 22, 50, .62); backdrop-filter: blur(3px); }
.modal-shell {
  position: relative; background: var(--white); border-radius: var(--radius);
  max-width: 520px; width: 100%; padding: 28px; box-shadow: var(--shadow-lg); z-index: 1;
}
.modal-shell--player { max-width: 900px; }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px;
  border: none; background: var(--gray-100); border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--navy-800);
}
.modal-close:hover { background: var(--gray-200); }
.modal-close svg { width: 18px; height: 18px; }
.player-title { font-size: 1.2rem; margin: 0 40px 16px 0; }
.player-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000;
  border-radius: var(--radius-sm); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.player-loading, .player-error { color: var(--silver-300); font-size: .95rem; }

/* ---- Rechnung-anfragen Modal ---- */
.invoice-sub { color: var(--text-soft); font-size: .92rem; margin: 0 40px 18px 0; }
.invoice-done { text-align: center; padding: 8px 0 4px; }
.invoice-done-icon {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 14px;
  background: #E9F7EF; color: #1C5A38; font-size: 1.7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.invoice-done p { color: var(--text); margin: 0 0 18px; line-height: 1.5; }

/* ---- Nicht konfiguriert ---- */
.not-configured { max-width: 520px; margin: 80px auto; padding: 0 20px; }

/* ---- Footer ---- */
.kurse-footer { padding: 32px 0; border-top: 1px solid var(--gray-200); margin-top: 48px; }
.kurse-footer p { color: var(--muted); font-size: .9rem; text-align: center; margin: 0; }
.kurse-footer a { color: var(--text-soft); text-decoration: none; }
.kurse-footer a:hover { color: var(--navy-800); }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  /* Die Hauptseite (styles.css) blendet .header-tools ab 960px aus, weil sie
     ein Hamburger-Menü hat. Die Kursseite hat KEINS — also müssen Sprach-
     Umschalter, Konto-Leiste und "Zur Website" hier sichtbar bleiben. */
  .kurse-body .header-inner > .header-tools { display: flex !important; }
  .kurse-body .header-inner { flex-wrap: wrap; gap: 12px 16px; }
  .kurse-body .header-tools { flex-wrap: wrap; align-items: center; gap: 10px 14px; }
  /* Header mobil nicht mehr fixiert: umbrechende Werkzeuge sollen den Inhalt
     nicht überdecken (der fixe Header hätte sonst eine unbekannte Höhe). */
  .kurse-body .site-header { position: static; }
  .kurse-body { padding-top: 0; }
}
@media (max-width: 860px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .konto-grid { grid-template-columns: 1fr; }
  .account-email { display: none; }
}
@media (max-width: 560px) {
  .lesson-item { flex-wrap: wrap; }
  .lesson-actions { width: 100%; justify-content: flex-start; margin-top: 4px; }
}
