/* archive.css — Archive & Category page design (source of truth), unmodified from your provided HTML/CSS.
   Used for: /quotes/, /quotes/{language}/, /quotes/{category}/, /quotes/{language}/{category}/
   Loaded ONLY on those pages (see functions.php: quotehaven_enqueue_archive_assets). */

:root {
  --bg: #f5f6fa;
  --card: #fdfdff;
  --surface: #ffffff;
  --border: #e8eaf1;
  --border-soft: #eceef4;
  --ink: #111827;
  --muted: #6b7280;
  --faint: #9aa3b2;
  --accent: #6d28d9;
  --accent-strong: #7c3aed;
  --accent-deep: #5b21b6;
  --accent-soft: #ede9fe;
  --radius-lg: 18px;
  --radius-md: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 14px 30px -14px rgba(15, 23, 42, 0.16);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent-soft); color: var(--accent-deep); }

.container-x {
  max-width: 1520px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ============ Page intro ============ */
.section-intro { padding: 40px 0 6px; }

.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 500;
  color: var(--faint);
  margin-bottom: 30px;
}
.breadcrumb a { color: #4b5563; transition: color 0.2s ease; }
.breadcrumb a:hover { color: var(--accent); }
.crumb-sep { color: var(--faint); }
.crumb-current { color: var(--muted); }

.intro-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.page-title {
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink);
}

.page-lead {
  margin-top: 16px;
  max-width: 580px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.total-stat {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--muted);
  font-size: 15px; font-weight: 500;
  padding-bottom: 4px;
  white-space: nowrap;
}
.total-stat svg { color: var(--muted); }
.total-stat strong { color: #374151; font-weight: 600; }

/* ============ Quotes grid ============ */
.section-quotes { padding: 36px 0 76px; }

.quotes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.quote-card {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.quote-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #ddd8f8;
}

.quote-media {
  flex: 0 0 130px;
  width: 130px; height: 130px;
  border-radius: 16px;
  overflow: hidden;
  background: #eef0f6;
}
.quote-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.quote-card:hover .quote-media img { transform: scale(1.06); }

.quote-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.quote-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.quote-author { margin-top: 9px; font-size: 15px; color: var(--muted); }

.quote-meta {
  margin-top: 15px;
  display: flex; align-items: center;
  gap: 18px; flex-wrap: wrap;
  font-size: 13px; font-weight: 500;
  color: var(--muted);
}
.meta-item { display: inline-flex; align-items: center; gap: 7px; }
.meta-item svg { color: var(--faint); }
.meta-cat svg { color: var(--accent-strong); }

.quote-link {
  margin-top: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600;
  color: var(--accent);
  transition: color 0.25s ease;
}
.quote-link svg { transition: transform 0.3s ease; }
.quote-link:hover { color: var(--accent-deep); }
.quote-link:hover svg { transform: translateX(4px); }

/* ============ Pagination ============ */
.pagination-wrap { display: flex; justify-content: center; margin-top: 46px; }

.pagination {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: var(--shadow-sm);
}

.page-btn {
  min-width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: #374151;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.page-btn:hover { border-color: #c9c3f6; color: var(--accent); }
.page-btn.is-active {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(124, 58, 237, 0.55);
}
.page-dots { color: var(--faint); padding: 0 6px; user-select: none; }

/* ============ Reveal animation ============ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .quote-card, .quote-media img { transition: none; }
}

/* ============ Focus states ============ */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .quotes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .quotes-grid { grid-template-columns: 1fr; }
  .quote-card { gap: 18px; padding: 20px; }
  .quote-media { flex-basis: 96px; width: 96px; height: 96px; border-radius: 12px; }
  .quote-title { font-size: 17px; }
  .intro-row { align-items: flex-start; flex-direction: column; gap: 18px; }
  .pagination { flex-wrap: wrap; justify-content: center; }
  .section-intro { padding-top: 28px; }
  .section-quotes { padding-bottom: 56px; }
}
