/* Image card — full-bleed photo with overlay text + hover Details CTA */

.vsc-main > .vsc-image-card {
  max-width: min(300px, calc(100% - 2 * var(--vsc-content-pad, 16px)));
  margin: 24px auto;
  width: 100%;
  box-sizing: border-box;
}

.vsc-row__col > .vsc-image-card {
  max-width: 300px;
  width: 100%;
  margin: 0;
  height: 100%;
}

.vsc-image-card {
  display: block;
  width: 100%;
  max-width: 300px;
  border: 1px solid var(--color-border-muted, #ececec);
  border-radius: var(--radius-md, 8px);
  background: var(--color-bg-surface, #fafafa);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 250ms var(--cubic-bezier, cubic-bezier(0.4, 0, 0.2, 1)),
    border-color 250ms var(--cubic-bezier, cubic-bezier(0.4, 0, 0.2, 1));
}

.vsc-image-card--linked {
  cursor: pointer;
}

.vsc-image-card:hover,
.vsc-image-card:focus-visible {
  box-shadow: 0 8px 28px rgba(32, 42, 68, 0.32);
}

.vsc-image-card--linked:focus-visible {
  outline: 2px solid var(--color-brand-primary, #d42c31);
  outline-offset: 2px;
}

.vsc-image-card__media {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  min-height: 298px;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: var(--color-bg-muted, #ececec);
}

.vsc-image-card__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vsc-image-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(32, 42, 68, 0.3) 0%,
    #202a44 71.154%
  );
}

.vsc-image-card__cta {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: calc(100% - 24px);
  padding: var(--spacing-8, 8px);
  border-radius: var(--radius-pill, 999px);
  background: var(--color-brand-primary, #d42c31);
  color: var(--color-text-inverse, #fafafa);
  overflow: hidden;
  transition: gap 200ms var(--cubic-bezier, cubic-bezier(0.4, 0, 0.2, 1)),
    padding 200ms var(--cubic-bezier, cubic-bezier(0.4, 0, 0.2, 1));
}

.vsc-image-card:hover .vsc-image-card__cta,
.vsc-image-card:focus-visible .vsc-image-card__cta {
  gap: 8px;
  padding: var(--spacing-8, 8px) var(--spacing-12, 12px);
}

.vsc-image-card__cta-icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: currentColor;
}

.vsc-image-card__cta-icon svg {
  display: block;
  width: 14px;
  height: 14px;
  stroke-width: 3;
}

.vsc-image-card__cta-label {
  display: inline-block;
  max-width: 0;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-body, system-ui, sans-serif);
  font-weight: 600;
  font-size: 12px;
  line-height: 14px;
  color: inherit;
  opacity: 0;
  transition: max-width 200ms var(--cubic-bezier, cubic-bezier(0.4, 0, 0.2, 1)),
    opacity 200ms var(--cubic-bezier, cubic-bezier(0.4, 0, 0.2, 1));
}

.vsc-image-card:hover .vsc-image-card__cta-label,
.vsc-image-card:focus-visible .vsc-image-card__cta-label {
  max-width: 12em;
  opacity: 1;
}

.vsc-image-card__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
  padding: var(--spacing-16, 16px) var(--spacing-16, 16px) 12px 12px;
  overflow: hidden;
}

.vsc-image-card__title {
  margin: 0;
  font-family: var(--font-display, system-ui, sans-serif);
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
  color: var(--color-brand-primary, #d42c31);
}

.vsc-image-card__text {
  margin: 0;
  font-family: var(--font-body, system-ui, sans-serif);
  font-weight: 400;
  font-size: 13px;
  line-height: 20px;
  color: var(--color-text-inverse, #fafafa);
}

@media (max-width: 768px) {
  .vsc-main > .vsc-image-card {
    max-width: calc(100% - 2 * var(--vsc-content-pad, 16px));
  }

  .vsc-row__col > .vsc-image-card,
  .vsc-image-card {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vsc-image-card,
  .vsc-image-card__cta,
  .vsc-image-card__cta-label {
    transition: none;
  }
}
