/* ═══════════════════════════════════════════════════════════════════════
   DK Portfolio – Styles  v1.4
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Titelgif-Container: Referenzrahmen für absolutes Overlay ─────────── */

#titelgif {
  position: relative !important;
  overflow: hidden !important;
}

/* ── Alte Elemente ausblenden ─────────────────────────────────────────── */

.elementor-element-4844859 {
  display: none !important;
}

#video-progress-wrapper {
  display: none !important;
}

/* Heading (Daniel Kremser) und Footer bleiben sichtbar */
#titelgif > .elementor-element-d3c7662,
#titelgif > .elementor-element-79b0d25 {
  position: relative;
  /* KEIN z-index – sonst wird mix-blend-mode isoliert */
}

/* Leerer Container a8e6744 verstecken */
.elementor-element-a8e6744 {
  display: none !important;
}

/* ── Hintergrund-Video ────────────────────────────────────────────────── */

.elementor-background-video-hosted {
  transition: opacity 0.4s ease;
  opacity: 1;
}

.elementor-background-video-hosted.fade-out {
  opacity: 0;
}

/* ── Portfolio Wrapper – Absolute Overlay über dem Video ───────────────── */

#dk-portfolio-wrapper {
  position: absolute !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: row;
  padding: 0 40px;
  box-sizing: border-box;
  gap: 60px;
  align-items: center;
  /* KEIN z-index! Sonst entsteht ein Stacking Context,
     der mix-blend-mode daran hindert, gegen das Video zu blenden. */
  pointer-events: none;
}

/* Kinder sollen klickbar sein */
#dk-portfolio-wrapper > * {
  pointer-events: auto;
}

/* ── Scroll-Indikator (Pfeil nach unten) ──────────────────────────────── */

#dk-projects-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 420px;
  max-width: 420px;
  flex-shrink: 0;
}

#dk-scroll-indicator {
  text-align: center;
  width: 100%;
  padding-top: 8px;
  transition: opacity 0.3s ease;
}

#dk-scroll-indicator.dk-hidden {
  opacity: 0;
  pointer-events: none;
}

#dk-scroll-indicator svg {
  width: 20px;
  height: 20px;
  fill: rgba(255, 255, 255, 0.6);
  mix-blend-mode: difference;
  animation: dk-bounce 2s ease infinite;
}

@keyframes dk-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ── Linke Spalte: Projekte (scrollbar) ───────────────────────────────── */

#dk-projects {
  width: 100%;
  overflow-y: auto;
  max-height: 65vh;
  padding-right: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: visibility 0.2s ease;
}

#dk-projects.dk-fade-out {
  visibility: hidden;
}

/* Scrollbar komplett ausblenden */
#dk-projects::-webkit-scrollbar {
  display: none;
}

#dk-projects {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* ── Einzelnes Projekt ────────────────────────────────────────────────── */

.dk-project-item {
  display: flex;
  flex-direction: column;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  padding: 10px 0 10px 14px;
  transition: border-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
  border-left: 3px solid transparent;
  position: relative;
  /* KEIN opacity! opacity < 1 erzeugt Stacking Context → isoliert mix-blend-mode */
}

/* Projekte ohne Video-Link: kein Pointer-Cursor */
.dk-project-item.dk-no-link {
  cursor: default;
}

.dk-project-item.dk-project-active {
  border-left-color: transparent;
  color: #fff;
}

/* Aktiver Strich auch negativ zum Video */
.dk-project-item.dk-project-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #fff;
  mix-blend-mode: difference;
}

/* Titel */
.dk-project-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.dk-project-active .dk-project-title {
  font-weight: 900;
  font-size: 1.2rem;
}

/* Job-Beschreibung */
.dk-project-job {
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.4;
}

/* Production */
.dk-project-production {
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.4;
}

/* ── Rechte Spalte: Kategorien ────────────────────────────────────────── */

#dk-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  align-items: flex-end;
  flex-shrink: 0;
  min-width: 180px;
  padding-right: 10px;
  margin-left: auto;
}

.dk-category-item {
  font-size: 1.05rem;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease, letter-spacing 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: right;
  user-select: none;
}

.dk-category-item:hover {
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.12em;
}

.dk-category-item.dk-category-active {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* ── Mix-Blend-Mode ───────────────────────────────────────────────────── */
/* Nur auf die äußersten Text-Elemente: kein z-index/position auf
   Eltern-Containern, damit die Blend-Berechnung direkt gegen das
   darunterliegende Video erfolgt und kein Stacking-Context isoliert. */

#titelgif .dk-project-title,
#titelgif .dk-project-job,
#titelgif .dk-project-production,
#titelgif .dk-category-item,
#titelgif .elementor-element-79b0d25 .elementor-heading-title,
#titelgif .elementor-element-79b0d25 .elementor-heading-title a,
#titelgif .elementor-element-d3c7662 .elementor-heading-title,
#titelgif .elementor-element-d3c7662 .elementor-heading-title a,
#titelgif .elementor-icon-list-text,
#titelgif .elementor-icon-list-item a {
  mix-blend-mode: difference;
}

/* Video selbst: normal */
#titelgif .elementor-background-video-container,
#titelgif .elementor-background-video-container * {
  mix-blend-mode: normal;
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 768px) {

  /* Wrapper: Spalten-Layout, Projekte unten über den Kategorien */
  #dk-portfolio-wrapper {
    flex-direction: column;
    padding: 80px 16px 80px 16px; /* oben Platz für Heading, unten für Kategorien */
    gap: 0;
    align-items: stretch;
    justify-content: flex-end;
  }

  /* Projekte-Wrap füllt verfügbaren Raum */
  #dk-projects-wrap {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 1 auto;
    min-height: 0;
  }

  /* Projektliste scrollbar, begrenzte Höhe → Luft unter Titel */
  #dk-projects {
    width: 100% !important;
    max-height: 350px;
    padding-right: 8px;
    gap: 2px;
  }

  /* Kompaktere Projekte */
  .dk-project-item {
    padding: 6px 0 6px 10px;
  }

  .dk-project-title {
    font-size: 0.88rem;
  }

  .dk-project-active .dk-project-title {
    font-size: 0.95rem;
  }

  .dk-project-job,
  .dk-project-production {
    font-size: 0.72rem;
  }

  /* Scroll-Indikator kleiner */
  #dk-scroll-indicator svg {
    width: 16px;
    height: 16px;
  }

  /* Kategorien: fixiert am unteren Rand, horizontal */
  #dk-categories {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 14px;
    min-width: unset;
    padding: 12px 16px;
    margin-left: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .dk-category-item {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
  }

  .dk-category-item:hover {
    letter-spacing: 0.06em;
  }

  .dk-category-item.dk-category-active {
    letter-spacing: 0.1em;
  }
}

@media (max-width: 480px) {
  #dk-portfolio-wrapper {
    padding: 70px 12px 75px 12px;
  }

  #dk-projects {
    max-height: 300px;
  }

  .dk-project-title {
    font-size: 0.82rem;
  }

  .dk-project-active .dk-project-title {
    font-size: 0.88rem;
  }

  .dk-project-job,
  .dk-project-production {
    font-size: 0.68rem;
  }

  .dk-category-item {
    font-size: 0.7rem;
  }

  #dk-categories {
    gap: 4px 10px;
    padding: 10px 12px;
  }
}
