/* =============================================================
   Spartan Agency — City landing pages + Cities index (2026)

   Rendered by spartan-traxx-child/taxonomy-traxx_city.php (one city)
   and page-cities.php (index). Community-section markup comes from the
   properties plugin's city template tags (`.tx-city__section`,
   `.tx-city__list`, `.tx-city__photos`) so the same CSS also styles the
   plugin's fallback template. The child template carries no listing
   grid (removed 2026-09-17); the plugin fallback's simple list reuses
   .tx-properties-list from property-card.css.

   Also styles `.tx-city-teaser` -- the "About {City}" block on a
   single listing that links back to the city page.

   Colour rules: charcoal type, gold accents, bone surfaces, plum links
   (body copy only). Every heading stays >= 18px so gold-on-white is
   never used for small text.
   ============================================================= */

/* ---------- Shared column ---------- */
.tx-city__inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Community band (About / Living / lists / gallery) ---------- */
.tx-city__community {
  background: var(--surface-page);
  padding-block: var(--section-y);
  border-top: 1px solid var(--rule-light);
}

.tx-city__section {
  color: var(--text);
  font-family: var(--font-prose);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.tx-city__section h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
  color: var(--charcoal-2);
  margin: 0 0 var(--s-4);
  padding-bottom: var(--s-2);
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

.tx-city__section p {
  margin: 0 0 var(--s-4);
  max-width: 68ch;
}

.tx-city__section a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 3px;
}

.tx-city__section a:hover,
.tx-city__section a:focus-visible {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

/* Prose pair: About + Living here side by side on desktop. */
.tx-city__prose-grid {
  display: grid;
  gap: var(--s-7) var(--s-8);
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .tx-city__prose-grid:has(> :nth-child(2)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Lists pair: schools + events. */
.tx-city__lists-grid {
  display: grid;
  gap: var(--s-6) var(--s-8);
  grid-template-columns: 1fr;
  margin-top: var(--s-8);
}

@media (min-width: 900px) {
  .tx-city__lists-grid:has(> :nth-child(2)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tx-city__section-intro {
  color: var(--text-muted);
  font-size: var(--fs-small);
}

.tx-city__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.tx-city__list-item {
  background: var(--surface-elevated);
  border: 1px solid var(--rule-light);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-sm);
  padding: var(--s-3) var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.tx-city__list-label {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--charcoal-2);
}

.tx-city__list-note {
  font-size: var(--fs-small);
  color: var(--text-muted);
  line-height: 1.5;
}

/* Gallery */
.tx-city__gallery {
  margin-top: var(--s-8);
}

.tx-city__photos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s-4);
}

.tx-city__photo {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.tx-city__photo a {
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-light);
}

.tx-city__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
}

.tx-city__photo-caption,
.tx-city__credit {
  font-size: var(--fs-small);
  color: var(--text-muted);
  line-height: 1.45;
}

.tx-city__credit {
  margin: var(--s-4) 0 0;
}

/* ---------- Other cities chips ---------- */
.tx-city__more {
  background: var(--surface-content);
  padding-block: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--rule-light);
}

.tx-city__more h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  color: var(--charcoal-2);
  margin: 0 0 var(--s-4);
}

.tx-city__chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-3);
}

.tx-city__chip {
  display: inline-block;
  padding: 0.45rem 1rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--rule-soft);
  background: var(--surface-page);
  color: var(--charcoal-2);
  font-family: var(--font-body);
  font-size: var(--fs-nav);
  letter-spacing: var(--tracking-nav);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.tx-city__chip:hover,
.tx-city__chip:focus-visible {
  background: var(--gold-tint);
  border-color: var(--logo-gold);
  color: var(--charcoal-2);
}

.tx-city__chip--all {
  border-color: var(--slate-blue);
  background: var(--slate-blue);
  color: var(--on-charcoal);
}

.tx-city__chip--all:hover,
.tx-city__chip--all:focus-visible {
  background: var(--slate-blue-2);
  color: var(--on-charcoal);
}

/* ---------- CTA band ---------- */
.tx-city__cta {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.tx-city__cta h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  color: var(--text-on-dark);
  margin: 0 0 var(--s-3);
}

.tx-city__cta p {
  max-width: 64ch;
  color: var(--on-charcoal-muted);
  margin: 0 0 var(--s-5);
  line-height: var(--lh-body);
}

.tx-city__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

/* ---------- Cities index (page-cities.php) ---------- */
.tx-cities {
  background: var(--surface-page);
  padding-block: var(--section-y);
}

.tx-cities__intro {
  max-width: 68ch;
  color: var(--text);
  font-family: var(--font-prose);
  line-height: var(--lh-body);
  margin-bottom: var(--s-6);
}

.tx-cities__intro p { margin: 0 0 var(--s-4); }

.tx-cities__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-5);
}

.tx-city-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-elevated);
  border: 1px solid var(--rule-light);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

@media (prefers-reduced-motion: no-preference) {
  .tx-city-card:hover,
  .tx-city-card:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(20, 22, 26, 0.10);
  }
}

.tx-city-card__media {
  aspect-ratio: 16 / 9;
  background: var(--slate-blue);
}

.tx-city-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tx-city-card__body {
  padding: var(--s-4) var(--s-5) var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.tx-city-card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.375rem;
  line-height: var(--lh-tight);
  margin: 0;
}

.tx-city-card__title a {
  color: var(--charcoal-2);
  text-decoration: none;
}

.tx-city-card__title a:hover,
.tx-city-card__title a:focus-visible {
  color: var(--accent-text); /* slate-2: logo gold is 2.31:1 on white, decor only */
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tx-city-card__count {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--text-muted);
  margin: 0;
}

.tx-city-card__excerpt {
  font-family: var(--font-prose);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
}

.tx-city-card__more {
  margin-top: auto;
  padding-top: var(--s-2);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- "About {City}" teaser on a listing ---------- */
.tx-city-teaser {
  margin-top: var(--s-7);
  padding: var(--s-5) var(--s-6);
  background: var(--surface-page);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--font-prose);
  line-height: var(--lh-body);
}

.tx-city-teaser h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  color: var(--charcoal-2);
  margin: 0 0 var(--s-3);
}

.tx-city-teaser p {
  margin: 0 0 var(--s-3);
  max-width: 68ch;
}

.tx-city-teaser__more {
  margin: 0;
}

.tx-city-teaser__more a {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tx-city-teaser__more a:hover,
.tx-city-teaser__more a:focus-visible {
  color: var(--link-hover);
}

/* ---------- Nav: Cities dropdown ----------
   Children are injected at render time (inc/cities.php) under the
   "Cities" menu item; the existing .site-nav dropdown styles apply.
   Only the "All cities" child needs a subtle separator. */
.menu-item--cities-all > a {
  border-top: 1px solid var(--rule-light);
  margin-top: var(--s-1);
  padding-top: calc(var(--s-2) + var(--s-1));
}
