/* Module: Icon Card Grid */
.jhg-icon-card-grid {
  overflow-x: clip;
  max-width: 100%;
}

.jhg-icon-card-grid-heading {
  margin: 0 0 2.25rem;
  color: var(--jhg-navy-deep);
  font-weight: 700;
  text-transform: none;
  text-align: center;
  letter-spacing: 0.02em;
}

.jhg-icon-card-grid-wrap {
  --jhg-icon-grid-pad: 1.875rem;
  position: relative;
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding: var(--jhg-icon-grid-pad);
}

.jhg-icon-card-grid-cells {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: minmax(18rem, auto);
  width: 100%;
  --jhg-icon-grid-line: var(--jhg-neutral-400);
  border: 1px solid var(--jhg-icon-grid-line);
  background: var(--jhg-light);
}

.jhg-icon-service-card {
  position: relative;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  text-align: center;
  text-decoration: none;
  color: var(--jhg-navy-deep);
  background: var(--jhg-light);
  border-right: 1px solid var(--jhg-icon-grid-line);
  border-bottom: 1px solid var(--jhg-icon-grid-line);
  transition: background-color 0.25s ease;
}

/* Soft red wash on hover (XD "Our Core Services") */
.jhg-icon-service-card-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(
    40% 40% at 50% 41%,
    rgba(var(--jhg-red-rgb), 0.085) 0%,
    rgba(var(--jhg-red-rgb), 0) 100%
  );
  transition: opacity 0.3s ease;
}

.jhg-icon-service-card:hover .jhg-icon-service-card-glow,
.jhg-icon-service-card:focus-within .jhg-icon-service-card-glow {
  opacity: 1;
}

.jhg-icon-service-card-icon,
.jhg-icon-service-card-title,
.jhg-icon-service-card-desc,
.jhg-icon-service-card-cta,
.jhg-icon-service-card-line {
  position: relative;
  z-index: 1;
}

a.jhg-icon-service-card:hover,
a.jhg-icon-service-card:focus-visible {
  outline: none;
  z-index: 1;
}

.jhg-icon-service-card-title {
  margin: 0;
  max-width: 16rem;
  font-weight: 400;
  color: var(--jhg-navy-deep);
  transition: color 0.25s ease;
}

/* Simple variant: title picks up the red accent on hover */
.jhg-icon-service-card:not(.jhg-icon-service-card-detailed):hover
  .jhg-icon-service-card-title,
.jhg-icon-service-card:not(.jhg-icon-service-card-detailed):focus-within
  .jhg-icon-service-card-title {
  color: var(--jhg-red);
}

/* Inline icon inherits its colour, so the whole glyph turns red on hover */
.jhg-icon-service-card-svg {
  position: relative;
  z-index: 1;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--jhg-navy-deep);
  transition: color 0.25s ease;
}

.jhg-icon-service-card-detailed .jhg-icon-service-card-svg {
  width: 2rem;
  height: 2rem;
}

.jhg-icon-service-card:not(.jhg-icon-service-card-detailed):hover
  .jhg-icon-service-card-svg,
.jhg-icon-service-card:not(.jhg-icon-service-card-detailed):focus-within
  .jhg-icon-service-card-svg {
  color: var(--jhg-red);
}

.jhg-icon-service-card-line {
  display: block;
  width: 2.5rem;
  height: 0;
  border-top: 1.5px solid var(--jhg-red);
}
.jhg-icon-card-grid-detailed .jhg-icon-card-grid-cells {
  grid-auto-rows: minmax(22rem, auto);
}

.jhg-icon-service-card-detailed {
  justify-content: flex-start;
  gap: 0.875rem;
  padding: 2rem 1.5rem 2.25rem;
}

.jhg-icon-card-grid-detailed .jhg-icon-service-card-title {
  max-width: 18rem;
  font-weight: 700;
}

.jhg-icon-service-card-desc {
  margin: 0;
  flex: 1 1 auto;
  color: var(--jhg-muted);
  font-weight: 400;
  max-width: 19rem;
}

.jhg-icon-service-card-cta {
  margin-top: auto;
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
}

.jhg-icon-service-card-btn {
  min-width: 10.5rem;
  min-height: 2.5rem;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 0.375rem;
  background: transparent;
}

.jhg-icon-service-card-btn:hover,
.jhg-icon-service-card-btn:focus-visible {
  background: var(--jhg-red);
  border-color: var(--jhg-red);
  color: var(--jhg-white);
}
.jhg-icon-service-card-icon {
  position: relative;
  width: 6rem;
  height: 6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 0.25rem;
}

.jhg-icon-service-card-detailed .jhg-icon-service-card-icon {
  width: 5rem;
  height: 5rem;
  margin-bottom: 0.5rem;
}

.jhg-icon-service-card-icon-ring {
  position: absolute;
  inset: 0;
  border-radius: 0.75rem;
  border: 1px solid var(--jhg-neutral-500-35);
  opacity: 0.5;
}

.jhg-icon-service-card-icon-bg {
  position: absolute;
  width: 5rem;
  height: 5rem;
  border-radius: 0.625rem;
  background: var(--jhg-white);
  box-shadow: var(--jhg-shadow-icon);
  transition: background-color 0.25s ease;
}

.jhg-icon-service-card-detailed .jhg-icon-service-card-icon-bg {
  width: 4.25rem;
  height: 4.25rem;
}

