/* ============================================================================
   Projeler sayfası — yalnız bu sayfaya özgü kurallar.
   Token ve ortak bileşenler styles.css'te (.page-hero, .breadcrumb,
   .gallery-btn, .lightbox, .cta-band, .eyebrow, .section).
   ========================================================================== */

/* ---------- Üst başlık: istatistik kartı alttan bindiği için ek boşluk ---------- */
.proj-hero .container { padding-bottom: calc(clamp(56px, 7vw, 96px) + 44px); }
.proj-hero .lead { max-width: 58ch; }

/* ---------- İstatistik kartı (hero'nun altına biner) ---------- */
.pstats { position: relative; z-index: 1; margin-top: -44px; }
.pstats__card { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.pstat { display: flex; align-items: center; gap: 14px; padding: 22px 24px; min-width: 0; border-left: 1px solid var(--line); }
.pstat:first-child { border-left: 0; }
.pstat__icon { flex: none; width: 46px; height: 46px; display: grid; place-items: center; background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 10px; color: var(--ink); }
.pstat__icon .icon { width: 24px; height: 24px; }
.pstat__num { display: block; font-size: 1.35rem; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.pstat__lbl { display: block; font-size: .82rem; color: var(--muted); margin-top: 3px; }
@media (max-width: 900px) {
  .pstats__card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pstat { padding: 18px 20px; }
  .pstat:nth-child(odd) { border-left: 0; }
  .pstat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 480px) {
  .pstat { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
  .pstat__icon { width: 40px; height: 40px; }
  .pstat__icon .icon { width: 22px; height: 22px; }
  .pstat__num { font-size: 1.15rem; }
}

/* ---------- Galeri başlığı ve sayaç ---------- */
#galeri { scroll-margin-top: calc(var(--header-h) + 12px); }
.gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 28px; }
.gallery-head .section-head { margin-bottom: 0; }
.gallery-count { font-size: .92rem; color: var(--muted); white-space: nowrap; padding-bottom: 6px; }
.gallery-count strong { color: var(--ink); font-size: 1.05rem; font-variant-numeric: tabular-nums; }

/* ---------- Filtre çipleri ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip { display: inline-flex; align-items: center; gap: 9px; padding: 9px 12px 9px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); font-size: .9rem; font-weight: 600; line-height: 1.2; cursor: pointer; white-space: nowrap; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.chip:hover { border-color: var(--ink); }
.chip__n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums; transition: background .15s ease, color .15s ease; }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-active .chip__n { background: var(--brand); color: var(--ink); }
@media (max-width: 760px) {
  /* Mobil: tek satır, yatay kaydırma; kenardan kenara kayar, ilk çip içerikle hizalı */
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); margin-bottom: 20px; padding: 6px var(--gutter) 10px; scroll-padding-inline: var(--gutter); scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; scroll-snap-align: start; }
}

/* ---------- Galeri ızgarası ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { position: relative; margin: 0; min-width: 0; }
.tile[hidden] { display: none; }
.tile .gallery-btn { box-shadow: var(--shadow-sm); transition: box-shadow .2s ease; }
.tile .gallery-btn:hover { box-shadow: var(--shadow); }
.tile .gallery-btn img { aspect-ratio: 4 / 3; height: auto; }
/* 2 satıra kırp. Alt boşluk padding değil saydam border: line-clamp ile gizlenen
   3. satır padding alanına sızar, border alanı ise overflow:hidden dışında kalır;
   gradyan zemin border-box'a yayıldığı için görünüm bozulmaz. */
.tile .gallery-btn figcaption { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; padding: 32px 14px 0; border-bottom: 12px solid transparent; line-height: 1.35; }
.tile__cat { position: absolute; top: 10px; left: 10px; z-index: 1; pointer-events: none; max-width: calc(100% - 20px); padding: 4px 9px; border-radius: 6px; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: .72rem; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
@media (max-width: 1024px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile .gallery-btn figcaption { padding: 24px 10px 0; border-bottom-width: 9px; font-size: .76rem; }
  .tile__cat { top: 8px; left: 8px; padding: 3px 7px; font-size: .66rem; }
}

/* Boş kategori notu (JS ile açılır) */
.tiles-empty { margin-top: 8px; padding: 28px 24px; border: 1px dashed var(--line); border-radius: var(--r); text-align: center; color: var(--muted); }
.tiles-empty[hidden] { display: none; }

/* Galeri altı not + WhatsApp */
.gallery-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-top: clamp(32px, 4vw, 48px); padding: 22px 26px; background: var(--bg-soft); border-radius: var(--r); }
.gallery-foot p { color: var(--ink-2); max-width: 62ch; font-size: .95rem; }
.gallery-foot strong { color: var(--ink); }
@media (max-width: 640px) { .gallery-foot { padding: 20px; } .gallery-foot .btn { width: 100%; } }
