/* ============================================================================
   OFFIQA — Directory / hub page stylesheet
   Loads AFTER offiqa-design-v2.css via extra_css.
   Used by: /blog/, /guides/, /glossary/, /compare/, /best/, /use-cases/,
            /templates/, /workflows/, /solutions/, /updates/
   ============================================================================ */

/* ── Directory intro ──────────────────────────────────────────────────────── */
.directory-intro {
  max-width: 68ch;
  margin-bottom: var(--space-6);
}

/* ── Filter chips row ─────────────────────────────────────────────────────── */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: var(--space-5);
}
.filter-chip {
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.filter-chip:hover,
.filter-chip.active {
  border-color: var(--green-400);
  background: var(--green-tint);
  color: var(--green-700);
  text-decoration: none;
}

/* ── Section divider ──────────────────────────────────────────────────────── */
.directory-section { margin-top: var(--space-7); }
.directory-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line-soft);
}
.directory-section-header h2 { margin: 0; font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
.directory-section-header .see-all {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--green-600);
  text-decoration: none;
  white-space: nowrap;
}
.directory-section-header .see-all:hover { color: var(--ochre-700); }

/* ── Count badge ──────────────────────────────────────────────────────────── */
.count-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
}

/* ── Empty state ──────────────────────────────────────────────────────────── */
.directory-empty {
  padding: var(--space-6);
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
}

/* ============================================================================
   BLOG LIST — 2-col grid, each post in a horizontal card
   Matches the resource-list aesthetic from the homepage / related-links section
   ============================================================================ */

/* Section header above the grid */
.blog-list-header {
  margin-bottom: var(--space-4);
}
.blog-list-header h2 {
  font-family: var(--font-sans);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0.5rem 0 0;
  color: var(--ink);
}

/* 2-column grid — same as .resource-list */
.blog-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

/* Each blog row card */
.blog-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(30, 41, 59, 0.05);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.45;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.blog-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  color: var(--ink);
  text-decoration: none;
}

/* Title — left side */
.blog-item-title {
  min-width: 0;
  color: var(--ink);
}

/* Category label — right side, same as resource-list span:last-child */
.blog-item-type {
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ============================================================================
   BLOG GRID — card layout with title + short description
   Each article is a vertical card: category badge, title, excerpt, read CTA.
   The first card can use .blog-card--featured to span the full width.
   ============================================================================ */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.blog-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: var(--space-4) var(--space-4) var(--space-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(30, 41, 59, 0.05);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  border-color: var(--green-300);
  color: var(--ink);
  text-decoration: none;
}

/* Category badge */
.blog-card-type {
  align-self: flex-start;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--green-tint);
  color: var(--green-700);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* Title */
.blog-card h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Short description / excerpt */
.blog-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

/* Read CTA pinned to bottom */
.blog-card-footer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--green-600);
}
.blog-card-arrow { transition: transform 0.16s ease; }
.blog-card:hover .blog-card-arrow { transform: translateX(3px); }

/* Featured card — spans full width with a slightly richer treatment */
.blog-card--featured {
  grid-column: 1 / -1;
  gap: 0.7rem;
  padding: var(--space-5);
  border-color: var(--line-soft);
  background:
    radial-gradient(30rem 20rem at 88% -30%, rgba(37, 99, 235, 0.07), transparent 62%),
    linear-gradient(165deg, var(--surface), var(--surface-2));
}
.blog-card--featured h3 { font-size: clamp(1.3rem, 2.4vw, 1.65rem); }
.blog-card--featured p  { font-size: 0.98rem; max-width: 70ch; }

@media (max-width: 720px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* ── Older .dir-card kept for backward compat ─────────────────────────────── */
.dir-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.dir-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--green-300);
  color: var(--ink);
  text-decoration: none;
}
.dir-card-type {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ochre-700);
}
.dir-card h3 { font-size: 1rem; line-height: 1.25; margin: 0; }
.dir-card p  { font-size: 0.88rem; color: var(--muted); margin: 0; line-height: 1.5; }
.dir-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.4rem;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .blog-list { grid-template-columns: 1fr; }
  .directory-section-header { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
}
