/* =============================================
   SCHADENEXPERTS — Bewerber-Funnel Fliesenleger
   style.css
   =============================================
   
   ANPASSEN: Farben in :root ändern um das Branding anzupassen.
   Alle Farben sind als CSS-Variablen definiert.
============================================= */

/* --- CSS-Variablen (ANPASSEN: Branding-Farben hier ändern) --- */
:root {
  /* ANPASSEN: Primärfarbe (Orange von schadenexperts.de) */
  --color-primary: #F26724;
  /* ANPASSEN: Primärfarbe dunkel (Hover-State) */
  --color-primary-dark: #D4551A;
  /* ANPASSEN: Primärfarbe hell (Hintergründe, Selections) */
  --color-primary-light: #FFF3ED;
  /* Textfarben */
  --color-text: #1E1810;
  --color-text-secondary: #4B4F58;
  --color-text-muted: #858585;
  /* Hintergründe */
  --color-bg: #FFFFFF;
  --color-bg-light: #F8F9FA;
  --color-bg-card: #FFFFFF;
  /* Borders */
  --color-border: #E0E0E0;
  --color-border-active: var(--color-primary);
  /* Erfolg / WhatsApp */
  --color-success: #25D366;
  --color-success-dark: #1DA851;
  /* Disqualifikation (freundlich) */
  --color-exit-bg: #FFF8F0;
  /* Abstände */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 48px;
  /* Radien */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  /* Schrift */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease-out;
  --transition-slow: 400ms ease-out;
  /* Content-Breite */
  --content-max-width: 480px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Funnel Container --- */
.funnel-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

/* --- Header (Progress-Bar + Zurück-Button) --- */
.funnel-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-bg);
  padding: var(--spacing-sm) var(--spacing-md);
  padding-top: max(var(--spacing-sm), env(safe-area-inset-top));
}

.funnel-header-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.funnel-nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xs);
}

.back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  color: var(--color-text-secondary);
  font-size: 20px;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.back-button:hover,
.back-button:active {
  background: var(--color-bg-light);
}

.back-button.hidden {
  visibility: hidden;
}

.logo-small {
  height: 28px;
  width: auto;
  margin-left: auto;
}

/* --- Progress Bar --- */
.progress-bar-container {
  width: 100%;
  height: 4px;
  background: var(--color-bg-light);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--color-primary);
  border-radius: 2px;
  width: 0%;
  transition: width var(--transition-normal);
}

/* --- Screens --- */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 100px var(--spacing-md) var(--spacing-xl);
  opacity: 0;
  transform: translateX(100%);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
  pointer-events: none;
  overflow-y: auto;
}

.screen.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  position: relative;
}

.screen.exit-left {
  opacity: 0;
  transform: translateX(-30%);
  pointer-events: none;
}

.screen.exit-right {
  opacity: 0;
  transform: translateX(30%);
  pointer-events: none;
}

/* --- Screen Content --- */
.screen-content {
  width: 100%;
  max-width: var(--content-max-width);
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* --- Typografie --- */
.screen-headline {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

.screen-subline {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xl);
  text-align: center;
  line-height: 1.5;
}

.screen-question {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: var(--spacing-xl);
  text-align: center;
}

/* --- Antwort-Buttons (Single Choice) --- */
.answer-options {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  width: 100%;
  margin-top: auto;
  margin-bottom: auto;
}

.answer-btn {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: var(--spacing-md) var(--spacing-lg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
  text-align: left;
  -webkit-user-select: none;
  user-select: none;
}

.answer-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.answer-btn:active {
  transform: scale(0.97);
}

.answer-btn.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.answer-btn .btn-icon {
  margin-right: var(--spacing-sm);
  font-size: 20px;
  flex-shrink: 0;
}

.answer-btn .btn-check {
  margin-left: auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.answer-btn.selected .btn-check {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: white;
}

.answer-btn.selected .btn-check::after {
  content: '✓';
  font-size: 14px;
  font-weight: 700;
  color: white;
}

/* --- Mehrfachauswahl (Checkboxen) --- */
.multi-select .answer-btn .btn-check {
  border-radius: 4px;
}

.multi-select .answer-btn.selected .btn-check {
  border-radius: 4px;
}

/* --- CTA / Weiter-Button --- */
.cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: var(--spacing-md) var(--spacing-lg);
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: white;
  font-family: var(--font-family);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  margin-top: auto;
  -webkit-user-select: none;
  user-select: none;
}

.cta-button:hover {
  background: var(--color-primary-dark);
}

.cta-button:active {
  transform: scale(0.97);
}

.cta-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.cta-button.whatsapp-btn {
  background: var(--color-success);
  margin-top: var(--spacing-md);
}

.cta-button.whatsapp-btn:hover {
  background: var(--color-success-dark);
}

/* --- Landing Screen (Screen 1) --- */
.screen-landing {
  justify-content: center;
  text-align: center;
}

.screen-landing .screen-content {
  align-items: center;
  justify-content: center;
}

.landing-logo {
  width: 200px;
  max-width: 60%;
  height: auto;
  margin-bottom: var(--spacing-xl);
}

.landing-headline {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
  margin-bottom: var(--spacing-md);
}

.landing-subline {
  font-size: 16px;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xxl);
}

/* --- Info Screen (Screen 7 — Value Proposition) --- */
.value-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
  width: 100%;
}

