/* Features / Why Us Widget — ColorPrint Elementor Widgets
 * Source: assets/scss/features.scss
 * Compile: npx sass features.scss ../css/features.css --style=compressed
 */

/* ── Root grid ──────────────────────────────────────────────────────────── */
.cp-features {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.cp-features--cols-2 { grid-template-columns: repeat(2, 1fr); }
.cp-features--cols-3 { grid-template-columns: repeat(3, 1fr); }
.cp-features--cols-4 { grid-template-columns: repeat(4, 1fr); }
.cp-features--cols-5 { grid-template-columns: repeat(5, 1fr); }

/* ── Item & Card ────────────────────────────────────────────────────────── */
.cp-features__item { display: flex; }

.cp-features__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  padding: 28px 22px 26px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #D6DEFF;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  cursor: default;
  transition:
    box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

a.cp-features__card { cursor: pointer; }

/* Accent top stripe */
.cp-features__card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: #2E70F4;
  border-radius: 14px 14px 0 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Icon wrapper ───────────────────────────────────────────────────────── */
.cp-features__icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #E9EEFF;
  border: 1.5px solid #B7C6FF;
  margin-bottom: 18px;
  flex-shrink: 0;
  transition:
    background-color 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.cp-features__icon {
  display: inline-flex;
  color: #2E70F4;
  font-size: 26px;
  line-height: 1;
}

.cp-features__icon svg,
.cp-features__icon i {
  width: 26px;
  height: 26px;
  font-size: inherit;
}

.cp-features__img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
}

/* ── Body ───────────────────────────────────────────────────────────────── */
.cp-features__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.cp-features__title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0B1220;
  line-height: 1.4;
  transition: color 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.cp-features__desc {
  display: block;
  font-size: 0.8125rem;
  color: #55657A;
  line-height: 1.65;
}

/* ── Number badge ───────────────────────────────────────────────────────── */
.cp-features__number {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 2rem;
  font-weight: 800;
  color: #E9EEFF;
  line-height: 1;
  letter-spacing: -0.04em;
  pointer-events: none;
  transition: color 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Hover state (card & a) ─────────────────────────────────────────────── */
.cp-features__card:hover {
  box-shadow: 0 8px 32px rgba(46, 112, 244, 0.14);
  border-color: #B7C6FF;
  transform: translateY(-3px);
}

.cp-features__card:hover::before {
  transform: scaleX(1);
}

.cp-features__card:hover .cp-features__icon-wrap {
  background: #2E70F4;
  border-color: #2E70F4;
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(46, 112, 244, 0.28);
}

.cp-features__card:hover .cp-features__icon { color: #fff; }
.cp-features__card:hover .cp-features__img  { filter: brightness(10); }
.cp-features__card:hover .cp-features__title { color: #2E70F4; }
.cp-features__card:hover .cp-features__number { color: #D6DEFF; }

/* ── Style: Bordered ────────────────────────────────────────────────────── */
.cp-features--bordered .cp-features__card {
  border: 1.5px solid #D6DEFF;
  box-shadow: none;
  background: #ffffff;
}

/* ── Style: Flat ────────────────────────────────────────────────────────── */
.cp-features--flat .cp-features__card {
  background: transparent;
  border: none;
  box-shadow: none;
}

.cp-features--flat .cp-features__card:hover {
  background: #F7F9FF;
  border-color: transparent;
  box-shadow: none;
}

/* ── Style: Filled ──────────────────────────────────────────────────────── */
.cp-features--filled .cp-features__card {
  background: #2E70F4;
  border-color: #2E70F4;
  color: #fff;
}

.cp-features--filled .cp-features__card::before {
  background: rgba(255, 255, 255, 0.4);
}

.cp-features--filled .cp-features__icon-wrap {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.cp-features--filled .cp-features__icon  { color: #fff; }
.cp-features--filled .cp-features__title { color: #fff; }
.cp-features--filled .cp-features__desc  { color: rgba(255, 255, 255, 0.8); }
.cp-features--filled .cp-features__number { color: rgba(255, 255, 255, 0.1); }

.cp-features--filled .cp-features__card:hover {
  background: #2F52D7;
  border-color: #2F52D7;
  box-shadow: 0 8px 32px rgba(46, 112, 244, 0.35);
  transform: translateY(-3px);
}

.cp-features--filled .cp-features__card:hover .cp-features__icon-wrap {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.08);
  box-shadow: none;
}

.cp-features--filled .cp-features__card:hover .cp-features__icon  { color: #fff; }
.cp-features--filled .cp-features__card:hover .cp-features__title { color: #fff; }
.cp-features--filled .cp-features__card:hover .cp-features__number { color: rgba(255, 255, 255, 0.15); }

/* ── Icon position: left ────────────────────────────────────────────────── */
.cp-features--icon-left .cp-features__card {
  flex-direction: row;
  align-items: flex-start;
  text-align: left;
  padding: 22px 24px;
  gap: 18px;
}

.cp-features--icon-left .cp-features__icon-wrap {
  margin-bottom: 0;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 12px;
}

.cp-features--icon-left .cp-features__icon { font-size: 22px; }
.cp-features--icon-left .cp-features__icon svg,
.cp-features--icon-left .cp-features__icon i { width: 22px; height: 22px; }
.cp-features--icon-left .cp-features__img { width: 36px; height: 36px; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cp-features--cols-5,
  .cp-features--cols-4 { grid-template-columns: repeat(3, 1fr); }
}

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

  .cp-features__icon-wrap { width: 56px; height: 56px; }
  .cp-features__icon { font-size: 22px; }
  .cp-features__icon svg,
  .cp-features__icon i { width: 22px; height: 22px; }
  .cp-features__title { font-size: 0.875rem; }
  .cp-features__card  { padding: 22px 16px 20px; }
  .cp-features--icon-left .cp-features__card { gap: 14px; }
}

@media (max-width: 500px) {
  .cp-features { grid-template-columns: 1fr 1fr; gap: 12px; }

  .cp-features__card   { padding: 18px 14px 16px; border-radius: 10px; }
  .cp-features__icon-wrap { width: 48px; height: 48px; border-radius: 12px; margin-bottom: 12px; }
  .cp-features__icon   { font-size: 20px; }
  .cp-features__title  { font-size: 0.8125rem; }
  .cp-features__desc   { font-size: 0.75rem; }
  .cp-features__number { font-size: 1.5rem; top: 10px; right: 12px; }
}

@media (max-width: 360px) {
  .cp-features { grid-template-columns: 1fr; }
}
