/* =========================================================
   Projeler — liste, durum filtresi, kart, detay ve galeri
   (template değişkenleri; style.css'teki .place-card / .section-head / .eyebrow yeniden kullanılır)
   ========================================================= */

/* ---------- Durum rozeti ---------- */
.status-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem .85rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  background: var(--white); color: var(--charcoal);
  font-size: .6rem; font-weight: 600; line-height: 1; letter-spacing: .18em; text-transform: uppercase;
  white-space: nowrap;
}
.status-badge::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--bronze); }
.status-badge--baslanacak::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--bronze); }
.status-badge--bitmis { background: var(--charcoal); color: var(--white); box-shadow: none; }
.status-badge--bitmis::before { background: var(--bronze-light); }

/* ---------- Liste ---------- */
.projects-page { padding: calc(var(--header-h) + 3.5rem) 0 4.5rem; background: var(--white); }
@media (min-width: 1024px) { .projects-page { padding: calc(var(--header-h) + 5rem) 0 6.5rem; } }
.projects-page .section-head { margin-bottom: 2.4rem; }
.projects-page .h-section { font-size: clamp(2.2rem, 4.6vw, 4.4rem); }

.project-filter {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem;
  margin-bottom: 3rem;
}
.project-filter__link {
  display: inline-flex; align-items: center; gap: .55rem;
  min-height: 2.75rem; padding: 0 1.15rem;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: .66rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--heading);
  transition: color .35s var(--ease), background-color .35s var(--ease), border-color .35s var(--ease);
}
@media (min-width: 640px) { .project-filter__link { padding: 0 1.4rem; letter-spacing: .2em; } }
.project-filter__link:hover { border-color: var(--charcoal); }
.project-filter__link[aria-current="page"] { background: var(--charcoal); border-color: var(--charcoal); color: var(--white); }
.project-filter__count { font-size: .62rem; letter-spacing: .04em; color: var(--accent-text); }
.project-filter__link[aria-current="page"] .project-filter__count { color: var(--bronze-light); }

.project-grid { display: grid; gap: 3rem 1.5rem; }
@media (min-width: 640px) { .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.5rem 2rem; } }

/* ---------- Kart ---------- */
.project-card { display: flex; flex-direction: column; align-items: flex-start; }
.project-card__media { position: relative; width: 100%; }
.project-card__media .status-badge { position: absolute; top: .9rem; left: .9rem; }
.project-card .place-card__name { margin-top: 1.2rem; }
.project-card .place-card__desc { margin: .55rem 0 0; }
.project-card .text-link { margin-top: 1.1rem; }
.project-card__placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: var(--sand); }
.project-card__placeholder img { width: 26%; height: auto; opacity: .4; }

/* ---------- Boş durum ---------- */
.project-empty {
  max-width: 38rem; margin: 0 auto;
  padding: 3rem 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.project-empty__title { font-family: var(--font-display); font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.3; color: var(--heading); text-wrap: balance; }
.project-empty__text { margin-top: .9rem; font-size: .95rem; color: var(--muted); }
.project-empty__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.2rem 2rem; margin-top: 2rem; }

/* ---------- Detay ---------- */
.project-detail { padding: calc(var(--header-h) + 3rem) 0 4.5rem; background: var(--white); }
@media (min-width: 1024px) { .project-detail { padding: calc(var(--header-h) + 4.5rem) 0 6.5rem; } }
.project-detail__crumbs {
  display: flex; flex-wrap: wrap; gap: .4rem .7rem;
  margin-bottom: 1.4rem;
  font-size: .66rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.project-detail__crumbs a { transition: color .3s; }
.project-detail__crumbs a:hover { color: var(--accent-text); }
.project-detail .h-section { font-size: clamp(2.2rem, 5vw, 4.6rem); }
.project-detail__status { margin-top: 1.4rem; }

.project-detail__body { display: grid; gap: 2.2rem; margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .project-detail__body { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 4rem; align-items: start; } }
.project-detail__text { max-width: 44rem; font-size: clamp(1rem, 1.3vw, 1.12rem); line-height: 1.75; overflow-wrap: break-word; }
.project-detail__text p + p { margin-top: 1.1rem; }
.project-detail__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem 2rem; }
@media (min-width: 900px) { .project-detail__cta { flex-direction: column; align-items: flex-start; } }
/* Uzun CTA metni dar ekranda taşmasın. */
.project-detail__cta .btn { white-space: normal; text-align: center; height: auto; min-height: 3.3rem; padding-block: .85rem; }

/* ---------- Galeri ---------- */
.gallery { margin-top: 4rem; }
.gallery__title {
  padding-bottom: 1.1rem; margin-bottom: 1.7rem;
  border-bottom: 1px solid var(--line);
  font-size: .72rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--heading);
}
.gallery__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 900px) { .gallery__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }
.gallery__item { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: var(--bg-alt); cursor: zoom-in; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.gallery__item:hover img { transform: scale(1.04); }

/* ---------- Lightbox ---------- */
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox {
  width: 100%; max-width: none; height: 100%; max-height: none;
  margin: 0; padding: 4.5rem 1rem 5.5rem; border: 0;
  background: transparent; color: var(--white);
  overflow: hidden;
}
/* ::backdrop custom property'leri her tarayıcıda devralmaz; --ink değeri açıkça yazıldı. */
.lightbox::backdrop { background: rgba(38, 39, 43, .95); }
.lightbox__figure { display: flex; flex-direction: column; align-items: center; gap: 1rem; width: 100%; height: 100%; }
.lightbox__img { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.lightbox__caption { font-size: .66rem; font-weight: 600; letter-spacing: .22em; color: rgba(255, 255, 255, .7); }
.lightbox__btn {
  position: absolute;
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(38, 39, 43, .5); color: var(--white);
  transition: background-color .35s var(--ease), border-color .35s var(--ease);
}
.lightbox__btn:hover { background: var(--bronze); border-color: var(--bronze); }
.lightbox__btn svg { width: 1.1rem; height: 1.1rem; }
.lightbox__btn--close { top: 1rem; right: 1rem; }
.lightbox__btn--prev, .lightbox__btn--next { bottom: 1.25rem; }
.lightbox__btn--prev { left: calc(50% - 4.5rem); }
.lightbox__btn--next { right: calc(50% - 4.5rem); }
@media (min-width: 1024px) {
  .lightbox { padding: 4rem 6.5rem; }
  .lightbox__btn--prev, .lightbox__btn--next { bottom: auto; top: 50%; translate: 0 -50%; }
  .lightbox__btn--prev { left: 1.75rem; }
  .lightbox__btn--next { right: 1.75rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: lightbox-in .35s var(--ease); }
  .lightbox[open]::backdrop { animation: lightbox-fade .35s var(--ease); }
}
@keyframes lightbox-in { from { opacity: 0; transform: scale(.985); } }
@keyframes lightbox-fade { from { opacity: 0; } }
