/**
 * Current developments hub — cards grid, intro.
 * Expects css/jch-modern.css (design tokens) loaded first.
 */

.jch-current-dev {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.jch-current-dev__intro {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto 2.5rem;
  padding-top: 0.5rem;
}

.jch-current-dev__intro h1 {
  font-family: var(--jch-font, system-ui, sans-serif);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  color: var(--jch-brand, #0c4a6e);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

.jch-current-dev__intro p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--jch-ink-soft, #334155);
  margin: 0;
}

.jch-current-dev__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 1.75rem;
}

/**
 * Past developments hub: wider shell + fixed-width columns so 3–4 cards
 * per row match the same 24rem card size as current developments.
 */
.jch-current-dev--wide-grid {
  max-width: min(100%, 104rem);
}

.jch-current-dev--wide-grid .jch-current-dev__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 24rem);
  justify-content: center;
  align-items: stretch;
  gap: 1.75rem;
}

.jch-current-dev--wide-grid .jch-dev-card {
  width: 100%;
  max-width: none;
  flex: initial;
}

@media (max-width: 28rem) {
  .jch-current-dev--wide-grid .jch-current-dev__grid {
    grid-template-columns: 1fr;
  }

  .jch-current-dev--wide-grid .jch-dev-card {
    width: min(100%, 24rem);
    max-width: 24rem;
    justify-self: center;
  }
}

.jch-current-dev__cta {
  margin: 0 auto 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--jch-border, #e2e8f0);
  border-radius: var(--jch-radius, 10px);
  background: var(--jch-surface, #f8fafc);
  text-align: center;
  max-width: 48rem;
}

.jch-current-dev__cta p {
  margin: 0;
  color: var(--jch-ink-soft, #334155);
  line-height: 1.55;
}

.jch-current-dev__cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem 0.75rem;
  margin-top: 1rem;
}

.jch-current-dev__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  text-decoration: none !important;
  font-size: 0.95rem;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  min-width: 8.5rem;
}

.jch-current-dev__cta-btn--primary {
  background: var(--jch-brand, #0c4a6e);
  color: #fff !important;
  border: 1px solid transparent;
}

.jch-current-dev__cta-btn--primary:hover {
  background: var(--jch-brand-hover, #0369a1);
  color: #fff !important;
}

.jch-current-dev__cta-btn--secondary {
  background: #fff;
  color: var(--jch-brand, #0c4a6e) !important;
  border: 1px solid var(--jch-border, #e2e8f0);
}

.jch-current-dev__cta-btn--secondary:hover {
  border-color: var(--jch-brand-hover, #0369a1);
  color: var(--jch-brand-hover, #0369a1) !important;
}

/* Legacy single CTA link (if used elsewhere) */
.jch-current-dev__cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.85rem;
  padding: 0.65rem 1.05rem;
  border-radius: 8px;
  text-decoration: none !important;
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--jch-brand, #0c4a6e);
  color: #fff !important;
  transition: background 0.15s ease;
}

.jch-current-dev__cta-link:hover {
  background: var(--jch-brand-hover, #0369a1);
  color: #fff !important;
}

.jch-dev-card {
  flex: 0 1 auto;
  width: min(100%, 24rem);
  max-width: 24rem;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--jch-border, #e2e8f0);
  border-radius: var(--jch-radius, 10px);
  overflow: hidden;
  box-shadow: var(--jch-shadow, 0 4px 24px rgba(15, 23, 42, 0.06));
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.jch-dev-card:hover {
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.jch-dev-card__media {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  background: var(--jch-surface-2, #f1f5f9);
  overflow: hidden;
}

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

.jch-dev-card__badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--jch-brand, #0c4a6e);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
}

.jch-dev-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.15rem 1.25rem 1.25rem;
  gap: 0.5rem;
}

.jch-dev-card__title {
  font-family: var(--jch-font, system-ui, sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--jch-ink, #0f172a);
  margin: 0;
  line-height: 1.25;
}

.jch-dev-card__location {
  font-size: 0.9rem;
  color: var(--jch-ink-soft, #64748b);
  margin: 0;
  line-height: 1.45;
}

.jch-dev-card__excerpt {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--jch-ink-soft, #334155);
  margin: 0;
  flex: 1;
}

.jch-dev-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--jch-border, #e2e8f0);
}

.jch-dev-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none !important;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.jch-dev-card__btn--primary {
  background: var(--jch-brand, #0c4a6e);
  color: #fff !important;
}

.jch-dev-card__btn--primary:hover {
  background: var(--jch-brand-hover, #0369a1);
  color: #fff !important;
}

.jch-dev-card__btn--secondary {
  background: transparent;
  color: var(--jch-brand, #0c4a6e) !important;
  border: 1px solid var(--jch-border, #e2e8f0);
}

.jch-dev-card__btn--secondary:hover {
  border-color: var(--jch-brand-hover, #0369a1);
  color: var(--jch-brand-hover, #0369a1) !important;
}

.jch-current-dev__footnote {
  margin-top: 2.5rem;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--jch-ink-soft, #475569);
  background: var(--jch-surface, #f8fafc);
  border: 1px solid var(--jch-border, #e2e8f0);
  border-radius: var(--jch-radius, 10px);
  text-align: center;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.jch-current-dev__footnote a {
  font-weight: 600;
}

@media (max-width: 480px) {
  .jch-dev-card__actions {
    flex-direction: column;
  }

  .jch-dev-card__btn {
    width: 100%;
  }

  .jch-current-dev__cta-actions {
    flex-direction: column;
  }

  .jch-current-dev__cta-btn {
    width: 100%;
    min-width: 0;
  }
}
