/* ============================================
   WORK PAGE — wk-card layout
   Logo + text on left, image slider on right
   ============================================ */

.wk-section { background: var(--color-bg); }

/* List of work entries */
.wk-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Single work card ─────────────────────── */
.wk-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 480px;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.2s ease;
}

.wk-card:first-child { border-top: 1px solid var(--color-border); }
.wk-card:hover { background: rgba(255,255,255,0.015); }

/* Alternate: odd cards = logo left / even = logo right */
.wk-card:nth-child(even) { direction: rtl; }
.wk-card:nth-child(even) > * { direction: ltr; }

/* ── LEFT PANEL — logo + text ─────────────── */
.wk-card__left {
  padding: var(--space-16) var(--space-12);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-5);
  position: relative;
}

.wk-card__logo-wrap {
  width: 160px;
  height: 52px;
  display: flex;
  align-items: center;
}

.wk-card__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.wk-card__tag {
  margin-top: var(--space-1);
}

.wk-card__headline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.25;
  margin: 0;
}

.wk-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.8;
  max-width: 480px;
  margin: 0;
}

/* ── RIGHT PANEL — slider ─────────────────── */
.wk-card__right {
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  aspect-ratio: 1 / 1;
}

/* ── Slider ───────────────────────────────── */
.wk-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wk-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.wk-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.wk-slide.active { opacity: 1; }

.wk-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Prev / Next arrows */
.wk-prev,
.wk-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
  opacity: 0;
  backdrop-filter: blur(6px);
}

.wk-card__right:hover .wk-prev,
.wk-card__right:hover .wk-next { opacity: 1; }

.wk-prev { left: var(--space-4); }
.wk-next { right: var(--space-4); }

.wk-prev:hover,
.wk-next:hover { background: rgba(201,168,76,0.5); border-color: var(--color-gold); }

/* Dot indicators */
.wk-dots {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-2);
  z-index: 10;
}

.wk-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  padding: 0;
}

.wk-dot.active {
  background: var(--color-gold);
  transform: scale(1.3);
}

/* ── Divider between cards ────────────────── */
.wk-card + .wk-card {
  border-top: none;
}

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 900px) {
  /* Stack: image on top, text below */
  .wk-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .wk-card:nth-child(even) { direction: ltr; }

  /* Image panel: keep aspect-ratio so slider has real height */
  .wk-card__right {
    aspect-ratio: 1 / 1;
    width: 100%;
    /* Keep position:relative + defined height so absolute slides work */
    position: relative;
  }

  /* Slider fills the panel via absolute positioning — parent has height via aspect-ratio */
  .wk-slider {
    position: absolute;
    inset: 0;
  }

  .wk-slides {
    position: absolute;
    inset: 0;
  }

  /* Show prev/next arrows always on touch devices */
  .wk-prev, .wk-next { opacity: 0.7; }

  /* Text panel */
  .wk-card__left {
    padding: var(--space-8) var(--space-6);
    gap: var(--space-4);
    order: 2; /* text below image */
  }

  /* Logo visible and sized correctly */
  .wk-card__logo-wrap {
    width: 140px;
    height: 44px;
  }
}

@media (max-width: 600px) {
  .wk-card__right {
    aspect-ratio: 1 / 1;
  }

  .wk-card__left {
    padding: var(--space-7) var(--space-5);
  }

  .wk-card__logo-wrap {
    width: 120px;
    height: 38px;
  }

  .wk-card__headline {
    font-size: 1.1rem;
  }

  .wk-card__desc {
    font-size: var(--text-xs);
  }

  /* Dots slightly larger for touch */
  .wk-dot {
    width: 10px;
    height: 10px;
  }
}
