/* ============================================================
   case-study.css — Case study oldalak közös stílusa
   Kiegészíti a style.css-t
   ============================================================ */

/* ── Case study hero ── */
.cs-hero {
  padding-block: var(--space-2xl) var(--space-xl);
}

@media (max-width: 767px) {
  .cs-hero {
    padding-top: var(--space-lg);
  }
}

.cs-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  transition: color var(--transition);
}

.cs-hero__back:hover {
  color: var(--color-text-primary);
}

.cs-hero__back svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.cs-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
  margin-bottom: var(--space-md);
}

.cs-hero__tag {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.cs-hero__tag + .cs-hero__tag::before {
  content: '·';
  margin-right: var(--space-xs);
}

.cs-hero__title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--color-text-primary);
  margin-bottom: var(--space-lg);
}

/* Hero metrikák — cs-results kártya megjelenéssel */
.cs-hero__metrics {
  margin-top: 0;
}

/* ── Hero image ── */
.cs-hero-image {
  margin-block: var(--space-md);
}

.cs-hero-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  display: block;
  height: auto;
}

/* ── Video thumbnail ── */
.cs-video-thumb {
  display: block;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}

.cs-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--transition);
}

.cs-video-thumb:hover img {
  opacity: 0.85;
}

.cs-video-thumb__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.cs-video-thumb__play svg {
  width: 72px;
  height: 72px;
  transition: transform var(--transition);
}

.cs-video-thumb:hover .cs-video-thumb__play svg {
  transform: scale(1.1);
}

/* ── Download bar ── */
.cs-download-bar {
  margin-block: var(--space-md);
}

.cs-download-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--color-text-primary);
}

.cs-download-bar__steam-logo {
  height: 28px;
  width: auto;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}

.cs-download-bar__sub {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

.cs-download-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-primary);
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  min-height: 44px;
  transition: background var(--transition), opacity var(--transition);
}

.cs-download-bar__btn:hover {
  opacity: 0.85;
}

.cs-download-bar__steam-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── Case study body ── */
.cs-body {
  padding-block: var(--space-2xl);
}

.cs-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 900px) {
  .cs-layout {
    grid-template-columns: 220px 1fr;
    gap: var(--space-xl);
    align-items: start;
  }
}

/* ── Sticky sidebar nav ── */
.cs-sidenav {
  display: none;
}

@media (min-width: 900px) {
  .cs-sidenav {
    display: block;
    position: sticky;
    top: 5rem;
  }
}

.cs-sidenav__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.cs-sidenav__link {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  padding: 0.375rem 0;
  transition: color var(--transition);
  display: block;
}

.cs-sidenav__link:hover,
.cs-sidenav__link.is-active {
  color: var(--color-text-primary);
}

.cs-sidenav__link.is-active {
  font-weight: 500;
}

/* ── Sections ── */
.cs-section {
  padding-block: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.cs-section:first-child {
  border-top: none;
  padding-top: 0;
}

.cs-section__number {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: var(--space-sm);
}

.cs-section__title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.cs-section__body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text-secondary);
  max-width: 65ch;
}

.cs-section__body p + p {
  margin-top: var(--space-sm);
}

/* ── Fázis címek (pl. OTP Folyamat) ── */
.cs-phase__title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-primary);
  letter-spacing: 0.01em;
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
}

.cs-phase__title:first-child {
  margin-top: 0;
}

/* ── Decision blocks ── */
.cs-decisions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.cs-decision {
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.cs-decision__title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.cs-decision__body {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* ── Research methods ── */
.cs-methods__label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: var(--space-md);
  margin-bottom: 0.5rem;
}

.cs-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-sm);
}

.cs-method {
  font-size: 0.8125rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  background: var(--color-surface);
}

/* ── Image gallery ── */
.cs-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

@media (min-width: 640px) {
  .cs-gallery {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .cs-gallery {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.cs-gallery__item {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--color-border);
  cursor: zoom-in;
  position: relative;
}

.cs-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease, opacity var(--transition);
  display: block;
}

.cs-gallery__item:hover img {
  transform: scale(1.03);
  opacity: 0.92;
}

.cs-gallery__item--wide {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 7;
}

/* ── Hero methods ── */
.cs-hero__methods {
  margin-top: var(--space-sm);
}

.cs-hero__methods-label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
}

.cs-hero__methods-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* ── Outcome / results ── */
.cs-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* Eredménykártya — háromszintes struktúra */
.cs-result {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

/* Felső label — uppercase, kis méret */
.cs-result__category {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.375rem;
}

/* Nagy szám */
.cs-result__value {
  font-size: 2rem;
  font-weight: 500;
  color: var(--color-text-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-xs);
}

/* Badge-ek sora */
.cs-result__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.375rem;
}

.cs-result__badge {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.125rem 0.5rem;
  letter-spacing: 0.02em;
}

/* Alszöveg */
.cs-result__sub {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-top: auto;
}

/* Visszafelé kompatibilitás — régi .cs-result__label */
.cs-result__label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-top: auto;
}

/* ── Lesson / tanulság ── */
.cs-lesson {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  border-left: 2px solid var(--color-text-primary);
  background: var(--color-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.cs-lesson__label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.cs-lesson__text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* ── CTA ── */
.cs-cta {
  margin-top: var(--space-lg);
}

.cs-cta__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-text-primary);
  padding-bottom: 2px;
  transition: opacity var(--transition);
}

.cs-cta__link:hover {
  opacity: 0.6;
}

/* ── Next project ── */
.cs-next {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-xl);
}

.cs-next__label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: var(--space-sm);
}

.cs-next__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  transition: background var(--transition), border-color var(--transition);
}

.cs-next__link:hover {
  background: var(--color-bg);
  border-color: var(--color-border-hover);
}

.cs-next__title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}

.cs-next__desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.cs-next__arrow {
  font-size: 1.5rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.cs-next__link:hover .cs-next__arrow {
  transform: translateX(4px);
}

/* ── Placeholder vizuál ── */
.cs-placeholder {
  padding: var(--space-xl);
  border: 1px dashed var(--color-border-hover);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-top: var(--space-md);
  background: var(--color-surface);
}

/* ══════════════════════════════════════════════
   LIGHTBOX
   ══════════════════════════════════════════════ */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  padding: var(--space-sm);
}

.lightbox.is-open {
  display: flex;
}

.lightbox__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: var(--radius-md);
  display: block;
  user-select: none;
}

.lightbox__close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: background 200ms ease;
  z-index: 1001;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__close svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.lightbox__prev,
.lightbox__next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: background 200ms ease, opacity 200ms ease;
  z-index: 1001;
}

.lightbox__prev { left: 1rem; }
.lightbox__next { right: 1rem; }

.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__prev:disabled,
.lightbox__next:disabled {
  opacity: 0.2;
  cursor: default;
}

.lightbox__prev svg,
.lightbox__next svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.lightbox__counter {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
  z-index: 1001;
  white-space: nowrap;
}

.lightbox__caption {
  position: fixed;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  max-width: 600px;
  padding-inline: var(--space-sm);
  z-index: 1001;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .lightbox__prev,
  .lightbox__next {
    top: auto;
    bottom: 4.5rem;
    transform: none;
    width: 44px;
    height: 44px;
  }

  .lightbox__prev { left: 1.5rem; }
  .lightbox__next { right: 1.5rem; }

  .lightbox__img {
    max-height: calc(100vh - 160px);
  }

  .lightbox__caption {
    bottom: 3.5rem;
    font-size: 0.75rem;
  }

  .lightbox__counter {
    bottom: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox__img {
    transition: none;
  }
}
