/* =========================================================
   Knowledge Hub — Conditions Archive Styles
   File: archive-conditions.css
   Enqueued via functions.php (see snippet below)
   ========================================================= */

/* --- Color tokens (match these to your theme's existing
   CSS variables if you already define them elsewhere) --- */
.kh-archive {
  --muted-foreground: #6B6459;
  --accent-foreground: #2B241C;
  --primary-foreground: #FDFAF3;
  --input: #E4D7B8;
  --antique-bronze: #7C5A24;
  --ring: #B98A3D;

  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
  box-sizing: border-box;
}

.kh-archive *,
.kh-archive *::before,
.kh-archive *::after {
  box-sizing: border-box;
}

/* -------------------- Page header -------------------- */

.kh-archive__header {
  max-width: 720px;
  margin: 0 0 56px;
}

.kh-eyebrow {
  font-family: "IBM Plex Mono", monospace; /* swap for your "Font 4" */
  font-weight: 400;
  font-style: normal;
  font-size: 11px;
  line-height: 16.5px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin: 0 0 12px;
}

.kh-title {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-style: normal;
  font-size: 48px;
  line-height: 48px;
  letter-spacing: -0.72px;
  color: var(--accent-foreground);
  margin: 0 0 20px;
}

.kh-subtitle {
  font-family: "Inter", sans-serif; /* swap for your "Font 3" */
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 28px;
  letter-spacing: 0;
  color: var(--muted-foreground);
  margin: 0;
}

/* -------------------- Category sections -------------------- */

.kh-category {
  margin: 0 0 48px;
}

.kh-category__heading {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
  font-style: normal;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--antique-bronze);
  margin: 0 0 20px;
}

/* -------------------- Card grid -------------------- */

.kh-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.kh-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  height: 176px;
  padding: 24px 24px 26px 24px;
  border-radius: 24px;
  border: 1px solid var(--input);
  background: var(--primary-foreground);
  opacity: 1;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.kh-card:hover {
  border-color: var(--ring);
  transform: translateY(-2px);
}

.kh-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.kh-card__title {
  font-family: "Fraunces", serif; /* swap for your "Font 2" */
  font-weight: 400;
  font-style: normal;
  font-size: 24px;
  line-height: 32px;
  letter-spacing: -0.36px;
  color: var(--accent-foreground);
  margin: 0;
}

.kh-card__excerpt {
  font-family: "Inter", sans-serif; /* swap for your "Font 3" */
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0;
  color: var(--muted-foreground);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kh-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Inter", sans-serif; /* swap for your "Font 3" */
  font-weight: 500;
  font-style: normal;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0;
  color: var(--ring);
  text-decoration: none;
  width: fit-content;
}

.kh-card__link svg {
  transition: transform 0.2s ease;
}

.kh-card__link:hover svg {
  transform: translateX(3px);
}

.kh-empty {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: #6B6459;
}

/* =========================================================
   Responsive breakpoints
   ========================================================= */

/* Tablet */
@media (max-width: 1024px) {
  .kh-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .kh-title {
    font-size: 40px;
    line-height: 42px;
  }
}

/* Large mobile */
@media (max-width: 640px) {
  .kh-archive {
    padding: 40px 16px;
  }

  .kh-card-grid {
    grid-template-columns: 1fr;
  }

  .kh-card {
    height: auto;
    min-height: 176px;
  }

  .kh-title {
    font-size: 32px;
    line-height: 36px;
    letter-spacing: -0.48px;
  }

  .kh-subtitle {
    font-size: 16px;
    line-height: 24px;
  }
}

/* Small mobile */
@media (max-width: 380px) {
  .kh-title {
    font-size: 28px;
    line-height: 32px;
  }

  .kh-card {
    padding: 20px;
  }

  .kh-card__title {
    font-size: 20px;
    line-height: 28px;
  }
}