.value-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background: var(--color-bg-light);
  border-radius: var(--radius-sm);
}

.value-item .value-icon {
  font-size: 24px;
  flex-shrink: 0;
  line-height: 1.3;
}

.value-item .value-text {
  font-size: 15px;
  line-height: 1.4;
  color: var(--color-text);
}

.value-item .value-text strong {
  font-weight: 600;
}

/* --- Tariftabelle (Screen 7) --- */
.tarif-headline {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
  text-align: center;
  line-height: 1.4;
}

.tarif-cards {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  width: 100%;
  margin-bottom: var(--spacing-lg);
}

.tarif-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-card);
  gap: var(--spacing-sm);
}

.tarif-card--highlight {
  border-color: var(--color-primary);
  border-width: 2px;
  background: var(--color-primary-light);
  border-left: 4px solid var(--color-primary);
}

.tarif-card--muted {
  background: var(--color-bg-light);
  opacity: 0.85;
}

.tarif-card-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.tarif-level {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.tarif-req {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.3;
}

.tarif-card-right {
  flex-shrink: 0;
  text-align: right;
}

.tarif-wage {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.tarif-card--highlight .tarif-wage {
  font-size: 22px;
}

.tarif-card--muted .tarif-wage {
  color: var(--color-text-secondary);
}

/* --- Formular (Screen 9) --- */
.form-group {
  margin-bottom: var(--spacing-md);
  width: 100%;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.form-input,
.form-select {
  width: 100%;
  min-height: 52px;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-card);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: 16px;
  transition: border-color var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234B4F58' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

/* --- DSGVO Checkbox --- */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.checkbox-group input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin-top: 2px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.checkbox-group label {
  font-size: 13px;
  line-height: 1.4;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.checkbox-group label a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* --- Formular-Hinweis --- */
.form-hint {
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--spacing-md);
  line-height: 1.4;
}

/* --- Disqualifikation / Exit-Screens --- */
.screen-exit {
  background: var(--color-exit-bg);
}

.screen-exit .screen-content {
  justify-content: center;
  text-align: center;
}

.exit-icon {
  font-size: 48px;
  margin-bottom: var(--spacing-lg);
}

.exit-headline {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--spacing-md);
}

.exit-text {
  font-size: 16px;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xl);
  line-height: 1.5;
}

.exit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md) var(--spacing-lg);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
  width: 100%;
  min-height: 52px;
}

.exit-link:hover {
  background: var(--color-primary);
  color: white;
}

.exit-link + .exit-link {
  margin-top: var(--spacing-sm);
}

/* --- Danke-Screen --- */
.screen-thankyou .screen-content {
  justify-content: center;
  text-align: center;
}

.thankyou-icon {
  font-size: 56px;
  margin-bottom: var(--spacing-lg);
}

.thankyou-headline {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--spacing-md);
}

.thankyou-text {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: var(--spacing-xl);
}

/* --- Hinweis-Screen (z.B. Führerschein) --- */
.hint-box {
  background: var(--color-primary-light);
  border-left: 4px solid var(--color-primary);
  padding: var(--spacing-md);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: var(--spacing-lg);
  font-size: 15px;
  line-height: 1.4;
  color: var(--color-text-secondary);
}

/* --- Utility --- */
.text-center {
  text-align: center;
}

.mt-auto {
  margin-top: auto;
}

.mb-md {
  margin-bottom: var(--spacing-md);
}

.hidden {
  display: none !important;
}

/* --- Ladeanimation (optional) --- */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: var(--spacing-lg) auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Responsive (Desktop-Fallback, nicht Priorität) --- */
@media (min-width: 600px) {
  .screen {
    padding-top: 110px;
  }

  .landing-headline {
    font-size: 32px;
  }

  .screen-question {
    font-size: 24px;
  }
}

/* --- Safe Area für iPhones mit Notch --- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .screen {
    padding-bottom: calc(var(--spacing-xl) + env(safe-area-inset-bottom));
  }
}

/* --- Formular-Fehler --- */
.form-input.error,
.form-select.error {
  border-color: #E53935;
}

.form-error-msg {
  font-size: 12px;
  color: #E53935;
  margin-top: 4px;
}

/* --- WhatsApp Button Icon --- */
.whatsapp-icon {
  width: 24px;
  height: 24px;
  margin-right: var(--spacing-xs);
}
