/* KUN Collective — proje detay sayfası */

.kun-project-page {
  font-family: Outfit, sans-serif;
  background: #bc0f10;
}

.kun-project-page main,
.kun-project-page #content {
  background: #bc0f10;
  color: #fafafa;
}

.kun-project-page > .kun-dept-nav {
  background: #0f0f0e;
  padding: clamp(40px, 5vw, 56px) clamp(20px, 4vw, 80px) clamp(48px, 6vw, 72px);
}

.kun-project-main {
  padding: clamp(96px, 12vw, 140px) clamp(20px, 4vw, 80px) clamp(64px, 8vw, 96px);
}

@media (max-width: 1023px) {
  .kun-project-page .kun-project-main {
    padding-top: max(108px, calc(env(safe-area-inset-top, 0px) + 88px));
  }

  .kun-project-pill {
    max-width: min(100%, calc(100vw - 32px));
    white-space: normal;
    line-height: 1.35;
  }
}

.kun-project-main__inner {
  max-width: min(1280px, 100%);
  margin: 0 auto;
}

.kun-project-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 clamp(20px, 3vw, 32px);
}

@media (max-width: 639px) {
  .kun-project-top {
    gap: 8px;
  }

  .kun-project-pill {
    min-height: 36px;
    padding: 7px 14px;
    font-size: 11px;
    letter-spacing: 0.08em;
  }
}

.kun-project-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 20px;
  border: 1.5px solid rgba(250, 250, 250, 0.88);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fafafa;
  white-space: nowrap;
}

.kun-project-pill--link {
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.kun-project-pill--link:hover {
  background: rgba(250, 250, 250, 0.12);
  border-color: #fafafa;
}

.kun-project-title {
  margin: 0 0 clamp(28px, 4vw, 48px);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  /* Büyük harf PHP View::trUpper ile (Türkçe i→İ); CSS text-transform kullanma */
  color: #fafafa;
}

.kun-project-hero {
  margin-bottom: clamp(32px, 5vw, 56px);
}

/* Proje detay galerisi — kompakt mozaik */
.kun-project-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 0.9vw, 10px);
  width: 100%;
  max-width: 920px;
}

@media (min-width: 900px) {
  .kun-project-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.kun-project-gallery__cell {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  display: flex;
  aspect-ratio: 1;
}

.kun-project-gallery__cell--hero,
.kun-project-gallery__cell--top-a,
.kun-project-gallery__cell--top-b,
.kun-project-gallery__cell--wide {
  grid-column: auto;
  aspect-ratio: 1;
}

.kun-project-gallery__trigger {
  display: block;
  flex: 1;
  width: 100%;
  min-height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  overflow: hidden;
}

.kun-project-gallery__trigger:hover img,
.kun-project-gallery__trigger:focus-visible img {
  transform: scale(1.04);
}

.kun-project-gallery__trigger:focus-visible {
  outline: 2px solid #fafafa;
  outline-offset: 2px;
}

.kun-project-gallery__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

@media (max-width: 767px) {
  .kun-project-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .kun-project-gallery__cell--hero,
  .kun-project-gallery__cell--top-a,
  .kun-project-gallery__cell--top-b,
  .kun-project-gallery__cell--wide {
    grid-column: auto;
    aspect-ratio: 1;
  }
}

.kun-project-hero__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

/* Prodüksiyon / animasyon video: kırmızı zeminden ayıran gölge */
.kun-project-hero__video-wrap,
#kun-project-media:has(> .kun-project-hero__frame.has-video) {
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.42),
    0 12px 24px rgba(0, 0, 0, 0.28),
    0 2px 6px rgba(0, 0, 0, 0.18);
}

.kun-project-hero__frame.has-video {
  background: #0f0f0e;
}

.kun-project-hero__frame > img,
.kun-project-hero__poster img,
.kun-project-hero__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kun-project-hero__frame > iframe,
.kun-project-hero__media[src] {
  border: 0;
}

video.kun-project-hero__media {
  object-fit: contain;
  background: #0f0f0e;
}

.kun-project-hero__poster {
  position: relative;
  width: 100%;
  height: 100%;
}

.kun-project-hero__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.kun-project-hero__play:hover {
  transform: scale(1.06);
}

