/**
 * Corporate blog (/blogs/ and /blog/<slug>/).
 *
 * The cards, prose and article furniture come from assets/country-pages.css —
 * the two blog systems are meant to look identical, and duplicating 600 lines
 * to say so would guarantee they drift. This file adds only what the corporate
 * index needs on top: the stream filter chips and the card's type badge.
 */

/* ------------------------------------------------------------- filters -- */

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-bottom: var(--space-24);
}

.blog-filter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-8) var(--space-16);
  border: var(--border-thin) solid var(--color-border-light);
  border-radius: var(--radius-pill, 999px);
  background: var(--color-surface-card);
  color: var(--color-text-secondary);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--motion-fast, 150ms), color var(--motion-fast, 150ms),
    background var(--motion-fast, 150ms);
}

.blog-filter:hover {
  border-color: var(--color-border-medium);
  color: var(--color-text-primary);
}

.blog-filter:focus-visible {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 2px;
}

.blog-filter.is-active {
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  color: var(--color-text-inverse);
}

/* The count rides at a lighter weight so the label stays the thing you read. */
.blog-filter__n {
  font-weight: var(--weight-regular);
  opacity: 0.65;
  font-size: 10px;
}

/* --------------------------------------------------------- card badge -- */

/* Marks which stream a card belongs to, so a case study is recognisable as one
   even when the filter is set to All. Sits on the image rather than in the body
   to keep the card's text block — and therefore its height — unchanged. */
.blog-card__badge {
  position: absolute;
  top: var(--space-12);
  left: var(--space-12);
  padding: 3px var(--space-8);
  border-radius: var(--radius-small, 4px);
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
}

@media (max-width: 680px) {
  .blog-filters {
    gap: var(--space-6);
  }

  .blog-filter {
    padding: var(--space-6) var(--space-12);
    font-size: 10px;
  }
}

/* ---------------------------------------------------------- case studies -- */

/* Case-study articles (.cp-case, see caseStudyFixes.js). Their lists take the
   shared article list rules in country-pages.css. */

/* Section headings in the flat brand blue (client review 27 Oct; the
   gradient stays on display headlines only). */
#main-content .cp-case .cp-prose :is(h2, h3, h4) {
  color: var(--color-brand-primary);
}

/* A small chart keeps its own size rather than stretching soft. */
.cp-prose .cp-figure--natural img {
  width: auto;
  max-width: 100%;
}

/* Photos side by side at one height (flex set inline from each aspect ratio). */
.cp-gallery {
  display: flex;
  gap: var(--space-16);
}

.cp-prose .cp-gallery figure {
  margin: 0;
  min-width: 0;
}

@media (max-width: 560px) {
  .cp-gallery {
    flex-direction: column;
  }

  .cp-gallery figure {
    flex: none !important;
  }
}
