/******************************************************************

Stylesheet: Block Style
Block: Insight

******************************************************************/
/******************************************************************

Stylesheet: Variables

Here is where we declare all our variables like colors, fonts,
base values, and defaults. We want to make sure this file ONLY
contains variables that way our files don't get all messy.
No one likes a mess.

******************************************************************/
/*********************
WRAPS
*********************/
/*********************
MEDIA QUERIES
*********************/
/*********************
COLORS
*********************/
/*********************
FONT FAMILY
*********************/
/*********************
FONT SIZES
*********************/
/*********************
PADDINGS
*********************/
/*********************
TRANSITIONS
*********************/
.sp-insight {
  display: grid;
  gap: var(--wp--preset--spacing--32);
}

.sp-insight-simple-grid,
.sp-insight--featured {
  display: grid;
  gap: var(--wp--preset--spacing--16);
}

.sp-insight-card {
  display: block;
  border-radius: 0.3em;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--wp--preset--color--white);
  container-type: inline-size;
  container-name: insight-card;
}
.sp-insight-card .sp-insight-card__layout {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
}
.sp-insight-card .sp-insight-card__media {
  width: 100%;
  line-height: 0;
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}
.sp-insight-card .sp-insight-card__media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  transition: all 0.3s ease-in-out;
}
.sp-insight-card .sp-insight-card__body {
  padding: var(--wp--preset--spacing--32);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--wp--preset--spacing--16);
  transition: all 0.3s ease-in-out;
}
.sp-insight-card .sp-insight-card__title,
.sp-insight-card .sp-insight-card__excerpt {
  margin: 0;
}
.sp-insight-card .sp-insight-card__title {
  margin-top: auto;
}
.sp-insight-card .sp-insight-card__excerpt {
  margin-bottom: var(--wp--preset--spacing--32);
}
.sp-insight-card .sp-insight-card__icon {
  margin-top: auto;
  align-self: flex-end;
  justify-self: end;
  color: var(--wp--preset--color--orange);
  width: 2.4em;
  transition: all 0.3s ease-in-out;
}
.sp-insight-card .sp-insight-card__icon img {
  width: 100%;
  display: block;
}
.sp-insight-card:hover .sp-insight-card__media {
  border-radius: 0 !important;
  filter: brightness(0.8);
}
.sp-insight-card:hover .sp-insight-card__media img {
  transform: scale(1.02);
}
.sp-insight-card:hover .sp-insight-card__body {
  background: #94d0ff;
}
.sp-insight-card:hover .sp-insight-card__icon {
  opacity: 0;
}
.sp-insight-card:focus-visible {
  outline: 2px solid var(--wp--preset--color--accon-blue);
  outline-offset: 2px;
}

.sp-insight--featured .sp-insight-card.is-big .sp-insight-card__body {
  background: #94d0ff;
}
@media (min-width: 768px) {
  .sp-insight--featured .sp-insight-card.is-big .sp-insight-card__body {
    padding: var(--wp--preset--spacing--128) var(--wp--preset--spacing--64);
  }
}
.sp-insight--featured .sp-insight-card.is-big .sp-insight-card__body > * {
  max-width: 420px;
}
.sp-insight--featured .sp-insight-card.is-big .sp-insight-card__body .sp-insight-card__title {
  font-weight: 700;
  font-size: var(--wp--preset--font-size--sp-huge);
}
.sp-insight--featured .sp-insight-card.is-big .sp-insight-card__body .sp-insight-card__icon {
  display: none;
}
@media (min-width: 768px) {
  .sp-insight--featured {
    grid-auto-flow: row dense;
  }
}
@media (min-width: 768px) and (max-width: 1239px) {
  .sp-insight--featured {
    grid-template-columns: repeat(3, 1fr);
  }
  .sp-insight--featured .sp-insight-card.is-big {
    grid-column: span 2;
    grid-row: span 2;
    align-self: stretch;
    height: 100%;
  }
  .sp-insight--featured .sp-insight-card.is-big .sp-insight-card__media {
    height: 100%;
  }
  .sp-insight--featured .sp-insight-card.is-big .sp-insight-card__layout {
    grid-template-rows: 1.4fr 0.6fr;
  }
  .sp-insight--featured .sp-insight-card:nth-child(6n+1) {
    grid-column: 1/span 2;
  }
  .sp-insight--featured .sp-insight-card:nth-child(6n+2), .sp-insight--featured .sp-insight-card:nth-child(6n+3) {
    grid-column: 3;
  }
  .sp-insight--featured .sp-insight-card:nth-child(6n+4), .sp-insight--featured .sp-insight-card:nth-child(6n+5) {
    grid-column: 1;
  }
  .sp-insight--featured .sp-insight-card:nth-child(6n) {
    grid-column: 2/span 2;
  }
}
@media (min-width: 1240px) {
  .sp-insight--featured {
    grid-template-columns: 1fr 1fr;
  }
  .sp-insight--featured .sp-insight-card.is-big {
    grid-column: auto;
    grid-row: span 2;
    align-self: stretch;
    height: 100%;
  }
  .sp-insight--featured .sp-insight-card.is-big .sp-insight-card__media {
    height: 100%;
  }
  .sp-insight--featured .sp-insight-card.is-big .sp-insight-card__layout {
    grid-template-rows: 1.2fr 0.8fr;
  }
  .sp-insight--featured .sp-insight-card:nth-child(6n+1), .sp-insight--featured .sp-insight-card:nth-child(6n+4), .sp-insight--featured .sp-insight-card:nth-child(6n+5) {
    grid-column: 1;
  }
  .sp-insight--featured .sp-insight-card:nth-child(6n+2), .sp-insight--featured .sp-insight-card:nth-child(6n+3), .sp-insight--featured .sp-insight-card:nth-child(6n) {
    grid-column: 2;
  }
}

@container insight-card (min-width: 420px) {
  .sp-insight-card:not(.is-big) .sp-insight-card__layout {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
  }
  .sp-insight-card:not(.is-big) .sp-insight-card__media {
    height: 100%;
    border-radius: 0.3em;
    overflow: hidden;
  }
  .sp-insight-card:not(.is-big) .sp-insight-card__body {
    padding: var(--wp--preset--spacing--32);
  }
}
@container insight-card (max-width: 419px) {
  .sp-insight-simple-grid .sp-insight-card__media {
    aspect-ratio: 1/1;
    border-radius: 0.3em;
  }
}
@media (min-width: 768px) {
  .sp-insight-simple-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.sp-insight__more-link {
  display: block;
  margin-top: var(--wp--preset--spacing--64);
  text-align: right;
  padding: 0 0 var(--wp--preset--spacing--16);
  border-bottom: 1px solid var(--wp--preset--color--gray);
}
.sp-insight__more-link a {
  color: inherit;
}
