/* =========================
   Vermögensbrücke Tools - Allgemeines Stylesheet
   Für Tools auf der Subdomain (ohne Header/Footer)
   ========================= */

/* Reset & Box-Sizing */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* CSS Variablen */
:root {
  --beige-light: #F6EDE4;
  --beige-dark: #F1E2D3;
  --gold: #C9A227;
  --gold-light: #FBB94C;
  --black: #1a1a1a;
  --white: #FFFFFF;
  --success: #4CAF50;
  --warning: #FF9800;
  --danger: #f44336;
}

/* =========================
   Typografie
   ========================= */
body {
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  line-height: 1.75;
  color: var(--black);
  background: var(--beige-light);
}

h1, h2, h3 {
  font-family: 'Arapey', serif;
  font-weight: 400;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* =========================
   Layout
   ========================= */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 32px;
}

.container-narrow {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 32px;
}

.container-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

section {
  padding: clamp(60px, 8vw, 100px) 0;
}

/* =========================
   Eyebrow & Lead
   ========================= */
.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.5;
  margin-bottom: 16px;
  font-weight: 600;
}

.lead {
  font-size: 1.2rem;
  opacity: 0.8;
  max-width: 600px;
}

/* =========================
   Hero Section
   ========================= */
.hero {
  background: var(--black);
  color: var(--beige-light);
  padding: 120px 0 80px;
  text-align: center;
}

.hero h1 {
  color: var(--white);
}

.hero .lead {
  max-width: 700px;
  margin: 0 auto;
}

/* =========================
   Cards
   ========================= */
.card {
  background: var(--white);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.card-dark {
  background: var(--black);
  color: var(--beige-light);
  border-radius: 20px;
  padding: 32px;
}

/* =========================
   Buttons
   ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 60px;
  text-decoration: none;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  border: none;
  transition: all 0.3s ease;
  gap: 8px;
}

.btn-primary {
  background: var(--gold);
  color: var(--black);
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--black);
  border: 2px solid var(--black);
}

.btn-secondary:hover {
  background: var(--black);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}

.btn-outline:hover {
  background: var(--gold);
  color: var(--black);
}

.btn-submit {
  background: var(--success);
  color: var(--white);
}

.btn-submit:hover {
  background: #43A047;
}

/* =========================
   Form Elements
   ========================= */
input[type="text"],
input[type="email"],
input[type="number"],
textarea {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--white);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* =========================
   Range Slider
   ========================= */
.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(to right, var(--gold) 0%, var(--gold) var(--progress, 50%), var(--beige-dark) var(--progress, 50%), var(--beige-dark) 100%);
  outline: none;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 4px solid var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.range-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 4px solid var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Slider Labels */
.slider-container {
  position: relative;
  padding-bottom: 30px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.8rem;
  opacity: 0.6;
}

.slider-current-value {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--black);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 4px 12px;
  border-radius: 20px;
}

/* =========================
   Scale Section
   ========================= */
.scale-section {
  margin-top: 24px;
}

.scale-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(201, 162, 39, 0.15);
  color: var(--gold);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.scale-descriptions {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 12px;
  gap: 20px;
}

.scale-descriptions span:first-child {
  text-align: left;
}

.scale-descriptions span:last-child {
  text-align: right;
}

/* =========================
   Person Container
   ========================= */
.person-container {
  background: rgba(0,0,0,0.02);
  border-radius: 16px;
  padding: 24px;
  margin-top: 24px;
}

.person-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.person-icon {
  font-size: 1.3rem;
}

/* =========================
   Story Section
   ========================= */
.story-section {
  margin-top: 28px;
  padding: 20px;
  background: rgba(184, 157, 102, 0.08);
  border-radius: 12px;
  border-left: 4px solid var(--gold);
}

.story-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 14px;
}

.story-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.story-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid rgba(184, 157, 102, 0.3);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 100px;
  background: white;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.story-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 157, 102, 0.15);
}

