/**
 * Content With Cards Block Styles
 * Layout only — typography/colors come from canonical classes/tokens.
 */

.contentwithcards {
  position: relative;
  overflow: hidden;
  background: var(--color-card-navy);
  margin: 32px auto;
}

.contentwithcards .container {
  position: relative;
  z-index: 2;
}

/* Far-right background image (navy-tinted, diagonal left edge) */
.contentwithcards-bg {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 8%;
  background-color: #418FDE;
  clip-path: polygon(48px 0, 100% 0, 100% 100%, 0 100%);
  z-index: 0;
  pointer-events: none;
}

.contentwithcards-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--bg-img);
  background-size: cover;
  background-position: center;
  opacity: 0.2;
}

/* Slanted orange accent on the far right (above the bg, below content) */
.contentwithcards-accent {
  position: absolute;
  top: 50%;
  bottom: 0;
  right: 7%;
  width: 14px;
  background: var(--color-brand-orange);
  transform: skewX(-10deg);
  transform-origin: center;
  border-top-left-radius: 6px;
  z-index: 1;
  pointer-events: none;
}

.contentwithcards-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: var(--space-16);
  margin-right: 40px;
}

.contentwithcards--flip .contentwithcards-content {
  order: 2;
}
.contentwithcards--flip .contentwithcards-cards {
  order: 1;
}

.contentwithcards-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 600px;
}

.contentwithcards-heading {
  font-size: 24px;
}

/* WYSIWYG body wraps text in <p>; keep the light colour + reset margins */
.contentwithcards-body p {
  margin: 0;
  color: inherit;
}

.contentwithcards-body a {
  color: #ffffff;
  text-decoration: underline;
}

/* Cards row */
.contentwithcards-cards {
  display: flex;
  gap: var(--space-5);
  justify-content: flex-end;
}

.contentwithcards-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--color-card);
  border-radius: var(--radius-md);
  max-width: 270px;
}

.contentwithcards-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(105deg, #003087 22%, #418fde 100%);
  margin-bottom: 25px;
}

@media (max-width: 601px) {
  .contentwithcards-card-icon {
    margin-bottom: 15px;
  }
}

.contentwithcards-card-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.contentwithcards-card-title {
  color: var(--color-navy);
}

.contentwithcards-card-desc {
  color: var(--color-navy);
}

@media (max-width: 900px) {
  .contentwithcards-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .contentwithcards--flip .contentwithcards-content,
  .contentwithcards--flip .contentwithcards-cards {
    order: 0;
  }

  .contentwithcards-bg {
    display: none;
  }

  .contentwithcards-cards {
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .contentwithcards-cards {
    flex-direction: column;
    justify-content: center;
  }

  .contentwithcards-accent {
    display: none;
  }
}
