/* === BLACK CELL SECTION === */

/* Motivierender Spruch unter dem Titel */
.blackcell-quote {
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  font-style: italic;
  color: var(--accent);
  margin: -10px auto 30px;
  max-width: 700px;
  letter-spacing: 0.03em;
  line-height: 1.7;
  text-shadow: 0 0 20px rgba(209, 49, 47, 0.3);
}

/* Buch-Wrapper ohne seitliche Buttons */
.blackcell-book-wrapper {
  position: relative;
  margin-top: 40px;
  perspective: 1500px;
}

/* Buch Container - Kantig mit abgeschnittenen Ecken */
.blackcell-book-container {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(11, 12, 14, 0.98), rgba(15, 16, 18, 0.95));
  border: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
  clip-path: polygon(
    40px 0,           /* Oben links: 40px abgeschnitten */
    100% 0,           /* Oben rechts: normal */
    100% calc(100% - 40px),  /* Unten rechts: 40px abgeschnitten */
    calc(100% - 40px) 100%,  /* Unten rechts: 40px abgeschnitten */
    0 100%,           /* Unten links: normal */
    0 40px            /* Oben links: 40px abgeschnitten */
  );
}

/* Pages Container */
.blackcell-pages {
  position: relative;
  width: 100%;
  min-height: 420px;
  height: 420px;
}

/* Einzelne Seite */
.blackcell-page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateX(50px) scale(0.95);
  transform-origin: center;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* Aktive Seite */
.blackcell-page.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
  position: relative;
}

/* Slide-Out Animation nach links */
.blackcell-page.slide-out-left {
  animation: slideOutLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Slide-Out Animation nach rechts */
.blackcell-page.slide-out-right {
  animation: slideOutRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Slide-In Animation von rechts */
.blackcell-page.slide-in-right {
  animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Slide-In Animation von links */
.blackcell-page.slide-in-left {
  animation: slideInLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Black Cell Slide spezifisch - feste Höhe */
#blackcell .ops-slide {
  min-height: 420px;
  height: 420px;
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  gap: 0;
}

/* Black Cell Content mit festem max-height und Scrolling */
#blackcell .ops-slide-content {
  padding: 30px;
  display: flex;
  flex-direction: column;
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Schöneres Scrollbar-Design für Black Cell */
#blackcell .ops-slide-content::-webkit-scrollbar {
  width: 8px;
}

#blackcell .ops-slide-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

#blackcell .ops-slide-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-alpha-06), var(--accent-alpha-03));
  border-radius: 10px;
  border: 1px solid var(--accent-alpha-02);
}

#blackcell .ops-slide-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-alpha-08), rgba(209, 49, 47, 0.5));
}

/* Keyframes für elegantes Slide & Fade */
@keyframes slideOutLeft {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-80px) scale(0.92);
  }
}

@keyframes slideOutRight {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(80px) scale(0.92);
  }
}

@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translateX(80px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-80px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* Seiten-Anzeige mit Pfeilen (1 / 4) */
.blackcell-page-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
}

.page-display {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.1em;
  min-width: 80px;
  text-align: center;
}

.page-current {
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 700;
}

.page-total {
  color: var(--text);
}

/* Schlichte Pfeil-Buttons */
.blackcell-arrow-btn {
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 50%;
  padding: 0;
}

.blackcell-arrow-btn svg {
  width: 28px;
  height: 28px;
  stroke: var(--accent);
  transition: all 0.2s ease;
}

.blackcell-arrow-btn:hover {
  background: var(--accent-alpha-01);
  transform: scale(1.1);
}

.blackcell-arrow-btn:hover svg {
  stroke: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent-alpha-06));
}

.blackcell-arrow-btn:active {
  transform: scale(0.95);
}

.blackcell-arrow-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.blackcell-arrow-btn:disabled:hover {
  background: transparent;
  transform: scale(1);
}

/* Black Cell spezifische Styles */
.blackcell-tagline {
  font-size: 15px;
  font-weight: 600;
  font-style: italic;
  color: var(--accent);
  margin: 0 0 16px 0;
  letter-spacing: 0.02em;
}

.blackcell-leader {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin: 16px 0;
  letter-spacing: 0.02em;
}

.blackcell-leader-label {
  color: var(--accent);
}

/* Dezente Trennlinie */
.blackcell-separator {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 20%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.1) 80%,
    transparent 100%
  );
  margin: 20px 0;
}

/* Black Cell Image - Bild zentriert und contained statt cover */
#blackcell .ops-slide-image img {
  object-fit: contain;
  padding: 40px;
}

/* Gruppennamen in Rot */
#blackcell .ops-header h3 {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 1024px) {
  .blackcell-page-indicator {
    gap: 20px;
  }

  .blackcell-arrow-btn {
    width: 36px;
    height: 36px;
  }

  .blackcell-arrow-btn svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 768px) {
  .blackcell-page-indicator {
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .blackcell-arrow-btn {
    width: 32px;
    height: 32px;
  }

  .blackcell-arrow-btn svg {
    width: 20px;
    height: 20px;
  }

  .page-display {
    font-size: 1rem;
  }

  .page-current {
    font-size: 1.2rem;
  }

  .blackcell-pages {
    min-height: 490px;
    height: 490px;
  }

  #blackcell .ops-slide {
    min-height: 490px;
    height: 490px;
    grid-template-columns: 1fr;
    grid-template-rows: 220px 2px 1fr;
  }

  #blackcell .ops-slide-divider {
    background: linear-gradient(90deg, transparent 0%, rgba(209, 49, 47, 0.8) 20%, rgba(209, 49, 47, 0.8) 80%, transparent 100%);
    width: 100%;
    height: 2px;
  }

  #blackcell .ops-slide-image {
    min-height: 220px;
    height: 220px;
  }

  #blackcell .ops-slide-content {
    padding: 15px 25px 25px;
    max-height: calc(490px - 220px - 2px);
  }
}

@media (max-width: 480px) {
  .blackcell-book-container {
    clip-path: polygon(
      20px 0, 100% 0, 100% calc(100% - 20px),
      calc(100% - 20px) 100%, 0 100%, 0 20px
    );
  }

  .blackcell-pages {
    min-height: auto;
    height: auto;
  }

  #blackcell .ops-slide {
    min-height: auto;
    height: auto;
    grid-template-rows: 160px 2px 1fr;
  }

  #blackcell .ops-slide-image {
    min-height: 160px;
    height: 160px;
  }

  #blackcell .ops-slide-image img {
    padding: 20px;
  }

  #blackcell .ops-slide-content {
    max-height: none;
    padding: 12px 18px 20px;
    font-size: 13.5px;
  }

  .blackcell-quote {
    font-size: 0.88rem;
  }
}

