.stats-grid {
  --sg-gap: 36px;
  --sg-radius: 20px;
  --sg-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  max-width: 1032px !important;
  margin: 0 auto !important;
}
/* Desktop: 3 columns */
.stats-grid .ep-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: var(--sg-gap) !important;
  width: 100% !important;
  align-items: stretch !important;
}
/* Reset native Enfold item grid behavior */
.stats-grid .ep-item, .stats-grid .ep-grid-column, .stats-grid .one-third, .stats-grid .one-full-mobile, .stats-grid .one-full-tablet {
  float: none !important;
  clear: none !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 0 64px 0 !important;
  background: transparent !important;
  box-sizing: border-box !important;
  position: relative !important;
  overflow: visible !important;
  display: flex !important;
  height: 100% !important;
}
/* Card */
.stats-grid .ep-item-inner {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-height: 360px !important;
  height: 100% !important;
  padding: 34px 24px 24px !important;
  background: #FFFFFF !important;
  border-radius: 20px !important;
  box-shadow: var(--sg-shadow) !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  text-align: left !important;
}
/* Bottom gradient line with subtle smile effect */
.stats-grid .ep-item-inner::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 14px;
  border-radius: 0 0 20px 20px;
  z-index: 1;
}
/* Card 1: magenta / purple to deep blue */
.stats-grid .ep-item:nth-child(1) .ep-item-inner::after {
  background: linear-gradient(90deg, #D13DB0 0%, #9B34E6 28%, #3718F1 62%, #1A0B7A 100%);
}
/* Card 2: violet, blue, deep blue-violet */
.stats-grid .ep-item:nth-child(2) .ep-item-inner::after {
  background: linear-gradient(90deg, #8B80FF 0%, #3718F1 34%, #2510A8 68%, #1A0B7A 100%);
}
/* Card 3: orange to magenta, no blue or purple */
.stats-grid .ep-item:nth-child(3) .ep-item-inner::after {
  background: linear-gradient(90deg, #F08A3C 0%, #D95BA8 35%, #C92AAD 68%, #8F0F73 100%);
}
/* Dotted connector line between desktop cards */
.stats-grid .ep-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 42%;
  right: calc(var(--sg-gap) * -1);
  width: var(--sg-gap);
  border-top: 2px dotted #000000;
  transform: translateY(-50%);
  z-index: 0;
}
/* Content wrapper */
.stats-grid .ep-item-contents, .stats-grid .ep-item-content {
  width: 100% !important;
  text-align: left !important;
  background: transparent !important;
  position: static !important;
  overflow: visible !important;
  z-index: 2 !important;
}
/* Big heading / number */
.stats-grid .ep-item-title, .stats-grid .ep-item-title a, .stats-grid h3, .stats-grid h4 {
  color: #000000 !important;
  font-family: "Inter", sans-serif !important;
  font-size: 100px !important;
  font-weight: 300 !important;
  line-height: 0.92 !important;
  letter-spacing: -0.04em !important;
  margin: 0 0 34px 0 !important;
  text-align: left !important;
}
/* Smaller % sign */
.stats-grid .ep-item-title sup, .stats-grid h3 sup, .stats-grid h4 sup {
  font-size: 0.36em !important;
  font-weight: 300 !important;
  line-height: 0 !important;
  vertical-align: super !important;
  position: relative !important;
  top: -0.1em !important;
}
/* Main content */
.stats-grid .ep-item-content, .stats-grid .ep-item-content p, .stats-grid .ep-item-contents p {
  color: #000000 !important;
  font-family: "Lexend Deca", sans-serif !important;
  font-size: 16px !important;
  font-style: normal !important;
  font-weight: 300 !important;
  line-height: 28px !important;
  text-align: left !important;
  margin: 0 !important;
}
/* Subtitle outside card */
.stats-grid .ep-item-subtitle {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: -48px !important;
  width: 100% !important;
  text-align: center !important;
  color: #2F2F31 !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  margin: 0 !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
  z-index: 5 !important;
}
/* Remove extra spacing */
.stats-grid .ep-item-content p:last-child, .stats-grid .ep-item-contents p:last-child {
  margin-bottom: 0 !important;
}
/* Remove unwanted theme hover */
.stats-grid .ep-item:hover, .stats-grid .ep-item-inner:hover, .stats-grid .ep-item-contents:hover, .stats-grid .ep-item a:hover {
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}
/* Keep card white on hover */
.stats-grid .ep-item:hover .ep-item-inner, .stats-grid .ep-item-inner:hover {
  background: #FFFFFF !important;
  box-shadow: var(--sg-shadow) !important;
}
/* =========================
   Tablet: 2 columns
   Last card centered if alone
   ========================= */
@media only screen and (min-width: 768px) and (max-width: 989px) {
  /* Center the last card only when it is alone in the second row */
  .stats-grid {
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  .stats-grid .ep-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 28px !important;
    width: 100% !important;
    align-items: stretch !important;
  }
  .stats-grid .ep-item {
    width: 100% !important;
    padding-bottom: 58px !important;
  }
  .stats-grid .ep-item:last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
    width: calc(50% - 14px) !important;
    justify-self: center !important;
  }
  .stats-grid .ep-item:not(:last-child)::after {
    display: none !important;
  }
  .stats-grid .ep-item-inner {
    width: 100% !important;
    min-height: 300px !important;
    padding: 34px 24px 24px !important;
    border-radius: 20px !important;
  }
  .stats-grid .ep-item-inner::after {
    border-radius: 0 0 20px 20px;
  }
  .stats-grid .ep-item-title, .stats-grid .ep-item-title a, .stats-grid h3, .stats-grid h4 {
    font-family: "Inter", sans-serif !important;
    font-size: 82px !important;
    font-weight: 300 !important;
    margin-bottom: 34px !important;
  }
  .stats-grid .ep-item-title sup, .stats-grid h3 sup, .stats-grid h4 sup {
    font-size: 0.36em !important;
    font-weight: 300 !important;
    top: -0.1em !important;
  }
  .stats-grid .ep-item-content, .stats-grid .ep-item-content p, .stats-grid .ep-item-contents p {
    font-family: "Lexend Deca", sans-serif !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 300 !important;
    line-height: 28px !important;
  }
  .stats-grid .ep-item-subtitle {
    font-size: 14px !important;
    bottom: -42px !important;
  }
}
/* =========================
   Mobile: 1 column
   ========================= */
@media only screen and (max-width: 767px) {
  /* Hide dotted line on mobile */
  /* Reset centered tablet card */
  .stats-grid .ep-grid {
    grid-template-columns: 1fr !important;
    gap: 26px !important;
  }
  .stats-grid .ep-item {
    padding-bottom: 58px !important;
  }
  .stats-grid .ep-item:not(:last-child)::after {
    display: none !important;
  }
  .stats-grid .ep-item:last-child:nth-child(odd) {
    grid-column: auto !important;
    width: 100% !important;
    max-width: none !important;
    justify-self: stretch !important;
  }
  .stats-grid .ep-item-inner {
    min-height: 280px !important;
    padding: 28px 20px 24px !important;
    border-radius: 20px !important;
  }
  .stats-grid .ep-item-inner::after {
    border-radius: 0 0 20px 20px;
  }
  .stats-grid .ep-item-title, .stats-grid .ep-item-title a, .stats-grid h3, .stats-grid h4 {
    font-family: "Inter", sans-serif !important;
    font-size: 64px !important;
    font-weight: 300 !important;
    line-height: 0.95 !important;
    margin-bottom: 34px !important;
  }
  .stats-grid .ep-item-title sup, .stats-grid h3 sup, .stats-grid h4 sup {
    font-size: 0.36em !important;
    font-weight: 300 !important;
    top: -0.1em !important;
  }
  .stats-grid .ep-item-content, .stats-grid .ep-item-content p, .stats-grid .ep-item-contents p {
    font-family: "Lexend Deca", sans-serif !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 300 !important;
    line-height: 28px !important;
  }
  .stats-grid .ep-item-subtitle {
    font-size: 14px !important;
    bottom: -42px !important;
  }
}
/* =========================
   Small mobile
   ========================= */
@media only screen and (max-width: 480px) {
  .stats-grid .ep-item-inner {
    min-height: 260px !important;
    padding: 26px 18px 24px !important;
    border-radius: 20px !important;
  }
  .stats-grid .ep-item-title, .stats-grid .ep-item-title a, .stats-grid h3, .stats-grid h4 {
    font-family: "Inter", sans-serif !important;
    font-size: 56px !important;
    font-weight: 300 !important;
    margin-bottom: 34px !important;
  }
  .stats-grid .ep-item-title sup, .stats-grid h3 sup, .stats-grid h4 sup {
    font-size: 0.36em !important;
    font-weight: 300 !important;
    top: -0.1em !important;
  }
  .stats-grid .ep-item-content, .stats-grid .ep-item-content p, .stats-grid .ep-item-contents p {
    font-family: "Lexend Deca", sans-serif !important;
    font-size: 15px !important;
    font-style: normal !important;
    font-weight: 300 !important;
    line-height: 26px !important;
  }
}
