/* Ausbildung 2027 auf der Startseite: zwei Azubi-Karten und das
 * Bewerbungsformular (Logik: /assets/angebot/bewerbung.js).
 *
 * Weisser Seitengrund wie der Rest der Seite; nur die beiden Azubi-Karten
 * sind dunkel (Anthrazit) und fallen dadurch auf. Das Formular nutzt die
 * Felder des Angebots-Konfigurators (angebot.css).
 */

.ausbildung {
  scroll-margin-top: 40px;
  padding: 72px 0 84px;
  border-top: 1px solid var(--border);
  background: #fff;
}

/* ------------------------------------------------------------ Kopf */

.az-head { max-width: 760px; margin: 0 0 40px; }

.az-badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  box-shadow: 0 8px 22px rgba(207, 31, 40, .35);
}

.az-head h2 {
  margin: 20px 0 14px;
  font-size: clamp(34px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.02em;
  color: var(--headline-tone);
}
.az-head h2 span { color: var(--brand); }

.az-head p {
  margin: 0;
  max-width: 56ch;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--muted);
}

/* ------------------------------------------------------------ Karten */

.az-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.az-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 28px 28px 26px;
  border-radius: 18px;
  background: #232426;
  border: 1px solid #232426;
  color: #fff;
  box-shadow: 0 14px 34px rgba(20, 21, 23, .16);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), border-color .25s ease, box-shadow .25s ease;
}
.az-card:hover { transform: translateY(-4px); border-color: rgba(207, 31, 40, .7); box-shadow: 0 20px 44px rgba(20, 21, 23, .22); }

.az-card__icon {
  width: 54px; height: 54px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--brand); color: #fff;
  margin-bottom: 18px;
}
.az-card__icon svg { width: 28px; height: 28px; }

.az-card__kicker {
  font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand);
}

.az-card h3 { margin: 6px 0 14px; font-size: clamp(21px, 2.2vw, 26px); font-weight: 800; color: #fff; }

.az-card ul { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 9px; }
.az-card li {
  position: relative; padding-left: 26px;
  font-size: 15.5px; line-height: 1.5; color: rgba(255, 255, 255, .8);
}
.az-card li::before {
  content: ""; position: absolute; left: 0; top: .32em;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--brand)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 11px no-repeat;
}

.az-card__cta { margin-top: auto; align-self: flex-start; }

/* Direkteinstieg fuer Fachkraefte: gleiche Karte, Icon als roter Rahmen
   statt roter Flaeche, damit man die zwei Reihen auseinanderhaelt. */
.az-card--pro .az-card__icon { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }

.az-subhead { max-width: 760px; margin: 52px 0 24px; }
.az-subhead h3 {
  margin: 6px 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--headline-tone);
}
.az-subhead p { margin: 0; color: var(--muted); font-size: clamp(15px, 1.2vw, 17px); line-height: 1.6; }

/* ------------------------------------------------------------ Formular */

.az-form-panel { margin-top: 40px; scroll-margin-top: 110px; }
/* Erst nach "Jetzt bewerben" sichtbar (bewerbung.js), dann sanft hinein. */
.az-form-panel.is-entering { animation: az-form-in 420ms cubic-bezier(.16, 1, .3, 1) both; }
@keyframes az-form-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.az-form { color: var(--text); }
.az-form .ak-form__head h3 { margin-bottom: 6px; }
.az-form__lead { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

.az-choice { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.az-choice legend { width: 100%; margin-bottom: 9px; padding: 0; font-size: 14px; font-weight: 700; color: var(--headline-tone); }
.az-choice .ak-error { width: 100%; }

.az-choice__opt {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border: 1.5px solid rgba(24, 25, 27, .18);
  border-radius: var(--radius-sm);
  font-weight: 700; font-size: 15px;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.az-choice__opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.az-choice__opt:has(input:checked) { border-color: var(--brand); background: rgba(207, 31, 40, .06); }
.az-choice__opt:has(input:focus-visible) { outline: 3px solid rgba(207, 31, 40, .45); outline-offset: 2px; }
.az-choice:has(input[aria-invalid="true"]) .az-choice__opt { border-color: var(--brand); }


/* Felder der jeweils anderen Bewerbungsart (bewerbung.js setzt hidden);
   .ak-field ist sonst display:flex und wuerde hidden ueberstimmen. */
.az-form [data-only][hidden] { display: none; }

/* Der Danke-Zustand ersetzt das Formular: im selben Rahmen wie das Formular. */
.az-form-panel .ak-done { border: 1px solid rgba(24, 25, 27, .12); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }

@media (max-width: 640px) {
  .ausbildung { padding: 64px 0 72px; }
  .az-form .ak-grid { grid-template-columns: 1fr; }
  .az-choice__opt { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .az-card { transition: none; }
  .az-card:hover { transform: none; }
}
