body {
  font-family: Arial, sans-serif;
  scroll-behavior: smooth;
}

/* Smooth fade-in/out for sections */
.page-section {
  transition: opacity 0.5s ease, transform 0.5s ease;
  opacity: 1;
}

.hidden-section {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

/* Hero Section */
.hero {
  background: url('../img/header.jpg') no-repeat center center;
  background-size: cover;
  color: #fff;
  padding: 120px 20px;
  text-align: center;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: bold;
}

.hero p {
  font-size: 1.3rem;
  margin-top: 1rem;
}

.cta-section {
  background: #721c24;
  color: #fff;
  padding: 50px 20px;
  text-align: center;
  border-radius: 12px;
}

.cta-section a.btn {
  font-size: 1.2rem;
  padding: 12px 30px;
}

.feature-icon {
  font-size: 2rem;
  color: #721c24;
}

footer {
  background: #f8f9fa;
  padding: 20px 0;
}

/* Section spacing */
section {
  padding-top: 60px;
  padding-bottom: 60px;
}

a {
  color: #721c24;
  text-decoration: none;
  transition: color 0.3s, transform 0.2s;
}

a:hover {
  color: #721c24;
  text-decoration: underline;
  transform: translateY(-1px);
}

#suggestions {
  list-style: none;
  padding: 0;
  margin: 0;
  z-index: 1000;
}

#suggestions li:hover {
  background-color: #eee;
  cursor: pointer;
}

/* --- Fix: Überschriften / Labels im Formular linksbündig --- */
#kontakt-section,
#kontakt-section * {
  text-align: left !important;
}

/* --- Formular-Layout --- */
#kontakt-section .form-label {
  display: block;
  width: 100%;
  margin-bottom: 4px;
  color: #f8f9fa;
  /* Weiß auf dunklem Hintergrund */
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Pflichtstern */
#kontakt-section .form-label .text-danger {
  font-weight: 600;
  font-size: 1rem;
  color: #ff8080 !important;
  margin-left: 2px;
}

/* Eingabefelder mit Icon */
#kontakt-section .input-group-text {
  border: none;
  border-radius: 6px 0 0 6px;
  background: #fff;
  color: #721c24;
  min-width: 46px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#kontakt-section input,
#kontakt-section textarea {
  border: none;
  border-radius: 0 6px 6px 0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
  padding: 12px 14px;
  font-size: 1rem;
}

#kontakt-section input:focus,
#kontakt-section textarea:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 77, 79, 0.4);
  outline: none;
}

/* --- Button --- */
#kontakt-section .btn-light {
  background: #fff;
  color: #721c24;
  border: none;
  font-size: 1rem;
}

#kontakt-section .btn-light:hover {
  background: #f8f9fa;
  color: #721c24;
}

#kontakt-section .btn:focus {
  box-shadow: none !important;
}


/* --- Verbessertes Fehler-Feedback im Formular --- */
#kontakt-section .is-invalid {
  border: 2px solid #ff4d4f !important;
  box-shadow: 0 0 6px rgba(255, 77, 79, 0.4);
  background-color: #fff0f0;
  transition: all 0.2s ease-in-out;
}

#kontakt-section input.is-invalid:focus,
#kontakt-section textarea.is-invalid:focus {
  border-color: #ff1f1f !important;
  box-shadow: 0 0 0 0.25rem rgba(255, 77, 79, 0.5);
  background-color: #ffeaea;
}

/* Validierte Felder: dezentes Grün */
#kontakt-section .is-valid {
  border: 2px solid #28a745 !important;
  box-shadow: 0 0 4px rgba(40, 167, 69, 0.3);
  background-color: #f6fff6;
}

/* --- Fehlermeldung optisch verbessert --- */
#kontakt-section .invalid-feedback {
  display: block;
  color: #ffb3b3;
  font-size: 0.9rem;
  margin-top: 3px;
  padding-left: 50px;
  /* bündig unter Icon */
  font-weight: 500;
  animation: fadeIn 0.3s ease;
}

/* Standard: Fehlermeldungen verstecken */
.invalid-feedback {
  display: none;
}

/* Nur zeigen, wenn das Feld invalid ist UND validiert oder berührt wurde */
.was-validated :invalid~.invalid-feedback,
.was-touched:invalid~.invalid-feedback {
  display: block;
}


/* Sanfte Animation beim Erscheinen */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Eingabefelder-Icons ebenfalls farblich reagieren */
#kontakt-section .input-group-text {
  transition: background-color 0.2s ease, color 0.2s ease;
}

#kontakt-section .is-invalid~.input-group-text,
#kontakt-section .input-group:has(input.is-invalid) .input-group-text {
  background: #ff4d4f !important;
  color: #fff !important;
}

#kontakt-section .is-valid~.input-group-text,
#kontakt-section .input-group:has(input.is-valid) .input-group-text {
  background: #28a745 !important;
  color: #fff !important;
}

/* --- Fix: Nur das Formular im CTA-Abschnitt links ausrichten --- */
#kontakt-section form,
#kontakt-section form * {
  text-align: left !important;
}

/* --- Inline-Alert Stil --- */
#form-message {
  transition: opacity 0.5s ease, max-height 0.5s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-bottom: 0;
}

#form-message:not(.d-none) {
  opacity: 1;
  max-height: 200px;
  margin-bottom: 15px;
}

/* Alerts im Stil deines Themas */
#form-message.alert-success {
  background: #28a745;
  color: #fff;
  border: none;
}

#form-message.alert-danger {
  background: #dc3545;
  color: #fff;
  border: none;
}

#form-message.alert-info {
  background: #ffc107;
  color: #212529;
  border: none;
}

#form-message {
  transition: opacity 0.4s ease;
}

#form-message.d-none {
  opacity: 0;
}