/* =====================================================
   משפחה כלכלית — Articles Listing Page
   ===================================================== */

/* Hero */
.listing-hero {
  text-align: center;
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border-bottom: 1px solid var(--rule);
}
.listing-hero .kicker {
  display: inline-flex;
  margin-inline: auto;
  margin-bottom: 1.25rem;
}
.listing-hero__title {
  font-style: italic;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 .75rem;
}
.listing-hero__lead {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-style: italic;
  color: var(--ink-soft);
  max-width: 32em;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

.listing-hero__search {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}
.listing-hero__search .ic {
  position: absolute;
  inset-inline-end: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--ink-mute);
  pointer-events: none;
}
.listing-hero__search input {
  width: 100%;
  padding: .85rem 2.7rem .85rem 1rem;
  border: 1.5px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--white);
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.listing-hero__search input::placeholder { color: var(--ink-mute); opacity: .7; }
.listing-hero__search input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-pale);
}

/* Filters */
.listing-filters {
  position: sticky;
  top: calc(var(--utility-h) + var(--header-h));
  z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 1rem 0;
  margin-bottom: 0;
}
@media (max-width: 1024px) {
  .listing-filters { position: static; }
}

.filter-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: .55rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: .9rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .2s ease;
  font-weight: 500;
}
.filter-btn:hover {
  border-color: var(--gold);
  color: var(--ink);
  background: var(--paper-2);
}
.filter-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  font-weight: 700;
}
.filter-btn.is-active:hover { background: var(--ink); color: var(--gold-soft); }

.filter-btn__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 .45em;
  background: var(--paper-2);
  color: var(--ink-mute);
  font-family: var(--serif);
  font-weight: 700;
  font-size: .8em;
  font-style: italic;
  border-radius: 999px;
  margin-inline-start: .25em;
}
.filter-btn.is-active .filter-btn__count {
  background: var(--gold);
  color: var(--ink);
}

/* Grid */
.listing-grid-wrap {
  padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(3rem, 5vw, 4.5rem);
}
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.list-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.list-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: var(--rule-strong);
}

.list-card__thumb {
  display: block;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--paper-2);
  position: relative;
}
.list-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.list-card:hover .list-card__thumb img { transform: scale(1.06); }
.list-card__thumb::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 50%;
  background: linear-gradient(180deg, transparent, rgba(24, 27, 44, .25));
  pointer-events: none;
}

.list-card__body {
  padding: 1.4rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  flex: 1;
}
.list-card__cat {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: .35em;
}
.list-card__cat::before {
  content: "";
  width: 18px;
  height: 1.5px;
  background: var(--gold);
}
.list-card__title {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.005em;
  font-weight: 700;
}
.list-card__title a { color: inherit; }
.list-card__title a:hover { color: var(--gold); }

.list-card__excerpt {
  font-size: .92rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.list-card__more {
  margin-top: .85rem;
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: .35em;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
  align-self: start;
  transition: color .2s, border-color .2s, gap .2s;
}
.list-card__more:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
  gap: .55em;
}
.list-card__more .ic { width: 14px; height: 14px; }

.listing-empty {
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-mute);
  padding: 4rem 1rem;
}

/* CTA at bottom */
.listing-cta {
  background: var(--paper-2);
  padding: clamp(3rem, 5vw, 5rem) 0;
  border-top: 1px solid var(--rule);
}
.listing-cta .cta-frame {
  text-align: center;
  max-width: 660px;
  margin: 0 auto;
}
.listing-cta .cta-frame .kicker {
  justify-content: center;
}
.listing-cta .cta-frame .btn { margin-top: .5rem; }
