/* ──────────────────────────────────────────────
   COMPONENTS — language switcher, hover links,
   galleries, sequence player, lightbox
   ────────────────────────────────────────────── */

/* ── LANGUAGE SWITCHER ── */
/* Floats above the page and flips its contrast when it passes over
   the light hero or footer (class toggled in language-switcher.js). */
.lang-switch {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: var(--z-lang-switch);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(8, 11, 16, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  backdrop-filter: blur(10px) saturate(1.3);
  transition:
    background 0.35s,
    border-color 0.35s,
    color 0.35s;
}
.lang-switch.on-light {
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.45);
  border-color: rgba(44, 37, 32, 0.12);
}
.lang-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: inherit;
  cursor: pointer;
  padding: 2px 1px;
  opacity: 0.4;
  transition: opacity 0.15s;
}
.lang-btn:hover {
  opacity: 0.75;
}
.lang-btn.active {
  opacity: 1;
}
.lang-sep {
  width: 1px;
  height: 10px;
  background: currentColor;
  opacity: 0.22;
}

/* ── HOVER LINK (underlined, reveals an image on hover) ── */
.hover-link {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 3px;
  cursor: pointer;
  position: relative;
}
.hover-link:hover {
  text-decoration-color: var(--link);
}
.hover-preview {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  z-index: var(--z-hover-preview);
}
.hover-link:hover .hover-preview {
  opacity: 1;
}
.hover-preview img {
  width: 100%;
  display: block;
}

/* ── GALLERY ── */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.gallery-item {
  overflow: hidden;
  aspect-ratio: 3/2;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.15s;
}
.gallery-item:hover img {
  opacity: 0.88;
}

/* ── SEQUENCE PLAYER ── */
.verlauf-player {
  margin-bottom: 32px;
}
.player-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  cursor: pointer;
  background: #0a0d12;
}
.player-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.player-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.player-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  opacity: 0.4;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.player-btn:hover {
  opacity: 1;
}
.player-progress {
  flex: 1;
  height: 24px;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.player-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 1px;
}
.player-progress-fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
  width: 0%;
  pointer-events: none;
  border-radius: 1px;
}
.player-progress-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  top: 50%;
  transform: translateY(-50%);
  left: 0%;
  margin-left: -5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
}
.player-progress:hover .player-progress-handle {
  opacity: 1;
}
.player-meta {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.player-meta span {
  font-size: 10px;
  opacity: 0.4;
  letter-spacing: 0.02em;
}
.player-expand {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.15s;
  padding: 4px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.player-expand:hover {
  opacity: 1;
}
.player-divider {
  height: 1px;
  background: var(--hairline);
  margin: 0 0 32px;
}

/* Fullscreen state: the controls get brighter against the black backdrop */
.verlauf-player.expanded {
  position: fixed;
  inset: 0;
  z-index: var(--z-player-expanded);
  background: #000;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.verlauf-player.expanded .player-image-wrap {
  flex: 1;
  aspect-ratio: auto;
}
.verlauf-player.expanded .player-controls {
  padding: 10px 32px 14px;
  background: #000;
  flex-shrink: 0;
}
.verlauf-player.expanded .player-btn {
  opacity: 0.7;
}
.verlauf-player.expanded .player-btn:hover {
  opacity: 1;
}
.verlauf-player.expanded .player-expand {
  opacity: 0.6;
}
.verlauf-player.expanded .player-expand:hover {
  opacity: 1;
}
.verlauf-player.expanded .player-meta span {
  opacity: 0.6;
}
.verlauf-player.expanded .player-progress-track {
  background: rgba(255, 255, 255, 0.25);
}
.verlauf-player.expanded .player-progress-fill {
  background: rgba(255, 255, 255, 0.7);
}

/* ── LIGHTBOX ── */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.97);
  z-index: var(--z-lightbox);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#lightbox.open {
  opacity: 1;
  pointer-events: all;
}
#lightbox-img {
  max-width: calc(100vw - 60px);
  max-height: calc(100vh - 60px);
  object-fit: contain;
  display: block;
}
#lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.15s;
  padding: 10px;
}
#lightbox-close:hover {
  opacity: 0.8;
}
#lightbox-prev,
#lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  opacity: 0.2;
  transition: opacity 0.15s;
  padding: 16px;
  font-family: sans-serif;
}
#lightbox-prev:hover,
#lightbox-next:hover {
  opacity: 0.7;
}
#lightbox-prev {
  left: 4px;
}
#lightbox-next {
  right: 4px;
}
#lightbox-meta {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
#lightbox-counter,
#lightbox-exposure {
  font-size: 10px;
  color: #888;
  letter-spacing: 0.05em;
}

@media (max-width: 600px) {
  .hover-preview {
    width: 180px;
  }
  .lang-switch {
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    gap: 7px;
  }
}
