/* 04 Rack Systems — Desktop V6 */

.rsn-systems {
  background: var(--rsn-ice);
  padding: 112px 100px;
}

.rsn-systems__inner {
  width: 100%;
  max-width: var(--rsn-container);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 52px;
}

.rsn-systems__heading {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rsn-systems__eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  line-height: 1.54;
  text-transform: uppercase;
  color: var(--rsn-rack-red);
}

.rsn-systems__title {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.6px;
  color: #171a1f;
}

.rsn-systems__subtitle {
  max-width: 720px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.56;
  color: #5f6872;
}

.rsn-systems__rows {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rsn-systems__row {
  display: flex;
  gap: 24px;
  width: 100%;
}

.rsn-systems__row--large {
  min-height: 620px;
}

.rsn-systems__row--compact {
  min-height: 560px;
}

.rsn-rack-card {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--rsn-white);
  border: 1px solid var(--rsn-border);
  border-radius: var(--rsn-radius-card);
  overflow: hidden;
}

.rsn-rack-card--large {
  height: 620px;
}

.rsn-rack-card--compact {
  height: 560px;
}

.rsn-rack-card__media {
  width: 100%;
  overflow: hidden;
  background: #dce5ee;
}

.rsn-rack-card--large .rsn-rack-card__media {
  height: 330px;
  flex: 0 0 330px;
}

.rsn-rack-card--compact .rsn-rack-card__media {
  height: 260px;
  flex: 0 0 260px;
}

.rsn-rack-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.rsn-rack-card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.rsn-rack-card--large .rsn-rack-card__body {
  height: 290px;
  padding: 32px;
}

.rsn-rack-card--compact .rsn-rack-card__body {
  height: 300px;
  padding: 28px;
}

.rsn-rack-card__copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rsn-rack-card__title {
  font-weight: 600;
  color: #17202b;
  line-height: 1.25;
}

.rsn-rack-card--large .rsn-rack-card__title {
  font-size: 26px;
}

.rsn-rack-card--compact .rsn-rack-card__title {
  font-size: 23px;
}

.rsn-rack-card__summary {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: #657180;
}

.rsn-rack-card__signature {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #7b8794;
}

.rsn-rack-card__spacer {
  flex: 1 1 auto;
  min-height: 12px;
}

.rsn-rack-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  font-size: 14px;
  font-weight: 700;
  color: var(--rsn-corporate-blue);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.rsn-rack-card__cta:hover {
  color: var(--rsn-blue-hover);
  text-decoration: none;
}

.rsn-rack-card__cta-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media (max-width: 1279px) {
  .rsn-systems {
    padding: 80px var(--rsn-gutter);
  }

  .rsn-systems__title {
    font-size: clamp(28px, 3.2vw, 44px);
  }
}

@media (max-width: 1023px) {
  .rsn-systems {
    padding: 52px 16px 56px;
    background: #f4f7fa;
  }

  .rsn-systems__inner {
    gap: 28px;
  }

  .rsn-systems__heading {
    gap: 10px;
  }

  .rsn-systems__eyebrow {
    font-size: 12px;
  }

  .rsn-systems__title {
    font-size: 32px;
    letter-spacing: -0.4px;
  }

  .rsn-systems__subtitle {
    font-size: 15px;
  }

  .rsn-systems__rows {
    gap: 12px;
  }

  .rsn-systems__row {
    flex-direction: column;
    gap: 12px;
    min-height: 0;
  }

  .rsn-systems__row--large {
    min-height: 0;
  }

  .rsn-systems__row--compact {
    min-height: 0;
  }

  /* Prevent flex-shrink collapse (overflow:hidden + flex:1 1 0 → 2px lines) */
  .rsn-systems__row .rsn-rack-card {
    flex: 0 0 auto;
    min-height: 0;
  }

  .rsn-rack-card--large,
  .rsn-rack-card--compact {
    height: auto;
    border-radius: 14px;
  }

  /* Featured first system card */
  .rsn-systems__row--large .rsn-rack-card--large:first-child {
    border-radius: 18px;
  }

  .rsn-systems__row--large .rsn-rack-card--large:first-child .rsn-rack-card__media {
    height: 230px;
    flex: 0 0 230px;
  }

  .rsn-systems__row--large .rsn-rack-card--large:first-child .rsn-rack-card__body {
    height: auto;
    flex: 0 0 auto;
    padding: 20px 20px 18px;
  }

  .rsn-systems__row--large .rsn-rack-card--large:first-child .rsn-rack-card__title {
    font-size: 23px;
  }

  /* Compact horizontal cards: cantilever + three compact */
  .rsn-systems__row--large .rsn-rack-card--large:last-child,
  .rsn-systems__row--compact .rsn-rack-card--compact {
    flex-direction: row;
    flex: 0 0 auto;
    height: 158px;
    min-height: 158px;
    border-radius: 14px;
  }

  .rsn-systems__row--large .rsn-rack-card--large:last-child .rsn-rack-card__media,
  .rsn-systems__row--compact .rsn-rack-card--compact .rsn-rack-card__media {
    width: 118px;
    height: 158px;
    flex: 0 0 118px;
  }

  .rsn-systems__row--large .rsn-rack-card--large:last-child .rsn-rack-card__body,
  .rsn-systems__row--compact .rsn-rack-card--compact .rsn-rack-card__body {
    height: auto;
    padding: 14px 14px 12px;
    justify-content: center;
    gap: 5px;
  }

  .rsn-systems__row--large .rsn-rack-card--large:last-child .rsn-rack-card__summary,
  .rsn-systems__row--compact .rsn-rack-card__signature,
  .rsn-systems__row--large .rsn-rack-card--large:last-child .rsn-rack-card__signature {
    display: none;
  }

  .rsn-systems__row--compact .rsn-rack-card__summary {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
  }

  .rsn-systems__row--large .rsn-rack-card--large:last-child .rsn-rack-card__title,
  .rsn-systems__row--compact .rsn-rack-card__title {
    font-size: 16px;
  }

  .rsn-rack-card__spacer {
    display: none;
  }
}
