/* LIBRARY Filter — Card UI (scoped as .lf) */
:root {
  --bg: #f7f9fb;
  --ink: #2b2b2b;
  --muted: #6c6f75;
  --brand: #7b63c7;
  --brand-dark: #664fc0;
  --card: #ffffff;
  --line: #e6e8ef;
}

.lf {
  color: var(--ink);
  background: #fff;
  font: 16px/1.55 Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, sans-serif;
}
.lf * {
  box-sizing: border-box;
}

.lf .wrap {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px;
}

.lf .panel {
  width: 100%;
  background: #eff6f6;
  border-bottom: 1px solid var(--line);
}
.lf .panel-inner {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px 16px;
}

.lf .filters {
  display: grid;
  gap: 12px;
}
.lf .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lf .field label {
  display: block;
  margin-bottom: 6px;
  color: #160224;
  text-align: center;
  font-family: Bierstadt, Inter, system-ui;
  font-size: 16px;
  font-weight: 400;
  line-height: 160%;
}

.lf input[type="text"],
.lf select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
  color: #160224;
  text-align: center;
  font-family: Bierstadt, Inter, system-ui;
  font-size: 16px;
  font-weight: 400;
  line-height: 160%;
}
.lf input[type="text"]:focus,
.lf select:focus {
  border-color: #a9a0e9;
  box-shadow: 0 0 0 3px rgba(121, 101, 214, 0.15);
}

.lf .submit-wrap {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}
.lf .btn {
  padding: 11px 26px;
  border: 0;
  background: #7c5da8;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}
.lf .btn:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.lf .meta {
  display: flex;
  justify-content: flex-end;
  margin: 16px 20px;
  color: #160224;
  text-align: right;
  font-family: Bierstadt;
  font-size: 16px;
  font-weight: 400;
  line-height: 160%;
  padding-top: 20px;
}

.lf .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 760px) {
  .lf .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1060px) {
  .lf .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1280px) {
  .lf .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.lf .card {
  background: var(--card);
  border: 1px solid #e4e7ec;
  padding: 24px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  font-size: 18px;
  box-shadow: 0 2px 6px rgba(22, 2, 36, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}
.lf .thumb {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}
.lf .thumb img {
  width: 100%;
  height: 220px;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.4s ease;
}
.lf .card:hover .thumb img {
  transform: scale(1.04);
}

.lf .title {
  margin: 4px 0 2px;
  color: #160224;
  font-family: Bierstadt;
  font-size: 16px;
  font-weight: 700;
  line-height: 160%;
}
.lf .desc {
  margin: 0;
  color: #4a4c56;
  font-family: Bierstadt;
  font-size: 16px;
  font-weight: 400;
  line-height: 160%;
}

.lf .actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.lf .read {
  background: #fff;
  border: 1px solid #160224;
  color: #160224;
  padding: 10px 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: Bierstadt;
  font-size: 16px;
  font-weight: 700;
  line-height: 160%;
}
.lf .read:hover {
  background: #7b63c7;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.lf .dl {
  color: #6b7280;
  text-decoration: none;
  font-size: 30px;
  display: flex;
  align-items: center;
  transition: color 0.3s ease, transform 0.3s ease;
  width: 20px;
  height: 20px;
  aspect-ratio: 1/1;
}
.lf .dl:hover {
  color: #000;
  transform: scale(1.08);
}

.lf .pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 30px 0 30px;
}
.lf .page-btn {
  border: 1px solid #e4e7ec;
  background: #fff;
  border-radius: 999px;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: Bierstadt;
  font-size: 14px;
}
.lf .page-btn[aria-current="page"] {
  background: #7c5da8;
  color: #fff;
  border-color: #7c5da8;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(124, 93, 168, 0.25);
}
.lf .page-btn:hover:not([aria-current="page"]) {
  background: #f4f0ff;
  transform: translateY(-2px);
  border-color: #d5c9ff;
}
.lf .page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 1024px) {
  .lf .row {
    grid-template-columns: 1fr;
  }
  .lf .panel-inner {
    padding: 16px;
  }
  .lf .meta {
    margin: 14px 16px;
  }
}
@media (max-width: 600px) {
  .lf .panel-inner {
    padding: 12px;
  }
  .lf .btn {
    width: 100%;
  }
  .lf .meta {
    margin: 10px 12px;
    font-size: 14px;
  }
}
.lf .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(22, 2, 36, 0.1);
  border-color: #d9d4ec;
}

/* Focus states */
.lf .btn:focus-visible,
.lf .page-btn:focus-visible,
.lf input:focus-visible,
.lf select:focus-visible,
.lf a.read:focus-visible {
  outline: 3px solid rgba(124, 93, 168, 0.35);
  outline-offset: 2px;
  border-color: #b6a4e3;
}
.lf ::placeholder {
  color: #9aa0a6;
}
