/* ==========================================================================
   BUHA — Komponenten (Designsystem 6, 10)
   Buttons, Cards, Teaser, Vorteile, Prozess, Formulare, Hinweisbox,
   Trust-Elemente, Akkordeon, Kostenrechner, Cookie-Banner u. a.
   ========================================================================== */

/* ==========================================================================
   Icon-Basis (Designsystem 8.3)
   Jedes .icon ist standardmäßig 1.25rem groß; einzelne Kontexte überschreiben.
   Das injizierte SVG füllt den .icon-Container vollständig.
   ========================================================================== */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
}

.icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================================================
   6.1 Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: 48px;
  padding-inline: var(--s-5);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 150ms ease-out, transform 150ms ease-out,
    border-color 150ms ease-out;
}

.btn .icon {
  width: 20px;
  height: 20px;
}

.btn--lg {
  height: 56px;
  padding-inline: var(--s-6);
}

.btn--sm {
  height: 40px;
  padding-inline: var(--s-4);
  font-size: 0.9375rem;
}

/* Primär — Bernstein-Fläche, NAVY-Text (Designsystem 2.6 / 6.1) */
.btn--primary {
  background: var(--c-amber-500);
  color: var(--c-navy-900);
}

.btn--primary:hover {
  background: var(--c-amber-400);
  color: var(--c-navy-900);
  transform: translateY(-1px);
}

.btn--primary:active {
  background: var(--c-amber-600);
  transform: translateY(0);
}

/* Sekundär — weiße Fläche, Navy-Rahmen */
.btn--secondary {
  background: var(--c-surface);
  color: var(--c-navy-700);
  border-color: var(--c-navy-700);
}

.btn--secondary:hover {
  background: var(--c-navy-050);
  color: var(--c-navy-700);
}

.btn--secondary:active {
  background: var(--c-navy-100);
}

/* Tertiär / Text */
.btn--text {
  height: auto;
  padding: 0;
  background: none;
  color: var(--c-navy-600);
  font-weight: 600;
}

.btn--text:hover {
  color: var(--c-navy-700);
  text-decoration: underline;
}

/* Auf-Dunkel sekundär */
.btn--ondark {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn--ondark:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* WhatsApp-Button (Designsystem 6.12) — dunkles Label */
.btn--whatsapp {
  background: var(--c-whatsapp);
  color: var(--c-navy-900);
}

.btn--whatsapp:hover {
  background: var(--c-whatsapp-dark);
  color: var(--c-navy-900);
}

/* Ghost-Icon-Button (Header Telefon/WhatsApp) */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  color: var(--c-navy-700);
  background: transparent;
  text-decoration: none;
}

.btn-icon:hover {
  background: var(--c-navy-050);
  color: var(--c-navy-700);
}

.btn-icon.btn-icon--whatsapp:hover {
  background: rgba(37, 211, 102, 0.12);
}

/* Telefon-Link im Header (Tertiär) */
.phone-link {
  align-items: center;
  gap: var(--s-2);
  color: var(--c-navy-700);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
}

.phone-link:hover {
  color: var(--c-navy-600);
}

/* Deaktiviert (alle Varianten) */
.btn:disabled,
.btn[aria-disabled="true"] {
  background: var(--c-line);
  color: var(--c-ink-300);
  border-color: var(--c-line);
  cursor: not-allowed;
  transform: none;
}

/* Lade-Zustand */
.btn[aria-busy="true"] {
  position: relative;
  color: transparent !important;
}

.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--c-navy-900);
  animation: btn-spin 0.7s linear infinite;
}

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

.btn-block {
  width: 100%;
}

/* Volle Breite mobil bei Button-Paaren */
@media (max-width: 599px) {
  .hero-actions .btn,
  .cta-band .hero-actions .btn {
    width: 100%;
  }
}

/* ==========================================================================
   6.4 / 6.5 Cards & Leistungs-Teaser
   ========================================================================== */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  height: 100%;
}

@media (min-width: 1024px) {
  .card {
    padding: var(--s-6);
  }
}

.card h2,
.card h3 {
  margin-bottom: var(--s-2);
}

.card p {
  color: var(--c-ink-700);
}

/* klickbare Karte */
.card--link {
  text-decoration: none;
  transition: box-shadow 150ms ease-out, border-color 150ms ease-out,
    transform 150ms ease-out;
}

.card--link:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--c-navy-100);
  transform: translateY(-2px);
}

