/* Case studies (single-case_study.php). Tokens only (assets/exa/css/tokens.css). */

/* Hero: reuses .about-banner; the image sits on the pale exa surface */
.cs-hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.cs-hero-image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  border-radius: var(--exa-radius-sm);
}

.cs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--exa-space-8) var(--exa-space-24);
  margin-top: var(--exa-space-24);
}

.cs-meta-label {
  margin-right: var(--exa-space-4);
  color: var(--exa-color-text-tertiary);
}

.cs-meta a {
  color: var(--exa-color-brand);
  text-decoration: none;
}

.cs-meta a:hover {
  text-decoration: underline;
}

/* Details panel: white cards on the pale surface */
.cs-body {
  padding-top: 0;
}

.cs-surface {
  padding: var(--exa-space-20);
}

.cs-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--exa-space-24);
}

.cs-block,
.cs-figure,
.cs-gallery,
.cs-tech-head,
.cs-tech {
  min-width: 0;
}

.cs-block--wide,
.cs-figure,
.cs-gallery,
.cs-tech-head,
.cs-tech {
  grid-column: 1 / -1;
}

.cs-block {
  padding: var(--exa-space-24);
  border-radius: var(--exa-radius-card);
  background: var(--exa-color-surface);
}

.cs-block-title {
  display: flex;
  align-items: center;
  gap: var(--exa-space-12);
  margin-bottom: var(--exa-space-16);
  font-family: var(--exa-font-heading);
  font-size: var(--exa-text-title-size);
  line-height: var(--exa-text-title-line-height);
  letter-spacing: var(--exa-text-title-tracking);
  font-weight: var(--exa-font-weight-bold);
  color: var(--exa-color-text-primary);
}

.cs-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex: none;
}

.cs-text {
  font-family: var(--exa-font-body);
  font-size: var(--exa-text-body-size);
  line-height: 1.7;
  color: var(--exa-color-text-secondary);
}

.cs-text > * + *,
.cs-text + .cs-text {
  margin-top: var(--exa-space-12);
}

.cs-text ul {
  padding-left: 1.25em;
  list-style: disc;
}

.cs-text li + li {
  margin-top: var(--exa-space-8);
}

/* Screenshots keep their natural size, capped by the column and a max height */
.cs-figure {
  display: flex;
  justify-content: center;
  margin: 0;
}

.cs-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 640px;
  object-fit: contain;
  border-radius: var(--exa-radius-card);
}

.cs-gallery {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: var(--exa-space-24);
}

/* Technologies */
.cs-tech-head {
  margin-top: var(--exa-space-24);
  text-align: center;
}

.cs-tech {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--exa-space-16);
  padding: 0;
  list-style: none;
}

.cs-tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--exa-space-8);
  width: 160px;
  min-height: 130px;
  padding: var(--exa-space-16);
  border-radius: var(--exa-radius-card);
  background: var(--exa-color-surface);
  font-family: var(--exa-font-heading);
  font-weight: var(--exa-font-weight-bold);
  color: var(--exa-color-text-primary);
  text-align: center;
}

.cs-tech-item img {
  max-width: 64px;
  max-height: 48px;
  object-fit: contain;
}

/* More case studies */
.cs-more .title {
  text-align: center;
}

@media (min-width: 768px) {
  .cs-surface {
    padding: var(--exa-space-30);
  }

  .cs-block {
    padding: var(--exa-space-30);
  }
}

@media (max-width: 991px) {
  .cs-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .cs-figure img {
    max-height: 480px;
  }

  .cs-tech-item {
    width: calc(50% - 8px);
  }
}
