/* ============================================================
   coverflow.css  –  Coverflow Carousel for Heybeliada Park
   Two independent carousels: Photo + Video
   ============================================================ */

/* ─── Bölüm ─────────────────────────────────────────── */
.cf-section { overflow: hidden; }

.cf-block {
  margin-top: 60px;
}
.cf-block--video {
  margin-top: 80px;
}

/* Başlık + ok satırı */
.cf-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.cf-block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fraunces', serif;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
  color: var(--navy-900, #082a44);
  margin: 0;
}
.cf-block-title svg { color: var(--gold, #b9893f); flex-shrink: 0; }

.cf-nav {
  display: flex;
  gap: 10px;
}

.cf-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy-700, #0f4c75);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
  flex-shrink: 0;
}
.cf-btn:hover {
  background: var(--gold, #b9893f);
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(185, 137, 63, .35);
}
.cf-btn svg { width: 18px; height: 18px; }

/* ─── Stage (viewport) ─────────────────────────────── */
.cf-stage {
  position: relative;
  width: 100%;
  height: 420px;               /* Fotoğraf yüksekliği */
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  overflow: hidden;
  /* Kenarları solan görünüm */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0,0,0,.5) 12%,
    rgba(0,0,0,1) 28%,
    rgba(0,0,0,1) 72%,
    rgba(0,0,0,.5) 88%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0,0,0,.5) 12%,
    rgba(0,0,0,1) 28%,
    rgba(0,0,0,1) 72%,
    rgba(0,0,0,.5) 88%,
    transparent 100%
  );
}

/* Video stage daha uzun (9:16 oranı) */
.cf-stage--video {
  height: 540px;
}

/* ─── Slide ─────────────────────────────────────────── */
.cf-slide {
  position: absolute;
  width: 340px;
  height: 400px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  /* Başlangıç: JS tarafından transform set edilecek */
  transition:
    transform   .52s cubic-bezier(0.22, 1, 0.36, 1),
    opacity     .52s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow  .52s ease,
    filter      .52s ease;
  user-select: none;
  will-change: transform, opacity;
}

/* reduced-motion: animasyonu devre dışı bırak */
@media (prefers-reduced-motion: reduce) {
  .cf-slide { transition: none; }
}

.cf-slide--video {
  width: 240px;
  height: 430px;   /* 9:16 dikey */
}

/* Placeholder içerik */
.cf-ph {
  width: 100%;
  height: 100%;
  background: #eef2f6;
  border: 2px dashed #a4c2df;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--navy-600, #155a89);
  text-align: center;
}
.cf-ph svg  { width: 40px; height: 40px; opacity: .5; }
.cf-ph span {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .65;
}

/* Video placeholder — koyu arkaplan */
.cf-ph--video {
  background: var(--navy-900, #082a44);
  border-color: var(--navy-600, #155a89);
  color: rgba(255,255,255,.7);
}
.cf-ph--video svg { color: var(--gold, #b9893f); opacity: .7; }

/* Gerçek fotoğraf/video eklendiğinde tam kaplar */
.cf-slide img,
.cf-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ─── Coverflow pozisyon sınıfları (JS bunları atar) ─── */

/* Merkez (active) */
.cf-slide.pos-0 {
  transform: translateX(0) scale(1) rotateY(0deg);
  opacity: 1;
  z-index: 10;
  box-shadow: none;
  filter: brightness(1);
}

/* Hemen yanlar (±1) */
.cf-slide.pos-1 {
  transform: translateX(calc(var(--cf-offset, 380px))) scale(.80) rotateY(-20deg);
  opacity: .75;
  z-index: 8;
  box-shadow: none;
  filter: brightness(.85);
}
.cf-slide.pos--1 {
  transform: translateX(calc(-1 * var(--cf-offset, 380px))) scale(.80) rotateY(20deg);
  opacity: .75;
  z-index: 8;
  box-shadow: none;
  filter: brightness(.85);
}

/* İkinci sıra (±2) */
.cf-slide.pos-2 {
  transform: translateX(calc(var(--cf-offset, 380px) * 1.8)) scale(.62) rotateY(-28deg);
  opacity: .45;
  z-index: 5;
  filter: brightness(.7);
}
.cf-slide.pos--2 {
  transform: translateX(calc(-1 * var(--cf-offset, 380px) * 1.8)) scale(.62) rotateY(28deg);
  opacity: .45;
  z-index: 5;
  filter: brightness(.7);
}

/* Geri plan (gizli) */
.cf-slide.pos-hidden {
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

/* ─── Coverflow offset (fotoğraf vs video farklı boşluk) ── */
#cf-photo  { --cf-offset: 360px; }
#cf-video  { --cf-offset: 260px; }

/* ─── Dots ─────────────────────────────────────────── */
.cf-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.cf-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c9d4de;
  transition: background .3s ease, transform .3s ease;
  cursor: pointer;
  border: none;
  padding: 0;
}
.cf-dot.active {
  background: var(--gold, #b9893f);
  transform: scale(1.35);
}

/* ─── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .cf-stage   { height: 310px; --cf-offset: 270px; }
  .cf-stage--video { height: 420px; --cf-offset: 200px; }
  .cf-slide   { width: 260px; height: 290px; }
  .cf-slide--video { width: 185px; height: 330px; }
  #cf-photo   { --cf-offset: 270px; }
  #cf-video   { --cf-offset: 195px; }

  .cf-slide.pos-2,
  .cf-slide.pos--2 { opacity: .2; }
}

@media (max-width: 480px) {
  .cf-block-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .cf-stage   { height: 260px; --cf-offset: 230px; }
  .cf-stage--video { height: 380px; --cf-offset: 180px; }
  .cf-slide   { width: 220px; height: 240px; }
  .cf-slide--video { width: 165px; height: 300px; }
  #cf-photo   { --cf-offset: 230px; }
  #cf-video   { --cf-offset: 175px; }

  .cf-slide.pos-2,
  .cf-slide.pos--2 { display: none; }
}
