/* PROGEM — Site 6 köprü stili, 2. paket: referans liste + detay
   Kaynak taban: eab4365d. Yalnız referances/list ve referances/detail şablonları
   @push('styles') ile yükler; her kural #projects.pg-s6-ref veya #single.pg-s6-ref
   altındadır. Paket 1'deki body.pg-site6 sınıfına bağlı değildir (bağımsız uygulanır).
   Header, footer (V4 açık), page-banner ve istatistik bölümü (.pg-ref-stats) hedeflenmez.
   Mokaptan veri, görsel, data: URL veya harici adres aktarılmaz. Görseller kırpılmaz
   (contain): canlı kapaklar logo/belge olabilir. */

.pg-s6-ref {
  --s6-navy: #053263;
  --s6-blue: #0072d2;
  --s6-mid: #055697;
  --s6-ink: #172f46;
  --s6-muted: #526879;
  --s6-meta: #415b70;
  --s6-line: #d6e2ec;
  --s6-field-line: var(--pg-line-ui, #5b6d7d); /* alan sınırı 3:1 (5,35:1); mokap #8da7bd 2,5:1 kalırdı */
  --s6-paper: #f3f7fb;
  --s6-media-bg: #edf2f6;
  --s6-radius: 9px;
  --s6-button-radius: 8px;
}

/* ---------- Liste: kategori sekmeleri ---------- */
#projects.pg-s6-ref .pg-reference-tools {
  margin: 0 0 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--s6-line);
}
#projects.pg-s6-ref .pg-reference-filters {
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 18px;
}
#projects.pg-s6-ref .pg-reference-filters a {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #adc3d8;
  border-radius: var(--s6-button-radius);
  background: #fff;
  color: var(--s6-navy);
  font-weight: 600;
}
#projects.pg-s6-ref .pg-reference-filters a:hover { background: #edf4fb; }
#projects.pg-s6-ref .pg-reference-filters a[aria-current="page"] {
  background: var(--s6-navy);
  border-color: var(--s6-navy);
  color: #fff;
}

/* ---------- Liste: arama formu (görünür etiketler, Site 6 alanları) ---------- */
#projects.pg-s6-ref .pg-reference-search {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
  max-width: none;
  margin: 0;
}
#projects.pg-s6-ref .pg-s6-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
#projects.pg-s6-ref .pg-s6-field--query { grid-column: span 2; }
#projects.pg-s6-ref .pg-s6-field label {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--s6-ink);
}
#projects.pg-s6-ref .pg-s6-field .form-control {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid var(--s6-field-line);
  border-radius: 5px;
  background-color: #fff;
  color: var(--s6-ink);
  font-size: 16px;
}
#projects.pg-s6-ref .pg-s6-form-actions {
  display: flex;
  gap: 10px;
  min-width: 0;
}
#projects.pg-s6-ref .pg-s6-form-actions .btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  padding: 10px 18px;
  border-radius: var(--s6-button-radius);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
#projects.pg-s6-ref .pg-s6-form-actions .primary-button {
  background: var(--s6-navy);
  border: 1px solid var(--s6-navy);
  color: #fff;
  box-shadow: none;
}
#projects.pg-s6-ref .pg-s6-form-actions .primary-button:hover {
  background: var(--s6-mid);
  border-color: var(--s6-mid);
}

/* İkincil düğme (liste ve detay) */
.pg-s6-ref .pg-s6-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid #adc3d8;
  border-radius: var(--s6-button-radius);
  background: #fff;
  color: var(--s6-navy);
  font-weight: 600;
  text-decoration: none;
  box-shadow: none;
}
.pg-s6-ref .pg-s6-btn-secondary:hover { background: #edf4fb; color: var(--s6-navy); }

/* ---------- Liste: sonuç satırı ---------- */
#projects.pg-s6-ref .pg-s6-ref-count {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--s6-meta);
}

/* ---------- Liste: kartlar ---------- */
#projects.pg-s6-ref .referances { row-gap: 24px; }
#projects.pg-s6-ref .referances > .item { display: flex; margin-top: 0; }
#projects.pg-s6-ref .pg-s6-ref-card {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--s6-line);
  border-radius: var(--s6-radius);
  transition: border-color .15s, box-shadow .15s;
}
#projects.pg-s6-ref .pg-s6-ref-card:hover {
  border-color: #9bb8d3;
  box-shadow: 0 4px 18px rgba(5, 50, 99, .07);
}
#projects.pg-s6-ref .pg-s6-ref-card__link {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  padding-bottom: 16px;
  color: inherit;
  text-decoration: none;
}
#projects.pg-s6-ref a.pg-s6-ref-card__link:focus-visible {
  outline: 3px solid var(--s6-blue);
  outline-offset: -3px;
}
#projects.pg-s6-ref .pg-s6-ref-card__img {
  display: block;
  flex-shrink: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: var(--s6-media-bg);
  border-bottom: 1px solid var(--s6-line);
  margin: 0 0 14px;
}
#projects.pg-s6-ref .pg-s6-ref-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.9em;
  margin: 0 18px 12px;
  font-family: var(--pg-font-alt, "Poppins", Helvetica, Arial, sans-serif);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -.02em;
  color: var(--s6-navy);
  overflow-wrap: anywhere;
}
#projects.pg-s6-ref .pg-s6-ref-card__meta {
  margin: auto 18px 0;
  padding: 9px 12px;
  background: var(--s6-paper);
  border-left: 3px solid #a7c7e4;
  border-radius: 0 5px 5px 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--s6-muted);
  overflow-wrap: anywhere;
}
#projects.pg-s6-ref a.pg-s6-ref-card__link:hover .pg-s6-ref-card__title { color: var(--s6-mid); }

