/* ============================================================
   KANDOI CERTIFICATIONS — Elementor widget styles
   All values are driven by CSS variables so Elementor
   style controls can override them per widget instance.
   ============================================================ */
.kandoi-certs {
  --kc-brand: #1b4393;
  --kc-teal: #0f8a84;
  --kc-body: #556877;
  --kc-card-bg: #ffffff;
  --kc-logo-bg: #f4f8fb;
  --kc-radius: 14px;
  --kc-logo-size: 96px;
  --kc-gap: 22px;
  --kc-columns: 4;
  --kc-gradient: linear-gradient(135deg, #1b4393 0%, #17658d 45%, #0f8a84 100%);
}

/* --- Sub-heading with divider lines --- */
.kandoi-certs .kc-subhead {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 30px;
}

.kandoi-certs .kc-subhead-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--kc-teal) 40%, var(--kc-teal) 60%, transparent);
  opacity: .7;
}

.kandoi-certs .kc-subhead-title {
  font-weight: 700;
  font-size: 2.44rem;
  color: var(--kc-brand);
  letter-spacing: .03em;
  white-space: nowrap;
  margin: 0;
}

/* --- Intro paragraph --- */
.kandoi-certs .kc-intro {
  color: var(--kc-body);
  font-size: 16px;
  line-height: 1.65;
  max-width: 750px;
  margin: 14px auto 38px;
  text-align: center;
}

/* --- Grid --- */
.kandoi-certs .kc-grid {
  display: grid;
  grid-template-columns: repeat(var(--kc-columns), minmax(0, 1fr));
  gap: var(--kc-gap);
}

/* --- Card --- */
.kandoi-certs .kc-card {
  background: var(--kc-card-bg);
  border: 1px solid color-mix(in srgb, var(--kc-teal) 22%, transparent);
  border-radius: var(--kc-radius);
  padding: 26px 18px 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.kandoi-certs .kc-card:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: var(--kc-gradient);
  opacity: 0;
  transition: opacity .25s ease;
}

.kandoi-certs .kc-card:hover {
  transform: translateY(-4px);
  border-color: var(--kc-teal);
  box-shadow: 0 12px 28px rgba(27, 67, 147, .12);
}

.kandoi-certs .kc-card:hover:before {
  opacity: 1;
}

.kandoi-certs .kc-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* --- Logo --- */
.kandoi-certs .kc-logo {
  width: var(--kc-logo-size);
  height: var(--kc-logo-size);
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--kc-logo-bg);
  border: 1.5px solid color-mix(in srgb, var(--kc-teal) 28%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.kandoi-certs .kc-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.kandoi-certs .kc-logo-fallback {
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: .04em;
  color: var(--kc-brand);
  line-height: 1.2;
}

/* --- Text --- */
.kandoi-certs .kc-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--kc-brand);
  margin: 0 0 6px;
}

.kandoi-certs .kc-desc {
  font-size: .85rem;
  color: var(--kc-body);
  line-height: 1.5;
  margin: 0;
}

/* --- Responsive fallbacks (only when columns are not set per device) --- */
@media (max-width: 1024px) {
  .kandoi-certs .kc-subhead-title {
    font-size: 1.6rem;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 767px) {
  .kandoi-certs .kc-subhead-line {
    display: none;
  }

  .kandoi-certs .kc-subhead {
    justify-content: center;
  }

  .kandoi-certs .kc-subhead-title {
    font-size: 1.3rem;
  }
}