.jhg-icon-service-card-icon img {
  position: relative;
  z-index: 1;
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
}

.jhg-icon-service-card-detailed .jhg-icon-service-card-icon img {
  width: 2rem;
  height: 2rem;
}
.jhg-icon-card-grid-cells .jhg-icon-service-card {
  border-right: 0;
}

.jhg-icon-card-grid-cells .jhg-icon-service-card:last-child {
  border-bottom: 0;
}

@media (min-width: 768px) {
  .jhg-icon-card-grid-cells {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(24rem, auto);
  }

  .jhg-icon-card-grid-detailed .jhg-icon-card-grid-cells {
    grid-auto-rows: minmax(23rem, auto);
  }

  /* .jhg-icon-card-grid-cells .jhg-icon-service-card {
    border-right: 1px solid var(--jhg-icon-grid-line);
  } */

  .jhg-icon-card-grid-cells .jhg-icon-service-card:nth-child(2n) {
    border-right: 0;
  }

  .jhg-icon-card-grid-cells .jhg-icon-service-card:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (min-width: 992px) {
  .jhg-icon-card-grid-cells {
    grid-template-columns: repeat(3, 1fr);
  }

  /* .jhg-icon-card-grid-cells .jhg-icon-service-card:nth-child(2n) {
    border-right: 1px solid var(--jhg-icon-grid-line);
  } */

  .jhg-icon-card-grid-cells .jhg-icon-service-card:nth-child(3n) {
    border-right: 0;
  }

  .jhg-icon-card-grid-cells .jhg-icon-service-card:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--jhg-icon-grid-line);
  }

  .jhg-icon-card-grid-cells .jhg-icon-service-card:nth-last-child(-n + 3) {
    border-bottom: 0;
  }
}

@media (max-width: 767.98px) {
  .jhg-icon-service-card-detailed {
    min-height: 0;
    padding: 1.75rem 1.25rem 2rem;
  }
}

.jhg-icon-card-grid-cells {
  border: none;
}
.jhg-icon-card-grid-cells .jhg-icon-service-card {
  position: relative;
  box-shadow: none !important;
  border-bottom: none;
  border-left: 1px solid #a3a3a3;
  border-top: 1px solid #a3a3a3;
}
.jhg-icon-card-grid-cells .jhg-icon-service-card:nth-child(3n),
.jhg-icon-card-grid-cells .jhg-icon-service-card:last-child {
  border-right: 1px solid #a3a3a3;
}
.jhg-icon-card-grid-cells .jhg-icon-service-card:nth-last-child(-n + 3) {
  border-left: 1px solid #a3a3a3 !important;
  border-bottom: 1px solid #a3a3a3 !important;
}

/* Red intersection marks, anchored to each card's own corners */
.jhg-icon-card-grid-dot {
  display: none;
  position: absolute;
  width: 19px;
  height: 19px;
  z-index: 3;
  pointer-events: none;
  background: var(--jhg-red);
  border: 4px solid var(--jhg-light);
  box-sizing: border-box;
}

.jhg-icon-card-grid-dot-tl {
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
}

.jhg-icon-card-grid-dot-tr {
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
}

.jhg-icon-card-grid-dot-bl {
  bottom: 0;
  left: 0;
  transform: translate(-50%, 50%);
}

.jhg-icon-card-grid-dot-br {
  bottom: 0;
  right: 0;
  transform: translate(50%, 50%);
}

/* 1-col: every card owns all four corners */
.jhg-icon-card-grid-cells .jhg-icon-card-grid-dot {
  display: block;
}

@media (min-width: 768px) and (max-width: 991.98px) {
  /* 2-col: left marks only on the first column, right marks on every card */
  .jhg-icon-card-grid-cells
    .jhg-icon-service-card:not(:nth-child(2n + 1))
    .jhg-icon-card-grid-dot-tl,
  .jhg-icon-card-grid-cells
    .jhg-icon-service-card:not(:nth-child(2n + 1))
    .jhg-icon-card-grid-dot-bl {
    display: none;
  }
}

@media (min-width: 992px) {
  /* 3-col: left marks only on the first column, right marks on every card */
  .jhg-icon-card-grid-cells
    .jhg-icon-service-card:not(:nth-child(3n + 1))
    .jhg-icon-card-grid-dot-tl,
  .jhg-icon-card-grid-cells
    .jhg-icon-service-card:not(:nth-child(3n + 1))
    .jhg-icon-card-grid-dot-bl {
    display: none;
  }
}

@media (max-width: 991px) {
  .jhg-icon-card-grid-cells .jhg-icon-service-card:nth-child(3n),
  .jhg-icon-card-grid-cells .jhg-icon-service-card:last-child {
    border-right: none;
  }
  .jhg-icon-card-grid-cells .jhg-icon-service-card:nth-last-child(-n + 2),
  .jhg-icon-card-grid-cells .jhg-icon-service-card:nth-child(2n) {
    border-right: 1px solid #a3a3a3 !important;
  }
  .jhg-icon-card-grid-cells .jhg-icon-service-card:nth-last-child(3) {
    border-bottom: 0 !important;
  }
}

@media (max-width: 767px) {
  .jhg-icon-card-grid-cells .jhg-icon-service-card {
    border-left: 1px solid #a3a3a3 !important;
    border-right: 1px solid #a3a3a3 !important;
  }
}