/* =========================================================
   resources.css — Resources & Results Library
   Loads AFTER style.css + pages.css.
   Uses the site palette (brand blue / navy / yellow) — the
   purple experiment was dropped, no page-local colours here.
   ========================================================= */

.phero .article-meta i { color: var(--pop); }

/* hero quick stats row */
.lib-stats {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 2.4rem;
  margin-top: 2rem;
}
.lib-stats div { color: #fff; }
.lib-stats strong { display: block; font-family: var(--font-display); font-size: 1.9rem; line-height: 1; }
.lib-stats span { font-size: 0.85rem; color: rgba(255, 255, 255, 0.78); }

/* ---------- library body ---------- */
.library { padding: 5rem 0 6rem; background: var(--bg); }

/* sticky toolbar: search + filter chips */
.lib-toolbar {
  position: sticky;
  top: calc(var(--header-h) - 6px);
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: 0 12px 30px -22px rgba(20, 33, 61, 0.4);
  margin-bottom: 2.5rem;
}
.lib-search {
  position: relative;
  margin-bottom: 1rem;
}
.lib-search i {
  position: absolute;
  left: 1.1rem; top: 50%;
  transform: translateY(-50%);
  color: var(--brand);
  font-size: 1rem;
}
.lib-search input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.95rem 1rem 0.95rem 2.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lib-search input::placeholder { color: #8aa0b4; }
.lib-search input:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(28, 110, 164, 0.14);
}

.lib-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.lib-chip {
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--body);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.18s ease;
}
.lib-chip i { font-size: 0.8rem; color: var(--brand); }
.lib-chip:hover { border-color: var(--brand); color: var(--ink); }
.lib-chip.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.lib-chip.is-active i { color: #fff; }

/* result count line */
.lib-count {
  font-size: 0.9rem;
  color: var(--body);
  margin-bottom: 1.4rem;
}
.lib-count strong { color: var(--ink); }

/* ---------- resource grid ---------- */
.res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}
.res-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.res-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--brand);
}
/* Kart kapağı: kartın iç boşluğunu taşarak üst kenara oturuyor. */
.res-cover {
  margin: -1.5rem -1.5rem 1.3rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  background: var(--accent-soft);
}
.res-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.res-card:hover .res-cover img { transform: scale(1.04); }
.res-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.res-icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--brand);
  font-size: 1.25rem;
}
.res-type {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--accent-soft);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.res-card h3 {
  font-size: 1.12rem;
  line-height: 1.3;
  margin-bottom: 0.55rem;
}
.res-card p {
  font-size: 0.92rem;
  color: var(--body);
  margin-bottom: 1.1rem;
}
.res-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-size: 0.8rem;
  color: #6a7d90;
  margin-bottom: 1.1rem;
}
.res-meta i { color: var(--brand); margin-right: 0.3rem; }
.res-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.res-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.res-link:hover { color: var(--brand-dark); }
.res-format {
  font-size: 0.72rem;
  font-weight: 600;
  color: #6a7d90;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* empty state */
.lib-empty {
  display: none;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--body);
}
.lib-empty i { font-size: 2.4rem; color: var(--line); margin-bottom: 1rem; }
.lib-empty.is-shown { display: block; }

/* CTA band: no override — uses the site-wide .get-involved styling. */

@media (max-width: 640px) {
  .lib-stats { gap: 1.6rem; }
  .res-grid { grid-template-columns: 1fr; }
}