.kun-project-hero__video {
  width: 100%;
  height: 100%;
}

.kun-project-hero__video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.kun-project-reels {
  display: flex;
  justify-content: center;
}

.kun-project-reels__frame {
  position: relative;
  width: min(420px, 100%);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 22px;
  background: #0b0b0b;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.kun-project-reels__poster,
.kun-project-reels__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.kun-project-reels__poster img,
.kun-project-reels__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  display: block;
  background: #000;
}

.kun-project-reels__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

.kun-project-reels__play {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 2;
  transform: translateX(-50%);
  min-width: 92px;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #111;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.kun-project-reels__play:hover {
  background: #fff;
}

.kun-project-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 4vw, 40px);
  padding: clamp(24px, 4vw, 40px) 0;
  border-top: 1px solid rgba(250, 250, 250, 0.22);
  border-bottom: 1px solid rgba(250, 250, 250, 0.22);
}

@media (min-width: 900px) {
  .kun-project-meta {
    grid-template-columns: repeat(4, 1fr);
  }
}

.kun-project-meta__label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250, 250, 250, 0.65);
}

.kun-project-meta__value {
  margin: 0;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.5;
  color: #fafafa;
}

.kun-project-related {
  margin-top: clamp(48px, 7vw, 80px);
}

.kun-project-related__heading {
  margin: 0 0 clamp(24px, 3vw, 36px);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fafafa;
}

.kun-project-related__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
}

@media (min-width: 768px) {
  .kun-project-related__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.kun-project-related__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.kun-project-related__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  margin-bottom: 14px;
}

.kun-project-related__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.kun-project-related__link:hover .kun-project-related__media img {
  transform: scale(1.04);
}

.kun-project-related__title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: #fafafa;
}

.kun-project-related__brand {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: rgba(250, 250, 250, 0.7);
  letter-spacing: 0.06em;
}

.kun-project-not-found {
  padding: clamp(120px, 16vw, 200px) clamp(20px, 4vw, 80px);
  text-align: center;
  background: #bc0f10;
  color: #fafafa;
  min-height: 60vh;
  font-family: Outfit, sans-serif;
}

.kun-project-not-found h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  text-transform: uppercase;
}

.kun-project-not-found p {
  margin: 0 0 28px;
  color: rgba(250, 250, 250, 0.8);
}

.kun-project-not-found a {
  color: #fafafa;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: underline;
}

/* Galeri lightbox — grafik tasarım & sosyal medya */
body.kun-gallery-lightbox-open {
  overflow: hidden;
}

.kun-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 32px);
}

.kun-gallery-lightbox[hidden] {
  display: none !important;
}

.kun-gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 14, 0.92);
}

.kun-gallery-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(1200px, 100%);
  max-height: calc(100vh - 32px);
  padding-top: 52px;
}

.kun-gallery-lightbox__figure {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  max-height: calc(100vh - 120px);
}

.kun-gallery-lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.kun-gallery-lightbox__close,
.kun-gallery-lightbox__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(250, 250, 250, 0.35);
  background: rgba(250, 250, 250, 0.08);
  color: #fafafa;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.kun-gallery-lightbox__close:hover,
.kun-gallery-lightbox__nav:hover:not(:disabled) {
  background: rgba(250, 250, 250, 0.16);
  border-color: #fafafa;
}

.kun-gallery-lightbox__close:focus-visible,
.kun-gallery-lightbox__nav:focus-visible {
  outline: 2px solid #fafafa;
  outline-offset: 2px;
}

.kun-gallery-lightbox__close {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  border-radius: 999px;
}

.kun-gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
}

.kun-gallery-lightbox__nav--prev {
  left: clamp(0px, 1vw, 8px);
}

.kun-gallery-lightbox__nav--next {
  right: clamp(0px, 1vw, 8px);
}

.kun-gallery-lightbox__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.kun-gallery-lightbox__counter {
  margin: 16px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250, 250, 250, 0.8);
}

@media (max-width: 767px) {
  .kun-gallery-lightbox__nav--prev {
    left: 0;
  }

  .kun-gallery-lightbox__nav--next {
    right: 0;
  }
}