.card-link-more {
  margin-top: auto;
  padding-top: var(--s-4);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--c-navy-600);
  font-weight: 600;
  font-size: 0.9375rem;
}

.card--link:hover .card-link-more {
  color: var(--c-navy-700);
}

/* Icon-Kreis (Leistungs-Teaser) */
.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--c-navy-100);
  color: var(--c-navy-700);
  display: grid;
  place-items: center;
  margin-bottom: var(--s-4);
}

.card-icon .icon {
  width: 28px;
  height: 28px;
}

/* B2B-Karte: Amber-Marker oben (Designsystem 6.5) */
.card--b2b {
  border-top: 4px solid var(--c-amber-500);
}

/* ==========================================================================
   6.6 Vorteils-Kacheln
   ========================================================================== */
.feature {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.feature .feature-icon {
  color: var(--c-amber-600);
  margin-bottom: var(--s-2);
}

/* Icon-Größe 32px in allen .feature-icon-Kontexten (Vorteile + Prozess) */
.feature-icon .icon {
  width: 32px;
  height: 32px;
}

/* Kachel-Titel: semantisch <h3>, visuell t-h4-Stil (Design-System 3.5/6.6,
   Rev. 2 — Klärung D-2). Markup: <h3 class="t-h4">…</h3>. h4 bleibt als
   Selektor erhalten für Hinweisbox-Titel innerhalb von .feature (falls genutzt). */
.feature h3,
.feature h4 {
  color: var(--c-navy-700);
}

.feature p {
  font-size: 0.9375rem;
  color: var(--c-ink-700);
}

/* ==========================================================================
   6.7 Prozess-Schritte
   ========================================================================== */
.process {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
  position: relative;
}

@media (min-width: 1024px) {
  .process {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-8);
  }
}

.process-step {
  position: relative;
}

.process-num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 3rem;
  line-height: 1;
  color: var(--c-amber-400);
  -webkit-text-stroke: 1px var(--c-amber-500);
  margin-bottom: var(--s-3);
}

.process-step .feature-icon {
  color: var(--c-navy-700);
  margin-bottom: var(--s-3);
}

/* Schritt-Titel: semantisch <h3>, visuell t-h4-Stil (Design-System 3.5/6.7,
   Rev. 2 — Klärung D-2). Markup: <h3 class="t-h4">…</h3>. */
.process-step h3,
.process-step h4 {
  margin-bottom: var(--s-2);
}

/* Verbindungslinie Desktop */
@media (min-width: 1024px) {
  .process::before {
    content: "";
    position: absolute;
    top: 24px;
    left: 16%;
    right: 16%;
    border-top: 2px dashed var(--c-navy-100);
    z-index: 0;
  }
  .process-step {
    z-index: 1;
  }
}

/* ==========================================================================
   6.9 Hinweisbox / Trust-Box / § 6 StBerG-Box
   ========================================================================== */
.notice {
  border-radius: var(--r-md);
  padding: var(--s-5);
  display: flex;
  gap: var(--s-4);
}

.notice .notice-icon {
  flex-shrink: 0;
}

.notice .notice-icon .icon {
  width: 24px;
  height: 24px;
}

/* Box-Titel: Hinweis-/Trust-Box-Titel sind Labels, keine Gliederungs-
   Headings (Design-System 6.9, Rev. 2) — gesetzt als
   <p class="box-title t-h4">. Die Regel sichert den t-h4-Stil mit
   ausreichender Spezifität gegen kontextbezogene .notice/.embed p-Regeln.
   h4 bleibt als Selektor für Abwärtskompatibilität erhalten. */
p.box-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.35;
  color: var(--c-navy-700);
}

.notice h4,
.notice .box-title {
  margin-bottom: var(--s-2);
}

.notice p:not(.box-title) {
  font-size: 0.9375rem;
}

/* Info-/Trust-Box */
.notice--info {
  background: var(--c-navy-050);
  border-left: 4px solid var(--c-navy-600);
}

.notice--info .notice-icon {
  color: var(--c-navy-700);
}

/* § 6 StBerG-Hinweisbox */
.notice--stberg {
  background: var(--c-warning-bg);
  border-left: 4px solid var(--c-amber-600);
}

.notice--stberg .notice-icon {
  color: var(--c-amber-600);
}

.notice--stberg h4,
.notice--stberg .box-title {
  color: var(--c-navy-700);
}