.story-textarea::placeholder {
  color: #aaa;
  font-style: italic;
}

/* =========================
   Reflection Section (Swipeable)
   ========================= */
.reflection-section {
  margin-top: 28px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(184, 157, 102, 0.06), rgba(184, 157, 102, 0.12));
  border-radius: 16px;
  border: 1px solid rgba(184, 157, 102, 0.2);
}

.reflection-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.reflection-icon {
  font-size: 1.3rem;
}

.reflection-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--black);
}

.reflection-hint {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--gold);
  opacity: 0.8;
  animation: swipeHint 2s ease-in-out infinite;
}

@keyframes swipeHint {
  0%, 100% { transform: translateX(0); opacity: 0.6; }
  50% { transform: translateX(5px); opacity: 1; }
}

.reflection-carousel {
  position: relative;
  overflow: hidden;
}

.reflection-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.reflection-card {
  min-width: 100%;
  padding: 0 4px;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.reflection-card.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.reflection-question {
  font-size: 1rem;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 12px;
  line-height: 1.5;
}

.reflection-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid rgba(184, 157, 102, 0.25);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 80px;
  background: white;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.reflection-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 157, 102, 0.15);
}

.reflection-textarea::placeholder {
  color: #aaa;
  font-style: italic;
}

.reflection-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.reflection-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: white;
  color: var(--gold);
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reflection-nav-btn:hover {
  background: var(--gold);
  color: white;
}

.reflection-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.reflection-dots {
  display: flex;
  gap: 8px;
}

.reflection-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(184, 157, 102, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.reflection-dot.active {
  background: var(--gold);
  transform: scale(1.2);
}

.reflection-dot:hover {
  background: var(--gold-light);
}

/* =========================
   Notes Section
   ========================= */
.notes-section {
  margin-top: 24px;
}

.notes-toggle {
  font-size: 0.9rem;
  color: var(--gold);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.notes-toggle:hover {
  gap: 10px;
}

.notes-field {
  display: none;
  margin-top: 16px;
}

.notes-field.active {
  display: block;
}

.notes-field textarea {
  width: 100%;
  padding: 16px;
  border: 2px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.3s ease;
}

.notes-field textarea:focus {
  outline: none;
  border-color: var(--gold);
}

/* =========================
   Progress Bar
   ========================= */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 16px 32px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto 12px;
}

.progress-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.progress-count {
  font-size: 0.85rem;
  opacity: 0.7;
}

.progress-bar {
  max-width: 1000px;
  margin: 0 auto;
  height: 8px;
  background: var(--beige-dark);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* =========================
   Question Navigation
   ========================= */
.question-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid rgba(0,0,0,0.05);
}

.question-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.question-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--beige-dark);
  cursor: pointer;
  transition: all 0.3s ease;
}

.question-dot.active {
  background: var(--gold);
  transform: scale(1.2);
}

.question-dot.completed {
  background: var(--success);
}

.question-dot:hover {
  background: var(--gold-light);
}

/* =========================
   Summary Grid
   ========================= */
