/* ============================================================
   KAWE-BAU · BAUFORTSCHRITT-DETAIL: Fortschritts-Ring + Zeitleiste
   Neu gebaut für den statischen Rebuild. Ersetzt zwei WordPress-Plugins,
   deren Funktionalität nicht portierbar ist:
   - "Essential Blocks" Kreis-Fortschrittsbalken  -> .kwp-ring (reines CSS,
     conic-gradient, kein Plugin nötig)
   - "Cool Timeline" (Content Timeline)           -> .kwt-timeline (eigene
     abwechselnde Zeitleiste, gleiche Bild-pro-Kachel-Struktur, plus
     eigene Mini-Lightbox in timeline.js statt der Plugin-Lightbox)
   Design konsequent im hellen Holz-System (Jahresringe, Mono-Eyebrow,
   Akzent #ba5512/#8e3f0b).
   ============================================================ */

.kwp-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 40px 0 16px;
}
.kwp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #8e3f0b;
}
.kwp-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ba5512;
  animation: kwp-pulse 2.4s ease-out infinite;
}
@keyframes kwp-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(186,85,18,.55); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(186,85,18,0); }
}
.kwp-heading {
  margin: 0 0 28px;
  font-family: inherit;
  font-weight: 300;
  text-transform: none;
  letter-spacing: normal;
  font-size: clamp(20px, 2.6vw, 27px);
  color: #1c140d;
}
.kwp-heading b { font-family: inherit; font-weight: 800; color: #8e3f0b; }

.kwp-ring-card {
  display: inline-flex;
  padding: clamp(30px, 4.5vw, 42px);
  border-radius: 20px;
  background: radial-gradient(600px 440px at 30% 15%, #efdbc8 0%, #e7c9ac 55%, #d5a87b 100%);
  border: 1px solid rgba(78, 48, 24, .16);
  box-shadow: 0 10px 34px rgba(70, 47, 27, .16);
}
.kwp-ring {
  --p: 0;
  --size: 172px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(from -90deg, #8e3f0b 0%, #ec883c calc(var(--p) * 1%), rgba(28,20,13,.1) 0);
  position: relative;
}
.kwp-ring--done {
  background: conic-gradient(from -90deg, #227a3a 0%, #6fe08a calc(var(--p) * 1%), rgba(28,20,13,.1) 0);
}
.kwp-ring::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: #f3e0ce;
  box-shadow: inset 0 2px 10px rgba(70,47,27,.14);
}
.kwp-ring-label {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.kwp-ring-label strong {
  display: flex;
  align-items: flex-start;
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  color: #1c140d;
}
.kwp-ring-label strong span { font-size: 20px; font-weight: 700; margin-left: 1px; }
.kwp-ring-label small {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .16em;
  color: #8e3f0b;
  text-transform: uppercase;
}
.kwp-ring.kwp-ring--done .kwp-ring-label small { color: #1f7a34; }
@media (prefers-reduced-motion: reduce) {
  .kwp-dot { animation: none; }
}

.kwt-timeline {
  position: relative;
  max-width: 900px;
  margin: 48px auto;
  padding: 0 8px;
}
.kwt-timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(180deg, transparent 0%, rgba(186,85,18,.4) 6%, rgba(186,85,18,.4) 94%, transparent 100%);
}
.kwt-item {
  position: relative;
  width: 100%;
  margin-bottom: 56px;
  display: grid;
  grid-template-columns: 1fr;
}
.kwt-item:last-child { margin-bottom: 0; }
.kwt-marker {
  position: absolute;
  left: 50%;
  top: 4px;
  width: 34px; height: 34px;
  margin-left: -17px;
  border-radius: 50%;
  background: #ba5512;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 800;
  box-shadow: 0 0 0 6px #ead3bd;
  z-index: 2;
}
.kwt-card {
  width: calc(50% - 40px);
  background: radial-gradient(700px 420px at 20% 10%, #efdbc8 0%, #e7c9ac 60%, #d5a87b 100%);
  border-radius: 16px;
  padding: 24px 26px;
  box-shadow: 0 10px 30px rgba(70,47,27,.14);
}
.kwt-item.kwt-left .kwt-card { margin-right: auto; }
.kwt-item.kwt-right .kwt-card { margin-left: auto; }
.kwt-date {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #8e3f0b;
  margin: 0 0 8px;
}
.kwt-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: #1c140d;
  line-height: 1.3;
}
.kwt-card p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(28,20,13,.75);
}
.kwt-card p:last-of-type { margin-bottom: 14px; }
.kwt-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}
.kwt-gallery button {
  border: none;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
  background: none;
}
.kwt-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.kwt-gallery button:hover img { transform: scale(1.08); }

@media (max-width: 760px) {
  .kwt-timeline::before { left: 20px; }
  .kwt-marker { left: 20px; }
  .kwt-card,
  .kwt-item.kwt-left .kwt-card,
  .kwt-item.kwt-right .kwt-card {
    width: calc(100% - 56px);
    margin-left: auto;
    margin-right: 0;
  }
}

/* ---------- Mini-Lightbox ---------- */
.kwt-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(16,13,9,.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.kwt-lightbox.kwt-open { display: flex; }
.kwt-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.kwt-lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