/* Erfolg / Fehler */
.notice--success {
  background: var(--c-success-bg);
  border-left: 4px solid var(--c-success);
}

.notice--success .notice-icon { color: var(--c-success); }

.notice--error {
  background: var(--c-error-bg);
  border-left: 4px solid var(--c-error);
}

.notice--error .notice-icon { color: var(--c-error); }

/* Entwickler-/Redaktions-Hinweis (Lohn-Seite, § 6 Nr. 4 StBerG) */
.dev-note {
  background: repeating-linear-gradient(
    45deg,
    var(--c-warning-bg),
    var(--c-warning-bg) 16px,
    #f7e0c2 16px,
    #f7e0c2 32px
  );
  border: 2px dashed var(--c-amber-600);
  border-radius: var(--r-md);
  padding: var(--s-5);
  color: var(--c-navy-900);
}

.dev-note strong {
  color: var(--c-navy-900);
}

.dev-note .dev-note-label {
  display: inline-block;
  background: var(--c-amber-600);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px var(--s-2);
  border-radius: 4px;
  margin-bottom: var(--s-2);
}

/* ==========================================================================
   6.10 Trust-/Vertrauens-Elemente
   ========================================================================== */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: 40px;
  padding-inline: var(--s-4);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-navy-700);
  white-space: nowrap;
}

.trust-badge .icon {
  width: 18px;
  height: 18px;
  color: var(--c-success);
}

/* auf dunklem Grund */
.hero--dark .trust-badge,
.section--navy .trust-badge {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.hero--dark .trust-badge .icon,
.section--navy .trust-badge .icon {
  color: var(--c-amber-400);
}

/* Pill / Tag / Kategorie */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 4px var(--s-3);
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--c-navy-100);
  color: var(--c-navy-700);
}

.pill--amber {
  background: var(--c-amber-100);
  color: var(--c-amber-600);
}

/* Reaktionszeit-Versprechen-Badge */
.response-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-success);
}

/* Testimonial-Card */
.testimonial {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--s-6);
  position: relative;
}

.testimonial::before {
  content: "\201C";
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 0.6;
  color: var(--c-amber-100);
  position: absolute;
  top: var(--s-5);
  left: var(--s-5);
}

.testimonial blockquote {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--c-ink-900);
  position: relative;
  margin-bottom: var(--s-4);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-navy-100);
  display: grid;
  place-items: center;
  color: var(--c-navy-700);
  font-weight: 600;
  flex-shrink: 0;
}

.testimonial-author cite {
  font-style: normal;
}

.testimonial-author .ta-name {
  display: block;
  font-weight: 600;
  color: var(--c-navy-700);
}

.testimonial-author .ta-role {
  display: block;
  font-size: 0.8125rem;
  color: var(--c-ink-500);
}

/* Qualifikations-Block */
.qual-card {
  display: flex;
  gap: var(--s-5);
  align-items: flex-start;
  background: var(--c-navy-050);
  border-radius: var(--r-md);
  padding: var(--s-6);
}

.qual-card .qual-photo {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: var(--r-md);
  background: var(--c-navy-100);
  display: grid;
  place-items: center;
  color: var(--c-navy-700);
}

/* ==========================================================================
   6.8 Formulare & Inputs
   ========================================================================== */
.form-field {
  margin-bottom: var(--s-5);
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--c-ink-700);
  margin-bottom: var(--s-2);
}

.form-label .req {
  color: var(--c-error);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--s-3) var(--s-4);
  font-size: 1rem; /* verhindert iOS-Zoom */
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  color: var(--c-ink-900);
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

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

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--c-ink-300);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-width: 2px;
  border-color: var(--c-navy-600);
  box-shadow: 0 0 0 3px rgba(30, 74, 140, 0.2);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  background: var(--c-bg-soft);
  color: var(--c-ink-300);
}

.form-help {
  margin-top: var(--s-2);
  font-size: 0.9375rem;
  color: var(--c-ink-500);
}

/* Fehlerzustand */
.form-field.has-error .form-input,
.form-field.has-error .form-select,
.form-field.has-error .form-textarea {
  border-width: 2px;
  border-color: var(--c-error);
}

.form-error {
  display: none;
  margin-top: var(--s-2);
  font-size: 0.9375rem;
  color: var(--c-error);
  align-items: center;
  gap: var(--s-1);
}

.form-field.has-error .form-error {
  display: flex;
}

