/* Structural baseline for hs/grid-cards. Visual styling lives in theme. */

.hs-grid-cards {
  display: flex !important;
  flex-wrap: wrap;
  gap: 24px;
  margin: 1.5rem 0;
  position: relative;
}

.hs-grid-cards__box {
  min-width: 220px;
}

.hs-grid-cards--auto {
  display: grid !important;
  gap: 24px;
}

.hs-grid-cards--auto.auto-cols-1 {
  grid-template-columns: 1fr;
  margin-inline: auto;
  max-width: 650px;
}

.hs-grid-cards--auto.auto-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.hs-grid-cards--auto.auto-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.hs-grid-cards--auto.auto-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
  .hs-grid-cards--auto.auto-cols-3,
  .hs-grid-cards--auto.auto-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hs-grid-cards--auto {
    grid-template-columns: 1fr !important;
  }
}

.hs-grid-cards--xsmall .hs-grid-cards__box {
  flex: 1 1 180px;
  min-width: 180px;
}

.hs-grid-cards--small .hs-grid-cards__box {
  flex: 1 1 220px;
  min-width: 220px;
}

.hs-grid-cards--medium .hs-grid-cards__box {
  flex: 1 1 240px;
  min-width: 240px;
}

.hs-grid-cards--large .hs-grid-cards__box {
  flex: 1 1 340px;
  min-width: 340px;
}

.hs-grid-cards--xlarge .hs-grid-cards__box {
  flex: 1 1 500px;
  min-width: 500px;
}

.hs-grid-cards--full .hs-grid-cards__box {
  flex: 1 1 100%;
  min-width: 100%;
}

.hs-grid-cards.fixed-size.hs-grid-cards--xsmall .hs-grid-cards__box {
  flex: 0 0 180px;
}

.hs-grid-cards.fixed-size.hs-grid-cards--small .hs-grid-cards__box {
  flex: 0 0 220px;
}

.hs-grid-cards.fixed-size.hs-grid-cards--medium .hs-grid-cards__box {
  flex: 0 0 240px;
}

.hs-grid-cards.fixed-size.hs-grid-cards--large .hs-grid-cards__box {
  flex: 0 0 340px;
}

.hs-grid-cards.fixed-size.hs-grid-cards--xlarge .hs-grid-cards__box {
  flex: 0 0 500px;
}

.hs-grid-cards.fixed-size.hs-grid-cards--full .hs-grid-cards__box {
  flex: 1 1 100%;
}

.hs-grid-cards__img {
  display: block;
  height: auto;
  margin: -20px -20px 1rem;
  width: calc(100% + 40px);
}

.hs-grid-cards__title {
  margin: 0 0 0.5rem;
}

.hs-grid-cards__content {
  display: flex;
  flex-direction: column;
}

.hs-grid-cards__inner-content {
  flex: 1;
}

.hs-grid-cards__inner-content p {
  margin: 0.4em 0;
}

.hs-grid-cards__inner-content > :first-child {
  margin-top: 0;
}

.hs-grid-cards__inner-content > :last-child {
  margin-bottom: 0;
}

.hs-grid-cards__inner-content ol,
.hs-grid-cards__inner-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.hs-grid-cards__inner-content li {
  margin: 0.25rem 0;
}

.hs-grid-cards__icon {
  margin-bottom: 1.25rem;
}

.hs-grid-cards.icon-align--center .hs-grid-cards__icon {
  align-self: center;
}

.hs-grid-cards.icon-size--small .hs-grid-cards__icon {
  height: 36px;
  width: 36px;
}

.hs-grid-cards.icon-size--small .hs-grid-cards__icon svg {
  height: 18px;
  width: 18px;
}

.hs-grid-cards.icon-size--large .hs-grid-cards__icon {
  height: 64px;
  width: 64px;
}

.hs-grid-cards.icon-size--large .hs-grid-cards__icon svg {
  height: 32px;
  width: 32px;
}

.hs-grid-cards.icon-size--xlarge .hs-grid-cards__icon {
  height: 80px;
  width: 80px;
}

.hs-grid-cards.icon-size--xlarge .hs-grid-cards__icon svg {
  height: 40px;
  width: 40px;
}

.hs-grid-cards.icon-size--xxlarge .hs-grid-cards__icon {
  height: 96px;
  width: 96px;
}

.hs-grid-cards.icon-size--xxlarge .hs-grid-cards__icon svg {
  height: 48px;
  width: 48px;
}

.hs-grid-cards.icon-size--xxxlarge .hs-grid-cards__icon {
  height: 128px;
  width: 128px;
}

.hs-grid-cards.icon-size--xxxlarge .hs-grid-cards__icon svg {
  height: 64px;
  width: 64px;
}

.hs-grid-cards__box.has-card-link {
  cursor: pointer;
  position: relative;
}

.hs-grid-cards__card-link {
  inset: 0;
  position: absolute;
  text-decoration: none;
  z-index: 0;
}

.hs-grid-cards__box.has-card-link .hs-grid-cards__inner-content a,
.hs-grid-cards__box.has-card-link .hs-grid-cards__inner-content button {
  position: relative;
  z-index: 1;
}
