/* Client types — expanding cards (vanilla port of ExpandingCards) */
.section--client-types {
  background: #ffffff;
  color: var(--azul-midnight-ink);
  padding-top: clamp(72px, 10vw, 120px);
  padding-bottom: clamp(72px, 10vw, 120px);
}

.client-types__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.client-types__title {
  margin: 0 0 clamp(28px, 4vw, 44px);
  font-family: Montserrat, system-ui, sans-serif;
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--azul-midnight-ink);
  text-align: left;
}

.expanding-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  width: 100%;
  height: 520px;
  gap: 10px;
  grid-template-rows: 1fr;
  transition: grid-template-columns 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    grid-template-rows 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.expanding-cards__item {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #0a121a;
  box-shadow: 0 10px 28px rgba(14, 26, 36, 0.12);
  cursor: pointer;
  outline: none;
}

.expanding-cards__item:focus-visible {
  box-shadow: 0 0 0 3px rgba(48, 199, 232, 0.55), 0 10px 28px rgba(14, 26, 36, 0.12);
}

.expanding-cards__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  filter: grayscale(1);
  transition: transform 0.45s ease, filter 0.45s ease;
}

.expanding-cards__item.is-active .expanding-cards__media {
  transform: scale(1);
  filter: grayscale(0);
}

.expanding-cards__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 18, 26, 0.15) 0%,
    rgba(10, 18, 26, 0.45) 42%,
    rgba(10, 18, 26, 0.94) 100%
  );
  pointer-events: none;
}

.expanding-cards__body {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 22px;
  color: #fff;
}

/* Collapsed desktop label — vertical */
.expanding-cards__spine {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  transform: translate(-50%, -50%) rotate(-90deg);
  white-space: nowrap;
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  opacity: 1;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.expanding-cards__item.is-active .expanding-cards__spine {
  opacity: 0;
}

.expanding-cards__title {
  margin: 0;
  font-family: Montserrat, system-ui, sans-serif;
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #d9eaf4;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease 0.08s, transform 0.3s ease 0.08s;
}

.expanding-cards__copy {
  margin: 0;
  max-width: 28rem;
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease 0.14s, transform 0.3s ease 0.14s;
}

.expanding-cards__pill {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 4px;
  padding: 0.45em 1.1em;
  border-radius: 999px;
  background: var(--azul-signal-blue);
  color: #fff;
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease 0.2s, transform 0.3s ease 0.2s;
}

.expanding-cards__item.is-active .expanding-cards__title,
.expanding-cards__item.is-active .expanding-cards__copy,
.expanding-cards__item.is-active .expanding-cards__pill {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 767px) {
  .expanding-cards {
    height: 640px;
    grid-template-columns: 1fr;
  }

  .expanding-cards__spine {
    display: none;
  }

  /* On mobile collapsed cards still show a short label */
  .expanding-cards__item:not(.is-active) .expanding-cards__title {
    opacity: 1;
    transform: none;
    font-size: 13px;
  }

  .expanding-cards__item:not(.is-active) .expanding-cards__copy,
  .expanding-cards__item:not(.is-active) .expanding-cards__pill {
    display: none;
  }

  .expanding-cards__body {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .expanding-cards,
  .expanding-cards__media,
  .expanding-cards__spine,
  .expanding-cards__title,
  .expanding-cards__copy,
  .expanding-cards__pill {
    transition: none;
  }
}
