/* Text category hero: the same visual hierarchy as the AI and home heroes. */
.directory-page--text {
  --text-hero-ink: #12234b;
  --text-hero-muted: #52658a;
  --text-hero-surface: #fff;
  --text-hero-line: #dce7fc;
  --text-hero-wash: #eaf3ff;
  --text-hero-glow: #dceaff;
  --text-hero-gap: clamp(1rem, 2.5vw, 2rem);
}

.directory-page.directory-page--text {
  background:
    radial-gradient(ellipse 850px 470px at 82% 170px, var(--text-hero-glow), transparent 76%),
    linear-gradient(180deg, var(--text-hero-wash), var(--color-bg) 740px);
}

.directory-page--text::before { content: none; }
.directory-page--text .breadcrumb { margin-bottom: .625rem; }

.directory-page--text .cat-hero {
  grid-template-columns: minmax(0, 56fr) minmax(0, 44fr);
  align-items: start;
  gap: var(--text-hero-gap);
  margin-bottom: 0;
  padding-bottom: 1.25rem;
}

.directory-page--text .cat-hero__text {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  max-width: 700px;
  padding-block: 0;
}

.directory-page--text .cat-hero__h1 {
  grid-row: 1;
  color: var(--text-hero-ink);
  font-size: clamp(2.2rem, 3.65vw, 3.45rem);
  font-weight: var(--font-bold);
  line-height: 1.12;
  letter-spacing: -.045em;
}

.directory-page--text .cat-hero__h1 > span { display: block; }
.directory-page--text .cat-hero__title-gradient {
  color: #5545e8;
  background: linear-gradient(105deg, #2563eb 0%, #6254f4 58%, #a23ce8 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.directory-page--text .cat-hero__desc {
  grid-row: 3;
  max-width: 58ch;
  margin-top: .8rem;
  color: var(--text-hero-muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.directory-page--text .cat-hero__footer { display: contents; }
.directory-page--text .cat-hero .directory-hero__actions {
  grid-row: 4;
  margin-top: 1.15rem;
}

.directory-page--text .cat-hero__badges {
  position: absolute;
  inset: 0 0 1.25rem auto;
  display: block;
  width: calc((100% - var(--text-hero-gap)) * .44);
  z-index: 2;
  pointer-events: none;
}

.directory-page--text .cat-hero__badge {
  position: absolute;
  min-height: 31px;
  padding: .43rem .75rem;
  border-color: var(--text-hero-line);
  background: var(--text-hero-surface);
  color: var(--text-hero-muted);
  font-size: .72rem;
  font-weight: var(--font-semibold);
  box-shadow: 0 9px 22px -13px rgb(36 62 122 / .38);
}

.directory-page--text .cat-hero__badge:nth-child(1) { top: .25rem; left: 1%; }
.directory-page--text .cat-hero__badge:nth-child(2) { top: 1.5rem; right: 0; }
.directory-page--text .cat-hero__badge:nth-child(3) { right: 7%; bottom: .25rem; }
.directory-page--text .cat-hero__badge strong { color: var(--text-hero-ink); }

.directory-page--text .cat-hero__visual {
  display: grid;
  min-height: 0;
  margin: -1.5rem 0 0;
  padding-bottom: .75rem;
}

.directory-page--text .cat-hero__visual-image {
  width: 100%;
  max-width: 470px;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  filter: drop-shadow(0 22px 30px rgb(49 82 157 / .12));
}

.directory-page--text .cat-hero .directory-btn {
  min-height: 46px;
  padding-inline: 1.25rem;
  border-radius: 11px;
  font-size: .86rem;
}

.directory-page--text .cat-hero .directory-btn--primary {
  background: linear-gradient(110deg, #3165ff, #7044f9);
  box-shadow: 0 12px 24px -12px rgb(79 70 229 / .55), inset 0 1px 0 rgb(255 255 255 / .3);
}

.directory-page--text .cat-tools {
  margin-top: 0;
  scroll-margin-top: calc(var(--header-height, 76px) + 2rem);
}

[data-theme="dark"] .directory-page--text {
  --text-hero-ink: #e8efff;
  --text-hero-muted: #b3c1db;
  --text-hero-surface: #172134;
  --text-hero-line: #2b3c5c;
  --text-hero-wash: #101c31;
  --text-hero-glow: #1b2d50;
}

[data-theme="dark"] .directory-page--text .cat-hero__title-gradient {
  background-image: linear-gradient(105deg, #89b3ff, #b59aff 65%, #db9cff);
}

@media (max-width: 900px) {
  .directory-page--text .cat-hero {
    --text-hero-gap: 1rem;
    grid-template-columns: minmax(0, 60fr) minmax(0, 40fr);
  }
  .directory-page--text .cat-hero__h1 { font-size: clamp(2rem, 4.5vw, 2.6rem); }
  .directory-page--text .cat-hero__badges { width: calc((100% - var(--text-hero-gap)) * .4); }
}

@media (max-width: 640px) {
  .directory-page--text .breadcrumb { margin-bottom: .875rem; font-size: .72rem; }
  .directory-page--text .cat-hero {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 1.25rem;
  }
  .directory-page--text .cat-hero__h1 { font-size: clamp(1.9rem, 8vw, 2.35rem); }
  .directory-page--text .cat-hero__badges {
    position: static;
    grid-row: 2;
    display: flex;
    flex-wrap: wrap;
    width: auto;
    gap: .25rem .8rem;
    margin-top: .7rem;
  }
  .directory-page--text .cat-hero__badge {
    position: static;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: .7rem;
    font-weight: var(--font-semibold);
    line-height: 1.5;
    box-shadow: none;
  }
  .directory-page--text .cat-hero__badge + .cat-hero__badge::before {
    content: "·";
    margin-right: .8rem;
    color: var(--text-hero-muted);
  }
  .directory-page--text .cat-hero__desc { margin-top: .75rem; font-size: .92rem; }
  .directory-page--text .cat-hero .directory-hero__actions { margin-top: 1rem; }
  .directory-page--text .cat-hero__visual { display: none; }
}