.form-error .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Checkbox / Radio */
.choice {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  min-height: 44px;
  padding-block: var(--s-2);
  cursor: pointer;
}

.choice input {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  flex-shrink: 0;
  accent-color: var(--c-navy-700);
  cursor: pointer;
}

.choice span {
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* DSGVO-Einwilligung */
.consent {
  font-size: 0.875rem;
}

/* Formular-Aktionen */
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
}

@media (min-width: 600px) {
  .form-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 599px) {
  .form-actions .btn {
    width: 100%;
  }
}

/* Fehlerzusammenfassung */
.form-summary-error {
  display: none;
}

.form-summary-error.is-visible {
  display: flex;
}

/* ==========================================================================
   6.13 Akkordeon / FAQ
   ========================================================================== */
.accordion {
  border-top: 1px solid var(--c-line);
}

.accordion-item {
  border-bottom: 1px solid var(--c-line);
}

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  width: 100%;
  padding: var(--s-4) var(--s-3);
  text-align: left;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--c-navy-700);
}

.accordion-trigger:hover {
  background: var(--c-navy-050);
}

.accordion-trigger .acc-icon {
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.accordion-trigger[aria-expanded="true"] .acc-icon {
  transform: rotate(180deg);
}

.accordion-panel {
  overflow: hidden;
  padding: 0 var(--s-3);
  max-height: 0;
  transition: max-height 250ms ease, padding 250ms ease;
}

.accordion-panel[hidden] {
  display: block; /* override, wir steuern per max-height */
}

.accordion-item.is-open .accordion-panel {
  max-height: 600px;
  padding-bottom: var(--s-5);
}

.accordion-panel p {
  font-size: 0.9375rem;
  color: var(--c-ink-700);
}

@media (prefers-reduced-motion: reduce) {
  .accordion-panel {
    transition: none;
  }
}

/* ==========================================================================
   6.12 Klick-to-load Embed-Platzhalter (Terminbuchung / Karte)
   ========================================================================== */
.embed-placeholder {
  background: var(--c-navy-050);
  border: 1px dashed var(--c-line);
  border-radius: var(--r-md);
  padding: var(--s-7) var(--s-5);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
}

.embed-placeholder .icon {
  width: 40px;
  height: 40px;
  color: var(--c-navy-700);
}

.embed-placeholder h4,
.embed-placeholder .box-title {
  color: var(--c-navy-700);
}

.embed-placeholder p:not(.box-title) {
  font-size: 0.9375rem;
  max-width: 32rem;
}

.embed-loaded {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--c-line);
}

.embed-loaded iframe {
  display: block;
  width: 100%;
  border: 0;
}

/* ==========================================================================
   6.14 Modal / Dialog
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: rgba(11, 27, 51, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--s-5);
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  max-width: 560px;
  width: 100%;
  padding: var(--s-6);
  position: relative;
  z-index: var(--z-modal);
}

.modal-close {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
}

/* ==========================================================================
   Cookie-/Consent-Banner (Konzept 10.4)
   ========================================================================== */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-cookie);
  background: var(--c-surface);
  border-top: 2px solid var(--c-navy-700);
  box-shadow: 0 -16px 48px rgba(11, 27, 51, 0.16);
  padding: var(--s-5);
}

@media (min-width: 1024px) {
  .cookie-banner {
    padding: var(--s-5) var(--s-6);
  }
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-inner {
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

@media (min-width: 1024px) {
  .cookie-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cookie-text {
  font-size: 0.9375rem;
}

.cookie-text h4 {
  margin-bottom: var(--s-1);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  flex-shrink: 0;
}

@media (max-width: 599px) {
  .cookie-actions .btn {
    flex: 1;
  }
}

/* ==========================================================================
   Toast (Formular-Feedback)
   ========================================================================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  background: var(--c-navy-900);
  color: #fff;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.9375rem;
}

.toast[hidden] {
  display: none;
}

/* ==========================================================================
   Statistik-/Fakten-Reihe
   ========================================================================== */
.stat-row {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .stat-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  text-align: center;
}

.stat .stat-num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2.25rem;
  color: var(--c-navy-700);
  line-height: 1.1;
}

.section--navy .stat .stat-num {
  color: var(--c-amber-400);
}

.stat .stat-label {
  font-size: 0.875rem;
  color: var(--c-ink-500);
  margin-top: var(--s-1);
}

.section--navy .stat .stat-label {
  color: rgba(255, 255, 255, 0.72);
}
