/* ============================================================
   BORIFF Assessment – Stylesheet
   Farben: Navy #1B2B4B | Gold #C8963E
   ============================================================ */

:root {
  --navy:      #1B2B4B;
  --navy-dark: #121E35;
  --navy-light:#2A3F6B;
  --gold:      #C8963E;
  --gold-light:#E8B86D;
  --bg:        #F4F6F9;
  --bg-card:   #FFFFFF;
  --text:      #1A202C;
  --text-muted:#6B7280;
  --border:    #D1D5DB;
  --success:   #16A34A;
  --radius:    8px;
  --shadow:    0 2px 12px rgba(27,43,75,.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.site-header .logo {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
}
.site-header .logo span { color: var(--gold); }
.header-step { color: rgba(255,255,255,.65); font-size: .875rem; }

/* ── Progress Bar ───────────────────────────────────────── */
.progress-bar-outer {
  background: rgba(255,255,255,.15);
  height: 4px;
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
}
.progress-bar-inner {
  height: 100%;
  background: var(--gold);
  transition: width .5s ease;
}

/* ── Layout ─────────────────────────────────────────────── */
.page-wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* ── Step indicator ─────────────────────────────────────── */
.step-indicator {
  display: flex;
  gap: .5rem;
  margin-bottom: 2rem;
  align-items: center;
}
.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 600;
  background: var(--border);
  color: var(--text-muted);
  text-decoration: none;
  transition: background .2s;
}
.step-dot.active  { background: var(--navy); color: #fff; }
.step-dot.done    { background: var(--gold); color: #fff; }
.step-dot.done::after { content: '✓'; }
.step-connector { flex: 1; height: 2px; background: var(--border); }
.step-connector.done { background: var(--gold); }

/* ── Card ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 2.25rem;
  margin-bottom: 1.75rem;
}
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--gold);
}
.section-intro {
  background: #EEF2F8;
  border-left: 4px solid var(--navy-light);
  padding: .75rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.session-hint {
  background: #FEF9EC;
  border-left: 4px solid var(--gold);
  padding: .75rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .875rem;
  margin-bottom: 1.5rem;
}

/* ── Page Title ─────────────────────────────────────────── */
.page-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .4rem;
}
.page-subtitle {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 2rem;
}

/* ── Form elements ──────────────────────────────────────── */
.field { margin-bottom: 1.5rem; }
.field label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .4rem;
  color: var(--navy);
}
.field .hint {
  font-size: .825rem;
  color: var(--text-muted);
  margin-bottom: .5rem;
  font-style: italic;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  padding: .6rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,43,75,.12);
}
.field textarea { min-height: 110px; resize: vertical; }

/* Inline grid for short inputs */
.fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.fields-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
@media(max-width:600px) {
  .fields-grid, .fields-grid-3 { grid-template-columns: 1fr; }
}

/* ── Radio / Checkbox ───────────────────────────────────── */
.options-list { display: flex; flex-direction: column; gap: .45rem; }
.option-item {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .55rem .75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s;
}
.option-item:hover { background: #F0F4FA; }
.option-item input[type="radio"],
.option-item input[type="checkbox"] {
  margin-top: .15rem;
  accent-color: var(--navy);
  flex-shrink: 0;
}
.option-item label { cursor: pointer; font-size: .9rem; }

/* Checkbox grid (2 columns) */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem .75rem;
}
@media(max-width:520px) { .options-grid { grid-template-columns: 1fr; } }

/* ── Scale / Matrix ─────────────────────────────────────── */
.scale-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.scale-table th {
  background: var(--navy);
  color: #fff;
  padding: .4rem .5rem;
  text-align: center;
  font-weight: 600;
}
.scale-table th:first-child { text-align: left; padding-left: .75rem; min-width: 200px; }
.scale-table td {
  padding: .45rem .5rem;
  text-align: center;
  border-bottom: 1px solid #EEF0F3;
}
.scale-table td:first-child { text-align: left; padding-left: .75rem; font-size: .875rem; }
.scale-table tr:nth-child(even) td { background: #F8FAFC; }
.scale-table input[type="radio"] { accent-color: var(--navy); }

/* ── Conditional sections ───────────────────────────────── */
.conditional-section { display: none; }
.conditional-section.visible { display: block; }

/* ── Other input ────────────────────────────────────────── */
.other-input { margin-top: .5rem; display: none; }
.other-input.visible { display: block; }

/* ── Buttons ────────────────────────────────────────────── */
.btn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem 1.75rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background .2s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #b8832e; }
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-outline:hover { background: #EEF2F8; }
.btn-lg { padding: .85rem 2.5rem; font-size: 1.05rem; }

/* ── DSGVO box ──────────────────────────────────────────── */
.dsgvo-box {
  background: #F8FAFC;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  font-size: .875rem;
  line-height: 1.7;
}
.dsgvo-box a { color: var(--navy); }

/* ── Success / Error messages ───────────────────────────── */
.alert {
  padding: .85rem 1.15rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: .9rem;
}
.alert-error   { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.alert-success { background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; }

/* ── Autosave indicator ─────────────────────────────────── */
#autosave-indicator {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background: var(--navy);
  color: #fff;
  font-size: .8rem;
  padding: .4rem .9rem;
  border-radius: 20px;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
#autosave-indicator.show { opacity: 1; }

/* ── Thank-you page ─────────────────────────────────────── */
.thankyou-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.thankyou-box  { text-align: center; padding: 3rem 2rem; }
.thankyou-box h1 { font-size: 2rem; color: var(--navy); margin-bottom: .75rem; }
.thankyou-box p  { color: var(--text-muted); max-width: 480px; margin: 0 auto 1.5rem; }

/* ── Responsive ─────────────────────────────────────────── */
@media(max-width:640px) {
  .page-wrapper { padding: 1.5rem 1rem 4rem; }
  .card { padding: 1.25rem 1.1rem; }
  .btn-row { flex-direction: column-reverse; }
  .btn { width: 100%; justify-content: center; }
}
