/*   Farbvariablen und Grundlayout --> übernommen von dem CI/CD */
:root {
  --marian-blue: #283583; /* Hauptfarbe (Blau) */
  --warmrot: #d94a38; /* Für Fehlermeldungen / Kontraste */
  --soft-white: #f4f4f2; /* Hintergrundfarbe / Flächen */
  --ultra-black: #1d1d1b; /* Text und Flächen */
  --silver: #a5a5a5; /* Sekundärtextfarbe */
  --font: 'Poppins', sans-serif; /* Hauptschriftart */
}

* {
  box-sizing: border-box; /* Einheitliches Box-Modell */
}

body {
  font-family: var(--font);
  margin: 0;
  padding: 0;
  color: var(--ultra-black);
  background-color: var(--soft-white);
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Für Sticky Footer */
}

/*  Formularelemente */
input,
select,
textarea {
  width: 100%;
  max-width: 400px;
  padding: 0.6rem 0.9rem;
  margin-top: 0.3rem;
  border: 1px solid #444;
  border-radius: 6px;
  background-color: #222;
  color: white;
  font-size: 1rem;
}

input::placeholder {
  color: #888;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

label {
  display: block;
  margin-top: 1.2rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--silver);
}

h2 {
  margin-bottom: 1rem;
  color: var(--soft-white);
}

/* Buttons */
.btn-primary,
.btn-secondary {
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background-color: var(--marian-blue);
  color: white;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background-color: var(--ultra-black);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid white;
  color: white;
}

.btn-secondary:hover {
  background-color: white;
  color: var(--ultra-black);
}

/* Header-Navigation */
.site-header {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 1rem 2rem;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  width: 100%;
}

.logo {
  height: 50px;
}

.main-nav {
  display: flex;
  gap: 1rem;
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero-background {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.hero-slides {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  height: 100%;
  width: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  flex: 0 0 100%;
  background: center / cover no-repeat;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 0;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4); /* Verdunklung für besseren Kontrast */
}

.hero-content {
  position: relative;
  z-index: 10;
  padding: 2rem;
  max-width: 700px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

/* Buttons im Hero */
.titel-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  opacity: 0;
  transform: translateY(40px);
  animation: slideUpFade 1s ease-out 1.2s forwards;
}

/*  Animationen */
@keyframes slideUpFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-body {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-body.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Fehlerzustände */
.error {
  border-color: var(--warmrot) !important;
  box-shadow: 0 0 0 2px rgba(217, 74, 56, 0.3) !important;
}

.error-text {
  color: var(--warmrot);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

/* Footer */
.site-footer {
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.75rem;
  font-weight: 300;
  z-index: 1000;
}

.site-footer a {
  color: white;
  text-decoration: underline;
  font-weight: 400;
}

/* Formularbereich */
.form-background {
  background-color: #111;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  min-height: 100vh;
}

.form-wrapper {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 1100px;
  background-color: var(--ultra-black);
  color: var(--soft-white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 1;
}

/* Bildbereich links im Formular */
.form-image {
  flex: 1;
  background: url('../assets/hero1.jpg') no-repeat center center / cover;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 400px;
  color: white;
}

/* Text im Bildbereich */
.form-text h1 {
  font-size: 1.4rem;
  text-align: center;
}

.form-text p {
  font-size: 1rem;
  line-height: 1.4;
  margin-top: 0.5rem;
}

/* Eingabebereich im Formular */
.form-box {
  flex: 1;
  padding: 3rem;
  background-color: var(--ultra-black);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-nav {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Fortschrittsanzeige */
.progressbar-container {
  width: 100%;
  max-width: 1100px;
  margin: 2rem auto 0;
  padding: 0 2rem;
}

.progressbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 0.5rem;
}

.progressbar-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.progressbar-step.active {
  background-color: var(--marian-blue);
}

/* Linie zwischen den Schritten */
.progressbar-line {
  flex: 1;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.progressbar-line::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--marian-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease-in-out;
}

.progressbar-line.filled::before {
  transform: scaleX(1);
}

/* Weitere Layouts */
.design-element {
  position: absolute;
  top: 80px;
  left: -100px;
  width: 600px;
  height: 600px;
  background: url('../assets/gestaltungselement.png') no-repeat center center;
  background-size: contain;
  opacity: 0.45;
  pointer-events: none; /* Klicks blockieren */
}

#validation h2 {
  color: var(--soft-white);
  text-align: center;
  margin-bottom: 2rem;
}

#input {
  width: 100%;
  border-collapse: collapse;
  background-color: #222;
  color: var(--soft-white);
  border-radius: 12px;
}

#input th,
#input td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #333;
}

#input tr:last-child td {
  border-bottom: none;
}

/* Für Mobile First brauchte ich Hilfe von AI */
@media (max-width: 768px) {
  html,
  body {
    font-size: 15px;
    height: auto;
    overflow-x: hidden;
  }

  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  .site-header {
    padding: 0.8rem 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .logo {
    height: 40px;
  }

  .main-nav {
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .main-nav .btn-primary,
  .main-nav .btn-secondary {
    display: none;
  }

  .nav-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
  }

  .title-content {
    padding: 2rem 1rem;
    text-align: center;
    max-width: 95%;
  }

  .title-content h1 {
    font-size: 1.4rem;
    line-height: 1.4;
    margin-bottom: 1.2rem;
  }

  .title-content p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
  }

  .titel-buttons {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 1rem;
    font-size: 1.05rem;
    border-radius: 8px;
  }

  .form-background {
    padding: 1rem;
    min-height: 0;
  }

  .form-wrapper {
    flex-direction: column;
    padding: 0;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
  }

  .form-image {
    order: 0;
    width: 100%;
    height: 220px;
    padding: 1rem;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
  }

  .form-text h1 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
  }

  .form-text p {
    font-size: 1rem;
    line-height: 1.5;
  }

  .form-box {
    width: 100%;
    padding: 1.5rem 1rem;
  }

  input,
  select,
  textarea {
    width: 100%;
    font-size: 1rem;
  }

  label {
    font-size: 0.9rem;
    margin-top: 1rem;
  }

  .btn-primary {
    font-size: 1.1rem;
    padding: 1rem;
    border-radius: 8px;
  }

  .form-nav {
    gap: 1rem;
  }

  .progressbar-container {
    padding: 0 1rem;
    margin-bottom: 1rem;
  }

  .progressbar-step {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }

  .progressbar-line {
    height: 3px;
  }

  .form-wrapper.dark {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 12px;
    box-shadow: none;
    width: 100%;
  }

  #validation h2 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
  }

  #input {
    display: block;
    overflow-x: auto;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  #input th,
  #input td {
    padding: 0.6rem 0.8rem;
    font-size: 0.95rem;
    word-break: break-word;
  }

  #input th {
    font-size: 1.05rem;
  }

  #validation p {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
  }

  .site-footer {
    z-index: 1;
    font-size: 0.75rem;
    padding: 0.8rem 1rem;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.4);
  }

  .design-element {
    width: 300px;
    height: 300px;
    top: 40px;
    left: -80px;
    background-size: 90%;
    opacity: 0.45;
  }
}