.summary {
  background: var(--beige-dark);
  padding: 60px 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.summary-card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.summary-card.highlight {
  background: var(--gold);
  color: var(--black);
}

.summary-value {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: 'Arapey', serif;
  margin-bottom: 8px;
}

.summary-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* =========================
   Results Display
   ========================= */
.result-card {
  background: var(--white);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.result-theme {
  font-size: 1.3rem;
}

.result-badge {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.result-badge.low {
  background: rgba(76, 175, 80, 0.15);
  color: var(--success);
}

.result-badge.medium {
  background: rgba(255, 152, 0, 0.15);
  color: var(--warning);
}

.result-badge.high {
  background: rgba(244, 67, 54, 0.15);
  color: var(--danger);
}

/* Score Bars */
.scores-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.person-scores {
  padding: 20px;
  background: rgba(0,0,0,0.02);
  border-radius: 12px;
}

.person-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 16px;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.score-label {
  width: 80px;
  font-size: 0.9rem;
  font-weight: 500;
}

.score-bar-container {
  flex: 1;
  height: 12px;
  background: var(--beige-light);
  border-radius: 12px;
  position: relative;
}

.score-bar {
  height: 100%;
  border-radius: 12px;
  transition: width 0.5s ease;
}

.score-bar.phil {
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.score-bar.comfort {
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

.score-value {
  font-weight: 700;
  margin-left: 12px;
  font-size: 0.9rem;
  min-width: 50px;
}

/* =========================
   Legend
   ========================= */
.legend {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.legend-color.phil {
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.legend-color.comfort {
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

/* =========================
   Options Grid
   ========================= */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.option-card {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.option-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.option-card h3 {
  margin-bottom: 12px;
}

.option-card p {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-bottom: 20px;
}

/* =========================
   Insights
   ========================= */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.insight-card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
}

.insight-card h4 {
  color: var(--gold);
  margin-bottom: 12px;
}

.insight-card p {
  opacity: 0.8;
  font-size: 0.95rem;
}

.insight-card ul {
  list-style: none;
  margin-top: 12px;
}

.insight-card li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  opacity: 0.8;
  font-size: 0.9rem;
}

.insight-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
}

/* =========================
   CTA Section
   ========================= */
.cta {
  background: var(--black);
  color: var(--beige-light);
  padding: 80px 0;
}

.cta-box {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-box h2 {
  color: var(--white);
  margin-bottom: 16px;
}

.cta-box p {
  opacity: 0.8;
  margin-bottom: 32px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* =========================
   Messages
   ========================= */
.success-message {
  background: rgba(76, 175, 80, 0.1);
  border: 2px solid var(--success);
  color: var(--success);
  padding: 16px 24px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.error-message {
  background: rgba(244, 67, 54, 0.1);
  border: 2px solid var(--danger);
  color: var(--danger);
  padding: 16px 24px;
  border-radius: 12px;
  margin-bottom: 24px;
}

/* =========================
   User Menu (Floating)
   ========================= */
.user-menu {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
}

.user-menu-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--black);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-menu-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}

.user-menu-toggle svg {
  width: 24px;
  height: 24px;
  fill: var(--gold);
}

.user-menu-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.user-menu.open .user-menu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu-header {
  padding: 16px 20px;
  font-weight: 600;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.user-menu-panel a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: var(--black);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}

.user-menu-panel a:hover {
  background: rgba(0,0,0,0.03);
}

.menu-icon {
  font-size: 1.1rem;
}

/* =========================
   Selection Cards
   ========================= */
.selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.selection-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.3s ease;
}

.selection-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.selection-card.active {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.05);
}

.selection-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

/* =========================
   Info Grid
   ========================= */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.info-card {
  background: var(--white);
  border-radius: 16px;
  padding: 28px;
}

.info-card h4 {
  margin-bottom: 12px;
}

.info-card p {
  font-size: 0.95rem;
  opacity: 0.8;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  section {
    padding: clamp(40px, 6vw, 60px) 0;
  }

  .hero {
    padding: 100px 0 60px;
  }

  .scores-container {
    grid-template-columns: 1fr;
  }

  .question-nav {
    flex-direction: column;
    gap: 16px;
  }

  .btn {
    width: 100%;
  }

  .selection-grid,
  .options-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .score-label {
    width: 60px;
    font-size: 0.8rem;
  }

  .progress-container {
    padding: 12px 16px;
  }

  .user-menu {
    bottom: 16px;
    right: 16px;
  }
}

/* =========================
   Print Styles
   ========================= */
@media print {
  body {
    background: white;
  }

  .progress-container,
  .user-menu,
  .question-nav,
  .btn,
  .notes-section {
    display: none !important;
  }

  section {
    padding: 20px 0;
    page-break-inside: avoid;
  }

  .card,
  .result-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