/* ---------- Liste: sayfalama (vendor.pagination.custom çıktısı; sınıflar Bootstrap varsayımı) ---------- */
#projects.pg-s6-ref .referances-pagination { margin-top: 28px; }
#projects.pg-s6-ref .referances-pagination .pagination {
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
#projects.pg-s6-ref .referances-pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #adc3d8;
  border-radius: var(--s6-button-radius);
  color: var(--s6-navy);
  background: #fff;
}
#projects.pg-s6-ref .referances-pagination .page-item.active .page-link,
#projects.pg-s6-ref .referances-pagination .page-link[aria-current="page"] {
  background: var(--s6-navy);
  border-color: var(--s6-navy);
  color: #fff;
}
#projects.pg-s6-ref .referances-pagination .page-item.disabled .page-link {
  color: var(--s6-muted);
  background: var(--s6-paper);
  border-color: #cbdbe6;
}

/* ---------- Detay ---------- */
#single.pg-s6-ref .pg-s6-ref-cover {
  display: block;
  width: 100%;
  height: auto;
  max-height: 430px;
  object-fit: contain;
  background: var(--s6-media-bg);
  border-radius: var(--s6-radius);
  box-shadow: none;
  margin: 0 0 24px;
}
#single.pg-s6-ref .pg-s6-prose {
  max-width: 760px;
  min-width: 0;
  font-size: 18px;
  line-height: 1.8;
  color: var(--s6-ink);
  overflow-wrap: anywhere;
}
#single.pg-s6-ref .pg-s6-prose p,
#single.pg-s6-ref .pg-s6-prose li { font-size: 18px; line-height: 1.75; }
#single.pg-s6-ref .pg-s6-prose p { margin: 0 0 16px; }
#single.pg-s6-ref .pg-s6-prose h2 { font-size: 26px; line-height: 1.3; margin: 28px 0 12px; color: var(--s6-navy); }
#single.pg-s6-ref .pg-s6-prose h3 { font-size: 22px; line-height: 1.35; margin: 22px 0 10px; color: var(--s6-navy); }
#single.pg-s6-ref .pg-s6-prose > :first-child { margin-top: 0; }
#single.pg-s6-ref .pg-s6-prose img { max-width: 100%; height: auto; }
#single.pg-s6-ref .pg-s6-prose a:not(.btn) { text-decoration: underline; }
#single.pg-s6-ref .pg-s6-prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
}
#single.pg-s6-ref .pg-s6-prose td,
#single.pg-s6-ref .pg-s6-prose th { border: 1px solid var(--s6-line); padding: 10px; }

#single.pg-s6-ref .pg-s6-ref-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--s6-line);
}
#single.pg-s6-ref .pg-s6-ref-nav__next { margin-left: auto; }

#single.pg-s6-ref .pg-s6-aside-box {
  padding: 22px;
  background: var(--s6-paper);
  border-top: 3px solid var(--s6-blue);
}
#single.pg-s6-ref .pg-s6-aside-box__cta { margin-bottom: 22px; }
#single.pg-s6-ref .pg-s6-aside-box__cta .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: var(--s6-button-radius);
  background: var(--s6-navy);
  border: 1px solid var(--s6-navy);
  color: #fff;
  font-weight: 600;
  box-shadow: none;
}
#single.pg-s6-ref .pg-s6-aside-box__cta .primary-button:hover { background: var(--s6-mid); border-color: var(--s6-mid); }
#single.pg-s6-ref .pg-s6-aside-box__title {
  margin: 0 0 10px;
  font-family: var(--pg-font-alt, "Poppins", Helvetica, Arial, sans-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--s6-navy);
}
#single.pg-s6-ref .pg-s6-aside-box .list-group-item {
  background: transparent;
  border-color: var(--s6-line);
  padding-left: 0;
  padding-right: 0;
}
#single.pg-s6-ref .pg-s6-aside-item {
  display: flex;
  align-items: center;
  gap: 14px;
}
#single.pg-s6-ref .pg-s6-aside-item__thumb { flex: 0 0 64px; }
#single.pg-s6-ref .pg-s6-aside-item__thumb img {
  display: block;
  width: 64px;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--s6-line);
  border-radius: 5px;
  box-shadow: none;
}
#single.pg-s6-ref .pg-s6-aside-item__text {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--s6-navy);
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
#single.pg-s6-ref .pg-s6-aside-item__text:hover { color: var(--s6-mid); text-decoration: underline; }

/* ---------- Tablet ≤1199 ---------- */
@media (max-width: 1199px) {
  #projects.pg-s6-ref .pg-reference-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #projects.pg-s6-ref .pg-s6-form-actions { grid-column: span 2; }
}

/* ---------- Mobil ≤767 (390 dahil) ---------- */
@media (max-width: 767px) {
  #projects.pg-s6-ref .pg-reference-search { grid-template-columns: minmax(0, 1fr); }
  #projects.pg-s6-ref .pg-s6-field--query,
  #projects.pg-s6-ref .pg-s6-form-actions { grid-column: auto; }
  #projects.pg-s6-ref .pg-s6-ref-card__title { font-size: 19px; }
  #single.pg-s6-ref .pg-s6-prose,
  #single.pg-s6-ref .pg-s6-prose p,
  #single.pg-s6-ref .pg-s6-prose li { font-size: 17px; }
  #single.pg-s6-ref .pg-s6-ref-nav .btn { flex: 1 1 100%; }
  #single.pg-s6-ref .pg-s6-ref-nav__next { margin-left: 0; }
  #single.pg-s6-ref .pg-s6-aside-box { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  #projects.pg-s6-ref .pg-s6-ref-card { transition: none; }
}

@media (forced-colors: active) {
  #projects.pg-s6-ref .pg-s6-ref-card { border: 1px solid CanvasText; }
}
