/* ============================================================
   PartyTrailer Krefeld – Stylesheet
   Farben zentral über CSS-Variablen anpassbar.
   ============================================================ */
:root {
  --background: #ffffff;
  --surface: #f5f5f5;
  --text: #171a20;
  --text-light: #5c5e62;
  --primary: #1f6f54;
  --primary-hover: #185a44;
  --border: #d8d8d8;
  --danger: #b3261e;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
p { margin: 0 0 1rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; width: 100%; }
.container--narrow { max-width: 760px; }

/* ---------- Fokuszustände (Barrierefreiheit) ---------- */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, summary:focus-visible,
.choice:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* ============ NAVIGATION ============ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav__logo { font-weight: 700; font-size: 1.15rem; color: var(--text); }
.nav__logo:hover { text-decoration: none; }
.nav__menu { display: flex; align-items: center; gap: 26px; }
.nav__menu a { color: var(--text); font-size: .95rem; font-weight: 500; }
.nav__menu a:hover { color: var(--primary); text-decoration: none; }
.nav__toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--text); transition: .3s; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 26px; border-radius: 100px; font-size: 1rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all .2s ease;
  text-align: center; text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); }
.btn--outline { background: transparent; color: var(--text); border-color: var(--text); }
.btn--outline:hover { background: var(--text); color: #fff; }
.btn--ghost { background: var(--surface); color: var(--text); }
.btn--ghost:hover { background: #e8e8e8; }
.btn--sm { padding: 9px 18px; font-size: .9rem; }
.btn--block { width: 100%; }

/* ============ HERO ============ */
.hero { position: relative; color: #fff; }
.hero__media {
  height: min(80vh, 620px);
  background-image: url("../images/hero-trailer.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #263934;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__placeholder { color: rgba(255,255,255,.55); font-size: 1.1rem; letter-spacing: .05em; }
.hero__content {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(90deg, rgba(0,0,0,.58), rgba(0,0,0,.26), rgba(0,0,0,.18));
}
.hero__content h1 { color: #fff; max-width: 900px; }
.hero__content p { font-size: clamp(1rem, 2vw, 1.35rem); max-width: 640px; color: #f0f0f0; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.hero__actions .btn--outline { color: #fff; border-color: #fff; }
.hero__actions .btn--outline:hover { background: #fff; color: var(--text); }

/* ============ SECTIONS ============ */
.section { padding: 72px 0; }
.section--alt { background: var(--surface); }
.section__title { text-align: center; }
.section__lead { text-align: center; color: var(--text-light); max-width: 640px; margin: 0 auto 2.5rem; }

/* ============ VORTEILE ============ */
.benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-top: 2rem; }
.benefit { background: var(--background); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; text-align: center; box-shadow: var(--shadow-sm); }
.benefit__icon { width: 48px; height: 48px; border-radius: 50%; background: var(--surface); color: var(--primary); font-size: 1.3rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-weight: 700; }
.benefit h3 { font-size: 1.05rem; }
.benefit p { color: var(--text-light); font-size: .92rem; margin: 0; }

/* ============ KONFIGURATOR STEPS ============ */
.step { background: var(--background); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 26px; box-shadow: var(--shadow-sm); }
.step__title { display: flex; align-items: center; gap: 12px; font-size: 1.25rem; }
.step__num { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.step__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* ---------- Choice-Buttons ---------- */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 8px; }
.choice-grid--5 { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.choice {
  background: var(--background); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 20px; cursor: pointer; text-align: left; transition: all .2s ease;
  display: flex; flex-direction: column; gap: 4px; font-family: inherit; font-size: 1rem; color: var(--text);
}
.choice--sm { text-align: center; align-items: center; padding: 16px; font-weight: 600; }
.choice:hover { border-color: var(--primary); }
.choice.is-active { border-color: var(--primary); background: rgba(31,111,84,.06); }
.choice__title { font-weight: 600; font-size: 1.05rem; }
.choice__desc { color: var(--text-light); font-size: .9rem; }

.hint { color: var(--text-light); font-size: .9rem; margin: 12px 0 0; }

/* ============ PRODUKTKARTEN ============ */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-top: 10px; }
.product-card {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--background); display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease;
}
.product-card.is-selected { border-color: var(--primary); box-shadow: var(--shadow); }
.product-card__img {
  height: 220px; background: var(--surface); display: flex; align-items: center; justify-content: center;
  color: var(--text-light); font-size: .85rem; background-size: contain; background-repeat: no-repeat; background-position: center;
}
.product-card__body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card__name { font-weight: 600; font-size: 1.1rem; }
.product-card__desc { color: var(--text-light); font-size: .9rem; flex: 1; }
.product-card__price { font-weight: 700; color: var(--primary); }
.product-card__rec { background: rgba(31,111,84,.1); color: var(--primary-hover); font-size: .82rem; padding: 8px 10px; border-radius: 8px; }
.product-card__controls { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; gap: 10px; }
.qty { display: flex; align-items: center; gap: 10px; }
.qty button {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--background); font-size: 1.3rem; cursor: pointer; line-height: 1; color: var(--text);
}
.qty button:hover { border-color: var(--primary); color: var(--primary); }
.qty output { min-width: 24px; text-align: center; font-weight: 600; }

/* ============ KALENDER ============ */
.calendar { max-width: 340px; margin: 8px 0 20px; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.calendar__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-weight: 600; }
.calendar__header button { background: var(--surface); border: none; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 1.1rem; }
.calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.calendar__dow { font-size: .75rem; color: var(--text-light); padding: 4px 0; }
.calendar__day { padding: 8px 0; border-radius: 8px; font-size: .85rem; cursor: pointer; border: 1px solid transparent; }
.calendar__day:hover { border-color: var(--primary); }
.calendar__day.is-empty { cursor: default; }
.calendar__day.is-blocked { background: #f3d6d4; color: var(--danger); cursor: not-allowed; text-decoration: line-through; }
.calendar__day.is-selected { background: var(--primary); color: #fff; }
.calendar__day.is-past { color: var(--border); cursor: not-allowed; }

/* ============ FORMULARE ============ */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
label { font-size: .9rem; font-weight: 500; }
input, textarea, select {
  font-family: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--background); color: var(--text); width: 100%;
}
input:focus, textarea:focus { border-color: var(--primary); }
input.is-invalid, textarea.is-invalid { border-color: var(--danger); }
textarea { resize: vertical; }

.checkbox { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0; }
.checkbox input { width: auto; margin-top: 4px; }
.checkbox label { font-weight: 400; font-size: .92rem; }

.form-error { color: var(--danger); font-weight: 500; }

/* ============ ZUSAMMENFASSUNG ============ */
.summary { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.summary__row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); font-size: .95rem; }
.summary__row:last-child { border-bottom: none; }
.summary__row span:last-child { font-weight: 600; white-space: nowrap; }
.summary__section { background: var(--surface); font-weight: 600; }
.summary__total { font-size: 1.2rem; font-weight: 700; background: rgba(31,111,84,.08); }
.summary__note { padding: 14px 18px; font-size: .85rem; color: var(--text-light); }
.summary__empty { padding: 24px; text-align: center; color: var(--text-light); }

/* ============ REQUEST RESULT ============ */
.request-result { margin-top: 26px; }
.request-summary {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: .92rem;
}

/* ============ NOTICES ============ */
.notice { border-radius: var(--radius); padding: 16px 18px; margin-bottom: 20px; }
.notice p { margin: 6px 0 0; }
.notice--info { background: rgba(31,111,84,.08); border: 1px solid rgba(31,111,84,.3); }
.notice--warn { background: #fff4e5; border: 1px solid #f0c27b; }

/* ============ STEPS-LIST / FAQ / CONTACT ============ */
.steps-list { list-style: none; padding: 0; max-width: 700px; margin: 0 auto; display: grid; gap: 14px; }
.steps-list li { display: flex; align-items: center; gap: 16px; background: var(--background); padding: 18px 22px; border-radius: var(--radius); border: 1px solid var(--border); }
.steps-list span { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-weight: 700; }

.faq details { border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 18px; margin-bottom: 12px; background: var(--background); }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--primary); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 0 0 14px; color: var(--text-light); }

.contact-card { background: var(--background); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.contact-card p { margin: 4px 0; }

/* ============ DATENSCHUTZ-BANNER ============ */
.privacy-banner {
  position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 200; max-width: 520px; margin: 0 auto;
  background: var(--text); color: #fff; border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.privacy-banner p { margin: 0; font-size: .88rem; flex: 1; min-width: 200px; }

/* ============ FOOTER ============ */
.footer { background: var(--text); color: #fff; padding: 40px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer strong { font-size: 1.1rem; }
.footer__muted { color: #b9bbbd; font-size: .9rem; margin: 4px 0 0; }
.footer__links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer__links a { color: #d0d2d3; font-size: .9rem; }
.footer__links a:hover { color: #fff; }
.footer__admin { opacity: .6; font-size: .82rem; }

/* ============ LEGAL PAGES ============ */
.legal { padding: 48px 0 72px; }
.legal h1 { margin-bottom: 24px; }
.legal h2 { font-size: 1.3rem; margin-top: 32px; }
.legal p, .legal li { color: var(--text); }
.legal .placeholder { background: #fff4e5; padding: 1px 6px; border-radius: 4px; }

/* ============ ADMIN ============ */
.admin-body { background: var(--surface); }
.admin { padding: 32px 0 72px; }
.admin-login { max-width: 460px; margin: 0 auto; }
.card { background: var(--background); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; margin-bottom: 24px; box-shadow: var(--shadow-sm); }
.admin__topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.admin__topactions { display: flex; gap: 10px; }
.admin__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.admin__actions label { cursor: pointer; }
.admin-products { display: flex; flex-direction: column; gap: 16px; }
.admin-product { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; background: var(--surface); }
.admin-product__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.admin-product__head strong { font-size: 1.05rem; }
.admin-product__order { display: flex; gap: 6px; }
.admin-product__order button, .admin-product__del {
  background: var(--background); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: .9rem;
}
.admin-product__del { color: var(--danger); border-color: var(--danger); }
.admin-checkbox { display: flex; align-items: center; gap: 8px; }
.admin-checkbox input { width: auto; }
code { background: var(--surface); padding: 2px 6px; border-radius: 4px; font-size: .9em; }

/* ============ RESPONSIVE ============ */
@media (max-width: 820px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute; top: 64px; left: 0; right: 0; background: var(--background);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a { padding: 14px 20px; }
  .nav__menu .btn { margin: 8px 20px; }
  .nav__menu--static { position: static; display: flex; flex-direction: row; box-shadow: none; border: none; padding: 0; }
  .section { padding: 48px 0; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .step { padding: 18px; }
  .hero__actions { flex-direction: column; width: 100%; }
  .hero__actions .btn { width: 100%; }
}

/* ============ ERFOLGREICH GESPEICHERTE ANFRAGE ============ */
.request-success {
  position: relative;
  overflow: hidden;
  margin-top: 28px;
  padding: clamp(26px, 5vw, 48px);
  border: 1px solid rgba(31,111,84,.28);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(31,111,84,.07), #fff 48%);
  text-align: center;
  box-shadow: var(--shadow);
}
.request-success.is-visible { animation: successCardIn .55s cubic-bezier(.2,.8,.2,1) both; }
.success-animation { position: relative; width: 96px; height: 96px; margin: 0 auto 20px; display: grid; place-items: center; }
.success-check {
  position: relative; z-index: 2; width: 78px; height: 78px; border-radius: 50%;
  display: grid; place-items: center; background: var(--primary); color: #fff;
  font-size: 2.6rem; font-weight: 800; box-shadow: 0 10px 30px rgba(31,111,84,.28);
  animation: successCheckIn .65s cubic-bezier(.17,.89,.32,1.35) .08s both;
}
.success-particles { position: absolute; inset: 50%; width: 0; height: 0; z-index: 1; }
.success-particle {
  position: absolute; left: -4px; top: -7px; width: 8px; height: 14px;
  border-radius: 3px; background: var(--primary); opacity: 0;
  animation: successParticle 1.05s ease-out var(--delay) both;
}
.success-particle:nth-child(3n) { border-radius: 50%; width: 9px; height: 9px; }
.success-particle:nth-child(3n+1) { background: #d6a534; }
.success-particle:nth-child(3n+2) { background: #5f7fd6; }
.success-eyebrow { margin: 0 0 6px; color: var(--primary); font-weight: 750; letter-spacing: .04em; }
.request-success h3 { margin-bottom: 10px; font-size: clamp(1.45rem, 3vw, 2rem); }
.success-message { max-width: 620px; margin: 0 auto 24px; color: var(--text-light); }
.success-message--warning {
  max-width: 680px;
  padding: 12px 16px;
  border: 1px solid #e6b86f;
  border-radius: 10px;
  background: #fff7e8;
  color: #7a4b00;
}

.success-summary {
  max-width: 650px; margin: 0 auto; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; background: #fff; text-align: left;
}
.success-summary__row {
  display: grid; grid-template-columns: minmax(100px, .6fr) minmax(0, 1.4fr);
  gap: 18px; padding: 13px 17px; border-bottom: 1px solid var(--border); align-items: start;
}
.success-summary__row > span { color: var(--text-light); }
.success-summary__row > strong, .success-summary__row > div { text-align: right; }
.success-summary__items { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; }
.success-summary__items li { font-weight: 600; }
.success-summary__total { background: rgba(31,111,84,.08); font-size: 1.08rem; }
.success-summary__note { margin: 0; padding: 11px 17px; color: var(--text-light); font-size: .86rem; text-align: center; }
.success-actions { justify-content: center; }
.btn.is-loading { cursor: wait; opacity: .78; }

@keyframes successCardIn {
  from { opacity: 0; transform: translateY(24px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes successCheckIn {
  0% { opacity: 0; transform: scale(.35) rotate(-18deg); }
  70% { opacity: 1; transform: scale(1.08) rotate(3deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes successParticle {
  0% { opacity: 1; transform: translate(0,0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--x),var(--y)) rotate(var(--r)); }
}
@media (prefers-reduced-motion: reduce) {
  .request-success.is-visible, .success-check, .success-particle { animation: none; }
}
@media (max-width: 560px) {
  .success-summary__row { grid-template-columns: 1fr; gap: 4px; }
  .success-summary__row > strong, .success-summary__row > div { text-align: left; }
  .success-actions .btn { width: 100%; }
}


/* ============ ANFRAGEBEREICH NACH KONFIGURATION ============ */
.request-section.is-revealed {
  animation: request-section-reveal .5s ease both;
}

.continue-error {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(179, 38, 30, .25);
  border-radius: 10px;
  background: rgba(179, 38, 30, .06);
}

@keyframes request-section-reveal {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .request-section.is-revealed {
    animation: none;
  }
}


/* Titelbild auf kleinen Displays sinnvoll ausrichten. */
@media (max-width: 600px) {
  .hero__media {
    height: 540px;
    background-position: 48% center;
  }

  .hero__content {
    background: rgba(0, 0, 0, .38);
  }
}
