/* Scope: .amgb-insights */

.amgb-insights {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--amgb-text);
  background: var(--amgb-white);
  overflow-x: clip;
}

/* Hero */
.amgb-insights__hero {
  background: var(--amgb-linen);
  padding: var(--amgb-space-12) 0;
}
.amgb-insights__hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--amgb-space-8);
  align-items: center;
}
@media (min-width: 768px) {
  .amgb-insights__hero-grid { grid-template-columns: 1.4fr 1fr; gap: var(--amgb-space-8); }
}
.amgb-insights__hero-card {
  margin: 0;
  background: var(--amgb-white);
  border: 1px solid var(--amgb-border);
  border-radius: var(--amgb-radius-xl);
  padding: var(--amgb-space-5);
  box-shadow: var(--amgb-shadow-md);
  max-width: 320px;
  justify-self: center;
}
.amgb-insights__hero-card svg { width: 100%; height: auto; display: block; }

/* Topic chips */
.amgb-insights__chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--amgb-space-2);
  justify-content: center;
}
.amgb-insights__chip {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--amgb-radius-full);
  border: 1.5px solid var(--amgb-gold);
  background: transparent;
  color: var(--amgb-gold-deep);
  cursor: pointer;
  min-height: 44px;
  transition: background 200ms ease, color 200ms ease;
}
.amgb-insights__chip:hover { background: var(--amgb-linen); }
.amgb-insights__chip--active,
.amgb-insights__chip[aria-pressed="true"] {
  background: var(--amgb-gold);
  color: var(--amgb-white);
}
.amgb-insights__chip:focus-visible {
  outline: 3px solid rgba(204, 143, 46, 0.4);
  outline-offset: 2px;
}

/* Article cards */
.amgb-insights__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--amgb-space-5);
}
@media (min-width: 640px)  { .amgb-insights__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .amgb-insights__grid { grid-template-columns: repeat(3, 1fr); } }

.amgb-insights__card {
  background: var(--amgb-white);
  border: 1px solid var(--amgb-border);
  border-radius: var(--amgb-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--amgb-shadow-sm);
}
.amgb-insights__card-img {
  border-bottom: 1px solid var(--amgb-border-light);
}
.amgb-insights__card-img svg { width: 100%; height: auto; display: block; }
.amgb-insights__topic {
  display: inline-block;
  margin: var(--amgb-space-4) var(--amgb-space-5) 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amgb-gold-deep);
  font-weight: 600;
}
.amgb-insights__card h3 {
  font-family: 'Roboto Slab', serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  margin: var(--amgb-space-2) var(--amgb-space-5) var(--amgb-space-2);
  color: var(--amgb-text);
}
.amgb-insights__card p {
  margin: 0 var(--amgb-space-5) var(--amgb-space-4);
  font-size: 14px;
  line-height: 1.55;
  color: var(--amgb-text-muted);
}
.amgb-insights__notify {
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--amgb-gold-deep);
  background: var(--amgb-linen);
  border: 0;
  border-top: 1px solid var(--amgb-border);
  padding: var(--amgb-space-4) var(--amgb-space-5);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  min-height: 44px;
  width: 100%;
}
.amgb-insights__notify:hover { background: var(--amgb-paper, #F5EFE2); }
.amgb-insights__notify svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Newsletter */
.amgb-insights__news-card {
  background: var(--amgb-linen);
  border: 1px solid var(--amgb-border);
  border-radius: var(--amgb-radius-xl);
  padding: var(--amgb-space-8);
  box-shadow: var(--amgb-shadow-md);
  text-align: center;
}
.amgb-insights__news-icon {
  width: 48px; height: 48px;
  stroke: var(--amgb-gold-deep);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  margin: 0 auto var(--amgb-space-3);
}
.amgb-insights__news-card .amgb-page__h2,
.amgb-insights__news-card .amgb-page__lede { text-align: center; }
.amgb-insights__news-card .amgb-page__lede { margin-left: auto; margin-right: auto; }

.amgb-insights__news-form {
  display: grid;
  gap: var(--amgb-space-4);
  text-align: left;
  margin-top: var(--amgb-space-5);
}
.amgb-insights__news-row--two {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--amgb-space-4);
}
@media (min-width: 540px) {
  .amgb-insights__news-row--two { grid-template-columns: 1fr 1fr; }
}
.amgb-insights__req {
  color: var(--amgb-gold-deep);
  font-weight: 700;
  margin-left: 2px;
}
.amgb-insights__news-consent {
  display: flex;
  gap: var(--amgb-space-3);
  font-size: 14px;
  color: var(--amgb-text-muted);
  line-height: 1.55;
  align-items: flex-start;
}
.amgb-insights__news-consent input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--amgb-gold);
  flex-shrink: 0;
}
.amgb-insights__news-form .amgb-btn-primary {
  justify-self: stretch;
  width: 100%;
}
.amgb-insights__news-note {
  font-size: 13px;
  color: var(--amgb-text-muted);
  font-style: italic;
  margin: 0;
  text-align: center;
}

