/* BINDU Institut - Basisprüfung Styles */
:root {
  /* BINDU CI Colors */
  --color-primary: #C46D5C;
  --color-primary-light: #F37C7B;
  --color-highlight: #ff6900;
  --color-bg: #EBE8E0;
  --color-bg-white: #FFFFFF;
  --color-text: #444444;
  --color-text-dark: #000000;
  --color-border: #d0cbc1;
  --color-success: #2e7d32;
  --color-error: #d32f2f;
  
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background-color: var(--color-bg-white);
  padding: 1.5rem 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--color-primary);
}

.header-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo img {
  max-height: 48px;
  width: auto;
}

.header-info {
  font-size: 0.9rem;
  color: var(--color-text);
}

.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex: 1;
  width: 100%;
}

/* Sections */
.section {
  background-color: var(--color-bg-white);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  box-shadow: var(--box-shadow);
  display: none; /* Hidden by default */
  animation: fadeIn 0.3s ease-in-out;
}

.section.active {
  display: block; /* Show active section */
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

h1, h2, h3 {
  color: var(--color-text-dark);
}

h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; border-bottom: 2px solid var(--color-bg); padding-bottom: 0.5rem; margin-top: 2rem; margin-bottom: 1rem; }
h2:first-of-type { margin-top: 0; }

p {
  margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text-dark);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: var(--font-family);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  transition: border-color 0.2s;
  background-color: var(--color-bg-white);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(196, 109, 92, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background-color: #a85848; /* Darker primary */
}

.btn-primary:disabled {
  background-color: #e09e91;
  cursor: not-allowed;
}

.btn-highlight {
  background-color: var(--color-highlight);
  color: white;
  margin-top: 1rem;
}

.btn-highlight:hover {
  background-color: #e05d00;
}

/* Loader */
.loader {
  display: none;
  border: 3px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  border-top: 3px solid white;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

.btn.loading .loader {
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Messages */
.alert {
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  display: none;
}

.alert.show {
  display: block;
}

.alert-error {
  background-color: #ffebee;
  color: var(--color-error);
  border: 1px solid #ffcdd2;
}

.alert-success {
  background-color: #e8f5e9;
  color: var(--color-success);
  border: 1px solid #c8e6c9;
}

/* Exam specific */
.question-card {
  background-color: #fcfcfc;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.question-text {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-text-dark);
}

/* Custom Checkbox */
.option-label {
  display: block;
  position: relative;
  padding: 1rem 1rem 1rem 3rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background-color: white;
  transition: all 0.2s;
}

.option-label:hover {
  background-color: #fafafa;
  border-color: var(--color-primary-light);
}

.option-input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 1rem;
  left: 1rem;
  height: 22px;
  width: 22px;
  background-color: white;
  border: 2px solid var(--color-border);
  border-radius: 4px; /* Slightly rounded for checkboxes */
}

.option-label:hover input ~ .checkmark {
  border-color: var(--color-primary-light);
}

.option-input:checked ~ .checkmark {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.option-input:checked ~ .checkmark:after {
  display: block;
}

.checkmark:after {
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.option-input:checked ~ .option-label-text {
  font-weight: 600;
}

/* Progress bar */
.progress-container {
  width: 100%;
  background-color: var(--color-border);
  height: 6px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

.progress-bar {
  height: 100%;
  background-color: var(--color-highlight);
  width: 0%;
  transition: width 0.3s ease;
}

.autosave-notice {
  font-size: 0.8rem;
  color: #666;
  text-align: right;
  margin-top: 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.autosave-notice.visible {
  opacity: 1;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.85rem;
  color: #777;
}
