/* ==========================================================================
   Category archive — same cloud backdrop as the article page, then the
   feature-plus-grid shape used across the family of sites.
   ========================================================================== */

:root {
  /* A touch deeper than --gradient-soft-card: the chapter cards are white, and
     on the paler wash they were floating rather than sitting on something. */
  --gradient-chapters: linear-gradient(120deg, #fbdde6 0%, #ffdcc2 100%);
  --gradient-chapters-dark: linear-gradient(120deg, #2b1425 0%, #150f14 100%);
  --category-title-size: clamp(2.25rem, 3.6vw, 4.4rem);
  --category-feature-title-size: clamp(1.5rem, 2.4vw, 2.9rem);
  --category-backdrop: var(--gradient-sky);
  --category-row-thumb: 5.25rem;
}

.category__hero {
  background-image: var(--category-backdrop);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% var(--gradient-sky-height);
  padding-block: clamp(3rem, 6vw, 7.5rem) clamp(3rem, 6vw, 8rem);
}

.category__hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.75rem, 1.2vw, 1.25rem);
  text-align: center;
}

.category__chapter {
  font-family: var(--font-body);
  font-size: var(--text-tag-size);
  line-height: var(--text-tag-lh);
  letter-spacing: var(--text-tag-ls);
  font-weight: var(--text-tag-weight);
  text-transform: uppercase;
  color: var(--color-eyebrow);
}

.category__title {
  font-family: var(--font-heading);
  font-size: var(--category-title-size);
  line-height: 1.15;
  letter-spacing: var(--text-h1-ls);
  font-weight: var(--text-h1-weight);
  color: var(--color-heading);
}

.category__desc {
  max-width: 46rem;
  font-family: var(--font-body);
  font-size: var(--text-body-lg-size);
  line-height: var(--text-body-lg-lh);
  color: var(--color-body-muted);
}

/* ---- The feature ---- */

.category__featured { padding-block: clamp(2rem, 3.5vw, 4rem); }

.category__featured-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(1.5rem, 3.2vw, 4rem);
}

.category__featured-media {
  display: block;
  flex: 1 1 52%;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
  aspect-ratio: 16 / 10;
}

.category__featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-base) var(--ease-standard);
}

.category__featured-media:hover img { transform: scale(1.03); }

.category__featured-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.875rem;
  flex: 1 1 44%;
  min-width: 0;
}

.category__featured-label {
  font-family: var(--font-body);
  font-size: var(--text-tag-size);
  letter-spacing: 0.16em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-eyebrow);
}

.category__featured-title {
  font-family: var(--font-heading);
  font-size: var(--category-feature-title-size);
  line-height: 1.2;
  letter-spacing: var(--text-h2-ls);
  font-weight: var(--text-h2-weight);
  color: var(--color-heading);
}

.category__featured-excerpt {
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  line-height: var(--text-body-lh);
  color: var(--color-body-muted);
}

/* ---- The rest of the chapter ---- */

.category__empty {
  font-family: var(--font-body);
  color: var(--color-body-muted);
}

.category__pagination {
  display: flex;
  justify-content: center;
  margin-top: clamp(2rem, 3.5vw, 4rem);
  font-family: var(--font-body);
  font-size: var(--text-small-size);
}

.category__pagination .nav-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.category__pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding-inline: 0.5rem;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-circle);
  color: var(--color-body-muted);
  transition: border-color var(--duration-fast) var(--ease-standard),
              color var(--duration-fast) var(--ease-standard);
}

.category__pagination .page-numbers:hover,
.category__pagination .page-numbers.current {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ---- Other chapters ----
   Dark, so the foot of a chapter reads as a door out of it rather than more
   of the same page. The cards lift off it on a wash of white rather than a
   flat panel, which keeps them feeling like paper in low light. */

.category__more {
  padding-block: clamp(2.5rem, 4.5vw, 5.5rem);
  background: var(--gradient-chapters-dark);
}

.category__more .category__featured-label { color: var(--color-soft-gold); }

.category__more-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--gap-card);
  margin-top: 1.5rem;
}

.category__more-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1 1 calc((100% - 4 * var(--gap-card)) / 5);
  min-width: 12rem;
  padding: clamp(1.25rem, 1.8vw, 1.75rem);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.05);
  transition: transform var(--duration-fast) var(--ease-standard),
              background var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard);
}

.category__more-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.09);
}

.category__more-title {
  font-family: var(--font-heading);
  font-size: clamp(1.125rem, 1.35vw, 1.625rem);
  line-height: 1.25;
  color: var(--color-white);
}

.category__more-go {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  margin-top: 0.25rem;
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  font-weight: var(--text-small-weight);
  color: var(--color-dove-taupe);
}

.category__more-card:hover .category__more-go { color: var(--color-soft-gold); }

@media (max-width: 1024px) {
  .category__featured-inner { flex-direction: column; align-items: stretch; }
}

@media (max-width: 767px) {
  /* Same reasoning as the article page: a gradient under `cover` fills the
     whole box rather than sitting as a band across the top of it. */
  .category__hero {
    background-size: var(--gradient-sky-width-mobile) var(--gradient-sky-height-mobile);
  }
}

/* ==========================================================================
   MOBILE — the chapter listing becomes a compact row per article

   Below the feature, a phone gets picture-left / words-right with the excerpt
   and the Read More dropped: at this width the summary repeats what the
   headline already says, and the whole row is the link anyway.
   ========================================================================== */

/* The widgets set their own column count from Elementor; a row rendered by a
   theme template has no widget above it, so it needs saying here. */
@media (max-width: 1024px) {
  .category__list .fz-cards { --fz-cards-columns: 2; }
}

@media (max-width: 767px) {
  .category__list .fz-cards { --fz-cards-columns: 1; gap: 1.25rem; }

  .category__list .fz-card-article {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-divider);
  }

  .category__list .fz-card-article__media {
    flex: 0 0 var(--category-row-thumb);
    width: var(--category-row-thumb);
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-nav-link);
  }

  .category__list .fz-card-article__body {
    gap: 0.25rem;
    flex: 1 1 auto;
    min-width: 0;
  }

  .category__list .fz-card-article__title { font-size: 1.125rem; line-height: 1.3; }

  .category__list .fz-card-article__text,
  .category__list .link-read-more { display: none; }
}