/* Cross-link block */
.amgb-insights__cross-inner { text-align: center; }
.amgb-insights__cross-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--amgb-space-3);
  margin-top: var(--amgb-space-6);
  text-align: left;
}
@media (min-width: 768px) {
  .amgb-insights__cross-grid { grid-template-columns: repeat(3, 1fr); }
}
.amgb-insights__cross-card {
  display: flex;
  flex-direction: column;
  gap: var(--amgb-space-2);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(214,154,43,0.4);
  border-radius: var(--amgb-radius-lg);
  padding: var(--amgb-space-5);
  text-decoration: none;
  color: var(--amgb-white);
  position: relative;
  transition: background 200ms ease, border-color 200ms ease;
}
.amgb-insights__cross-card:hover {
  background: rgba(214,154,43,0.1);
  border-color: var(--amgb-gold);
}
.amgb-insights__cross-card h3 {
  font-family: 'Roboto Slab', serif;
  font-weight: 600;
  font-size: 17px;
  margin: 0;
  color: var(--amgb-gold);
}
.amgb-insights__cross-card span {
  font-size: 14px;
  color: rgba(255,255,255,0.78);
  line-height: 1.5;
}
.amgb-insights__cross-card svg {
  width: 18px; height: 18px;
  stroke: var(--amgb-gold);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  align-self: flex-end;
  margin-top: auto;
}

@media (prefers-reduced-motion: reduce) {
  .amgb-insights__chip, .amgb-insights__notify, .amgb-insights__cross-card { transition: none; }
}

/* ──────────────────────────────────────────────────────────────────────────
   Insights overview card internals — equal-height + bottom-aligned CTA fix.
   Added 2026-05-29 (operator: "on the insights overview the read me moves
   around"). The live /insights/ grid (PID 448) uses card classes
   .amgb-insights__card-title / __card-excerpt / __card-meta / __card-cta which
   were previously unstyled, so the "Read more" CTA flowed straight after the
   date and sat at a different vertical offset on every card depending on
   title/excerpt length. The grid already stretches cards to equal height per
   row (align-items defaults to stretch on grid); the only missing piece was
   pinning the CTA to the card bottom and giving the body content consistent
   spacing. Scoped strictly to .amgb-insights__card descendants so no other
   card-like component (suburb / home / cross-link cards) is affected.
   ────────────────────────────────────────────────────────────────────────── */

/* Card image placeholder must not collapse / stretch oddly when empty. */
.amgb-insights__card .amgb-insights__card-img {
  flex: 0 0 auto;
}

/* Topic chip eyebrow — first text element, consistent top spacing. */
.amgb-insights__card .amgb-insights__topic {
  display: inline-block;
  margin: var(--amgb-space-4) var(--amgb-space-5) 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amgb-gold-deep);
  font-weight: 600;
}

/* Title — clamp to 3 lines so the body block height is predictable. */
.amgb-insights__card .amgb-insights__card-title {
  font-family: 'Roboto Slab', serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  margin: var(--amgb-space-2) var(--amgb-space-5);
  color: var(--amgb-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.amgb-insights__card .amgb-insights__card-title a {
  color: inherit;
  text-decoration: none;
}
.amgb-insights__card .amgb-insights__card-title a:hover,
.amgb-insights__card .amgb-insights__card-title a:focus-visible {
  color: var(--amgb-gold-deep);
  text-decoration: underline;
}

/* Excerpt — clamp to 3 lines for row-to-row consistency. */
.amgb-insights__card .amgb-insights__card-excerpt {
  margin: 0 var(--amgb-space-5) var(--amgb-space-3);
  font-size: 14px;
  line-height: 1.55;
  color: var(--amgb-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta (date) — sits directly below the excerpt, before the pinned CTA. */
.amgb-insights__card .amgb-insights__card-meta {
  margin: 0 var(--amgb-space-5) var(--amgb-space-4);
  font-size: 13px;
  color: var(--amgb-text-muted);
}
.amgb-insights__card .amgb-insights__card-meta time { font-style: normal; }

/* THE FIX: pin the Read more CTA to the bottom of the card regardless of
   title/excerpt length. margin-top:auto consumes the free space in the flex
   column so every CTA aligns at the same vertical offset within its row. */
.amgb-insights__card .amgb-insights__card-cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: var(--amgb-space-2);
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--amgb-gold-deep);
  background: var(--amgb-linen);
  border-top: 1px solid var(--amgb-border);
  padding: var(--amgb-space-4) var(--amgb-space-5);
  text-decoration: none;
  min-height: 44px;
  transition: background 200ms ease;
}
.amgb-insights__card .amgb-insights__card-cta:hover,
.amgb-insights__card .amgb-insights__card-cta:focus-visible {
  background: var(--amgb-paper, #F5EFE2);
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .amgb-insights__card .amgb-insights__card-cta { transition: none; }
}
