.projekt-main {
  padding-left: var(--frame);
  padding-right: var(--frame);
  padding-bottom: var(--footer-h, 40px);
  border-bottom: 1px solid var(--line);
}


/* SLIDER */
.slider {
  width: min(100%, var(--grid-max));
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.slider-track {
  display: contents;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.slide.active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

.slide img {
  display: block;
  width: calc(100% - 16px);
  margin: 8px;
  max-height: 70vh;
  object-fit: cover;
  border-radius: 8px;
}

/* Querformat: natürliche Breite, kein festes Verhältnis */
@media (orientation: landscape) {
  .slide img {
    aspect-ratio: auto;
    max-height: 80vh;
  }
}

/* Hochformat: quadratisch */
@media (orientation: portrait) {
  .slide img {
    aspect-ratio: 1 / 1;
    max-height: none;
  }
}

.slide.exiting {
  position: absolute !important;
  inset: 0;
  opacity: 1;
  pointer-events: none;
}

.slide.enter-right,
.slide.enter-left  { transition: transform 320ms ease; }
.slide.exit-left   { transition: transform 320ms ease; }
.slide.exit-right  { transition: transform 320ms ease; }

/* PFEILE */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  color: #fff;
  opacity: 0.6;
  transition: opacity 200ms ease;
  line-height: 0;
  z-index: 10;
}

.slider-btn:hover { opacity: 1; }
.slider-prev { left: 12px; }
.slider-next { right: 12px; }

.slider-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1;
  fill: none;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

/* DOTS */
.slider-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  transition: background 250ms ease, transform 250ms ease;
}

.dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* Slider füllt exakt den sichtbaren Bereich */
.slider--full {
  height: calc(100vh - var(--header-h, 80px) - var(--footer-h, 40px));
}

.slider--full .slide img {
  max-height: none;
  height: 100%;
  object-fit: cover;
}

/* Inhalt untereinander: Titel oben, Text darunter */
.projekt-content--stack {
  grid-template-columns: 1fr !important;
  gap: 32px !important;
}

.projekt-content {
  width: min(100%, var(--grid-max));
  margin: 0 auto;
  padding: 40px var(--pad);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}

.projekt-nr {
  display: block;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.4;
  margin-bottom: 20px;
}

.projekt-titel {
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.projekt-untertitel {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.4;
  margin: 0;
}

.projekt-body {
  font-size: 13px;
  line-height: 1.8;
  opacity: 0.6;
}

.projekt-body p {
  margin: 0 0 1em;
}

.projekt-specs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-left: calc(-1 * var(--pad));
  margin-right: calc(-1 * var(--pad));
  padding: 28px var(--pad) 0;
  border-top: 1px solid var(--line);
}

.projekt-spec {
  display: flex;
  gap: 20px;
  font-size: 11px;
  line-height: 1.6;
}

.projekt-spec-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.4;
  width: 88px;
  flex-shrink: 0;
}

.projekt-spec-value {
  opacity: 0.65;
}

@media (max-width: 600px) {
  .projekt-content {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* TITELBILD (Hero ohne Slider) */
.projekt-hero-wrapper {
  width: min(100%, var(--grid-max));
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.projekt-hero-img {
  display: block;
  width: calc(100% - 16px);
  margin: 8px;
  max-height: 80vh;
  object-fit: cover;
  border-radius: 8px;
}

/* 3-spaltig gleichmäßig */
.projekt-grid--3col {
  grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 600px) {
  .projekt-grid--3col {
    grid-template-columns: 1fr !important;
  }
}

/* BILDGRID */
.projekt-grid-wrapper {
  width: min(100%, var(--grid-max));
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding-bottom: 60px;
}

.projekt-grid-label {
  padding: 60px var(--pad) 16px;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.4;
  border-bottom: 1px solid var(--line);
}

.projekt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.projekt-kachel {
  aspect-ratio: 1 / 1;
  background: var(--bg);
  position: relative;
}


.projekt-kachel img,
.projekt-hero-img,
.slide img {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='12' fill='none' stroke='%23111111' stroke-width='1'/%3E%3Cline x1='16' y1='11' x2='16' y2='21' stroke='%23111111' stroke-width='1'/%3E%3Cline x1='11' y1='16' x2='21' y2='16' stroke='%23111111' stroke-width='1'/%3E%3C/svg%3E") 16 16, crosshair;
}

.projekt-kachel img {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

@media (max-width: 600px) {
  .pdf-kachel {
    aspect-ratio: 1 / 1 !important;
  }
}

/* Platzhalter wenn Bild fehlt */
.projekt-kachel img[src=""] ,
.projekt-kachel img:not([src]) {
  display: none;
}

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

/* 3-spaltig oben, letztes Bild quer */
.projekt-grid--3top {
  grid-template-columns: repeat(3, 1fr) !important;
}

.projekt-grid--3top .projekt-kachel:last-child:nth-child(3n+1) {
  grid-column: 1 / -1;
  aspect-ratio: 3 / 1;
}

/* 2-spaltig: Querformat 2 Spalten, Hochformat 1 Spalte */
.projekt-grid--2col {
  grid-template-columns: repeat(2, 1fr) !important;
}

@media (orientation: portrait) {
  .projekt-grid--2col {
    grid-template-columns: 1fr !important;
  }
}

.projekt-grid--2col .projekt-kachel:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  aspect-ratio: 2 / 1;
}

.projekt-grid--center {
  grid-template-columns: 1fr !important;
  width: 100%;
  background: none;
  border-bottom: 1px solid var(--line);
  padding: 0 calc(25% + var(--pad));
}

/* LIGHTBOX */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lb-overlay.lb-open {
  display: flex;
}

.lb-img {
  max-width: calc(100vw - 120px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
  display: block;
}

@media (max-width: 600px) {
  .lb-img {
    max-width: 100vw;
    max-height: 80vh;
  }
}

.lb-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
  flex-shrink: 0;
}

.lb-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
}

.lb-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.lb-prev {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

/* BUCH VIEWER */
.buch-wrapper {
  width: min(100%, var(--grid-max));
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 40px var(--pad) 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: var(--bg);
}

.buch-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.buch-book {
  display: flex;
  gap: 2px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  max-width: 100%;
  background: #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.buch-book canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.buch-loading {
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.4;
  padding: 60px 0;
}

.buch-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.buch-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.buch-btn:hover {
  background: #111;
  border-color: #111;
  color: #fff;
}

.buch-seite {
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.5;
  min-width: 60px;
  text-align: center;
}
